6 int main( int argc, char **argv )
14 buf = (char *)malloc(32*1024);
15 MPI_Init(&argc, &argv);
16 MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
17 MPI_Comm_size ( MPI_COMM_WORLD, &size );
19 if (size > 10) return 1;
22 for ( i = 1; i < size; i++ )
23 MPI_Isend(buf,1024,MPI_BYTE,i,0,MPI_COMM_WORLD,&req[i]);
24 MPI_Waitall(size-1, &req[1], &stat[1]); /* Core dumps here! */
27 MPI_Recv(buf,1024,MPI_BYTE,0,0,MPI_COMM_WORLD,&status);
35 int MPIND_Waitall(count, array_of_requests, array_of_statuses )
37 MPI_Request array_of_requests[];
38 MPI_Status array_of_statuses[];
43 for (i = 0; i < count; i++) {
44 if (!array_of_requests[i]) continue;
45 MPID_complete_send(&array_of_requests[i]->shandle,
46 &(array_of_statuses[i]) );
48 MPIND_Request_free( &array_of_requests[i] ); /* Core dumps here! */
49 array_of_requests[i] = NULL;
55 #define MPID_ND_free_send_handle( a ) if ((a)->buffer) {FREE((a)->buffer);}
57 int MPIND_Request_free( request )
60 int errno = MPI_SUCCESS;
62 printf("Should be core dumping here (buffer = %d)...\n",
63 (&((*request)->shandle.dev_shandle))->buffer);
64 MPID_ND_free_send_handle(&((*request)->shandle.dev_shandle));
65 printf("and not reaching here!\n");
66 SBfree( MPIR_shandles, *request );