diff --git a/.gitignore b/.gitignore index f3d483d..2dbd305 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /mpich-3.3.2.tar.gz /mpich-3.4.tar.gz /mpich-3.4.1.tar.gz +/mpich-4.0.2.tar.gz diff --git a/0001-Drop-real128.patch b/0001-Drop-real128.patch deleted file mode 100644 index 355bd87..0000000 --- a/0001-Drop-real128.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 8f0c71281b5dccd70a3f1d4204e3cc6bc7201ceb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= - -Date: Wed, 28 Aug 2019 10:57:55 +0000 -Subject: [PATCH] Drop real128 - -https://github.com/pmodels/mpich/issues/4005 ---- - .../fortran/use_mpi_f08/mpi_f08_types.f90 | 24 ------------------- - 1 file changed, 24 deletions(-) - -diff --git a/src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 b/src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 -index f8b0fa811..46bdf6972 100644 ---- a/src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 -+++ b/src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 -@@ -248,10 +248,8 @@ interface MPI_Sizeof - module procedure MPI_Sizeof_xint64 - module procedure MPI_Sizeof_xreal32 - module procedure MPI_Sizeof_xreal64 -- module procedure MPI_Sizeof_xreal128 - module procedure MPI_Sizeof_xcomplex32 - module procedure MPI_Sizeof_xcomplex64 -- module procedure MPI_Sizeof_xcomplex128 - end interface - - private :: MPI_Sizeof_character -@@ -263,10 +261,8 @@ private :: MPI_Sizeof_xint32 - private :: MPI_Sizeof_xint64 - private :: MPI_Sizeof_xreal32 - private :: MPI_Sizeof_xreal64 --private :: MPI_Sizeof_xreal128 - private :: MPI_Sizeof_xcomplex32 - private :: MPI_Sizeof_xcomplex64 --private :: MPI_Sizeof_xcomplex128 - - contains - -@@ -350,16 +346,6 @@ subroutine MPI_Sizeof_xreal64 (x, size, ierror) - ierror = 0 - end subroutine MPI_Sizeof_xreal64 - --subroutine MPI_Sizeof_xreal128 (x, size, ierror) -- use,intrinsic :: iso_fortran_env, only: real128 -- real(real128),dimension(..) :: x -- integer, intent(out) :: size -- integer, optional, intent(out) :: ierror -- -- size = storage_size(x)/8 -- ierror = 0 --end subroutine MPI_Sizeof_xreal128 -- - subroutine MPI_Sizeof_xcomplex32 (x, size, ierror) - use,intrinsic :: iso_fortran_env, only: real32 - complex(real32),dimension(..) :: x -@@ -380,16 +366,6 @@ subroutine MPI_Sizeof_xcomplex64 (x, size, ierror) - ierror = 0 - end subroutine MPI_Sizeof_xcomplex64 - --subroutine MPI_Sizeof_xcomplex128 (x, size, ierror) -- use,intrinsic :: iso_fortran_env, only: real128 -- complex(real128),dimension(..) :: x -- integer, intent(out) :: size -- integer, optional, intent(out) :: ierror -- -- size = storage_size(x)/8 -- ierror = 0 --end subroutine MPI_Sizeof_xcomplex128 -- - subroutine MPI_Status_f2f08(f_status, f08_status, ierror) - integer, intent(in) :: f_status(MPI_STATUS_SIZE) - type(MPI_Status), intent(out) :: f08_status --- -2.21.0 - diff --git a/0001-Revert-Remove-use-of-vasprintf.patch b/0001-Revert-Remove-use-of-vasprintf.patch deleted file mode 100644 index c11f090..0000000 --- a/0001-Revert-Remove-use-of-vasprintf.patch +++ /dev/null @@ -1,268 +0,0 @@ -From 6c286621ff551eed1dca5afaf08aeaa41eabd96d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sat, 30 Jan 2021 13:05:26 +0100 -Subject: [PATCH] Revert "Remove use of vasprintf" - -This reverts commit 1f0713f80303154d07d9221a7398b6fbc5c0fa6d. - -$ valgrind ./modules/json-c/tests/test_json_pointer -==56== Memcheck, a memory error detector -==56== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. -==56== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info -==56== Command: ./modules/json-c/tests/test_json_pointer -==56== -PASSED - GET - LOADED TEST JSON -{ "foo": [ "bar", "baz" ], "": 0, "a\/b": 1, "c%d": 2, "e^f": 3, "g|h": 4, "i\\j": 5, "k\"l": 6, " ": 7, "m~n": 8 } -PASSED - GET - ENTIRE OBJECT WORKED -PASSED - GET - /foo == ['bar', 'baz'] -PASSED - GET - /foo/0 == 'bar' -PASSED - GET - / == 0 -PASSED - GET - /a~1b == 1 -PASSED - GET - /c%d == 2 -PASSED - GET - /e^f == 3 -PASSED - GET - /g|h == 4 -PASSED - GET - /i\j == 5 -PASSED - GET - /k"l == 6 -PASSED - GET - / == 7 -PASSED - GET - /m~0n == 8 -PASSED - GET - LOADED TEST JSON -{ "foo": [ "bar", "baz" ], "": 0, "a\/b": 1, "c%d": 2, "e^f": 3, "g|h": 4, "i\\j": 5, "k\"l": 6, " ": 7, "m~n": 8 } -PASSED - GET - MISSING / -PASSED - GET - NULL INPUTS -==56== Invalid write of size 1 -==56== at 0x48D0F75: _IO_default_xsputn (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x48B954F: __vfprintf_internal (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x48C54F3: __vsprintf_internal (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x110C34: UnknownInlinedFun (stdio2.h:52) -==56== by 0x110C34: json_vasprintf.constprop.0 (vasprintf_compat.h:34) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid write of size 1 -==56== at 0x48C54F9: __vsprintf_internal (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x110C34: UnknownInlinedFun (stdio2.h:52) -==56== by 0x110C34: json_vasprintf.constprop.0 (vasprintf_compat.h:34) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a29 is 2 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid read of size 1 -==56== at 0x483F800: __strchr_sse2 (vg_replace_strmem.c:248) -==56== by 0x10CCDC: json_pointer_get_recursive (json_pointer.c:152) -==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid write of size 1 -==56== at 0x10CCE5: json_pointer_get_recursive (json_pointer.c:154) -==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid read of size 1 -==56== at 0x483FBE4: __strlen_sse2 (vg_replace_strmem.c:461) -==56== by 0x10CB0B: string_replace_all_occurrences_with_char (json_pointer.c:30) -==56== by 0x10CD47: UnknownInlinedFun (json_pointer.c:100) -==56== by 0x10CD47: json_pointer_get_recursive (json_pointer.c:157) -==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid read of size 1 -==56== at 0x4844510: strstr (vg_replace_strmem.c:1642) -==56== by 0x10CB53: string_replace_all_occurrences_with_char (json_pointer.c:33) -==56== by 0x10CD47: UnknownInlinedFun (json_pointer.c:100) -==56== by 0x10CD47: json_pointer_get_recursive (json_pointer.c:157) -==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid read of size 1 -==56== at 0x483FBE4: __strlen_sse2 (vg_replace_strmem.c:461) -==56== by 0x10CB0B: string_replace_all_occurrences_with_char (json_pointer.c:30) -==56== by 0x10CD5B: UnknownInlinedFun (json_pointer.c:101) -==56== by 0x10CD5B: json_pointer_get_recursive (json_pointer.c:157) -==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid read of size 1 -==56== at 0x4844510: strstr (vg_replace_strmem.c:1642) -==56== by 0x10CB53: string_replace_all_occurrences_with_char (json_pointer.c:33) -==56== by 0x10CD5B: UnknownInlinedFun (json_pointer.c:101) -==56== by 0x10CD5B: json_pointer_get_recursive (json_pointer.c:157) -==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -==56== Invalid read of size 1 -==56== at 0x483FBE4: __strlen_sse2 (vg_replace_strmem.c:461) -==56== by 0x10DAD3: lh_char_hash (linkhash.c:480) -==56== by 0x10CDCA: UnknownInlinedFun (linkhash.h:346) -==56== by 0x10CDCA: UnknownInlinedFun (linkhash.c:625) -==56== by 0x10CDCA: UnknownInlinedFun (linkhash.c:630) -==56== by 0x10CDCA: UnknownInlinedFun (json_object.c:547) -==56== by 0x10CDCA: UnknownInlinedFun (json_object.c:535) -==56== by 0x10CDCA: UnknownInlinedFun (json_pointer.c:103) -==56== by 0x10CDCA: json_pointer_get_recursive (json_pointer.c:157) -==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd -==56== at 0x483C805: malloc (vg_replace_malloc.c:307) -==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31) -==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211) -==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199) -==56== by 0x10AAE7: main (test_json_pointer.c:314) -==56== -test_json_pointer: test_json_pointer.c:200: test_wrong_inputs_get: Assertion `errno == EINVAL' failed. -==56== -==56== Process terminating with default action of signal 6 (SIGABRT) -==56== at 0x488A282: raise (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x48738A3: abort (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x4873788: __assert_fail_base.cold (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x4882A05: __assert_fail (in /usr/lib64/libc-2.32.9000.so) -==56== by 0x10B8F8: UnknownInlinedFun (test_json_pointer.c:200) -==56== by 0x10B8F8: main (test_json_pointer.c:314) -==56== -==56== HEAP SUMMARY: -==56== in use at exit: 2,307 bytes in 29 blocks -==56== total heap usage: 130 allocs, 101 frees, 10,302 bytes allocated -==56== -==56== LEAK SUMMARY: -==56== definitely lost: 0 bytes in 0 blocks -==56== indirectly lost: 0 bytes in 0 blocks -==56== possibly lost: 0 bytes in 0 blocks -==56== still reachable: 2,307 bytes in 29 blocks -==56== suppressed: 0 bytes in 0 blocks -==56== Rerun with --leak-check=full to see details of leaked memory -==56== -==56== For lists of detected and suppressed errors, rerun with: -s -==56== ERROR SUMMARY: 10 errors from 9 contexts (suppressed: 0 from 0) -Aborted (core dumped) ---- - configure.ac | 2 +- - json_pointer.c | 4 ++-- - printbuf.c | 2 +- - vasprintf_compat.h | 4 +++- - 4 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 9eb80bcf1c..f61fcccf24 100644 ---- a/modules/json-c/configure.ac -+++ b/modules/json-c/configure.ac -@@ -81,7 +81,7 @@ AS_IF([test "x$ac_cv___thread" != xno], - AC_FUNC_VPRINTF - AC_FUNC_MEMCMP - AC_CHECK_FUNCS([realloc]) --AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf open strncasecmp setlocale) -+AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open strncasecmp setlocale) - AC_CHECK_DECLS([INFINITY], [], [], [[#include ]]) - AC_CHECK_DECLS([nan], [], [], [[#include ]]) - AC_CHECK_DECLS([isnan], [], [], [[#include ]]) -diff --git a/modules/json-c/json_pointer.c b/modules/json-c/json_pointer.c -index 3b43eb2f40..9531c036c8 100644 ---- a/modules/json-c/json_pointer.c -+++ b/modules/json-c/json_pointer.c -@@ -208,7 +208,7 @@ int json_pointer_getf(struct json_object *obj, struct json_object **res, const c - } - - va_start(args, path_fmt); -- rc = json_vasprintf(&path_copy, path_fmt, args); -+ rc = vasprintf(&path_copy, path_fmt, args); - va_end(args); - - if (rc < 0) -@@ -287,7 +287,7 @@ int json_pointer_setf(struct json_object **obj, struct json_object *value, const - - /* pass a working copy to the recursive call */ - va_start(args, path_fmt); -- rc = json_vasprintf(&path_copy, path_fmt, args); -+ rc = vasprintf(&path_copy, path_fmt, args); - va_end(args); - - if (rc < 0) -diff --git a/modules/json-c/printbuf.c b/modules/json-c/printbuf.c -index b326293b01..6c77b5defd 100644 ---- a/modules/json-c/printbuf.c -+++ b/modules/json-c/printbuf.c -@@ -129,7 +129,7 @@ int sprintbuf(struct printbuf *p, const char *msg, ...) - would have been written - this code handles both cases. */ - if(size == -1 || size > 127) { - va_start(ap, msg); -- if((size = json_vasprintf(&t, msg, ap)) < 0) { va_end(ap); return -1; } -+ if((size = vasprintf(&t, msg, ap)) < 0) { va_end(ap); return -1; } - va_end(ap); - printbuf_memappend(p, t, size); - free(t); -diff --git a/modules/json-c/vasprintf_compat.h b/modules/json-c/vasprintf_compat.h -index b57f30f64c..43dbf8939c 100644 ---- a/modules/json-c/vasprintf_compat.h -+++ b/modules/json-c/vasprintf_compat.h -@@ -8,8 +8,9 @@ - - #include "snprintf_compat.h" - -+#if !defined(HAVE_VASPRINTF) - /* CAW: compliant version of vasprintf */ --static int json_vasprintf(char **buf, const char *fmt, va_list ap) -+static int vasprintf(char **buf, const char *fmt, va_list ap) - { - #ifndef WIN32 - static char _T_emptybuffer = '\0'; -@@ -40,5 +41,6 @@ static int json_vasprintf(char **buf, const char *fmt, va_list ap) - - return chars; - } -+#endif /* !HAVE_VASPRINTF */ - - #endif /* __vasprintf_compat_h */ diff --git a/0001-pkgconf-remove-optimization-and-link-flags-from-pkgc.patch b/0001-pkgconf-remove-optimization-and-link-flags-from-pkgc.patch index 1e74985..5a9b7b8 100644 --- a/0001-pkgconf-remove-optimization-and-link-flags-from-pkgc.patch +++ b/0001-pkgconf-remove-optimization-and-link-flags-from-pkgc.patch @@ -1,7 +1,8 @@ -From 395fecb92fb362b3cd1a91cb278d14160c5ded29 Mon Sep 17 00:00:00 2001 +From cb3e5715326c43779b51e1cab1519282c50199c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 8 Feb 2022 10:19:12 +0100 -Subject: [PATCH] pkgconf: remove optimization and link flags from pkgconf file +Subject: [PATCH 1/4] pkgconf: remove optimization and link flags from pkgconf + file Those flags are generally something "private" to a particular build. If we build mpich with -O2, it does not mean that some other program using the library should diff --git a/0002-pkgconf-also-drop-rpath-flags-from-pkgconf-file.patch b/0002-pkgconf-also-drop-rpath-flags-from-pkgconf-file.patch index 7e5b529..af7828c 100644 --- a/0002-pkgconf-also-drop-rpath-flags-from-pkgconf-file.patch +++ b/0002-pkgconf-also-drop-rpath-flags-from-pkgconf-file.patch @@ -1,7 +1,7 @@ -From 3af7825496ad12951d941ddba28361686028534b Mon Sep 17 00:00:00 2001 +From 03b024ee9346babc48a646b6ab98884ebdd49791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 8 Feb 2022 10:45:41 +0100 -Subject: [PATCH] pkgconf: also drop rpath flags from pkgconf file +Subject: [PATCH 2/4] pkgconf: also drop rpath flags from pkgconf file When environment modules are used, libraries are resolved using normal linker search options. The rpath argument here is actually completely diff --git a/fix_wrapper_flags.patch b/0003-Drop-build-flags-e.g.-specs.-and-lto-from-mpi-wrappe.patch similarity index 53% rename from fix_wrapper_flags.patch rename to 0003-Drop-build-flags-e.g.-specs.-and-lto-from-mpi-wrappe.patch index e555d6d..613d7c4 100644 --- a/fix_wrapper_flags.patch +++ b/0003-Drop-build-flags-e.g.-specs.-and-lto-from-mpi-wrappe.patch @@ -1,7 +1,25 @@ -diff -Naur mpich-3.3.2.orig/src/env/mpicc.bash.in mpich-3.3.2/src/env/mpicc.bash.in ---- mpich-3.3.2.orig/src/env/mpicc.bash.in 2020-08-06 00:42:51.089874000 +0000 -+++ mpich-3.3.2/src/env/mpicc.bash.in 2020-08-06 00:49:34.849138000 +0000 -@@ -214,13 +214,13 @@ +From e4f0e86f815d8bd3dbb7cccf660bae6ab7f302dd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 10 Apr 2022 09:35:14 +0200 +Subject: [PATCH 3/4] Drop build flags, e.g. -specs... and -lto from mpi + wrappers (mpicc and mpicxx) + +For discussion see: +https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7TFWEKTDWBYBHEGMIWBVI3AVGORZGNBS/ +--- + src/env/mpicc.bash.in | 8 ++++---- + src/env/mpicc.sh.in | 8 ++++---- + src/env/mpicxx.bash.in | 8 ++++---- + src/env/mpicxx.sh.in | 8 ++++---- + src/env/mpifort.bash.in | 6 +++--- + src/env/mpifort.sh.in | 6 +++--- + 6 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/src/env/mpicc.bash.in b/src/env/mpicc.bash.in +index 56d2dcb242..933ee22bf0 100644 +--- a/src/env/mpicc.bash.in ++++ b/src/env/mpicc.bash.in +@@ -247,13 +247,13 @@ if [ -n "$profConf" ] ; then fi fi @@ -19,10 +37,11 @@ diff -Naur mpich-3.3.2.orig/src/env/mpicc.bash.in mpich-3.3.2/src/env/mpicc.bash fi # ----------------------------------------------------------------------- -diff -Naur mpich-3.3.2.orig/src/env/mpicc.sh.in mpich-3.3.2/src/env/mpicc.sh.in ---- mpich-3.3.2.orig/src/env/mpicc.sh.in 2020-08-06 00:42:51.090874000 +0000 -+++ mpich-3.3.2/src/env/mpicc.sh.in 2020-08-06 00:49:34.849138000 +0000 -@@ -223,13 +223,13 @@ +diff --git a/src/env/mpicc.sh.in b/src/env/mpicc.sh.in +index 654131528e..4ebdc8b6ef 100644 +--- a/src/env/mpicc.sh.in ++++ b/src/env/mpicc.sh.in +@@ -253,13 +253,13 @@ if [ -n "$profConf" ] ; then fi fi @@ -40,10 +59,11 @@ diff -Naur mpich-3.3.2.orig/src/env/mpicc.sh.in mpich-3.3.2/src/env/mpicc.sh.in fi # ----------------------------------------------------------------------- -diff -Naur mpich-3.3.2.orig/src/env/mpicxx.bash.in mpich-3.3.2/src/env/mpicxx.bash.in ---- mpich-3.3.2.orig/src/env/mpicxx.bash.in 2020-08-06 00:42:51.090874000 +0000 -+++ mpich-3.3.2/src/env/mpicxx.bash.in 2020-08-06 00:49:34.849138000 +0000 -@@ -220,13 +220,13 @@ +diff --git a/src/env/mpicxx.bash.in b/src/env/mpicxx.bash.in +index 10d11e3fba..4066bb46f2 100644 +--- a/src/env/mpicxx.bash.in ++++ b/src/env/mpicxx.bash.in +@@ -253,13 +253,13 @@ if [ -n "$profConf" ] ; then fi fi @@ -61,10 +81,11 @@ diff -Naur mpich-3.3.2.orig/src/env/mpicxx.bash.in mpich-3.3.2/src/env/mpicxx.ba fi # A temporary statement to invoke the compiler -diff -Naur mpich-3.3.2.orig/src/env/mpicxx.sh.in mpich-3.3.2/src/env/mpicxx.sh.in ---- mpich-3.3.2.orig/src/env/mpicxx.sh.in 2020-08-06 00:42:51.090874000 +0000 -+++ mpich-3.3.2/src/env/mpicxx.sh.in 2020-08-06 00:49:34.850138000 +0000 -@@ -229,13 +229,13 @@ +diff --git a/src/env/mpicxx.sh.in b/src/env/mpicxx.sh.in +index 1c0078100f..2c090cb06c 100644 +--- a/src/env/mpicxx.sh.in ++++ b/src/env/mpicxx.sh.in +@@ -259,13 +259,13 @@ if [ -n "$profConf" ] ; then fi fi @@ -82,48 +103,11 @@ diff -Naur mpich-3.3.2.orig/src/env/mpicxx.sh.in mpich-3.3.2/src/env/mpicxx.sh.i fi # A temporary statement to invoke the compiler -diff -Naur mpich-3.3.2.orig/src/env/mpif77.bash.in mpich-3.3.2/src/env/mpif77.bash.in ---- mpich-3.3.2.orig/src/env/mpif77.bash.in 2020-08-06 00:42:51.090874000 +0000 -+++ mpich-3.3.2/src/env/mpif77.bash.in 2020-08-06 00:49:34.852138000 +0000 -@@ -272,12 +272,12 @@ - fi - fi - --final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@" --final_ldflags="@MPICH_MPIF77_LDFLAGS@ @WRAPPER_LDFLAGS@" -+final_fflags="@MPICH_MPIF77_FFLAGS@ " -+final_ldflags="@MPICH_MPIF77_LDFLAGS@ " - final_libs="@MPICH_MPIF77_LIBS@" - if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then - final_ldflags="${final_ldflags} @LDFLAGS@" -- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@" -+ final_libs="${final_libs} @LIBS@ " - fi - - # A temporary statement to invoke the compiler -diff -Naur mpich-3.3.2.orig/src/env/mpif77.sh.in mpich-3.3.2/src/env/mpif77.sh.in ---- mpich-3.3.2.orig/src/env/mpif77.sh.in 2020-08-06 00:42:51.090874000 +0000 -+++ mpich-3.3.2/src/env/mpif77.sh.in 2020-08-06 00:49:34.852138000 +0000 -@@ -294,12 +294,12 @@ - fi - fi - --final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@" --final_ldflags="@MPICH_MPIF77_LDFLAGS@ @WRAPPER_LDFLAGS@" -+final_fflags="@MPICH_MPIF77_FFLAGS@ " -+final_ldflags="@MPICH_MPIF77_LDFLAGS@ " - final_libs="@MPICH_MPIF77_LIBS@" - if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then - final_ldflags="${final_ldflags} @LDFLAGS@" -- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@" -+ final_libs="${final_libs} @LIBS@ " - fi - - # A temporary statement to invoke the compiler -diff -Naur mpich-3.3.2.orig/src/env/mpifort.bash.in mpich-3.3.2/src/env/mpifort.bash.in ---- mpich-3.3.2.orig/src/env/mpifort.bash.in 2020-08-06 00:42:51.090874000 +0000 -+++ mpich-3.3.2/src/env/mpifort.bash.in 2020-08-06 00:49:34.854138000 +0000 -@@ -313,12 +313,12 @@ +diff --git a/src/env/mpifort.bash.in b/src/env/mpifort.bash.in +index 1130c57986..91a6cb56c5 100644 +--- a/src/env/mpifort.bash.in ++++ b/src/env/mpifort.bash.in +@@ -335,12 +335,12 @@ elif [ -n "$FCMODINC" ] ; then FCMODDIRS="${FCMODINC}$modincdir" fi @@ -139,10 +123,11 @@ diff -Naur mpich-3.3.2.orig/src/env/mpifort.bash.in mpich-3.3.2/src/env/mpifort. fi # A temporary statement to invoke the compiler -diff -Naur mpich-3.3.2.orig/src/env/mpifort.sh.in mpich-3.3.2/src/env/mpifort.sh.in ---- mpich-3.3.2.orig/src/env/mpifort.sh.in 2020-08-06 00:42:51.090874000 +0000 -+++ mpich-3.3.2/src/env/mpifort.sh.in 2020-08-06 00:49:34.854138000 +0000 -@@ -330,12 +330,12 @@ +diff --git a/src/env/mpifort.sh.in b/src/env/mpifort.sh.in +index a1e7f4dd8e..9d89a8bbe7 100644 +--- a/src/env/mpifort.sh.in ++++ b/src/env/mpifort.sh.in +@@ -352,12 +352,12 @@ elif [ -n "$FCMODINC" ] ; then FCMODDIRS="${FCMODINC}$modincdir" fi diff --git a/mpich-modules.patch b/0004-Make-mpich.module-useful.patch similarity index 68% rename from mpich-modules.patch rename to 0004-Make-mpich.module-useful.patch index d8d4ab2..2d5d1ea 100644 --- a/mpich-modules.patch +++ b/0004-Make-mpich.module-useful.patch @@ -1,5 +1,16 @@ ---- mpich-3.2.1/src/packaging/envmods/mpich.module.in.orig 2017-11-11 03:19:44.000000000 +0100 -+++ mpich-3.2.1/src/packaging/envmods/mpich.module.in 2018-04-04 14:14:16.553160669 +0200 +From 27c409c30875ea3ddb8e4bfc6add07c5a3c7780a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 10 Apr 2022 09:36:17 +0200 +Subject: [PATCH 4/4] Make mpich.module useful + +--- + src/packaging/envmods/mpich.module.in | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) + +diff --git a/src/packaging/envmods/mpich.module.in b/src/packaging/envmods/mpich.module.in +index 3d6b4fa623..b8283274ee 100644 +--- a/src/packaging/envmods/mpich.module.in ++++ b/src/packaging/envmods/mpich.module.in @@ -3,12 +3,23 @@ # MPICH module for use with 'environment-modules' package: # diff --git a/mpich.spec b/mpich.spec index f49d566..0e5ff89 100644 --- a/mpich.spec +++ b/mpich.spec @@ -1,6 +1,6 @@ Summary: A high-performance implementation of MPI Name: mpich -Version: 3.4.1 +Version: 4.0.2 Release: %autorelease License: MIT URL: https://www.mpich.org/ @@ -10,24 +10,12 @@ Source1: mpich.macros Source2: mpich.pth.py2 Source3: mpich.pth.py3 -Patch0: 0001-Drop-real128.patch -Patch1: mpich-modules.patch -# Drop build flags, e.g. -specs... and -lto from mpi wrappers (mpicc and mpicxx) -# for discussion see: -# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7TFWEKTDWBYBHEGMIWBVI3AVGORZGNBS/ -Patch2: fix_wrapper_flags.patch -Patch3: 0001-pkgconf-remove-optimization-and-link-flags-from-pkgc.patch -Patch4: 0002-pkgconf-also-drop-rpath-flags-from-pkgconf-file.patch +Patch: 0001-pkgconf-remove-optimization-and-link-flags-from-pkgc.patch +Patch: 0002-pkgconf-also-drop-rpath-flags-from-pkgconf-file.patch +Patch: 0003-Drop-build-flags-e.g.-specs.-and-lto-from-mpi-wrappe.patch +Patch: 0004-Make-mpich.module-useful.patch # TODO: submit ^ upstream -# https://github.com/pmodels/mpich/issues/4534 -Patch5: 0001-Revert-Remove-use-of-vasprintf.patch - -# There seems to be some syntax error, but I cannot figure out what it -# is (";;" is missing, but adding it doesn't fix things). Since we use -# clock_gettime anyway, just rip out the whole block. -Patch6: esac-syntax-fix.diff - BuildRequires: make BuildRequires: autoconf BuildRequires: automake @@ -121,18 +109,7 @@ Requires: python(abi) = %{python3_version} mpich support for Python 3. %prep -%setup - -%ifarch %{arm} -%patch0 -p1 -%endif - -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 +%autosetup -p1 %build ./autogen.sh @@ -162,7 +139,9 @@ CONFIGURE_OPTS=( ) # Set -fallow-argument-mismatch for #1795817 -%configure "${CONFIGURE_OPTS[@]}" FFLAGS="$FFLAGS -fallow-argument-mismatch" +%configure "${CONFIGURE_OPTS[@]}" \ + FFLAGS="$FFLAGS -fallow-argument-mismatch" \ + FCFLAGS="$FCFLAGS -fallow-argument-mismatch" # Remove rpath sed -r -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool @@ -171,9 +150,6 @@ sed -r -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool #Try and work around 'unused-direct-shlib-dependency' rpmlint warnning sed -i -e 's| -shared | -Wl,--as-needed\0|g' libtool -# work-around libtool error: cannot determine absolute directory name of 'system/lib' -mkdir -p system/lib - %make_build VERBOSE=1 %install diff --git a/sources b/sources index 344b066..c9bacd5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mpich-3.4.1.tar.gz) = 61aa161b14bd501320e45e0598ea4f125a704383e4998bf1773ba8b1ce06fb73204bad8f7a5fc147b1cef97e6420cdb150856f6ab03db4dddfe87f02edd3b8d2 +SHA512 (mpich-4.0.2.tar.gz) = 42b7d8ffee5314cdf9b9f75a2b864f7686066ef86cc225feac7f25c7a487b45636df51c0bbc2d677992e07ed62ae24daf73617f2b44b0dacc6ff69f4e66a9208