|
| 1 | +#!/bin/bash -l |
| 2 | +#----------------------------------- |
| 3 | +# slurm-latexml.sh |
| 4 | +# |
| 5 | +# David Apostal |
| 6 | +# UND Computational Research Center |
| 7 | +# |
| 8 | +# Submit: |
| 9 | +# sbatch slurm-latexml.sh |
| 10 | +# |
| 11 | +# Check status: |
| 12 | +# squeue | grep [userid] |
| 13 | +# squeue -u [userid] |
| 14 | +# squeue -j [jobid] |
| 15 | +#----------------------------------- |
| 16 | + |
| 17 | +# use |
| 18 | +# git pull origin master |
| 19 | +# to make sure the code is up to date |
| 20 | + |
| 21 | +#SBATCH --job-name=latexml |
| 22 | +#SBATCH --partition=talon |
| 23 | + |
| 24 | +# Sets the maximum time the job can run (hh:mm:ss). |
| 25 | +#SBATCH --time=48:00:00 |
| 26 | + |
| 27 | +# Specifies nodes for the job. |
| 28 | +#SBATCH --nodes=1 |
| 29 | + |
| 30 | +# Sets the output file name. %x = job-name, %j = job-id |
| 31 | +#SBATCH --output=./%x.%j.out.txt |
| 32 | +#SBATCH --error=./%x.%j.err.txt |
| 33 | + |
| 34 | +# Job events (mail-type): begin, end, fail, all. |
| 35 | +###SBATCH --mail-type=fail |
| 36 | +###SBATCH --mail-user=[userid]@und.edu |
| 37 | + |
| 38 | +# load required modules here |
| 39 | +module load singularity |
| 40 | +# print the loaded modules |
| 41 | +#module list |
| 42 | + |
| 43 | +echo "" |
| 44 | +echo "Job started at $(date)" |
| 45 | +echo "" |
| 46 | + |
| 47 | +export LATEXML_KPSEWHICH=/home/timothy.prescott/.tex/texlive/2021/bin/x86_64-linux/kpsewhich |
| 48 | + |
| 49 | +#apexdir="../git/APEXCalculusLT_Source" |
| 50 | +latexmldir="../../.cpan/sources/authors/id/B/BR/BRMILLER/LaTeXML-0.8.5/blib/script/" |
| 51 | +singularitydir="../../latexml" |
| 52 | +printf '\\newcommand{\\thetitle}{Calculus}\n\\printincolor\n\\usethreeDgraphics\n\\renewcommand{\\monthYear}{June 2021}\n' > options.tex |
| 53 | +singularity exec $singularitydir/latexml.sif $latexmldir/latexml --quiet --destination=Calculus.xml --nocomments Calculus |
| 54 | + |
| 55 | +echo "" |
| 56 | +echo "Job intermission at $(date)" |
| 57 | +echo "" |
| 58 | + |
| 59 | +singularity exec $singularitydir/latexml.sif $latexmldir/latexmlpost --split --destination=web/index.html Calculus |
| 60 | + |
| 61 | +echo "" |
| 62 | +echo "Job ended at $(date)" |
| 63 | +echo "" |
0 commit comments