Skip to content

Commit

Permalink
Workaround for non-fetch AMO on CXI
Browse files Browse the repository at this point in the history
  • Loading branch information
wrrobin committed May 29, 2024
1 parent 934f44a commit d6e2abf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,13 @@ AC_ARG_ENABLE([ofi-inject],
[AC_HELP_STRING([--disable-ofi-inject],
[Disable OFI inject by default (default: enabled)])])
AS_IF([test "$enable_ofi_inject" = "no"],
[AC_DEFINE([DISABLE_OFI_INJECT], [0], [If defined, the OFI will not use fi_inject.])])
[AC_DEFINE([DISABLE_OFI_INJECT], [1], [If defined, the OFI will not use fi_inject.])])

AC_ARG_ENABLE([nonfetch-amo],
[AC_HELP_STRING([--disable-nonfetch-amo],
[Disable non-fetching AMO and replace them with fetching AMO (default: enabled)])])
AS_IF([test "$enable_nonfetch_amo" = "no"],
[AC_DEFINE([DISABLE_NONFETCH_AMO], [1], [If defined, SOS will fetch values for any AMO.])])

AC_ARG_WITH([oshrun-launcher],
[AC_HELP_STRING([--with-oshrun-launcher],
Expand Down
5 changes: 5 additions & 0 deletions src/shmem_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,13 @@ shmem_internal_atomic(shmem_ctx_t ctx, void *target, const void *source, size_t
if (shmem_shr_transport_use_atomic(ctx, target, len, pe, datatype)) {
shmem_shr_transport_atomic(ctx, target, source, len, pe, op, datatype);
} else {
#ifdef DISABLE_NONFETCH_AMO
shmem_transport_fetch_atomic((shmem_transport_ctx_t *)ctx, target,
source, target, len, pe, op, datatype);
#else
shmem_transport_atomic((shmem_transport_ctx_t *)ctx, target, source,
len, pe, op, datatype);
#endif
}
}

Expand Down

0 comments on commit d6e2abf

Please sign in to comment.