posted Oct 6, 2016, 9:01 PM by SRGICS UPLB
[
updated Oct 16, 2016, 9:00 PM
]
Quick start:
ssh -ouserknownhostsfile=/dev/null <username>@<cluster ip>
wget https://github.com/srg-ics-uplb/peak-two-cloud/raw/master/slurm/slurm_vcluster_config/submit.sh
wget https://github.com/srg-ics-uplb/peak-two-cloud/raw/master/slurm/slurm_vcluster_config/hello.c
mpicc -o hello.exe hello.c
sbatch submit.sh ./hello.exe
cat output.txt
Sample job script (submit.sh):#!/bin/bash
#
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <executable>"
exit
fi
#the name of the job
#SBATCH --job-name=mpijob
#the stdout output of the job
#SBATCH --output=output.txt
#available nodes
#SBATCH --nodes=4
#number of tasks
#SBATCH --ntasks=4
#time limit (D-HH:MM), terminate the job after two minutes
#if not yet done
#SBATCH -t 0-0:02
#the executable
EXEC=$1
#number of nodes to use in the run
NODES=4
#execute
mpiexec -np $NODES -f ../nodes.txt ./$EXEC
The script above describes a job to compile and execute hello.c, an MPI program. The important parameters to change are --job-name, --output, and EXEC. The values of these parameters should describe your program.
|
|