-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello George, George Bosilca wrote: > Harald, > > I check the PERUSE code which generate the MSG_ARRIVED event. There > seems to be no way to miss one of this events if the following > conditions are respected: > > - the communicator where the message arrive has the MSG_ARRIVED event > attached > - if this event is active. I do the COMM register and the activation. In fact, I just followed the "MPI PERUSE: An MPI Extension for Revealing Unexposed Implementation Information" examples. > If you can provide the source code of your example, I'll give it a try. Sure. I send you the smallest code that reproduces this problem. Run it with 4 tasks (although it's quite easy to make it run for lesser tasks). The output varies from run to run. Sometimes (in very rare) I have 3 MSG_ARRIVED messages, sometimes less. Here's a sample: BSCIT03:~/tests/mpi-tests/peruse>$HOME/aplic/openmpi/1.2/bin/mpirun -np 4 ./mpi_wait RANK 0: total_msg_arrived = 0 RANK 1 : MSG_ARRIVED comm = 134517424 buf = 0x0 count = 0 peer = 0 tag = 1001 RANK 1: total_msg_arrived = 1 RANK 2 : MSG_ARRIVED comm = 134517424 buf = 0x0 count = 0 peer = 0 tag = 1001 RANK 2: total_msg_arrived = 1 RANK 3: total_msg_arrived = 0 I'm running OpenMPI 1.2 on a FreeBSD 6.2 machine with a single processor. Thank you! > Thanks, > george. > > > On Apr 19, 2007, at 11:16 AM, Harald Servat wrote: > > Hello, > > I'm interested on gathering MSG_ARRIVED events through the PERUSE API > offered by OpenMPI 1.2. > > I've written an small MPIC C program that performs some communication, > and although I receive some MSG_ARRIVED events, however I'm loosing some > events because the number of MSG_ARRIVED do not match with the total > number of sends (and waitalls). > > Do you know if there's any reason that could cause this strange > behaviour? > > Regards, _______________________________________________ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users > ------------------------------------------------------------------------ > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFGKGYIwMPeuqUCg9wRAmtNAJ0VrQFzgGWMazYEYxabIxJCUMDVdwCfTouJ fGVTWgsPpjvX8E5gqFIWjlQ= =ZKA9 -----END PGP SIGNATURE-----
#include <mpi.h> #include <stdio.h> #include <stdlib.h> #include <peruse.h> int rank; int total_msg_arrived = 0; static int MSG_ARRIVED_callback (peruse_event_h event_h, MPI_Aint unique_id, peruse_comm_spec_t *spec, void *param) { total_msg_arrived++; fprintf (stdout, "RANK %d : MSG_ARRIVED comm = %d buf = %p count = %d peer = %d tag = %d\n", rank, spec->comm, spec->buf, spec->count, spec->peer, spec->tag); return 0; } int buffer[1048576]; int main (int argc, char *argv[]) { int ret, size, MSG_ARRIVED_event; MPI_Request req1,req2[3]; MPI_Status sts1,sts2[3]; peruse_event_h handler; MPI_Init (&argc, &argv); /* PERUSE CONFIG BEGIN */ ret = PERUSE_Init (); if (ret != PERUSE_SUCCESS) return 0; ret = PERUSE_Query_event ("PERUSE_COMM_MSG_ARRIVED", &MSG_ARRIVED_event); if (ret != PERUSE_SUCCESS) return 0; ret = PERUSE_Event_comm_register (MSG_ARRIVED_event, MPI_COMM_WORLD, MSG_ARRIVED_callback, NULL, &handler); if (ret != PERUSE_SUCCESS) { fprintf (stderr, "mpitrace: Error! Can't register PERUSE event!\n"); return 0; } ret = PERUSE_Event_activate (handler); if (ret != PERUSE_SUCCESS) { fprintf (stderr, "mpitrace: Error! Can't activate PERUSE event!\n"); return 0; } /* PERUSE CONFIG END */ MPI_Comm_rank (MPI_COMM_WORLD, &rank); MPI_Comm_size (MPI_COMM_WORLD, &size); if (rank == 0) { int out, indices[3*4]; MPI_Isend (buffer, 1, MPI_INTEGER, 1, 1001, MPI_COMM_WORLD, &(req2[0])); MPI_Isend (buffer, 1, MPI_INTEGER, 2, 1001, MPI_COMM_WORLD, &(req2[1])); MPI_Isend (buffer, 1, MPI_INTEGER, 3, 1001, MPI_COMM_WORLD, &(req2[2])); MPI_Waitall (3, req2, sts2); } else { int out, indices[4]; MPI_Irecv (buffer, 1, MPI_INTEGER, 0, 1001, MPI_COMM_WORLD, &req1); MPI_Wait (&req1, &sts1); } fprintf (stdout, "RANK %d: total_msg_arrived = %d\n", rank, total_msg_arrived); MPI_Finalize(); }