...
For longer running non-interactive use cases call Mathematica R in batch. Create the file math.
First, create the file demo.r
containing commands for R.
Next, create the file r-job.srun
. In the file, and add the desired slurm declarations, load the module(s), and call to the application.
Code Block | ||
---|---|---|
| ||
#!/bin/bash #SBATCH --account=<pirg-name> #SBATCH --job-name=matr-job #SBATCH --output=matr-job.out #SBATCH --error=matr-job.err module load MathematicaR/4.0.2 mathR -run-save < math-file.m/gpfs/projects/<pirg-name>/<user-name>/demo.r |
Submit the job
Use the sbatch command to submit the job.
Code Block | ||
---|---|---|
| ||
$ sbatch matr-job.srun |