Skip to content

Commit 14ad197

Browse files
committed
btl/ugni: fix very poor aries bw problem
The handling of RDMA get alignment in ugni BTL for Aries (cray xc) was wrong, resulting in very poor bandwidth for ugni BTL on aries. Verified using osu_bw now gives sensible bandwidth on Aries. Fixes open-mpi#1005 Signed-off-by: Howard Pritchard <[email protected]> (cherry picked from commit open-mpi/ompi@eaba98c)
1 parent 170fad5 commit 14ad197

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

opal/mca/btl/ugni/btl_ugni_component.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ btl_ugni_component_register(void)
231231
/* determine if there are get alignment restrictions */
232232
GNI_GetDeviceType (&device_type);
233233

234+
/*
235+
* see def. of ALIGNMENT_MASK to figure this one out
236+
*/
234237
if (GNI_DEVICE_GEMINI == device_type) {
235238
mca_btl_ugni_module.super.btl_get_alignment = 4;
236239
} else {

opal/mca/btl/ugni/btl_ugni_get.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
#include "btl_ugni_rdma.h"
1414
#include "btl_ugni_smsg.h"
1515

16+
/*
17+
* taken from osc_rdma_comm.h, ugh.
18+
*/
19+
20+
#define ALIGNMENT_MASK(x) ((x) ? (x) - 1 : 0)
21+
1622
int mca_btl_ugni_get (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, void *local_address,
1723
uint64_t remote_address, mca_btl_base_registration_handle_t *local_handle,
1824
mca_btl_base_registration_handle_t *remote_handle, size_t size, int flags,
@@ -21,7 +27,8 @@ int mca_btl_ugni_get (mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t
2127
bool check;
2228

2329
/* Check if the get is aligned/sized on a multiple of 4 */
24-
check = !!((remote_address | (uint64_t)(intptr_t) local_address | size) & (mca_btl_ugni_module.super.btl_get_alignment - 1));
30+
check = !!((remote_address | (uint64_t)(intptr_t) local_address | size) &
31+
ALIGNMENT_MASK(mca_btl_ugni_module.super.btl_get_alignment));
2532

2633
if (OPAL_UNLIKELY(check || size > mca_btl_ugni_module.super.btl_get_limit)) {
2734
BTL_VERBOSE(("RDMA/FMA Get not available due to size or alignment restrictions"));

0 commit comments

Comments
 (0)