mpi-families/impi-devel: define MPI_HOME variable to be consistent
with ohpc-style modulefiles for other MPI stacks
@@ -178,6 +178,12 @@ EOF
prepend-path PATH ${topDir}/${dir}/linux/mpi/intel64/bin_ohpc
EOF
+ # Also define MPI_HOME based on $I_MPI_ROOT
+ IMPI_HOME=`egrep "^setenv\s+I_MPI_ROOT" %{OHPC_MODULEDEPS}/intel/impi/${version} | awk '{print $3}'`
+ if [ -d "$IMPI_HOME/intel64" ];then
+ echo "setenv MPI_HOME $IMPI_HOME/intel64" >> %{OHPC_MODULEDEPS}/intel/impi/${version}
+ fi
+
# Version file
%{__cat} << EOF > %{OHPC_MODULEDEPS}/intel/impi/.version.${version}
#%Module1.0#####################################################################
@@ -224,6 +230,12 @@ EOF
set ModulesVersion "${version}"
EOF
+ # Also define MPI_HOME based on $I_MPI_ROOT
+ IMPI_HOME=`egrep "^setenv\s+I_MPI_ROOT" %{OHPC_MODULEDEPS}/intel/impi/${version} | awk '{print $3}'`
+ if [ -d "$IMPI_HOME/intel64" ];then
+ echo "setenv MPI_HOME $IMPI_HOME/intel64" >> %{OHPC_MODULEDEPS}/gnu/impi/${version}
+ fi
+
# support for additional gnu variants
%{__cp} %{OHPC_MODULEDEPS}/gnu/impi/${version} %{OHPC_MODULEDEPS}/gnu7/impi/${version}
%{__cp} %{OHPC_MODULEDEPS}/gnu/impi/.version.${version} %{OHPC_MODULEDEPS}/gnu7/impi/.version.${version}
