Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
languagebash
#!/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
languagebash
$ sbatch matr-job.srun