Debian Codegraph @

doc/example/compiler-etc-dependencies/example-sessions/ompi-switch.sh

raw
1 #!/bin/bash
2
3 source "$MOD_GIT_ROOTDIR"/doc/example/compiler-etc-dependencies/example-sessions/common_code.sh
4
5 do_cmd module purge
6 do_cmd module load pgi/19.4
7 do_cmd module load openmpi
8 do_cmd module list
9 do_cmd mpirun
10 do_cmd module switch "$AUTOFLAG" pgi intel/2019
11 do_cmd module list
12 do_cmd mpirun
13 case $TMP_STRATEGY in
14 flavours)
15 #Try switching to intel/2018, which does not support openmpi/4.0
16 case $TMP_MODVERSION in
17 3.*)
18 #Only do it on 3.x, as switch fails on 4.x
19 do_cmd module switch "$AUTOFLAG" intel intel/2018
20 do_cmd module list
21 do_cmd mpirun
22 ;;
23 esac
24 ;;
25 homebrewed|modulepath)
26 #Try switching to intel/2018, which does not support openmpi/4.0
27 case $TMP_MODVERSION in
28 4.*)
29 #Only do it on 4.x, as switch fails on 3.x
30 do_cmd module switch "$AUTOFLAG" intel intel/2018
31 do_cmd module list
32 do_cmd mpirun
33 ;;
34 esac
35 ;;
36 modulerc)
37 #We failed to reload openmpi on switch to intel/2018, no need to
38 #continue
39 ;;
40 esac
41