Update to 3.2.1
Patches which were upstreamed are dropped.
This commit is contained in:
parent
994bf42be4
commit
1014d88286
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
/mpich-3.1.tar.gz
|
||||
/mpich-3.1.4.tar.gz
|
||||
/mpich-3.2.tar.gz
|
||||
/mpich-3.2.1.tar.gz
|
||||
|
@ -1,163 +0,0 @@
|
||||
From 305dad8388ea27b4d1bf1202e90ad6947ae0ab26 Mon Sep 17 00:00:00 2001
|
||||
From: Pavan Balaji <balaji@anl.gov>
|
||||
Date: Thu, 21 Jan 2016 17:01:42 -0600
|
||||
Subject: [PATCH] hydra: improve localhost detection.
|
||||
|
||||
Be more forgiving for systems that do not resolve "localhost" or
|
||||
equivalent names very well (e.g., they are not added to /etc/hosts).
|
||||
Try them out, and if nothing works, fallback to "is not local" mode.
|
||||
|
||||
Thanks to Orion Poplawski <orion@cora.nwra.com> for the suggestion.
|
||||
---
|
||||
src/pm/hydra/utils/sock/sock.c | 89 +++++++++++++++++++++++-------------------
|
||||
1 file changed, 48 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/src/pm/hydra/utils/sock/sock.c b/src/pm/hydra/utils/sock/sock.c
|
||||
index 86b25077aac2..dc56c767f544 100644
|
||||
--- a/src/pm/hydra/utils/sock/sock.c
|
||||
+++ b/src/pm/hydra/utils/sock/sock.c
|
||||
@@ -492,7 +492,7 @@ HYD_status HYDU_sock_get_iface_ip(char *iface, char **ip)
|
||||
HYD_status HYDU_sock_is_local(char *host, int *is_local)
|
||||
{
|
||||
struct hostent *ht;
|
||||
- char *host_ip = NULL, *local_ip = NULL, *lhost_ip = NULL;
|
||||
+ char *host_ip = NULL, *lhost_ip = NULL;
|
||||
char lhost[MAX_HOSTNAME_LEN];
|
||||
struct sockaddr_in sa;
|
||||
struct ifaddrs *ifaddr, *ifa;
|
||||
@@ -516,54 +516,63 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local)
|
||||
|
||||
/* STEP 1: If "host" matches the local host name, return */
|
||||
if (gethostname(lhost, MAX_HOSTNAME_LEN) < 0) {
|
||||
- HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "gethostname returned an error\n");
|
||||
+ /* We can't figure out what my localhost name is. *sigh*. We
|
||||
+ * could return an error here, but we will just punt it to the
|
||||
+ * upper layer saying that we don't know if it is local. We
|
||||
+ * cannot try steps 2 and 3 either, since we don't have our
|
||||
+ * local hostname. */
|
||||
+ goto fn_exit;
|
||||
}
|
||||
else if (!strcmp(lhost, host)) {
|
||||
*is_local = 1;
|
||||
goto fn_exit;
|
||||
}
|
||||
+ else {
|
||||
+ /* we have our local hostname, but that does not match the
|
||||
+ * provided hostname. Let's try to get our remote IP address
|
||||
+ * first. If we can't get that, we can give up. */
|
||||
+ /* If we are unable to resolve the remote host name, it need
|
||||
+ * not be an error. It could mean that the user is using an
|
||||
+ * alias for the hostname (e.g., an ssh config alias) */
|
||||
+ if ((ht = gethostbyname(host)) == NULL)
|
||||
+ goto fn_exit;
|
||||
|
||||
+ memset((char *) &sa, 0, sizeof(struct sockaddr_in));
|
||||
+ memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length);
|
||||
|
||||
- /* STEP 2: If the IP address associated with "host" and the IP address local
|
||||
- * host resolves to match, return */
|
||||
-
|
||||
- if ((ht = gethostbyname(lhost)) == NULL) {
|
||||
- HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "gethostbyname error on %s: %s\n",
|
||||
- lhost, hstrerror(h_errno));
|
||||
+ /* Find the IP address of the host */
|
||||
+ host_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf,
|
||||
+ MAX_HOSTNAME_LEN));
|
||||
+ HYDU_ASSERT(host_ip, status);
|
||||
}
|
||||
|
||||
- memset((char *) &sa, 0, sizeof(struct sockaddr_in));
|
||||
- memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length);
|
||||
-
|
||||
- /* Find the IP address of the host */
|
||||
- lhost_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf,
|
||||
- MAX_HOSTNAME_LEN));
|
||||
- HYDU_ASSERT(lhost_ip, status);
|
||||
+ /* OK, if we are here, we got the remote IP. We have two ways of
|
||||
+ * getting the local IP: gethostbyname or getifaddrs. We'll try
|
||||
+ * both. */
|
||||
|
||||
- /* If we are unable to resolve the remote host name, it need not be an
|
||||
- * error. It could mean that the user is using an alias for the hostname
|
||||
- * (e.g., an ssh config alias) */
|
||||
- if ((ht = gethostbyname(host)) == NULL)
|
||||
- goto fn_exit;
|
||||
+ /* STEP 2: Let's try the gethostbyname model */
|
||||
|
||||
- memset((char *) &sa, 0, sizeof(struct sockaddr_in));
|
||||
- memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length);
|
||||
+ if ((ht = gethostbyname(lhost))) {
|
||||
+ memset((char *) &sa, 0, sizeof(struct sockaddr_in));
|
||||
+ memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length);
|
||||
|
||||
- /* Find the IP address of the host */
|
||||
- host_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf,
|
||||
- MAX_HOSTNAME_LEN));
|
||||
- HYDU_ASSERT(host_ip, status);
|
||||
+ /* Find the IP address of the host */
|
||||
+ lhost_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf,
|
||||
+ MAX_HOSTNAME_LEN));
|
||||
+ HYDU_ASSERT(lhost_ip, status);
|
||||
|
||||
- /* See if the IP address of the hostname we got matches the IP address
|
||||
- * to which the local host resolves */
|
||||
- if (!strcmp(lhost_ip, host_ip)) {
|
||||
- *is_local = 1;
|
||||
- goto fn_exit;
|
||||
+ /* See if the IP address of the hostname we got matches the IP
|
||||
+ * address to which the local host resolves */
|
||||
+ if (!strcmp(lhost_ip, host_ip)) {
|
||||
+ *is_local = 1;
|
||||
+ goto fn_exit;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ /* Either gethostbyname didn't resolve or we didn't find a match.
|
||||
+ * Either way, let's try the getifaddr model. */
|
||||
|
||||
- /* STEP 3: Find all local IP addresses and try to match the host IP
|
||||
- * with it. */
|
||||
+ /* STEP 3: Let's try the getifaddr model */
|
||||
|
||||
if (getifaddrs(&ifaddr) == -1)
|
||||
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "getifaddrs failed\n");
|
||||
@@ -573,21 +582,21 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local)
|
||||
if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) {
|
||||
struct sockaddr_in *sa_ptr = (struct sockaddr_in *) ifa->ifa_addr;
|
||||
|
||||
- local_ip = HYDU_strdup((char *)
|
||||
+ lhost_ip = HYDU_strdup((char *)
|
||||
inet_ntop(AF_INET, (const void *) &(sa_ptr->sin_addr), buf,
|
||||
MAX_HOSTNAME_LEN));
|
||||
- HYDU_ASSERT(local_ip, status);
|
||||
+ HYDU_ASSERT(lhost_ip, status);
|
||||
|
||||
- /* STEP 3: For each local IP address, see if it matches the "host"
|
||||
+ /* For each local IP address, see if it matches the "host"
|
||||
* IP address */
|
||||
- if (!strcmp(host_ip, local_ip)) {
|
||||
+ if (!strcmp(host_ip, lhost_ip)) {
|
||||
*is_local = 1;
|
||||
freeifaddrs(ifaddr);
|
||||
goto fn_exit;
|
||||
}
|
||||
|
||||
- HYDU_FREE(local_ip);
|
||||
- local_ip = NULL;
|
||||
+ HYDU_FREE(lhost_ip);
|
||||
+ lhost_ip = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,8 +605,6 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local)
|
||||
fn_exit:
|
||||
if (host_ip)
|
||||
HYDU_FREE(host_ip);
|
||||
- if (local_ip)
|
||||
- HYDU_FREE(local_ip);
|
||||
if (lhost_ip)
|
||||
HYDU_FREE(lhost_ip);
|
||||
return status;
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,32 +0,0 @@
|
||||
From d3d7f0d571607c3547396045093c77364cfaec0b Mon Sep 17 00:00:00 2001
|
||||
From: Ken Raffenetti <raffenet@mcs.anl.gov>
|
||||
Date: Fri, 28 Aug 2015 14:28:37 -0700
|
||||
Subject: [PATCH] pm/remshell: include MPL when linking
|
||||
|
||||
---
|
||||
src/pm/remshell/Makefile.mk | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pm/remshell/Makefile.mk b/src/pm/remshell/Makefile.mk
|
||||
index ea366a9e..0ec937d9 100644
|
||||
--- a/src/pm/remshell/Makefile.mk
|
||||
+++ b/src/pm/remshell/Makefile.mk
|
||||
@@ -16,13 +16,13 @@ if BUILD_PM_REMSHELL
|
||||
if PRIMARY_PM_REMSHELL
|
||||
bin_PROGRAMS += src/pm/remshell/mpiexec
|
||||
src_pm_remshell_mpiexec_SOURCES = src/pm/remshell/mpiexec.c
|
||||
-src_pm_remshell_mpiexec_LDADD = src/pm/util/libmpiexec.a
|
||||
+src_pm_remshell_mpiexec_LDADD = src/pm/util/libmpiexec.a $(mpllib)
|
||||
# we may not want to add AM_CPPFLAGS for this program
|
||||
src_pm_remshell_mpiexec_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS)
|
||||
else !PRIMARY_PM_REMSHELL
|
||||
bin_PROGRAMS += src/pm/remshell/mpiexec.remshell
|
||||
src_pm_remshell_mpiexec_remshell_SOURCES = src/pm/remshell/mpiexec.c
|
||||
-src_pm_remshell_mpiexec_remshell_LDADD = src/pm/util/libmpiexec.a
|
||||
+src_pm_remshell_mpiexec_remshell_LDADD = src/pm/util/libmpiexec.a $(mpllib)
|
||||
# we may not want to add AM_CPPFLAGS for this program
|
||||
src_pm_remshell_mpiexec_remshell_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS)
|
||||
endif !PRIMARY_PM_REMSHELL
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git mpich-3.2/src/pm/gforker/Makefile.mk~ mpich-3.2/src/pm/gforker/Makefile.mk
|
||||
index 3a156057b9..afb7b41a01 100644
|
||||
--- mpich-3.2/src/pm/gforker/Makefile.mk~
|
||||
+++ mpich-3.2/src/pm/gforker/Makefile.mk
|
||||
@@ -22,7 +22,7 @@ src_pm_gforker_mpiexec_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS)
|
||||
else !PRIMARY_PM_GFORKER
|
||||
bin_PROGRAMS += src/pm/gforker/mpiexec.gforker
|
||||
src_pm_gforker_mpiexec_gforker_SOURCES = src/pm/gforker/mpiexec.c
|
||||
-src_pm_gforker_mpiexec_gforker_LDADD = src/pm/util/libmpiexec.a
|
||||
+src_pm_gforker_mpiexec_gforker_LDADD = src/pm/util/libmpiexec.a $(mpllib)
|
||||
# we may not want to add AM_CPPFLAGS for this program
|
||||
src_pm_gforker_mpiexec_gforker_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS)
|
||||
endif !PRIMARY_PM_GFORKER
|
13
mpich.spec
13
mpich.spec
@ -1,9 +1,8 @@
|
||||
Summary: A high-performance implementation of MPI
|
||||
Name: mpich
|
||||
Version: 3.2
|
||||
Release: 10%{?dist}
|
||||
Version: 3.2.1
|
||||
Release: 1%{?dist}
|
||||
License: MIT
|
||||
Group: Development/Libraries
|
||||
URL: http://www.mpich.org/
|
||||
|
||||
Source0: http://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz
|
||||
@ -11,10 +10,7 @@ Source1: mpich.macros
|
||||
Source2: mpich.pth.py2
|
||||
Source3: mpich.pth.py3
|
||||
Patch0: mpich-modules.patch
|
||||
Patch1: https://trac.mpich.org/projects/mpich/raw-attachment/ticket/2299/0001-pm-remshell-include-MPL-when-linking.patch
|
||||
Patch2: 0002-pm-gforker-include-MPL-when-linking.patch
|
||||
Patch3: 0003-soften-version-check.patch
|
||||
Patch4: 0001-hydra-improve-localhost-detection.patch
|
||||
|
||||
BuildRequires: gcc-gfortran
|
||||
BuildRequires: hwloc-devel >= 1.8
|
||||
@ -174,7 +170,7 @@ mpich support for Python 3.
|
||||
#Try and work around 'unused-direct-shlib-dependency' rpmlint warnning
|
||||
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
%make_build VERBOSE=1
|
||||
|
||||
%install
|
||||
%make_install
|
||||
@ -256,6 +252,9 @@ make check VERBOSE=1
|
||||
%{python3_sitearch}/%{name}.pth
|
||||
|
||||
%changelog
|
||||
* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.2.1-1
|
||||
- Update to latest bugfix release (#1512188)
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user