Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions oshmem/mca/scoll/basic/scoll_basic_alltoall.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ int mca_scoll_basic_alltoall(struct oshmem_group_t *group,
return rc;
}

/* fence (which currently acts as quiet) is needed
* because scoll level barrier does not guarantee put completion
/* quiet is needed because scoll level barrier does not
* guarantee put completion
*/
MCA_SPML_CALL(fence());
MCA_SPML_CALL(quiet());

/* Wait for operation completion */
SCOLL_VERBOSE(14, "[#%d] Wait for operation completion", group->my_pe);
Expand Down
3 changes: 1 addition & 2 deletions oshmem/mca/scoll/basic/scoll_basic_barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ static int _algorithm_central_counter(struct oshmem_group_t *group,
The root could leave the first barrier and in the second barrier it could get SHMEM_SYNC_WAIT value on
remote node before the remote node receives its SHMEM_SYNC_RUN value in the first barrier
*/
/* TODO: actually it must be quiet */
MCA_SPML_CALL(fence());
MCA_SPML_CALL(quiet());
}
/* Wait for RUN signal */
else {
Expand Down
6 changes: 3 additions & 3 deletions oshmem/mca/scoll/basic/scoll_basic_broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ static int _algorithm_central_counter(struct oshmem_group_t *group,
rc = MCA_SPML_CALL(put(target, nlong, (void *)source, pe_cur));
}
}
/* fence (which currently acts as quiet) is needed
* because scoll level barrier does not guarantee put completion
/* quiet is needed because scoll level barrier does not
* guarantee put completion
*/
MCA_SPML_CALL(fence());
MCA_SPML_CALL(quiet());
}

if (rc == OSHMEM_SUCCESS) {
Expand Down
6 changes: 1 addition & 5 deletions oshmem/mca/spml/base/spml_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,7 @@ int mca_spml_base_wait(void* addr, int cmp, void* value, int datatype)
*/
int mca_spml_base_wait_nb(void* handle)
{
/* TODO fence is a gag for more accurate code
* Use shmem_quiet() (or a function calling shmem_quiet()) or
* shmem_wait_nb() to force completion of transfers for non-blocking operations.
*/
MCA_SPML_CALL(fence());
MCA_SPML_CALL(quiet());

return OSHMEM_SUCCESS;
}
Expand Down
1 change: 1 addition & 0 deletions oshmem/mca/spml/ikrit/spml_ikrit.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ mca_spml_ikrit_t mca_spml_ikrit = {
mca_spml_ikrit_send,
mca_spml_base_wait,
mca_spml_base_wait_nb,
mca_spml_ikrit_fence, /* fence is implemented as quiet */
mca_spml_ikrit_fence,
mca_spml_ikrit_cache_mkeys,
mca_spml_base_rmkey_free,
Expand Down
10 changes: 9 additions & 1 deletion oshmem/mca/spml/spml.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,19 @@ typedef int (*mca_spml_base_module_send_fn_t)(void *buf,
mca_spml_base_put_mode_t mode);

/**
* Wait for completion of all outstanding put() requests
* Assures ordering of delivery of put() requests
*
* @return - OSHMEM_SUCCESS or failure status.
*/
typedef int (*mca_spml_base_module_fence_fn_t)(void);

/**
* Wait for completion of all outstanding put() requests
*
* @return - OSHMEM_SUCCESS or failure status.
*/
typedef int (*mca_spml_base_module_quiet_fn_t)(void);

/**
* Waits for completion of a non-blocking put or get issued by the calling PE.
*
Expand Down Expand Up @@ -321,6 +328,7 @@ struct mca_spml_base_module_1_0_0_t {
mca_spml_base_module_wait_fn_t spml_wait;
mca_spml_base_module_wait_nb_fn_t spml_wait_nb;
mca_spml_base_module_fence_fn_t spml_fence;
mca_spml_base_module_quiet_fn_t spml_quiet;

mca_spml_base_module_mkey_unpack_fn_t spml_rmkey_unpack;
mca_spml_base_module_mkey_free_fn_t spml_rmkey_free;
Expand Down
8 changes: 4 additions & 4 deletions oshmem/mca/spml/ucx/spml_ucx.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ mca_spml_ucx_t mca_spml_ucx = {
mca_spml_ucx_send,
mca_spml_base_wait,
mca_spml_base_wait_nb,
mca_spml_ucx_quiet, /* At the moment fence is the same as quite for
every spml */
mca_spml_ucx_fence,
mca_spml_ucx_quiet,
mca_spml_ucx_rmkey_unpack,
mca_spml_ucx_rmkey_free,
mca_spml_ucx_rmkey_ptr,
Expand Down Expand Up @@ -520,7 +520,7 @@ int mca_spml_ucx_deregister(sshmem_mkey_t *mkeys)
spml_ucx_mkey_t *ucx_mkey;
map_segment_t *mem_seg;

MCA_SPML_CALL(fence());
MCA_SPML_CALL(quiet());
if (!mkeys)
return OSHMEM_SUCCESS;

Expand Down Expand Up @@ -598,7 +598,7 @@ int mca_spml_ucx_fence(void)
{
ucs_status_t err;

err = ucp_worker_flush(mca_spml_ucx.ucp_worker);
err = ucp_worker_fence(mca_spml_ucx.ucp_worker);
if (UCS_OK != err) {
SPML_ERROR("fence failed: %s", ucs_status_string(err));
oshmem_shmem_abort(-1);
Expand Down
4 changes: 2 additions & 2 deletions oshmem/shmem/c/shmem_barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void shmem_barrier(int PE_start, int logPE_stride, int PE_size, long *pSync)

#if OSHMEM_SPEC_COMPAT == 1
/* all outstanding puts must be completed */
shmem_fence();
shmem_quiet();
#endif

/* Create group basing PE_start, logPE_stride and PE_size */
Expand All @@ -54,7 +54,7 @@ void shmem_barrier_all(void)

#if OSHMEM_SPEC_COMPAT == 1
/* all outstanding puts must be completed */
shmem_fence();
shmem_quiet();
#endif

if (mca_scoll_sync_array) {
Expand Down
2 changes: 1 addition & 1 deletion oshmem/shmem/c/shmem_quiet.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
void shmem_quiet(void)
{

MCA_SPML_CALL(fence());
MCA_SPML_CALL(quiet());
}
2 changes: 1 addition & 1 deletion oshmem/shmem/fortran/shmem_quiet_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,

void shmem_quiet_f(void)
{
MCA_SPML_CALL(fence());
MCA_SPML_CALL(quiet());
}