[Beowulf] Block send mpi

rene rene at renestorm.de
Mon Feb 14 03:04:45 PST 2005


Hi Joe,

here is some output and changes which solves the problem.
I don't know, why I created a void buffer and sended an int array.
After creating an int buffer I was also able to delete it ;o)


Tnx anyway
Rene

int packsize;
MPI_Pack_size (bit, MPI_INT, newcomm, &packsize);
int bufsize = packsize + (MPI_BSEND_OVERHEAD);
// 		  void *buf = new (void (*[packsize]) ());
int *buf = new (int ([packsize]));

for (int az = 0; az < repeat + 1; az++)
{
  MPI_Buffer_attach (buf, bufsize);
  for (int node = 1; node < rankcount; node++)
    {
      bsend->ierr = MPI_Bsend (&testdata[0], bit, MPI_INT, node, 0,  newcomm);
    }
  MPI_Buffer_detach (&buf, &bufsize);
}
delete buf;


output for the old code: 
Program received signal SIGSEGV, Segmentation fault.
0:  0x40ad3860 in malloc_consolidate () from /lib/libc.so.6
0:  (gdb) kill
 rank 1 in job 4  xtrem_32898   caused collective abort of all ranks
  exit status of rank 1: killed by signal 9
rank 0 in job 4  xtrem_32898   caused collective abort of all ranks
  exit status of rank 0: killed by signal 9
1:  aborting job:
1:  Fatal error in MPI_Recv: Other MPI error, error stack:
1:  MPI_Recv(207): MPI_Recv(buf=0x8186388, count=32, MPI_INT, src=0, tag=0, 
comm=0x84000002, status=0xbfffee30) failed
1:  MPIDI_CH3_Progress_wait(207): an error occurred while handling an event 
returned by MPIDU_Sock_Wait()
1:  MPIDI_CH3I_Progress_handle_sock_event(492):
1:  connection_recv_fail(1728):
1:  MPIDU_Socki_handle_read(590): connection closed by peer (set=0,sock=1)


Am Montag 14 Februar 2005 06:42 schrieb Joe Landman:
> Rene:
>
>    More data.  Where exactly does it SEGV?  At the void *buf line? at
> the Pack? or the Bsend?  Did you compile with -g?   Do you have a core
> dump?
>
> Joe
>
> rene wrote:
> > Hi folks,
> >
> > i know, this isn't a mpi forum, even so allow me a question about block
> > sending.
> >
> > i got some(times) nice SIGSEGVs with that code (C++ implementation).
> > Did I code something totally wrong?
> > I really don't understand this function.
> > // int MPI_Buffer_attach( void *buffer, int size )
> >
> >  int packsize;
> >  MPI_Pack_size (bit, MPI_INT, newcomm, &packsize);
> >  int bufsize = packsize + (MPI_BSEND_OVERHEAD);
> >  void *buf = new (void (*[packsize]) ());
> >  MPI_Buffer_attach (buf, bufsize);
> >  ierr =MPI_Bsend (&testdata[0], bit, MPI_INT, node, 0,  newcomm);
> >  MPI_Buffer_detach (&buf, &bufsize);
> >
> > Thanks,

-- 
Rene Storm
@Cluster

Linux Cluster Consultant
Hamburgerstr. 42e
D-22952 Luetjensee
mailto:Rene at ReneStorm.de
Voice-IP: Skype.com, Rene_Storm



More information about the Beowulf mailing list