Skip to content

Commit

Permalink
Trial check; will revert
Browse files Browse the repository at this point in the history
  • Loading branch information
wrrobin committed Feb 13, 2024
1 parent ac09bc3 commit 72f8e11
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions src/shmem_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "transport.h"
#include "shr_transport.h"

static inline
/*static inline
void
shmem_internal_put_scalar(shmem_ctx_t ctx, void *target, const void *source, size_t len, int pe)
{
Expand All @@ -41,7 +41,7 @@ shmem_internal_put_scalar(shmem_ctx_t ctx, void *target, const void *source, siz
} else {
shmem_transport_put_scalar((shmem_transport_ctx_t *)ctx, target, source, len, pe);
}
}
}*/


static inline
Expand All @@ -59,6 +59,34 @@ shmem_internal_put_nb(shmem_ctx_t ctx, void *target, const void *source, size_t
}
}

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_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_scalar(ctx, target, source, len, pe);
} else {
long completion = 0;
#ifndef DISABLE_OFI_INJECT
shmem_transport_put_scalar((shmem_transport_ctx_t *)ctx, target, source, len, pe);
#else
shmem_transport_put_nb((shmem_transport_ctx_t *)ctx, target, source, len, pe, &completion);
shmem_internal_put_wait(ctx, &completion);
#endif
}
}


static inline
void
shmem_internal_put_signal_nbi(shmem_ctx_t ctx, void *target, const void *source, size_t len,
Expand Down Expand Up @@ -106,13 +134,13 @@ shmem_internal_put_ct_nb(shmemx_ct_t ct, void *target, const void *source, size_
}


static inline
/*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 */
}
*/ /* on-node is always blocking, so this is a no-op for them */
/*}*/


static inline
Expand Down

0 comments on commit 72f8e11

Please sign in to comment.