Skip to content

Commit

Permalink
rework workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jan 8, 2016
1 parent 9410f8a commit 6daa145
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/clib/pio_spmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ int pio_swapm(void *sndbuf, int sndlths[], int sdispls[], MPI_Datatype stypes
CheckMPIReturn(MPI_Comm_size(comm, &nprocs),__FILE__,__LINE__);
CheckMPIReturn(MPI_Comm_rank(comm, &mytask),__FILE__,__LINE__);

#ifndef OPEN_MPI
if(max_requests == 0) {
#ifdef DEBUG
int totalrecv=0;
Expand All @@ -260,11 +259,32 @@ int pio_swapm(void *sndbuf, int sndlths[], int sdispls[], MPI_Datatype stypes
}
printf("%s %d totalsend %d totalrecv %d \n",__FILE__,__LINE__,totalsend,totalrecv);

#endif
#ifdef OPEN_MPI
for(int i=0;i<nprocs;i++){
if(stypes[i]==MPI_DATATYPE_NULL){
stypes[i]=MPI_CHAR;
}
if(rtypes[i]==MPI_DATATYPE_NULL){
rtypes[i]=MPI_CHAR;
}
}
#endif
CheckMPIReturn(MPI_Alltoallw( sndbuf, sndlths, sdispls, stypes, rcvbuf, rcvlths, rdispls, rtypes, comm),__FILE__,__LINE__);

#ifdef OPEN_MPI
for(int i=0;i<nprocs;i++){
if(stypes[i]==MPI_CHAR){
stypes[i]=MPI_DATATYPE_NULL;
}
if(rtypes[i]==MPI_CHAR){
rtypes[i]=MPI_DATATYPE_NULL;
}
}
#endif
return PIO_NOERR;
}
#endif


int tag;
int offset_t;
Expand Down

0 comments on commit 6daa145

Please sign in to comment.