Re: [mpich-discuss] MPI process killed and SIGUSR1
Is this still related to your FT problems or is this a separate problem? Thanks, Wesley
On Oct 27, 2014, at 6:52 AM, Roy, Hirak <[email protected]> wrote:
Hi Wesley,
Here is my server.c and client.c. I have explicitly added ‘assert(0);’ in client.c. However my receive hangs in server and does not complete.
Could you please enlighten on this more.
Thanks, Hirak
#include <sys/types.h> #include <unistd.h> #include "mpi.h" #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <fcntl.h>
int main (int argc, char* argv[]) {
MPI_Init (&argc, &argv); MPI_Errhandler_set(MPI_COMM_WORLD,MPI_ERRORS_RETURN);
char portname[MPI_MAX_PORT_NAME]; MPI_Open_port(MPI_INFO_NULL, portname); MPI_Publish_name("RandomSession", MPI_INFO_NULL, portname); printf ("Successfully published portname : %s\n", portname); MPI_Comm newComm ; MPI_Comm_accept (portname, MPI_INFO_NULL, 0, MPI_COMM_SELF, &newComm); printf ("Successfully connected to client\n"); MPI_Errhandler_set(newComm, MPI_ERRORS_RETURN);
printf ("Waiting on receive\n"); int val = 0 ; MPI_Status status; int errcode = MPI_Recv(&val, 1, MPI_INT, 0, 99, newComm, &status); int errclass ; MPI_Error_class(errcode, &errclass); if (errclass == MPI_SUCCESS) { printf ("Received a message with tag 99\n"); MPI_Comm_disconnect (&newComm); printf ("Disconnected client\n"); } else { printf ("Receive error\n"); }
MPI_Unpublish_name("RandomSession", MPI_INFO_NULL, portname); MPI_Close_port(portname); MPI_Finalize();
}
#include <sys/types.h> #include <unistd.h> #include "mpi.h" #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <fcntl.h>
int main (int argc, char* argv[]) { MPI_Init (&argc, &argv); MPI_Errhandler_set(MPI_COMM_WORLD,MPI_ERRORS_RETURN);
char portname[MPI_MAX_PORT_NAME]; if (MPI_Lookup_name("RandomSession", MPI_INFO_NULL, portname) == MPI_SUCCESS) { printf ("Successfully got portname : %s\n", portname); MPI_Comm newComm ; MPI_Comm_connect (portname, MPI_INFO_NULL, 0, MPI_COMM_SELF, &newComm); printf ("Successfully connected to server\n"); MPI_Errhandler_set(newComm, MPI_ERRORS_RETURN);
assert (0); int val = 0 ; MPI_Send(&val, 1, MPI_INT, 0, 99, newComm); printf ("Send a message with tag 99\n"); MPI_Comm_disconnect (&newComm); printf ("Disconnected client\n"); } MPI_Finalize(); } MPICH Version: 3.0.4 MPICH Release date: Wed Apr 24 10:08:10 CDT 2013 MPICH Device: ch3:sock MPICH configure: --prefix /home/jlevitt/local/mpich-3.0.4/linux_x86_64 --disable-f77 --disable-fc --disable-f90modules --disable-cxx --enable-fast=nochkmsg --enable-fast=notiming --enable-fast=ndebug --enable-fast=O3 --with-device=ch3:sock CFLAGS=-O3 -fPIC CXXFLAGS=-O3 -fPIC MPICH CC: /u/prod/gnu/gcc/20121129/gcc-4.5.0-linux_x86_64/bin/gcc -O3 -fPIC -O3 MPICH CXX: no -O3 -fPIC MPICH F77: no MPICH FC: no _______________________________________________ discuss mailing list [email protected] <mailto:[email protected]> To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss <https://lists.mpich.org/mailman/listinfo/discuss>
_______________________________________________ discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss
participants (1)
-
Wesley Bland