[mod3 (modulerc)]$ module purge
[mod3 (modulerc)]$ module load pgi/18.4
[mod3 (modulerc)]$ module load openmpi/3.1
[mod3 (modulerc)]$ module load foo/1.1
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) pgi/18.4(default)              3) foo/1.1/pgi/18.4/openmpi/3.1
  2) openmpi/3.1/pgi/18.4
[mod3 (modulerc)]$ foo
foo 1.1 (pgi/18.4, openmpi/3.1)
[mod3 (modulerc)]$ module switch pgi intel/2018
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) intel/2018                     3) foo/1.1/pgi/18.4/openmpi/3.1
  2) openmpi/3.1/pgi/18.4
[mod3 (modulerc)]$ foo
foo 1.1 (pgi/18.4, openmpi/3.1)
[mod3 (modulerc)]$ mpirun
mpirun (openmpi/3.1, pgi/18.4)
[mod3 (modulerc)]$ module purge
[mod3 (modulerc)]$ module load intel/2019
[mod3 (modulerc)]$ module load foo
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) intel/2019(default)           2) foo/intel/2019/intelmpi/2.4
[mod3 (modulerc)]$ foo
foo 2.4 (intel/2019, intelmpi)
[mod3 (modulerc)]$ module load openmpi
[mod3 (modulerc)]$ module list
Currently Loaded Modulefiles:
  1) intel/2019(default)           3) openmpi/intel/2019/4.0
  2) foo/intel/2019/intelmpi/2.4
[mod3 (modulerc)]$ foo
foo 2.4 (intel/2019, intelmpi)
