testscript.sh 508 Bytes
Newer Older
1
2
3
#!/bin/bash
#MSUB -l nodes=1:ppn=4
#MSUB -l walltime=00:10:00
Sintal's avatar
Sintal committed
4
#Load required module files
5
#msub -I -V -l nodes=1:ppn=4,pmem=5000mb -l
Sintal's avatar
Sintal committed
6
#walltime=0:02:00:00
Sintal's avatar
Sintal committed
7
workingdir=~/testscript/
8
9
module load compiler/intel/19.0
module load mpi/openmpi/4.0
Sintal's avatar
Sintal committed
10
11
mpicc -o $(workingdir)helloworld $(workingdir)helloworld.c -no-multibyte-chars
mpirun -n 1 $(workingdir)helloworld
12
echo "-------------------"
Sintal's avatar
Sintal committed
13
mpirun -n 2 $(workingdir)helloworld
14
echo "------------------"
Sintal's avatar
Sintal committed
15
mpirun -n 4 $(workingdir)helloworld
16
echo "--------------------"