Skip to content

Commit d479de3

Browse files
authored
Merge pull request #2111 from hjelmn/v2.0.x_rdma
v2.0.x osc/rdma fixes
2 parents a07b192 + eeb3685 commit d479de3

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

ompi/mca/osc/rdma/osc_rdma_accumulate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ int ompi_osc_rdma_compare_and_swap (const void *origin_addr, const void *compare
703703
return OMPI_ERR_RMA_SYNC;
704704
}
705705

706-
ret = osc_rdma_get_remote_segment (module, peer, target_disp, 8, &target_address, &target_handle);
706+
ret = osc_rdma_get_remote_segment (module, peer, target_disp, dt->super.size, &target_address, &target_handle);
707707
if (OPAL_UNLIKELY(OPAL_SUCCESS != ret)) {
708708
return ret;
709709
}

ompi/mca/osc/rdma/osc_rdma_dynamic.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
3+
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
44
* reserved.
55
* $COPYRIGHT$
66
*
@@ -14,6 +14,7 @@
1414

1515
#include "mpi.h"
1616

17+
#include "opal/util/sys_limits.h"
1718

1819
/**
1920
* ompi_osc_rdma_find_region_containing:
@@ -71,9 +72,11 @@ static ompi_osc_rdma_region_t *find_insertion_point (ompi_osc_rdma_region_t *reg
7172
int mid_index = (max_index + min_index) >> 1;
7273
ompi_osc_rdma_region_t *region = (ompi_osc_rdma_region_t *)((intptr_t) regions + mid_index * region_size);
7374

75+
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "find_insertion_point (%d, %d, %lx, %lu)\n", min_index, max_index, base, region_size);
76+
7477
if (max_index < min_index) {
75-
*region_index = mid_index;
76-
return region;
78+
*region_index = min_index;
79+
return (ompi_osc_rdma_region_t *)((intptr_t) regions + min_index * region_size);
7780
}
7881

7982
if (region->base > base) {
@@ -92,7 +95,7 @@ int ompi_osc_rdma_attach (struct ompi_win_t *win, void *base, size_t len)
9295
osc_rdma_counter_t region_count;
9396
osc_rdma_counter_t region_id;
9497
void *bound;
95-
intptr_t page_size = getpagesize ();
98+
intptr_t page_size = opal_getpagesize ();
9699
int region_index;
97100
int ret;
98101

0 commit comments

Comments
 (0)