#!/bin/bash
#SBATCH --job-name=rmpi_snow_test
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=16
#SBATCH --cpus-per-task=1
#SBATCH --time=102:00
#SBATCH --mail-type=ALL
#SBATCH --mail-user=<your-email-addr>
#SBATCH --account=<your-project>
echo "SLURM_JOB_ID:" $SLURM_JOB_ID
# Modules to Load
module load gcc/12.2.0 openmpi/4.1.4 r-rmpi/0.7-1-ompi
# https://stat.ethz.ch/pipermail/r-sig-hpc/2019-November/002105.html
# This sets the path to where to find the RMPISNO command.
export PATH=$PATH:~/R/x86_64-pc-linux-gnu-library/4.2/snow/
mpirun RMPISNOW CMD BATCH --no-restore --no-save --quiet snow_test.R snow_test_$SLURM_JOB_ID.log |