[mod3 (modulerc)]$ module purge
[mod3 (modulerc)]$ module load pgi/19.4
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) pgi/19.4(default)        2) foo/2.4/pgi/19.4/nompi
[mod3 (modulerc)]$ foo
foo 2.4 (pgi/19.4, nompi)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module load openmpi/3.1
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) pgi/19.4(default)              3) foo/2.4/pgi/19.4/openmpi/3.1
  2) openmpi/3.1/pgi/19.4
[mod3 (modulerc)]$ foo
foo 2.4 (pgi/19.4, openmpi/3.1)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module unload openmpi
[mod3 (modulerc)]$ module switch pgi intel/2019
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) intel/2019(default)           2) foo/2.4/intel/2019/intelmpi
[mod3 (modulerc)]$ foo
foo 2.4 (intel/2019, intelmpi)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module load foo/2.4/intel/2019/nompi
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) intel/2019(default)        2) foo/2.4/intel/2019/nompi
[mod3 (modulerc)]$ foo
foo 2.4 (intel/2019, nompi)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module switch intelmpi mvapich/2.3.1
ModuleCmd_Switch.c(172):ERROR:152: Module 'intelmpi' is currently not loaded
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) intel/2019(default)           2) foo/2.4/intel/2019/intelmpi
[mod3 (modulerc)]$ foo
foo 2.4 (intel/2019, intelmpi)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module switch mvapich openmpi/4.0
ModuleCmd_Switch.c(172):ERROR:152: Module 'mvapich' is currently not loaded
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) intel/2019(default)           2) foo/2.4/intel/2019/intelmpi
[mod3 (modulerc)]$ foo
foo 2.4 (intel/2019, intelmpi)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module unload openmpi
[mod3 (modulerc)]$ module switch intel/2019 gcc/9.1.0
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) gcc/9.1.0(default)        2) foo/2.4/gcc/9.1.0/nompi
[mod3 (modulerc)]$ foo
foo 2.4 (gcc/9.1.0, nompi)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module load mvapich/2.3.1
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) gcc/9.1.0(default)        3) foo/2.4/gcc/9.1.0/nompi
  2) mvapich/2.3.1/gcc/9.1.0
[mod3 (modulerc)]$ foo
foo 2.4 (gcc/9.1.0, nompi)
[mod3 (modulerc)]$ module unload foo
[mod3 (modulerc)]$ module switch mvapich openmpi/4.0
[mod3 (modulerc)]$ module load foo/2.4
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) gcc/9.1.0(default)              3) foo/2.4/gcc/9.1.0/openmpi/4.0
  2) openmpi/4.0/gcc/9.1.0
[mod3 (modulerc)]$ foo
foo 2.4 (gcc/9.1.0, openmpi/4.0)
