summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2023-08-11 07:29:16 +0200
committerGitHub <noreply@github.com>2023-08-11 07:29:16 +0200
commit633723236ea1ea84e9cfa4356e95d6e0b20a0a29 (patch)
treee2834c4966503aa91c8216786e4070004c01a317
parent381f31e69ef353d8285a3ef4947350fb803aa385 (diff)
downloadspack-633723236ea1ea84e9cfa4356e95d6e0b20a0a29.tar.gz
spack-633723236ea1ea84e9cfa4356e95d6e0b20a0a29.tar.bz2
spack-633723236ea1ea84e9cfa4356e95d6e0b20a0a29.tar.xz
spack-633723236ea1ea84e9cfa4356e95d6e0b20a0a29.zip
mpich: fix building with NVHPC (#39082)
-rw-r--r--var/spack/repos/builtin/packages/mpich/mpich32_411_CFI_configure.patch10
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py13
2 files changed, 23 insertions, 0 deletions
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"),