diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5a555d4..0a10a9ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -156,6 +156,7 @@ jobs: echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV - uses: actions/checkout@v4 with: + fetch-depth: 0 submodules: 'true' - name: Install dependencies run: | @@ -217,6 +218,7 @@ jobs: # SOS - name: Build SOS (${{ matrix.sos_config }}) run: | + git submodule update --remote ./autogen.sh mkdir build; cd build ../configure --prefix=${SOS_INSTALL_DIR} --with-ofi=${LIBFABRIC_INSTALL_DIR} ${{ matrix.sos_config }} @@ -489,6 +491,7 @@ jobs: echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV - uses: actions/checkout@v4 with: + fetch-depth: 0 submodules: 'true' - name: Install dependencies run: | @@ -541,6 +544,7 @@ jobs: # SOS - name: Build SOS (${{ matrix.sos_config }}) run: | + git submodule update --remote ./autogen.sh mkdir build; cd build ../configure --prefix=${SOS_INSTALL_DIR} --with-ucx=${UCX_INSTALL_DIR} ${{ matrix.sos_config }} @@ -581,6 +585,7 @@ jobs: echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV - uses: actions/checkout@v4 with: + fetch-depth: 0 submodules: 'true' - name: Install dependencies run: | @@ -633,6 +638,7 @@ jobs: # SOS - name: Build SOS (${{ matrix.name }}) run: | + git submodule update --remote ./autogen.sh mkdir build; cd build ../configure --prefix=${SOS_INSTALL_DIR} --with-portals4=${PORTALS4_INSTALL_DIR} ${{ matrix.sos_config }} @@ -660,6 +666,7 @@ jobs: echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV - uses: actions/checkout@v4 with: + fetch-depth: 0 submodules: 'true' - name: Install dependencies run: | @@ -688,6 +695,7 @@ jobs: # SOS - name: Build SOS (${{ matrix.name }}) run: | + git submodule update --remote ./autogen.sh mkdir build; cd build ../configure --prefix=${SOS_INSTALL_DIR} ${{ matrix.sos_config }} diff --git a/mpp/shmemx.h4 b/mpp/shmemx.h4 index 693be25c..04bcfb91 100644 --- a/mpp/shmemx.h4 +++ b/mpp/shmemx.h4 @@ -42,9 +42,57 @@ include(shmemx_c_func.h4)dnl #ifdef __cplusplus } /* extern "C" */ +define(`SHMEM_CXX_IBPUT', +`static inline void shmemx_ibput($2 *target, const $2 *source, + ptrdiff_t tst, ptrdiff_t sst, + size_t bsize, size_t nblocks, int pe) { + shmemx_$1_ibput(target, source, tst, sst, bsize, nblocks, pe); +} +static inline void shmemx_ibput(shmem_ctx_t ctx, $2 *target, const $2 *source, + ptrdiff_t tst, ptrdiff_t sst, + size_t bsize, size_t nblocks, int pe) { + shmemx_ctx_$1_ibput(ctx, target, source, tst, sst, bsize, nblocks, pe); +}')dnl +SHMEM_CXX_DEFINE_FOR_RMA(`SHMEM_CXX_IBPUT') + +define(`SHMEM_CXX_IBGET', +`static inline void shmemx_ibget($2 *target, const $2 *source, + ptrdiff_t tst, ptrdiff_t sst, + size_t bsize, size_t nblocks, int pe) { + shmemx_$1_ibget(target, source, tst, sst, bsize, nblocks, pe); +} +static inline void shmemx_ibget(shmem_ctx_t ctx, $2 *target, const $2 *source, + ptrdiff_t tst, ptrdiff_t sst, + size_t bsize, size_t nblocks, int pe) { + shmemx_ctx_$1_ibget(ctx, target, source, tst, sst, bsize, nblocks, pe); +}')dnl +SHMEM_CXX_DEFINE_FOR_RMA(`SHMEM_CXX_IBGET') + /* C11 Generic Macros */ #elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(SHMEM_INTERNAL_INCLUDE)) +define(`SHMEM_C11_GEN_IBPUT', ` $2*: shmemx_$1_ibput')dnl +define(`SHMEM_CTX_C11_GEN_IBPUT', ` $2*: shmemx_ctx_$1_ibput')dnl +#define shmemx_ibput(...) \ + _Generic(SHMEM_C11_TYPE_EVAL_PTR(SHMEM_C11_ARG0(__VA_ARGS__)), \ + shmem_ctx_t: \ + _Generic(SHMEM_C11_TYPE_EVAL_PTR(SHMEM_C11_ARG1(__VA_ARGS__)), \ +SHMEM_BIND_C11_RMA(`SHMEM_CTX_C11_GEN_IBPUT', `, \') \ + ), \ +SHMEM_BIND_C11_RMA(`SHMEM_C11_GEN_IBPUT', `, \') \ + )(__VA_ARGS__) + +define(`SHMEM_C11_GEN_IBGET', ` $2*: shmemx_$1_ibget')dnl +define(`SHMEM_CTX_C11_GEN_IBGET', ` $2*: shmemx_ctx_$1_ibget')dnl +#define shmemx_ibget(...) \ + _Generic(SHMEM_C11_TYPE_EVAL_PTR(SHMEM_C11_ARG0(__VA_ARGS__)), \ + shmem_ctx_t: \ + _Generic(SHMEM_C11_TYPE_EVAL_PTR(SHMEM_C11_ARG1(__VA_ARGS__)), \ +SHMEM_BIND_C11_RMA(`SHMEM_CTX_C11_GEN_IBGET', `, \') \ + ), \ +SHMEM_BIND_C11_RMA(`SHMEM_C11_GEN_IBGET', `, \') \ + )(__VA_ARGS__) + #endif /* C11 */ #endif /* SHMEMX_H */ diff --git a/mpp/shmemx_c_func.h4 b/mpp/shmemx_c_func.h4 index e1e28336..16ebb602 100644 --- a/mpp/shmemx_c_func.h4 +++ b/mpp/shmemx_c_func.h4 @@ -27,6 +27,55 @@ SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_ct_wait(shmemx_ct_t ct, long wait_f SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_register_gettid(uint64_t (*gettid_fn)(void)); +/* Block-Strided RMA Routines */ +define(`SHMEM_C_IBPUT', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_$1_ibput($2 *target, const $2 *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, +SH_PAD(`$1') size_t bsize, size_t nblocks, int pe)')dnl +SHMEM_DECLARE_FOR_RMA(`SHMEM_C_IBPUT') + +define(`SHMEM_C_CTX_IBPUT', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_ctx_$1_ibput(shmem_ctx_t ctx, $2 *target, const $2 *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, +SH_PAD(`$1') size_t bsize, size_t nblocks, int pe)')dnl +SHMEM_DECLARE_FOR_RMA(`SHMEM_C_CTX_IBPUT') + +define(`SHMEM_C_IBPUT_N', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_ibput$1(void *target, const void *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, size_t bsize, size_t nblocks, +SH_PAD(`$1') int pe)')dnl +SHMEM_DECLARE_FOR_SIZES(`SHMEM_C_IBPUT_N') + +define(`SHMEM_C_CTX_IBPUT_N', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_ctx_ibput$1(shmem_ctx_t ctx, void *target, const void *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, size_t bsize, size_t nblocks, +SH_PAD(`$1') int pe)')dnl +SHMEM_DECLARE_FOR_SIZES(`SHMEM_C_CTX_IBPUT_N') + +define(`SHMEM_C_IBGET', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_$1_ibget($2 *target, const $2 *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, +SH_PAD(`$1') size_t bsize, size_t nblocks, int pe)')dnl +SHMEM_DECLARE_FOR_RMA(`SHMEM_C_IBGET') + +define(`SHMEM_C_CTX_IBGET', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_ctx_$1_ibget(shmem_ctx_t ctx, $2 *target, const $2 *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, +SH_PAD(`$1') size_t bsize, size_t nblocks, int pe)')dnl +SHMEM_DECLARE_FOR_RMA(`SHMEM_C_CTX_IBGET') + +define(`SHMEM_C_IBGET_N', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_ibget$1(void* target, const void *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, +SH_PAD(`$1') size_t bsize, size_t nblocks, int pe)')dnl +SHMEM_DECLARE_FOR_SIZES(`SHMEM_C_IBGET_N') + +define(`SHMEM_C_CTX_IBGET_N', +`SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_ctx_ibget$1(shmem_ctx_t ctx, void* target, const void *source, +SH_PAD(`$1') ptrdiff_t tst, ptrdiff_t sst, +SH_PAD(`$1') size_t bsize, size_t nblocks, int pe)')dnl +SHMEM_DECLARE_FOR_SIZES(`SHMEM_C_CTX_IBGET_N') + /* Performance Counter Query Routines */ SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_pcntr_get_issued_write(shmem_ctx_t ctx, uint64_t *cntr_value); SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_pcntr_get_issued_read(shmem_ctx_t ctx, uint64_t *cntr_value); diff --git a/src/data_c.c4 b/src/data_c.c4 index 2083fb0b..7274941d 100644 --- a/src/data_c.c4 +++ b/src/data_c.c4 @@ -163,6 +163,26 @@ define(`SHMEM_PROF_DEF_CTX_IPUT_N', #define shmem_ctx_iput$1 pshmem_ctx_iput$1')dnl SHMEM_DEFINE_FOR_SIZES(`SHMEM_PROF_DEF_CTX_IPUT_N') +define(`SHMEM_PROF_DEF_IBPUT', +`#pragma weak shmemx_$1_ibput = pshmemx_$1_ibput +#define shmemx_$1_ibput pshmemx_$1_ibput')dnl +SHMEM_DEFINE_FOR_RMA(`SHMEM_PROF_DEF_IBPUT') + +define(`SHMEM_PROF_DEF_CTX_IBPUT', +`#pragma weak shmemx_ctx_$1_ibput = pshmemx_ctx_$1_ibput +#define shmemx_ctx_$1_ibput pshmemx_ctx_$1_ibput')dnl +SHMEM_DEFINE_FOR_RMA(`SHMEM_PROF_DEF_CTX_IBPUT') + +define(`SHMEM_PROF_DEF_IBPUT_N', +`#pragma weak shmemx_ibput$1 = pshmemx_ibput$1 +#define shmemx_ibput$1 pshmemx_ibput$1')dnl +SHMEM_DEFINE_FOR_SIZES(`SHMEM_PROF_DEF_IBPUT_N') + +define(`SHMEM_PROF_DEF_CTX_IBPUT_N', +`#pragma weak shmemx_ctx_ibput$1 = pshmemx_ctx_ibput$1 +#define shmemx_ctx_ibput$1 pshmemx_ctx_ibput$1')dnl +SHMEM_DEFINE_FOR_SIZES(`SHMEM_PROF_DEF_CTX_IBPUT_N') + define(`SHMEM_PROF_DEF_IGET', `#pragma weak shmem_$1_iget = pshmem_$1_iget #define shmem_$1_iget pshmem_$1_iget')dnl @@ -183,6 +203,26 @@ define(`SHMEM_PROF_DEF_CTX_IGET_N', #define shmem_ctx_iget$1 pshmem_ctx_iget$1')dnl SHMEM_DEFINE_FOR_SIZES(`SHMEM_PROF_DEF_CTX_IGET_N') +define(`SHMEM_PROF_DEF_IBGET', +`#pragma weak shmemx_$1_ibget = pshmemx_$1_ibget +#define shmemx_$1_ibget pshmemx_$1_ibget')dnl +SHMEM_DEFINE_FOR_RMA(`SHMEM_PROF_DEF_IBGET') + +define(`SHMEM_PROF_DEF_CTX_IBGET', +`#pragma weak shmemx_ctx_$1_ibget = pshmemx_ctx_$1_ibget +#define shmemx_ctx_$1_ibget pshmemx_ctx_$1_ibget')dnl +SHMEM_DEFINE_FOR_RMA(`SHMEM_PROF_DEF_CTX_IBGET') + +define(`SHMEM_PROF_DEF_IBGET_N', +`#pragma weak shmemx_ibget$1 = pshmemx_ibget$1 +#define shmemx_ibget$1 pshmemx_ibget$1')dnl +SHMEM_DEFINE_FOR_SIZES(`SHMEM_PROF_DEF_IBGET_N') + +define(`SHMEM_PROF_DEF_CTX_IBGET_N', +`#pragma weak shmemx_ctx_ibget$1 = pshmemx_ctx_ibget$1 +#define shmemx_ctx_ibget$1 pshmemx_ctx_ibget$1')dnl +SHMEM_DEFINE_FOR_SIZES(`SHMEM_PROF_DEF_CTX_IBGET_N') + /* Blocking put with signal */ define(`SHMEM_PROF_DEF_PUT_SIGNAL', `#pragma weak shmem_$1_put_signal = pshmem_$1_put_signal @@ -439,6 +479,31 @@ SHMEM_PROF_DEF_CTX_PUT_N_SIGNAL_NBI(`mem') } \ } +#define SHMEM_DEF_IBPUT(STYPE,TYPE) \ + void SHMEM_FUNCTION_ATTRIBUTES \ + SHMEMX_FUNC_PROTOTYPE(STYPE##_ibput, TYPE *target, \ + const TYPE *source, ptrdiff_t tst, \ + ptrdiff_t sst, size_t bsize, size_t nblocks, int pe) \ + long completion = 0; \ + SHMEM_ERR_CHECK_INITIALIZED(); \ + SHMEM_ERR_CHECK_PE(pe); \ + SHMEM_ERR_CHECK_CTX(ctx); \ + SHMEM_ERR_CHECK_SYMMETRIC(target, sizeof(TYPE) * ((nblocks-1) * tst + bsize)); \ + SHMEM_ERR_CHECK_NULL(source, nblocks); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(tst, bsize); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(sst, bsize); \ + SHMEM_ERR_CHECK_OVERLAP(target, source, \ + sizeof(TYPE) * ((nblocks-1) * tst + bsize), \ + sizeof(TYPE) * ((nblocks-1) * sst + bsize), 0); \ + for ( ; nblocks > 0 ; --nblocks) { \ + shmem_internal_put_nb(ctx, target, source, \ + bsize * sizeof(TYPE), pe, \ + &completion); \ + target += tst; \ + source += sst; \ + } \ + shmem_internal_put_wait(ctx, &completion); \ + } #define SHMEM_DEF_IPUT_N(NAME,SIZE) \ void SHMEM_FUNCTION_ATTRIBUTES \ @@ -459,11 +524,37 @@ SHMEM_PROF_DEF_CTX_PUT_N_SIGNAL_NBI(`mem') for ( ; nelems > 0 ; --nelems) { \ shmem_internal_put_scalar(ctx, target, source, (SIZE), \ pe); \ - target = (uint8_t*)target + tst*(SIZE); \ - source = (uint8_t*)source + sst*(SIZE); \ + target = (uint8_t *) target + tst * (SIZE); \ + source = (uint8_t *) source + sst * (SIZE); \ } \ } +#define SHMEM_DEF_IBPUT_N(NAME,SIZE) \ + void SHMEM_FUNCTION_ATTRIBUTES \ + SHMEMX_FUNC_PROTOTYPE(ibput##NAME, void *target, \ + const void *source, ptrdiff_t tst, \ + ptrdiff_t sst, size_t bsize, size_t nblocks, int pe) \ + long completion = 0; \ + SHMEM_ERR_CHECK_INITIALIZED(); \ + SHMEM_ERR_CHECK_PE(pe); \ + SHMEM_ERR_CHECK_CTX(ctx); \ + SHMEM_ERR_CHECK_SYMMETRIC(target, \ + (SIZE) * ((nblocks-1) * tst + bsize)); \ + SHMEM_ERR_CHECK_NULL(source, nblocks); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(tst, bsize); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(sst, bsize); \ + SHMEM_ERR_CHECK_OVERLAP(target, source, \ + (SIZE) * ((nblocks-1) * tst + bsize), \ + (SIZE) * ((nblocks-1) * sst + bsize), 0); \ + for ( ; nblocks > 0 ; --nblocks) { \ + shmem_internal_put_nb(ctx, target, source, \ + bsize * (SIZE), pe, \ + &completion); \ + target = (uint8_t *) target + tst * (SIZE); \ + source = (uint8_t *) source + sst * (SIZE); \ + } \ + shmem_internal_put_wait(ctx, &completion); \ + } #define SHMEM_DEF_IGET(STYPE,TYPE) \ void SHMEM_FUNCTION_ATTRIBUTES \ @@ -490,6 +581,31 @@ SHMEM_PROF_DEF_CTX_PUT_N_SIGNAL_NBI(`mem') shmem_internal_get_wait(ctx); \ } +#define SHMEM_DEF_IBGET(STYPE,TYPE) \ + void SHMEM_FUNCTION_ATTRIBUTES \ + SHMEMX_FUNC_PROTOTYPE(STYPE##_ibget, TYPE *target, \ + const TYPE *source, \ + ptrdiff_t tst, ptrdiff_t sst, \ + size_t bsize, size_t nblocks, int pe) \ + SHMEM_ERR_CHECK_INITIALIZED(); \ + SHMEM_ERR_CHECK_PE(pe); \ + SHMEM_ERR_CHECK_CTX(ctx); \ + SHMEM_ERR_CHECK_SYMMETRIC(source, sizeof(TYPE) * ((nblocks-1) * sst + bsize)); \ + SHMEM_ERR_CHECK_NULL(target, nblocks); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(tst, bsize); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(sst, bsize); \ + SHMEM_ERR_CHECK_OVERLAP(target, source, \ + sizeof(TYPE) * ((nblocks-1) * tst + bsize), \ + sizeof(TYPE) * ((nblocks-1) * sst + bsize), 0); \ + for ( ; nblocks > 0 ; --nblocks) { \ + shmem_internal_get(ctx, target, source, \ + bsize * sizeof(TYPE), pe); \ + target += tst; \ + source += sst; \ + } \ + shmem_internal_get_wait(ctx); \ + } + #define SHMEM_DEF_IGET_N(NAME,SIZE) \ void SHMEM_FUNCTION_ATTRIBUTES \ SHMEM_FUNC_PROTOTYPE(iget##NAME, void *target, \ @@ -509,8 +625,34 @@ SHMEM_PROF_DEF_CTX_PUT_N_SIGNAL_NBI(`mem') (SIZE) * ((nelems-1) * sst + 1), 0); \ for ( ; nelems > 0 ; --nelems) { \ shmem_internal_get(ctx, target, source, (SIZE), pe);\ - target = (uint8_t*)target + tst*(SIZE); \ - source = (uint8_t*)source + sst*(SIZE); \ + target = (uint8_t *) target + tst * (SIZE); \ + source = (uint8_t *) source + sst * (SIZE); \ + } \ + shmem_internal_get_wait(ctx); \ + } + +#define SHMEM_DEF_IBGET_N(NAME,SIZE) \ + void SHMEM_FUNCTION_ATTRIBUTES \ + SHMEMX_FUNC_PROTOTYPE(ibget##NAME, void *target, \ + const void *source, ptrdiff_t tst, \ + ptrdiff_t sst, size_t bsize, \ + size_t nblocks, int pe) \ + SHMEM_ERR_CHECK_INITIALIZED(); \ + SHMEM_ERR_CHECK_PE(pe); \ + SHMEM_ERR_CHECK_CTX(ctx); \ + SHMEM_ERR_CHECK_SYMMETRIC(source, \ + (SIZE) * ((nblocks-1) * sst + bsize)); \ + SHMEM_ERR_CHECK_NULL(target, nblocks); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(tst, bsize); \ + SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(sst, bsize); \ + SHMEM_ERR_CHECK_OVERLAP(target, source, \ + (SIZE) * ((nblocks-1) * tst + bsize), \ + (SIZE) * ((nblocks-1) * sst + bsize), 0); \ + for ( ; nblocks > 0 ; --nblocks) { \ + shmem_internal_get(ctx, target, source, \ + bsize * (SIZE), pe); \ + target = (uint8_t *) target + tst * (SIZE); \ + source = (uint8_t *) source + sst * (SIZE); \ } \ shmem_internal_get_wait(ctx); \ } @@ -639,8 +781,12 @@ SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_GET_N_NBI') SHMEM_DEF_GET_N_NBI(`mem', `1') SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IPUT') SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IPUT_N') +SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IBPUT') +SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IBPUT_N') SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IGET') SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IGET_N') +SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IBGET') +SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IBGET_N') SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_PUT_SIGNAL') SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_PUT_N_SIGNAL') @@ -676,8 +822,12 @@ SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_GET_N_NBI') SHMEM_DEF_GET_N_NBI(`mem', `1') SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IPUT') SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IPUT_N') +SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IBPUT') +SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IBPUT_N') SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IGET') SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IGET_N') +SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_IBGET') +SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_IBGET_N') SHMEM_DEFINE_FOR_RMA(`SHMEM_DEF_PUT_SIGNAL') SHMEM_DEFINE_FOR_SIZES(`SHMEM_DEF_PUT_N_SIGNAL') diff --git a/src/shmem_internal.h b/src/shmem_internal.h index 5befc852..5785295c 100644 --- a/src/shmem_internal.h +++ b/src/shmem_internal.h @@ -348,6 +348,14 @@ extern hwloc_topology_t shmem_internal_topology; } \ } while (0) +#define SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(stride, bsize) \ + do { \ + if (stride < bsize) { \ + RAISE_ERROR_MSG("Stride argument \"%s\" (%zu), is less than block size %zu\n", \ + #stride, stride, bsize); \ + } \ + } while(0) + #else #define SHMEM_ERR_CHECK_INITIALIZED() #define SHMEM_ERR_CHECK_POSITIVE(arg) @@ -361,7 +369,8 @@ extern hwloc_topology_t shmem_internal_topology; #define SHMEM_ERR_CHECK_OVERLAP(ptr1, ptr2, size1, size2, complete_overlap_allowed) #define SHMEM_ERR_CHECK_NULL(ptr, nelems) #define SHMEM_ERR_CHECK_CMP_OP(op) -#define SHMEM_ERR_CHECK_SIG_OP(op) \ +#define SHMEM_ERR_CHECK_SIG_OP(op) +#define SHMEM_ERR_CHECK_STRIDE_GTE_BSIZE(stride, bsize) #endif /* ENABLE_ERROR_CHECKING */