|
5 | 5 | * reserved. |
6 | 6 | * Copyright (c) 2014 Intel, Inc. All rights reserved. |
7 | 7 | * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. |
8 | | - * Copyright (c) 2015-2016 Research Organization for Information Science |
| 8 | + * Copyright (c) 2015-2017 Research Organization for Information Science |
9 | 9 | * and Technology (RIST). All rights reserved. |
10 | 10 | * $COPYRIGHT$ |
11 | 11 | * |
|
21 | 21 | #include "ompi/mca/osc/base/osc_base_obj_convert.h" |
22 | 22 | #include "ompi/request/request.h" |
23 | 23 | #include "opal/util/sys_limits.h" |
| 24 | +#include "opal/include/opal/align.h" |
24 | 25 |
|
25 | 26 | #include "osc_sm.h" |
26 | 27 |
|
@@ -211,7 +212,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit |
211 | 212 | int i, flag; |
212 | 213 | size_t pagesize; |
213 | 214 | size_t state_size; |
214 | | - int posts_size, post_size = (comm_size + 63) / 64; |
| 215 | + size_t posts_size, post_size = (comm_size + 63) / 64; |
215 | 216 |
|
216 | 217 | OPAL_OUTPUT_VERBOSE((1, ompi_osc_base_framework.framework_output, |
217 | 218 | "allocating shared memory region of size %ld\n", (long) size)); |
@@ -246,7 +247,9 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit |
246 | 247 |
|
247 | 248 | /* user opal/shmem directly to create a shared memory segment */ |
248 | 249 | state_size = sizeof(ompi_osc_sm_global_state_t) + sizeof(ompi_osc_sm_node_state_t) * comm_size; |
| 250 | + state_size += OPAL_ALIGN_PAD_AMOUNT(state_size, 64); |
249 | 251 | posts_size = comm_size * post_size * sizeof (uint64_t); |
| 252 | + posts_size += OPAL_ALIGN_PAD_AMOUNT(posts_size, 64); |
250 | 253 | if (0 == ompi_comm_rank (module->comm)) { |
251 | 254 | char *data_file; |
252 | 255 | if (asprintf(&data_file, "%s"OPAL_PATH_SEP"shared_window_%d.%s", |
|
0 commit comments