From 633723236ea1ea84e9cfa4356e95d6e0b20a0a29 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Fri, 11 Aug 2023 07:29:16 +0200 Subject: mpich: fix building with NVHPC (#39082) --- .../builtin/packages/mpich/mpich32_411_CFI_configure.patch | 10 ++++++++++ var/spack/repos/builtin/packages/mpich/package.py | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mpich/mpich32_411_CFI_configure.patch diff --git a/var/spack/repos/builtin/packages/mpich/mpich32_411_CFI_configure.patch b/var/spack/repos/builtin/packages/mpich/mpich32_411_CFI_configure.patch new file mode 100644 index 0000000000..c0fce33abf --- /dev/null +++ b/var/spack/repos/builtin/packages/mpich/mpich32_411_CFI_configure.patch @@ -0,0 +1,10 @@ +--- a/configure ++++ b/configure +@@ -39449,6 +39449,7 @@ int foo_c(CFI_cdesc_t * a_desc, CFI_cdesc_t * b_desc) + + void test_assumed_rank_async_impl_c(CFI_cdesc_t * a_desc) + { ++ CFI_is_contiguous(a_desc); + return; + } + diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index cf3e27fc22..a68c7292b5 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -202,6 +202,18 @@ spack package at this time.""", patch("mpich34_yaksa_hindexed.patch", when="datatype-engine=yaksa") patch("mpich34_yaksa_hindexed.patch", when="datatype-engine=auto device=ch4") + # Fix false positive result of the configure time check for CFI support + # https://github.com/pmodels/mpich/pull/6537 + # https://github.com/pmodels/mpich/issues/6505 + with when("@3.2.2:4.1.1"): + # Apply the patch from the upstream repo in case we have to run the autoreconf stage: + patch( + "https://github.com/pmodels/mpich/commit/d901a0b731035297dd6598888c49322e2a05a4e0.patch?full_index=1", + sha256="de0de41ec42ac5f259ea02f195eea56fba84d72b0b649a44c947eab6632995ab", + ) + # Apply the changes to the configure script to skip the autoreconf stage if possible: + patch("mpich32_411_CFI_configure.patch") + depends_on("findutils", type="build") depends_on("pkgconfig", type="build") @@ -478,6 +490,7 @@ spack package at this time.""", def configure_args(self): spec = self.spec config_args = [ + "--disable-maintainer-mode", "--disable-silent-rules", "--enable-shared", "--with-pm={0}".format("hydra" if "+hydra" in spec else "no"), -- cgit v1.2.3-60-g2f50