From 1b1f0c5b480fb9485c05b4188885e23cc6a08d51 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 5 Oct 2021 17:21:22 -0400 Subject: [PATCH] import rpm-mpi-hooks-8-2.el8 --- SOURCES/mpi.prov | 23 +++++++---------------- SOURCES/mpi.req | 29 ++++++++--------------------- SPECS/rpm-mpi-hooks.spec | 12 ++++++++++-- 3 files changed, 25 insertions(+), 39 deletions(-) diff --git a/SOURCES/mpi.prov b/SOURCES/mpi.prov index cf489f2..a37dbce 100755 --- a/SOURCES/mpi.prov +++ b/SOURCES/mpi.prov @@ -27,8 +27,7 @@ if [ ! -d "$buildroot" ]; then exit 1 fi -# Remaining arguments are passed to elfdeps -shift +# Arguments are passed to elfdeps elfdepsargs="$@" # Search for all MPI implementations: @@ -46,24 +45,16 @@ 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/." | sed "s/(default)$//"); do module load $module - if [ -z "${MPI_COMPILER}" ]; then - >&2 echo "Invalid module file, no MPI_COMPILER defined" - exit 1 - fi - if [ -z "${MPI_HOME}" ]; then - >&2 echo "Invalid module file, no MPI_HOME defined" - exit 1 - fi mpi_compiler_for_dir[${MPI_HOME}]=${MPI_COMPILER} - if [ ! -z "${MPI_FORTRAN_MOD_DIR}" ]; then - mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER} - fi - if [ ! -z "${MPI_PYTHON2_SITEARCH}" ]; then + mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER} + if [ -n "${MPI_PYTHON2_SITEARCH}" ]; then mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER} + elif [ -n "${MPI_PYTHON_SITEARCH}" ]; then + mpi_compiler_for_dir[${MPI_PYTHON_SITEARCH}]=${MPI_COMPILER} fi - if [ ! -z "${MPI_PYTHON3_SITEARCH}" ]; then + if [ -n "${MPI_PYTHON3_SITEARCH}" ]; then mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER} fi module unload $module diff --git a/SOURCES/mpi.req b/SOURCES/mpi.req index 4eb4080..6055aa5 100755 --- a/SOURCES/mpi.req +++ b/SOURCES/mpi.req @@ -27,8 +27,7 @@ if [ ! -d "$buildroot" ]; then exit 1 fi -# Remaining arguments are passed to elfdeps -shift +# Arguments are passed to elfdeps elfdepsargs="$@" # Search for all MPI implementations: @@ -48,31 +47,19 @@ 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/." | sed "s/(default)$//"); do module load $module - if [ -z "${MPI_COMPILER}" ]; then - >&2 echo "Invalid module file, no MPI_COMPILER defined" - exit 1 - fi - if [ -z "${MPI_HOME}" ]; then - >&2 echo "Invalid module file, no MPI_HOME defined" - exit 1 - fi - if [ -z "${MPI_LIB}" ]; then - >&2 echo "Invalid module file, no MPI_LIB defined" - exit 1 - fi mpi_compiler_for_dir[${MPI_HOME}]=${MPI_COMPILER} - mpi_lib_for_compiler[${MPI_COMPILER}]=${MPI_LIB} - if [ ! -z "${MPI_FORTRAN_MOD_DIR}" ]; then - mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER} - fi - if [ ! -z "${MPI_PYTHON2_SITEARCH}" ]; then + mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER} + if [ -n "${MPI_PYTHON2_SITEARCH}" ]; then mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER} + elif [ -n "${MPI_PYTHON_SITEARCH}" ]; then + mpi_compiler_for_dir[${MPI_PYTHON_SITEARCH}]=${MPI_COMPILER} fi - if [ ! -z "${MPI_PYTHON3_SITEARCH}" ]; then + 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 fi diff --git a/SPECS/rpm-mpi-hooks.spec b/SPECS/rpm-mpi-hooks.spec index efaaea0..ff30ad2 100644 --- a/SPECS/rpm-mpi-hooks.spec +++ b/SPECS/rpm-mpi-hooks.spec @@ -1,6 +1,6 @@ Name: rpm-mpi-hooks -Version: 5 -Release: 4%{?dist} +Version: 8 +Release: 2%{?dist} Summary: RPM dependency generator hooks for MPI packages License: MIT @@ -46,6 +46,14 @@ install -Dpm 0755 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/mpi.req %changelog +* Tue May 18 2021 Honggang Li - 8-2 +- Rebuilt after building tool chain update +- Resolves: rhbz#1924665 + +* Wed Apr 07 2021 Honggang Li - 8-1 +- Sync with latest Fedora repo +- Resolves: rhbz#1924665 + * Thu Sep 13 2018 Jarod Wilson - 5-4 - Make hooks more resilient to missing info - Error out with a useful message when necessary info isn't there