File: ompi-switch.sh

package info (click to toggle)
modules 5.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,996 kB
  • sloc: exp: 79,667; sh: 6,142; tcl: 5,895; makefile: 1,478; ansic: 474; python: 272; csh: 202; perl: 47; ruby: 44; lisp: 13
file content (41 lines) | stat: -rw-r--r-- 986 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash

source "$MOD_GIT_ROOTDIR"/doc/example/compiler-etc-dependencies/example-sessions/common_code.sh

do_cmd module purge
do_cmd module load pgi/19.4
do_cmd module load openmpi
do_cmd module list
do_cmd mpirun
do_cmd module switch "$AUTOFLAG" pgi intel/2019
do_cmd module list
do_cmd mpirun
case $TMP_STRATEGY in
   flavours)
	#Try switching to intel/2018, which does not support openmpi/4.0
	case $TMP_MODVERSION in
           3.*)
		#Only do it on 3.x, as switch fails on 4.x
		do_cmd module switch "$AUTOFLAG" intel intel/2018
		do_cmd module list
		do_cmd mpirun
		;;
	esac
	;;
   homebrewed|modulepath)
	#Try switching to intel/2018, which does not support openmpi/4.0
	case $TMP_MODVERSION in
           4.*)
		#Only do it on 4.x, as switch fails on 3.x
		do_cmd module switch "$AUTOFLAG" intel intel/2018
		do_cmd module list
		do_cmd mpirun
		;;
	esac
	;;
   modulerc)
        #We failed to reload openmpi on switch to intel/2018, no need to
	#continue
        ;;
esac