Parallel job submission with SLURM
From ScientificComputing
In shared-memory parallel computing, multiple processors (or "threads") perform tasks independently but share a common global memory. If a processor modified an array in the memory, all other processors can see this update as well
$ module load gcc/6.3.0 $ gcc -o hello_omp -fopenmp hello_omp.c
$ export OMP_NUM_THREADS=8 $ sbatch -n 8 --nodes=1 --wrap="./hello_omp" |
In distributed-memory parallel computing, multiple processors (or "cores") perform tasks independently while each processor possesses its own private memory resource. If a processor modify an array in its memory, this processor has to communicate to other processors so that the others see this update.
$ module load gcc/6.3.0 openmpi/4.0.2 $ mpicc -o mpi_hello_world mpi_hello_world.c
$ module load gcc/6.3.0 openmpi/4.0.2 $ sbatch -n 240 --wrap="mpirun ./mpi_hello_world" |
Examples
Further readings
Helper