From fde1954c137aa50525bd1facc72c06cf38ef06ed Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Mon, 24 Jul 2023 12:56:32 -0700 Subject: [PATCH] mvapich2@2.3.7-1: add torque patch (#39027) --- .../packages/mvapich2/fix-torque.patch | 27 +++++++++++++++++++ .../builtin/packages/mvapich2/package.py | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mvapich2/fix-torque.patch diff --git a/var/spack/repos/builtin/packages/mvapich2/fix-torque.patch b/var/spack/repos/builtin/packages/mvapich2/fix-torque.patch new file mode 100644 index 0000000000..0f12f1931e --- /dev/null +++ b/var/spack/repos/builtin/packages/mvapich2/fix-torque.patch @@ -0,0 +1,27 @@ +diff -ruN spack-src/src/pm/hydra/configure.ac spack-src-patched/src/pm/hydra/configure.ac +--- spack-src/src/pm/hydra/configure.ac 2022-05-16 16:58:22.000000000 +0000 ++++ spack-src-patched/src/pm/hydra/configure.ac 2023-07-20 15:23:21.802299913 +0000 +@@ -306,15 +306,16 @@ + available_launchers="$available_launchers pbs" + PAC_APPEND_FLAG([-ltorque],[WRAPPER_LIBS]) + fi +- PAC_SET_HEADER_LIB_PATH(pbs) + PAC_PUSH_FLAG(LIBS) +- PAC_CHECK_HEADER_LIB(tm.h, pbs, tm_init, have_pbs_launcher=yes, ++ if test "have_pbs_launcher" = "no" ; then ++ PAC_CHECK_HEADER_LIB(tm.h, pbs, tm_init, have_pbs_launcher=yes, + have_pbs_launcher=no) +- PAC_POP_FLAG(LIBS) +- if test "$have_pbs_launcher" = "yes" ; then +- available_launchers="$available_launchers pbs" +- PAC_APPEND_FLAG([-lpbs],[WRAPPER_LIBS]) +- AC_DEFINE(HAVE_PBS_PRO, 1, [Define if PBS Pro support is enabled]) ++ PAC_POP_FLAG(LIBS) ++ if test "$have_pbs_launcher" = "yes" ; then ++ available_launchers="$available_launchers pbs" ++ PAC_APPEND_FLAG([-lpbs],[WRAPPER_LIBS]) ++ AC_DEFINE(HAVE_PBS_PRO, 1, [Define if PBS Pro support is enabled]) ++ fi + fi + available_rmks="$available_rmks pbs" + ;; diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 0bcd81ec9a..6b7181a88d 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -117,6 +117,7 @@ class Mvapich2(AutotoolsPackage): values=auto_or_any_combination_of("lustre", "gpfs", "nfs", "ufs"), ) + depends_on("automake@1.15", type="build") # needed for torque patch depends_on("findutils", type="build") depends_on("bison", type="build") depends_on("pkgconfig", type="build") @@ -139,6 +140,8 @@ class Mvapich2(AutotoolsPackage): conflicts("fabrics=psm2", when="@:2.1") # psm2 support was added at version 2.2 + patch("fix-torque.patch", when="@2.3.7-1") + filter_compiler_wrappers("mpicc", "mpicxx", "mpif77", "mpif90", "mpifort", relative_root="bin") @classmethod