Thanks. I found the problem and solved. On Mon, Oct 27, 2014 at 7:49 PM, <[email protected]> wrote:
Send discuss mailing list submissions to [email protected]
To subscribe or unsubscribe via the World Wide Web, visit https://lists.mpich.org/mailman/listinfo/discuss or, via email, send a message with subject or body 'help' to [email protected]
You can reach the person managing the list at [email protected]
When replying, please edit your Subject line so it is more specific than "Re: Contents of discuss digest..."
Today's Topics:
1. Re: buffer overflow (Seo, Sangmin) 2. Re: MPI process killed and SIGUSR1 (Wesley Bland) 3. Problems in MPICH 3.1.3 installation in OSX 10.10 with ifort compiler and Xcode 6.1 (Alejandro de la Calle)
----------------------------------------------------------------------
Message: 1 Date: Mon, 27 Oct 2014 12:52:13 +0000 From: "Seo, Sangmin" <[email protected]> To: "<[email protected]>" <[email protected]> Subject: Re: [mpich-discuss] buffer overflow Message-ID: <[email protected]> Content-Type: text/plain; charset="Windows-1252"
Hi Amjad,
As the error message, "25 bytes received but buffer size is 24?, says, your buffer size is smaller than the message size. You need to increase your buffer which is the memory pointed to by the first argument of MPI_Recv.
Best regards, Sangmin
On Oct 27, 2014, at 12:27 AM, Md. Amjad Hossain <[email protected]> wrote:
Hi,
I am sending and receiving a user defined (struct) data type using MPI_Send and MPI_Recv function. I am getting following buffer overflow error.
Fatal error in MPI_Recv: Message truncated, error stack: MPI_Recv(187).....................: MPI_Recv(buf=0x7fff2248b930, count=1, dtype=USER<struct>, src=0, tag=1, MPI_COMM_WORLD, status=0x7fff2248b970) failed MPIDI_CH3U_Receive_data_found(131): Message from rank 0 and tag 1 truncated; 25 bytes received but buffer size is 24
If I just send one byte less, everything is working properly. Could anyone please let me know which buffer it is and how can I increase the buffer size to avoid the error?
Regards Amjad _______________________________________________ discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss
------------------------------
Message: 2 Date: Mon, 27 Oct 2014 09:50:14 -0500 From: Wesley Bland <[email protected]> To: "[email protected]" <[email protected]> Subject: Re: [mpich-discuss] MPI process killed and SIGUSR1 Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8"
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