[Mvapich-discuss] ch3:nemesis mvapich2-2.3.7-1 compile error
Subramoni, Hari
subramoni.1 at osu.edu
Sat Mar 9 12:12:17 EST 2024
Hi, Chuck.
The ch3:nemesis has been deprecated. Please use the latest MVAPICH 3.0 for best performance and functionality.
Thx,
Hari.
-----Original Message-----
From: Mvapich-discuss <mvapich-discuss-bounces at lists.osu.edu> On Behalf Of Chuck Cranor via Mvapich-discuss
Sent: Friday, March 8, 2024 5:08 PM
To: mvapich-discuss at lists.osu.edu
Subject: [Mvapich-discuss] ch3:nemesis mvapich2-2.3.7-1 compile error
!-------------------------------------------------------------------|
This Message Is From an External Sender
This message came from outside your organization.
|-------------------------------------------------------------------!
hi-
configure "--with-device=ch3:nemesis" has compile errors introduced in mvapich2-2.3.7-1 (used to work in mvapich2-2.3.6).
The mvapich2 svn trunk from scm.mvapich.cse.ohio-state.edu also fails.
I'm compiling on linux ubuntu20, if it matters. There are two errors, both related to changes made to hostname/address handling:
--------------------------------------------------------------------
The first error is a typeo in on line 391 of src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c where references a variable "mpierrno" that does not exist in that file:
src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c: In function 'GetSockInterfaceAddr':
src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c:391:30: error: 'mpierrno' undeclared (first use in this function); did you mean 'mpi_errno'?
391 | MPIR_ERR_CHKANDJUMP2(mpierrno != 0, mpi_errno, MPI_ERR_OTHER,
| ^~~~~~~~
I believe this helps (mpi_errno contains the return value from a call to getaddrinfo() which returns zero on success):
--- mvapich2_FAIL/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c 2024-03-08 16:34:00.199724176 -0500
+++ mvapich2_FIX/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c 2024-03-08 16:45:13.779688980 -0500
@@ -388,7 +388,7 @@
if (!mpi_errno);
break;
}
- MPIR_ERR_CHKANDJUMP2(mpierrno != 0, mpi_errno, MPI_ERR_OTHER,
+ MPIR_ERR_CHKANDJUMP2(mpi_errno != 0, mpi_errno, MPI_ERR_OTHER,
"**getaddrinfo", "**getaddrinfo %s %d",
ifname_string, mpi_errno);
--------------------------------------------------------------------
The second error is trying to pass a structure as a pointer to the second arg of inet_ntop(int af, void *src, char *dst, socklen_t size):
CC src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo
src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c: In function 'MPIDI_GetIPInterface':
src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c:155:32: error: incompatible type for argument 2 of 'inet_ntop'
155 | inet_ntop(AF_INET, addr, ip, sizeof(ip));
| ^~~~
| |
| struct in_addr
In file included from src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c:49:
/usr/include/arpa/inet.h:64:20: note: expected 'const void * restrict' but argument is of type 'struct in_addr'
64 | extern const char *inet_ntop (int __af, const void *__restrict __cp,
| ^~~~~~~~~
the fix is to pass the address of the "struct in_addr addr" to inet_notp() instead of the structure itself:
--- mvapich2_FAIL/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c 2024-03-08 16:34:00.199724176 -0500
+++ mvapich2_FIX/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c 2024-03-08 16:45:29.971880371 -0500
@@ -152,7 +152,7 @@
addr = ((struct sockaddr_in *) &(ifreq->ifr_addr))->sin_addr;
if (dbg_ifname) {
char* ip[INET_ADDRSTRLEN];
- inet_ntop(AF_INET, addr, ip, sizeof(ip));
+ inet_ntop(AF_INET, &addr, ip, sizeof(ip));
fprintf(stdout, "IPv4 address = %08x (%s)\n", addr.s_addr, ip);
}
--------------------------------------------------------------------
chuck
_______________________________________________
Mvapich-discuss mailing list
Mvapich-discuss at lists.osu.edu
https://lists.osu.edu/mailman/listinfo/mvapich-discuss
More information about the Mvapich-discuss
mailing list