QNLP  v1.0
run_script_py_MPI.sh
Go to the documentation of this file.
1 #!/bin/bash
2 #SBATCH -J MPI_Py
3 #SBATCH -N 4
4 #SBATCH -p ProdQ
5 #SBATCH -t 01:00:00
6 #SBATCH -A "ichec001"
7 #no extra settings
8 
9 START_TIME=`date '+%Y-%b-%d_%H.%M.%S'`
10 TIMING_FILE=time_run_EndToEndApp.csv
11 touch ${TIMING_FILE}
12 
13 #################################################
14 ### MPI job configuration for Kay supercomputer
15 ###
16 ### Note: User may need to modify.
17 #################################################
18 
19 NNODES=4
20 NTASKSPERNODE=32
21 NTHREADS=1
22 NPROCS=$(( NTASKSPERNODE*NNODES ))
23 
24 export OMP_NUM_THREADS=${NTHREADS}
25 export AFF_THREAD=${NTHREADS}
26 export KMP_AFFINITY=compact
27 
28 NPROCS_PER_SOCKET=16
29 PLANE_FILL_WIDTH=16
30 
31 #################################################
32 ### Application configuration.
33 ###
34 ### Note: User may need to modify.
35 #################################################
36 
37 PATH_TO_EXECUTABLE=.
38 EXECUTABLE=simple_MPI.py
39 
40 EXECUTABLE_ARGS=""
41 
42 #################################################
43 ### Load relevant module files (gcc 8.2.0 and
44 ### Intel 2019 update 5).
45 #################################################
46 module purge
47 module load gcc/8.2.0 intel/2019u5
48 
49 #################################################
50 ### Set-up MPI environment variables for SHM.
51 #################################################
52 export I_MPI_SHM=skx_avx512
53 
54 #################################################
55 ### Specify MPI parameter tuning model [optional]
56 #################################################
57 export I_MPI_TUNING_BIN=${I_MPI_ROOT}/intel64/etc/tuning_skx_shm-ofi_efa.dat
58 
59 #################################################
60 # Run experiment
61 #################################################
62 start_time=`date +%s`
63 
64 srun --ntasks ${NPROCS} -c 1 --ntasks-per-socket=${NPROCS_PER_SOCKET} --cpu-bind=cores -m plane=${PLANE_FILL_WIDTH} python ${PATH_TO_EXECUTABLE}/${EXECUTABLE} ${EXECUTABLE_ARGS}
65 
66 end_time=`date +%s`
67 runtime=$((end_time-start_time))
68 
69 echo "Execution time: ${runtime}"