Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doku:mathematica [2021/12/09 20:11] – [Parallel Usage] goldenberg | doku:mathematica [2022/09/20 13:41] (current) – [SLURM] groda | ||
---|---|---|---|
Line 1: | Line 1: | ||
======= Mathematica Batch Jobs ======= | ======= Mathematica Batch Jobs ======= | ||
- | ===== VSC-2 ===== | ||
- | ==== Sun Grid Engine ==== | ||
- | The simplest way is to create a file with your mathematica commands, e.g. ' | ||
- | < | ||
- | # the following option makes sure the job will run in the current directory | ||
- | #$ -cwd | ||
- | # this option makes sure the job has the same environment variables as the submission shell | ||
- | #$ -V | ||
- | MATHDIR=/ | + | === SLURM === |
- | $MATHDIR/ | + | |
- | </ | + | |
- | If we name the above file as math-job.sh and place it in the same directory as math-input.m we can submit it from the same directory with | + | |
- | < | + | |
- | user@l01 $ qsub math-job.sh | + | |
- | </ | + | |
- | + | ||
- | The output will be left in file '' | + | |
- | + | ||
- | You could also incorporate mathematica commands in the job file itself, rather then have them in a separate file: | + | |
+ | In order to be able to use Mathematica, | ||
< | < | ||
- | #$ -cwd | + | [username@l32]$ module load Mathematica |
- | #$ -V | + | [username@l32]$ module list |
- | + | Currently Loaded Modulefiles: | |
- | MATHDIR=/ | + | [...] |
- | + | 18) Mathematica/ | |
- | $MATHDIR/ | + | |
- | 1+1 | + | |
- | 3*3 | + | |
- | END_MATH_COMMANDS | + | |
</ | </ | ||
- | The above notations means that everything between "<< | ||
- | |||
- | |||
- | ===== VSC-3 ===== | ||
- | === SLURM === | ||
- | In order to be able to use Mathematica, | ||
- | < | ||
- | [username@l32]$ module avail # select a Mathematica version | ||
- | [username@l32]$ module load Mathematica/ | ||
- | [username@l32]$ module list # check loaded modules | ||
- | Currently Loaded Modulefiles: | ||
- | 1) Mathematica/ | ||
- | </ | ||
(See also the introduction to the [[https:// | (See also the introduction to the [[https:// | ||
- | |||
Now, Mathematica can be called by | Now, Mathematica can be called by | ||
< | < | ||
Line 113: | Line 78: | ||
[username@l32]$ squeue -u username | [username@l32]$ squeue -u username | ||
</ | </ | ||
+ | |||
+ | ==== remote kernel connection ==== | ||
+ | |||
+ | The setup follows | ||
+ | [[https:// | ||
+ | with the | ||
+ | |||
+ | **Shell command to launch kernel:** | ||
+ | |||
+ | for VSC3+ | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | for VSC4 | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Note that on VSC4, the salloc command [as described on the | ||
+ | cc-mathematik.univie.ac.at web link] does not need the Mathematica | ||
+ | license. Just leave the -L parameter away. |