b0c4f9
--- mpich-3.2.1/src/packaging/envmods/mpich.module.in.orig	2017-11-11 03:19:44.000000000 +0100
b0c4f9
+++ mpich-3.2.1/src/packaging/envmods/mpich.module.in	2018-04-04 14:14:16.553160669 +0200
b0c4f9
@@ -3,12 +3,23 @@
b0c4f9
 #  MPICH module for use with 'environment-modules' package:
b0c4f9
 # 
b0c4f9
 
b0c4f9
+# Only allow one mpi module to be loaded at a time
b0c4f9
+conflict mpi
b0c4f9
+
b0c4f9
 # Define prefix so PATH and MANPATH can be updated.
b0c4f9
-setenv        prefix        @prefix@
b0c4f9
-setenv        exec_prefix   @exec_prefix@
b0c4f9
+setenv        MPI_BIN       @LIBDIR@/bin
b0c4f9
+setenv        MPI_SYSCONFIG @sysconfdir@/@MPINAME@-@ARCH@
b0c4f9
+setenv        MPI_FORTRAN_MOD_DIR @fortranmoddir@/@MPINAME@
b0c4f9
+setenv        MPI_INCLUDE   @includedir@
b0c4f9
+setenv        MPI_LIB       @libdir@
b0c4f9
+setenv        MPI_MAN       @mandir@
b0c4f9
+setenv        MPI_PYTHON_SITEARCH	@py2sitearch@/@MPINAME@
b0c4f9
+setenv        MPI_PYTHON2_SITEARCH	@py2sitearch@/@MPINAME@
b0c4f9
+setenv        MPI_PYTHON3_SITEARCH	@py3sitearch@/@MPINAME@
b0c4f9
+setenv        MPI_COMPILER  @MPINAME@-@ARCH@
b0c4f9
+setenv        MPI_SUFFIX    _@MPINAME@
b0c4f9
+setenv        MPI_HOME      @LIBDIR@
b0c4f9
 prepend-path  PATH          @bindir@
b0c4f9
-prepend-path  MANPATH       @mandir@
b0c4f9
-
b0c4f9
-# Undefine prefix and exec_prefix which are too generic environment variables.
b0c4f9
-unsetenv      prefix
b0c4f9
-unsetenv      exec_prefix
b0c4f9
+prepend-path  LD_LIBRARY_PATH @libdir@
b0c4f9
+prepend-path  MANPATH       :@mandir@
b0c4f9
+prepend-path  PKG_CONFIG_PATH @LIBDIR@/lib/pkgconfig