Skip to content

Commit

Permalink
Merge branch 'master' into ejh_uthash_include
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett authored Jul 5, 2019
2 parents 904b56a + 07d2784 commit ffd5b57
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
45 changes: 23 additions & 22 deletions src/clib/pio_spmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ int pio_swapm(void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype *sendty
printf("%s %d %d %d\n",__FILE__,__LINE__,extent, lb);
*/

#ifdef ONEWAY
/* If ONEWAY is true we will post mpi_sendrecv comms instead
* of irecv/send. */
if ((mpierr = MPI_Sendrecv(sptr, sendcounts[my_rank],sendtypes[my_rank],
my_rank, tag, rptr, recvcounts[my_rank], recvtypes[my_rank],
my_rank, tag, comm, &status)))
return check_mpi(NULL, NULL, mpierr, __FILE__, __LINE__);
#else
/* #ifdef ONEWAY */
/* /\* If ONEWAY is true we will post mpi_sendrecv comms instead */
/* * of irecv/send. *\/ */
/* if ((mpierr = MPI_Sendrecv(sptr, sendcounts[my_rank],sendtypes[my_rank], */
/* my_rank, tag, rptr, recvcounts[my_rank], recvtypes[my_rank], */
/* my_rank, tag, comm, &status))) */
/* return check_mpi(NULL, NULL, mpierr, __FILE__, __LINE__); */
/* #else */
if ((mpierr = MPI_Irecv(rptr, recvcounts[my_rank], recvtypes[my_rank],
my_rank, tag, comm, rcvids)))
return check_mpi(NULL, NULL, mpierr, __FILE__, __LINE__);
Expand All @@ -166,7 +166,7 @@ int pio_swapm(void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype *sendty

if ((mpierr = MPI_Wait(rcvids, &status)))
return check_mpi(NULL, NULL, mpierr, __FILE__, __LINE__);
#endif
/* #endif */
}

LOG((2, "Done sending to self... sending to other procs"));
Expand Down Expand Up @@ -288,25 +288,26 @@ int pio_swapm(void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype *sendty
}
ptr = (char *)sendbuf + sdispls[p];

/* On some software stacks MPI_Irsend() is either not available, not
* a major issue anymore, or is buggy. With PIO1 we have found that
* although the code correctly posts receives before the irsends,
* on some systems (software stacks) the code hangs. However the
* code works fine with isends. The USE_MPI_ISEND_FOR_FC macro should be
* used to choose between mpi_irsends and mpi_isends - the default
* is still mpi_irsend
/* On some software stacks MPI_Irsend() is either not
* available, not a major issue anymore, or is buggy. With
* PIO1 we have found that although the code correctly
* posts receives before the irsends, on some systems
* (software stacks) the code hangs. However the code
* works fine with isends. The USE_MPI_ISEND_FOR_FC macro
* should be used to choose between mpi_irsends and
* mpi_isends - the default is still mpi_irsend
*/
if (fc->hs && fc->isend)
{
#ifdef USE_MPI_ISEND_FOR_FC
if ((mpierr = MPI_Isend(ptr, sendcounts[p], sendtypes[p], p, tag, comm,
sndids + istep)))
return check_mpi(NULL, NULL, mpierr, __FILE__, __LINE__);
#else
/* #ifdef USE_MPI_ISEND_FOR_FC */
/* if ((mpierr = MPI_Isend(ptr, sendcounts[p], sendtypes[p], p, tag, comm, */
/* sndids + istep))) */
/* return check_mpi(NULL, NULL, mpierr, __FILE__, __LINE__); */
/* #else */
if ((mpierr = MPI_Irsend(ptr, sendcounts[p], sendtypes[p], p, tag, comm,
sndids + istep)))
return check_mpi(NULL, NULL, mpierr, __FILE__, __LINE__);
#endif
/* #endif */
}
else if (fc->isend)
{
Expand Down
8 changes: 4 additions & 4 deletions tests/general/pio_decomp_fillval.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PIO_TF_AUTO_TEST_SUB_BEGIN nc_write_1d_explicit_fval
PIO_TF_FC_DATA_TYPE, PARAMETER :: BUF_FILLVAL = -2
integer, dimension(1) :: dims
integer :: pio_dim
integer :: i, ierr, lsz
integer :: i, ierr
! iotypes = valid io types
integer, dimension(:), allocatable :: iotypes
character(len=PIO_TF_MAX_STR_LEN), dimension(:), allocatable :: iotype_descs
Expand Down Expand Up @@ -105,7 +105,7 @@ PIO_TF_AUTO_TEST_SUB_BEGIN nc_write_1d_implicit_fval
PIO_TF_FC_DATA_TYPE, PARAMETER :: BUF_FILLVAL = -2
integer, dimension(1) :: dims
integer :: pio_dim
integer :: i, ierr, lsz
integer :: i, ierr
! iotypes = valid io types
integer, dimension(:), allocatable :: iotypes
character(len=PIO_TF_MAX_STR_LEN), dimension(:), allocatable :: iotype_descs
Expand Down Expand Up @@ -208,7 +208,7 @@ PIO_TF_AUTO_TEST_SUB_BEGIN nc_read_1d_explicit_fval
PIO_TF_FC_DATA_TYPE, PARAMETER :: BUF_FILLVAL = -2
integer, dimension(1) :: dims
integer :: pio_dim
integer :: i, ierr, lsz
integer :: i, ierr
! iotypes = valid io types
integer, dimension(:), allocatable :: iotypes
character(len=PIO_TF_MAX_STR_LEN), dimension(:), allocatable :: iotype_descs
Expand Down Expand Up @@ -295,7 +295,7 @@ PIO_TF_AUTO_TEST_SUB_BEGIN nc_read_1d_implicit_fval
integer, parameter :: BUF_FILLVAL = -2
integer, dimension(1) :: dims
integer :: pio_dim
integer :: i, ierr, lsz
integer :: i, ierr
! iotypes = valid io types
integer, dimension(:), allocatable :: iotypes
character(len=PIO_TF_MAX_STR_LEN), dimension(:), allocatable :: iotype_descs
Expand Down

0 comments on commit ffd5b57

Please sign in to comment.