smpi_post_send_ok_to_send_out got corrupted handle

"Oleg I. Vdovikin" <[email protected]>
Newsgroups gmane.network.myrinet.general
Message-ID <[email protected]>
Hi,

    we're using Alpha Linux cluster and compiled new gm-1.5 &
mpich-1.2.1..7.

    We've some problems when running programs with --gm-use-shmem
specified - they are silently dies. Today I've run these problematic program
with gdb and mpich compiled with debug option. I've got the backtrace when
the program crashes with SIGSEGV. As seems to me
smpi_post_send_ok_to_send_cont gots corrupted (shrinked to 32 bit) rhandle -
it's 0x201bd6e8, and not 0x1201bd6e8 as it should be.

    I can't understand why this happens, but when I've add the missing
0x100000000 at line 631

<  rhandle = (MPIR_RHANDLE *)pkt->recv_id;
>  rhandle = (MPIR_RHANDLE *) (((long)pkt->recv_id) | 0x100000000);

    program works just fine. ;-))

    Any ideas?

    Program sources and the output for both processes attached to this
message.

Thanks,
    Oleg.

P.S. This also occures with gm-1.4 & mpich-1.2..8, gm-1.4 & mpich-1.2.1..7,
but DOES NOT with gm-1.4 & mpich-1.2..5.

--------------------------------------------------------------
#0  smpi_post_send_ok_to_send_cont (destination=1, rhandle=0x201bd6e8)
    at smppriv.c:401
#1  0x1200216f0 in smpi_recv_get (from=1, my_id=0, in_pkt=0x200004639c8)
    at smppriv.c:660
#2  0x120021dcc in smpi_net_lookup (dev=0x12016ad60, blocking=1)
    at smppriv.c:847
#3  0x120021f6c in MPID_SMP_Check_incoming (dev=0x12016ad60,
    blocking=MPID_BLOCKING) at smppriv.c:912
#4  0x1200182bc in MPID_SendComplete (request=0x1201b1c90,
    error_code=0x11ffffbe8) at adi2send.c:160
#5  0x1200055b4 in PMPI_Waitall (count=1, array_of_requests=0x1201c3b38,
    array_of_statuses=0x11ffffc68) at waitall.c:106
#6  0x120004ef0 in PMPI_Wait (request=0x1201c3b38, status=0x11ffffc68)
    at wait.c:57
#7  0x120002088 in main ()
#8  0x2000014f904 in __libc_start_main (main=0x120001d60 <main>, argc=1,
    argv=0x11ffffcf8, init=0x120001c80 <_init>, fini=0x120037160 <_fini>,
    rtld_fini=0x2000011d980, stack_end=0x11ffffce0)
    at ../sysdeps/generic/libc-start.c:92

--------------------------------------------
mpi_tbet.c (application/octet-stream, 2.6 KB)
#include <stdlib.h>
#include <stdio.h>
#include "mpi.h"

int MPI_ProcCount=2;
int MPI_MsgTest=1;
int MPI_TestCount=100;
int MPI_TestSize=130000;
int MPI_CurrentProcIdent;
#define dvm_exit exit
#define DVM_COMM_WORLD MPI_COMM_WORLD

void main(int argc,char **argv)
{ int             i, ierr;
  MPI_Status      Status;
  char           *sptr, *rptr;
  MPI_Request    *rReq0, *sReq0, *rReq, *sReq;
  int             proc;
    MPI_Init(&argc,&argv);
    MPI_Comm_size(MPI_COMM_WORLD,&MPI_ProcCount);
    MPI_Comm_rank(MPI_COMM_WORLD,&MPI_CurrentProcIdent);

  setbuf(stdout, NULL);
  setbuf(stderr, NULL);
  	
  if(MPI_ProcCount != 2 || MPI_MsgTest == 0)
     return;

  sptr  = (char *)malloc(MPI_TestCount * MPI_TestSize);

  if(sptr == NULL)
  {  printf("**** testmpi: no memory. sptr=NULL.\n");
     exit(1);
  }

  rptr  = (char *)malloc(MPI_TestCount * MPI_TestSize);

  if(rptr == NULL)
  {  printf("**** testmpi: no memory. rptr=NULL.\n");
     exit(1);
  }

  rReq0 = (MPI_Request *)malloc(MPI_TestCount * sizeof(MPI_Request));

  if(rReq0 == NULL)
  {  printf("**** testmpi: no memory. rReq0=NULL.\n");
     exit(1);
  }

  sReq0 = (MPI_Request *)malloc(MPI_TestCount * sizeof(MPI_Request));

  if(sReq0 == NULL)
  {  printf("**** testmpi: no memory. sReq0=NULL.\n");
     exit(1);
  }

  if(MPI_CurrentProcIdent == 0)
  {  printf("*** Start of mpi test ***\n");
     printf("MPI_MsgTest=%d MPI_TestCount=%d MPI_TestSize=%d\n",
            MPI_MsgTest, MPI_TestCount, MPI_TestSize);
  }

  if(MPI_CurrentProcIdent == 0)
     proc = 1;
  else
     proc = 0;

  rReq = rReq0;
  sReq = sReq0;

  for(i=0; i < MPI_TestCount; i++)
  { ierr= MPI_Irecv(rptr, MPI_TestSize, MPI_BYTE, proc, 1,
               DVM_COMM_WORLD, rReq);
  if(ierr != NULL)
  {  printf("**** testmpi: LIMIT of Irecv, i=%d\n",i);
     exit(1);
  }
    printf("testmpi: Irecv, i=%d\n",i);
     rptr += MPI_TestSize;
     rReq++;
  }

  for(i=0; i < MPI_TestCount; i++)
  {  if(MPI_MsgTest > 1)
     ierr=MPI_Issend(sptr, MPI_TestSize, MPI_BYTE, proc, 1,
                   DVM_COMM_WORLD, sReq);
     else
      ierr=MPI_Isend(sptr, MPI_TestSize, MPI_BYTE, proc, 1,
                  DVM_COMM_WORLD, sReq);

  if(ierr != NULL)
  {  printf("**** testmpi: LIMIT of Isend, i=%d\n",i);
     exit(1);
  }
    printf("testmpi: Isend or Issend, i=%d\n",i);

     sptr += MPI_TestSize;
     sReq++;
  }

  rReq = rReq0;
  sReq = sReq0;

  for(i=0; i < MPI_TestCount; i++)
  {  MPI_Wait(sReq, &Status);
     sReq++;
  }

  for(i=0; i < MPI_TestCount; i++)
  {  MPI_Wait(rReq, &Status);
     rReq++;
  }

//  if(MPI_CurrentProcIdent == 0)
     printf("*** End of mpi test ***\n");
MPI_Finalize();
  return;
}
m0,n2 (application/octet-stream, 6.1 KB) - not displayed
m1,n2 (application/octet-stream, 6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.