Avoid trying to load mpi/ directory as a module

Handle old MPI_PYTHON_SITEARCH and MPI_PYTHON3_SITEARCH conditionally for EL7
This commit is contained in:
Orion Poplawski 2018-12-04 20:53:24 -07:00
parent 7c6b162b07
commit a36a1e36f2
3 changed files with 24 additions and 8 deletions

View File

@ -46,12 +46,18 @@ if [ -e /etc/profile.d/modules.sh ]; then
done
export MODULEPATH="$MODULEPATH:$(IFS=:; echo "${_MODULEPATH[*]}")"
for module in $(module -t avail 2>&1 | grep "^mpi/"); do
for module in $(module -t avail 2>&1 | grep "^mpi/."); do
module load $module
mpi_compiler_for_dir[${MPI_HOME}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER}
if [ -n "${MPI_PYTHON2_SITEARCH}" ]; then
mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER}
else
mpi_compiler_for_dir[${MPI_PYTHON_SITEARCH}]=${MPI_COMPILER}
fi
if [ -n "${MPI_PYTHON3_SITEARCH}" ]; then
mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER}
fi
module unload $module
done
fi

12
mpi.req
View File

@ -48,12 +48,18 @@ if [ -e /etc/profile.d/modules.sh ]; then
done
export MODULEPATH="$MODULEPATH:$(IFS=:; echo "${_MODULEPATH[*]}")"
for module in $(module -t avail 2>&1 | grep "^mpi/"); do
for module in $(module -t avail 2>&1 | grep "^mpi/."); do
module load $module
mpi_compiler_for_dir[${MPI_HOME}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER}
if [ -n "${MPI_PYTHON2_SITEARCH}" ]; then
mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER}
else
mpi_compiler_for_dir[${MPI_PYTHON_SITEARCH}]=${MPI_COMPILER}
fi
if [ -n "${MPI_PYTHON3_SITEARCH}" ]; then
mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER}
fi
mpi_lib_for_compiler[${MPI_COMPILER}]=${MPI_LIB}
module unload $module
done

View File

@ -1,6 +1,6 @@
Name: rpm-mpi-hooks
Version: 5
Release: 4%{?dist}
Version: 6
Release: 1%{?dist}
Summary: RPM dependency generator hooks for MPI packages
License: MIT
@ -46,6 +46,10 @@ install -Dpm 0755 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/mpi.req
%changelog
* Tue Dec 4 2018 Orion Poplawski <orion@nwra.com> - 6-1
- Avoid trying to load mpi/ directory as a module
- Handle old MPI_PYTHON_SITEARCH and MPI_PYTHON3_SITEARCH conditionally for EL7
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild