Initial Submission Script
#!/bin/sh
# Submit.slurm
## Name of the job in the squeue output
#SBATCH --job-name SubmitDMTCP
## Deal with output and errors. Separate into 2 files (not the default).
## NOTE: %u=userID, %x=jobName, %N=nodeID, %j=jobID, %A=arrayMain, %a=arraySub
#SBATCH -o /scratch/%u/%x-%N-%j.out # Output file
#SBATCH -e /scratch/%u/%x-%N-%j.err # Error file
#SBATCH --mail-type=BEGIN,END,FAIL # NONE,BEGIN,END,FAIL,REQUEUE,ALL,...
#SBATCH --mail-user=<userID>@gmu.edu # Put your GMU email address here
## Specifying an upper limit on needed resources will improve your scheduling
## priority, but if you exceed these values, your job will be terminated.
## Check your "Job Ended" emails for actual resource usage info.
#SBATCH --mem=1G # Total memory needed for your job (suffixes: K,M,G,T)
#SBATCH --time=0-00:10 # Total time needed for your job: Days-Hours:Minutes
## These options are more useful when running parallel and array jobs
#SBATCH --nodes 1 # Number of nodes (computers) to reserve
#SBATCH --tasks 1 # Number of CPUs to reserve for each run
## Load dmtcp module
module load dmtcp/2.5.2
## Setup the checkpoint directory
export CKDIR=/scratch/$USER/checkpoints
mkdir -p $CKDIR
## Uncomment one of the demos below, and make sure the other is commented.
## Note: The DMTCP --rm option enables support for resource managers like slurm
## DmtcpCppCemo
##SBATCH --cpus-per-task 4 # Number of CPUs to reserve for threads
#export DMTCP_DL_PLUGIN=0 # DMTCP gave an error that suggested setting this.
#module load intel/ps_xe
#dmtcp_launch --ckptdir $CKDIR --rm -i 10 ./DmtcpCppDemo
## DmtcpJavaDemo
export DMTCP_SIGCKPT=10 # To eliminate DMTCP SIGCKPT errors (Java)
dmtcp_launch --ckptdir $CKDIR --rm -i 11 java -cp . DmtcpJavaDemo