mpich: fix building with NVHPC (#39082)

This commit is contained in:
Sergey Kosukhin 2023-08-11 07:29:16 +02:00 committed by GitHub
parent 381f31e69e
commit 633723236e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View file

@ -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;
}

View file

@ -202,6 +202,18 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
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 @@ def die_without_fortran(self):
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"),