import mpich-3.4.1-1.el8

This commit is contained in:
CentOS Sources 2021-10-05 17:41:38 -04:00 committed by Stepan Oksanichenko
parent b4113bff95
commit 48ba2349d5
7 changed files with 291 additions and 206 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/mpich-3.3.2.tar.gz SOURCES/mpich-3.4.1.tar.gz

View File

@ -1 +1 @@
d1b887a6265df846481328bb1a6a0855b5292bef SOURCES/mpich-3.3.2.tar.gz 47b599ad2cf2c10ef765446a534d7d0dfc33c474 SOURCES/mpich-3.4.1.tar.gz

View File

@ -0,0 +1,268 @@
From 6c286621ff551eed1dca5afaf08aeaa41eabd96d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
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 <math.h>]])
AC_CHECK_DECLS([nan], [], [], [[#include <math.h>]])
AC_CHECK_DECLS([isnan], [], [], [[#include <math.h>]])
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 */

View File

@ -1,34 +0,0 @@
From fbb8f503df077c726b0c99d467bc984566273b92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 15 Sep 2020 14:20:17 +0200
Subject: [PATCH 1/2] mpl: limit scope on macos .local workaround
This was added in 62f4178981617384fc116da4c839baf469bef512.
Assuming that "localhost" is equivalent to any name ending in .local
is unwarranted. RFC6762 reserves the ".local" suffix for MulticastDNS use,
but it is also used in other context for "local network" addresses and such.
So let's at least limit the scope to not hurt other systems.
---
src/mpl/src/sock/mpl_sockaddr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mpl/src/sock/mpl_sockaddr.c b/src/mpl/src/sock/mpl_sockaddr.c
index 51e9f9973f..9334cc4fb2 100644
--- a/src/mpl/src/sock/mpl_sockaddr.c
+++ b/src/mpl/src/sock/mpl_sockaddr.c
@@ -75,6 +75,7 @@ int MPL_get_sockaddr(const char *s_hostname, MPL_sockaddr_t * p_addr)
struct addrinfo *ai_list;
int ret;
+#ifdef __APPLE__
/* Macos adds .local to hostname when network is unavailable or limited.
* This will result in long timeout in getaddrinfo below.
* Bypass it by resetting the hostname to "localhost"
@@ -83,6 +84,7 @@ int MPL_get_sockaddr(const char *s_hostname, MPL_sockaddr_t * p_addr)
if (n > 6 && strcmp(s_hostname + n - 6, ".local") == 0) {
s_hostname = "localhost";
}
+#endif
/* NOTE: there is report that getaddrinfo implementations will call kernel
* even when s_hostname is entirely numerical string and it may cause

View File

@ -1,57 +0,0 @@
From ecb72e6699f4f8525115e0b42f81121a1cf8eefa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 15 Sep 2020 14:59:58 +0200
Subject: [PATCH 2/2] mpl: do not require non-loopback networking
getaddrinfo(3) says:
If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4
addresses are returned in the list pointed to by res only if the
local system has at least one IPv4 address configured, and IPv6
addresses are returned only if the local system has at least one
IPv6 address configured. The loopback address is not considered for
this case as valid as a configured address.
This means that MPL_get_sockaddr() will fail to resolve the local host
(either as "localhost" or by the actual hostname) on a system that has
no non-loopback networking. This break exection of mpirun e.g. in a
container for tests and such.
From https://bugzilla.redhat.com/show_bug.cgi?id=1839007:
<mock-chroot> sh-5.0# hostname
68da8e7c62a2404bb4bf75c9ce643e06
<mock-chroot> sh-5.0# module load mpi/mpich-x86_64
<mock-chroot> sh-5.0# mpirun ./a.out
Fatal error in PMPI_Init: Other MPI error, error stack:
MPIR_Init_thread(586)..............:
MPID_Init(224).....................: channel initialization failed
MPIDI_CH3_Init(105)................:
MPID_nem_init(324).................:
MPID_nem_tcp_init(175).............:
MPID_nem_tcp_get_business_card(404):
MPID_nem_tcp_init(375).............: gethostbyname failed, 68da8e7c62a2404bb4bf75c9ce643e06 (errno 0)
<mock-chroot> sh-5.0# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
---
src/mpl/src/sock/mpl_sockaddr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mpl/src/sock/mpl_sockaddr.c b/src/mpl/src/sock/mpl_sockaddr.c
index 9334cc4fb2..c0e991c68d 100644
--- a/src/mpl/src/sock/mpl_sockaddr.c
+++ b/src/mpl/src/sock/mpl_sockaddr.c
@@ -98,7 +98,7 @@ int MPL_get_sockaddr(const char *s_hostname, MPL_sockaddr_t * p_addr)
ai_hint.ai_family = af_type;
ai_hint.ai_socktype = SOCK_STREAM;
ai_hint.ai_protocol = IPPROTO_TCP;
- ai_hint.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
+ ai_hint.ai_flags = AI_V4MAPPED;
ret = getaddrinfo(s_hostname, NULL, &ai_hint, &ai_list);
if (ret) {
return ret;

View File

@ -1,101 +0,0 @@
From a1524608b05e6c89e2b99f64923f064d888465ce Mon Sep 17 00:00:00 2001
From: Hui Zhou <hzhou321@anl.gov>
Date: Mon, 18 Nov 2019 14:52:55 -0600
Subject: [PATCH 1/2] ch3: fix improper error handling from MPL_get_sockaddr
MPL layer does not directly return mpi_errno. Use MPIR_ERR_CHKANDJUMP
macro to create the appropriate return code. See pmodels/mpich#4318.
Cherry-picked from [8d923937ec5d].
---
.../channels/nemesis/netmod/tcp/tcp_init.c | 23 +++++++++++--------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
index 4c2383ed8f..bc58211eb6 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
@@ -307,8 +307,9 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname,
if (MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE) {
char s[100];
int len;
- mpi_errno = MPL_get_sockaddr_iface(MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, p_addr);
- MPIR_ERR_CHKANDJUMP1(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", "**iface_notfound %s", MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE);
+ int ret = MPL_get_sockaddr_iface(MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, p_addr);
+ MPIR_ERR_CHKANDJUMP1(ret != 0, mpi_errno, MPI_ERR_OTHER, "**iface_notfound",
+ "**iface_notfound %s", MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE);
MPL_sockaddr_to_str(p_addr, s, 100);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT, VERBOSE, (MPL_DBG_FDEST,
@@ -354,12 +355,13 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname,
ifname_string = ifname;
- /* If we didn't find a specific name, then try to get an IP address
- directly from the available interfaces, if that is supported on
- this platform. Otherwise, we'll drop into the next step that uses
- the ifname */
- mpi_errno = MPL_get_sockaddr_iface( NULL, p_addr);
- if (mpi_errno) MPIR_ERR_POP(mpi_errno);
+ /* If we didn't find a specific name, then try to get an IP address
+ * directly from the available interfaces, if that is supported on
+ * this platform. Otherwise, we'll drop into the next step that uses
+ * the ifname */
+ int ret = MPL_get_sockaddr_iface(NULL, p_addr);
+ MPIR_ERR_CHKANDJUMP1(ret != 0, mpi_errno, MPI_ERR_OTHER, "**iface_notfound",
+ "**iface_notfound %s", NULL);
ifaddrFound = 1;
}
else {
@@ -369,8 +371,9 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname,
/* If we don't have an IP address, try to get it from the name */
if (!ifaddrFound) {
- mpi_errno = MPL_get_sockaddr(ifname_string, p_addr);
- MPIR_ERR_CHKANDJUMP2(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**gethostbyname", "**gethostbyname %s %d", ifname_string, h_errno);
+ int ret = MPL_get_sockaddr(ifname_string, p_addr);
+ MPIR_ERR_CHKANDJUMP2(ret != 0, mpi_errno, MPI_ERR_OTHER, "**gethostbyname",
+ "**gethostbyname %s %d", ifname_string, h_errno);
}
fn_exit:
From 89157ad35c0885b4758d250d019f0f7cf0f59095 Mon Sep 17 00:00:00 2001
From: Hui Zhou <hzhou321@anl.gov>
Date: Wed, 15 Jan 2020 13:29:56 -0600
Subject: [PATCH 2/2] pmi: fix a wrong condition checking return of
MPL_get_sockaddr
Cherry-picked from [3e6af3c2fbaf]. See pmodels/mpich#4318.
---
src/mpl/include/mpl_sockaddr.h | 3 +++
src/pmi/simple/simple_pmi.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mpl/include/mpl_sockaddr.h b/src/mpl/include/mpl_sockaddr.h
index c0eb749419..a9860c1353 100644
--- a/src/mpl/include/mpl_sockaddr.h
+++ b/src/mpl/include/mpl_sockaddr.h
@@ -21,6 +21,9 @@
typedef struct sockaddr_storage MPL_sockaddr_t;
+/* The following functions when return an int, it returns 0 on success,
+ * non-zero indicates error. It is consistent with posix socket functions.
+ */
void MPL_sockaddr_set_aftype(int type);
int MPL_get_sockaddr(const char *s_hostname, MPL_sockaddr_t * p_addr);
int MPL_get_sockaddr_direct(int type, MPL_sockaddr_t * p_addr);
diff --git a/src/pmi/simple/simple_pmi.c b/src/pmi/simple/simple_pmi.c
index df37a8689f..7f660bdac9 100644
--- a/src/pmi/simple/simple_pmi.c
+++ b/src/pmi/simple/simple_pmi.c
@@ -881,7 +881,7 @@ static int PMII_Connect_to_pm(char *hostname, int portnum)
int q_wait = 1;
ret = MPL_get_sockaddr(hostname, &addr);
- if (!ret) {
+ if (ret) {
PMIU_printf(1, "Unable to get host entry for %s\n", hostname);
return PMI_FAIL;
}

View File

@ -1,7 +1,7 @@
Summary: A high-performance implementation of MPI Summary: A high-performance implementation of MPI
Name: mpich Name: mpich
Version: 3.3.2 Version: 3.4.1
Release: 9%{?dist} Release: 1%{?dist}
License: MIT License: MIT
URL: https://www.mpich.org/ URL: https://www.mpich.org/
@ -10,27 +10,29 @@ Source1: mpich.macros
Source2: mpich.pth.py3 Source2: mpich.pth.py3
Patch0: mpich-modules.patch Patch0: mpich-modules.patch
Patch1: 0001-Drop-real128.patch Patch1: 0001-Drop-real128.patch
# fix for #1793563 and #1799473
Patch2: https://github.com/pmodels/mpich/pull/4320.patch
# Drop build flags, e.g. -specs... and -lto from mpi wrappers (mpicc and mpicxx) # Drop build flags, e.g. -specs... and -lto from mpi wrappers (mpicc and mpicxx)
# for discussion see: # for discussion see:
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7TFWEKTDWBYBHEGMIWBVI3AVGORZGNBS/ # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7TFWEKTDWBYBHEGMIWBVI3AVGORZGNBS/
Patch3: fix_wrapper_flags.patch Patch3: fix_wrapper_flags.patch
# https://github.com/pmodels/mpich/issues/4534
Patch4: 0001-Revert-Remove-use-of-vasprintf.patch
Patch4: 0001-mpl-limit-scope-on-macos-.local-workaround.patch BuildRequires: make
Patch5: 0002-mpl-do-not-require-non-loopback-networking.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: gcc-gfortran BuildRequires: gcc-gfortran
BuildRequires: hwloc-devel >= 2.2.0 BuildRequires: hwloc-devel >= 2.2.0
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
# For ./maint/extractcvars
BuildRequires: perl(lib)
%ifnarch s390 %{mips} %ifnarch s390 %{mips}
BuildRequires: valgrind-devel BuildRequires: valgrind-devel
%endif %endif
# For %%{python3_sitearch} # For %%{python3_sitearch}
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: rpm-mpi-hooks BuildRequires: rpm-mpi-hooks
BuildRequires: automake
Provides: mpi Provides: mpi
Requires: environment(modules) Requires: environment(modules)
@ -97,20 +99,21 @@ Requires: python(abi) = %{python3_version}
mpich support for Python 3. mpich support for Python 3.
%prep %prep
%setup %setup -q
%patch0 -p1 %patch0 -p1
%ifarch %{arm} %ifarch %{arm}
%patch1 -p1 %patch1 -p1
%endif %endif
%patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1
%build %build
./autogen.sh
CONFIGURE_OPTS=( CONFIGURE_OPTS=(
--enable-sharedlibs=gcc --enable-sharedlibs=gcc
--enable-shared --enable-shared
@ -118,7 +121,8 @@ CONFIGURE_OPTS=(
--enable-lib-depend --enable-lib-depend
--disable-rpath --disable-rpath
--disable-silent-rules --disable-silent-rules
--enable-fc --enable-fortran
--with-gnu-ld
--with-device=ch3:nemesis --with-device=ch3:nemesis
--with-pm=hydra:gforker --with-pm=hydra:gforker
--includedir=%{_includedir}/%{name}-%{_arch} --includedir=%{_includedir}/%{name}-%{_arch}
@ -235,6 +239,11 @@ make check VERBOSE=1 \
%{python3_sitearch}/%{name}.pth %{python3_sitearch}/%{name}.pth
%changelog %changelog
* Thu May 27 2021 Honggang Li <honli@redhat.com> - 3.4.1-1
- Sync with Fedora build
- Update to latest upstream release 3.4.1
- Resolves: rhbz#1960076
* Thu Oct 15 2020 Honggang Li <honli@redhat.com> - 3.3.2-9 * Thu Oct 15 2020 Honggang Li <honli@redhat.com> - 3.3.2-9
- Fix a dependency typo - Fix a dependency typo
- Related: rhbz#1850080 - Related: rhbz#1850080