From 1795ca2abd36ec3a3d0803cfed0b5728d5604083 Mon Sep 17 00:00:00 2001 From: "Rahman, Md" Date: Tue, 13 Feb 2024 13:51:38 -0800 Subject: [PATCH 1/2] Using put_nb for iput when OFI inject is disabled Trial check; will revert Minimal change for put_scalar to disable fi_inject Minor --- src/shmem_comm.h | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/src/shmem_comm.h b/src/shmem_comm.h index 8624f653..f10c6b0d 100644 --- a/src/shmem_comm.h +++ b/src/shmem_comm.h @@ -32,30 +32,45 @@ static inline void -shmem_internal_put_scalar(shmem_ctx_t ctx, void *target, const void *source, size_t len, int pe) +shmem_internal_put_nb(shmem_ctx_t ctx, void *target, const void *source, size_t len, int pe, + long *completion) { - shmem_internal_assert(len > 0); + if (len == 0) + return; if (shmem_shr_transport_use_write(ctx, target, source, len, pe)) { - shmem_shr_transport_put_scalar(ctx, target, source, len, pe); + shmem_shr_transport_put(ctx, target, source, len, pe); } else { - shmem_transport_put_scalar((shmem_transport_ctx_t *)ctx, target, source, len, pe); + shmem_transport_put_nb((shmem_transport_ctx_t *)ctx, target, source, len, pe, completion); } } static inline void -shmem_internal_put_nb(shmem_ctx_t ctx, void *target, const void *source, size_t len, int pe, - long *completion) +shmem_internal_put_wait(shmem_ctx_t ctx, long *completion) { - if (len == 0) - return; + shmem_transport_put_wait((shmem_transport_ctx_t *)ctx, completion); + /* on-node is always blocking, so this is a no-op for them */ +} + + +static inline +void +shmem_internal_put_scalar(shmem_ctx_t ctx, void *target, const void *source, size_t len, int pe) +{ + shmem_internal_assert(len > 0); if (shmem_shr_transport_use_write(ctx, target, source, len, pe)) { - shmem_shr_transport_put(ctx, target, source, len, pe); + shmem_shr_transport_put_scalar(ctx, target, source, len, pe); } else { - shmem_transport_put_nb((shmem_transport_ctx_t *)ctx, target, source, len, pe, completion); +#ifndef DISABLE_OFI_INJECT + shmem_transport_put_scalar((shmem_transport_ctx_t *)ctx, target, source, len, pe); +#else + long completion = 0; + shmem_transport_put_nb((shmem_transport_ctx_t *)ctx, target, source, len, pe, &completion); + shmem_internal_put_wait(ctx, &completion); +#endif } } @@ -106,15 +121,6 @@ shmem_internal_put_ct_nb(shmemx_ct_t ct, void *target, const void *source, size_ } -static inline -void -shmem_internal_put_wait(shmem_ctx_t ctx, long *completion) -{ - shmem_transport_put_wait((shmem_transport_ctx_t *)ctx, completion); - /* on-node is always blocking, so this is a no-op for them */ -} - - static inline void shmem_internal_get(shmem_ctx_t ctx, void *target, const void *source, size_t len, int pe) From d1ff333ebcdced6b28bbd1451f9749ae980b5e1f Mon Sep 17 00:00:00 2001 From: "Rahman, Md" Date: Wed, 14 Feb 2024 08:07:43 -0800 Subject: [PATCH 2/2] Added a CI check --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17e21f7f..3bb942ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,6 +144,9 @@ jobs: - config_name: Manpages sos_config: --enable-manpages --enable-pmi-simple libfabric_version: v1.13.x + - config_name: Without OFI inject + sos_config: --disable-ofi-inject --enable-pmi-simple + libfabric_version: v1.13.x name: OFI ${{ matrix.libfabric_version }} (${{ matrix.config_name }})