|
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 Research Organization for Information Science |
| 8 | + * Copyright (c) 2015-2016 Research Organization for Information Science |
9 | 9 | * and Technology (RIST). All rights reserved. |
10 | 10 | * $COPYRIGHT$ |
11 | 11 | * |
@@ -214,10 +214,9 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit |
214 | 214 | module->posts[0] = (uint64_t *) (module->posts + 1); |
215 | 215 | } else { |
216 | 216 | unsigned long total, *rbuf; |
217 | | - char *data_file; |
218 | 217 | int i, flag; |
219 | 218 | size_t pagesize; |
220 | | - size_t state_size; |
| 219 | + size_t state_size; |
221 | 220 | int posts_size, post_size = (comm_size + 63) / 64; |
222 | 221 |
|
223 | 222 | OPAL_OUTPUT_VERBOSE((1, ompi_osc_base_framework.framework_output, |
@@ -251,22 +250,24 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit |
251 | 250 | total += rbuf[i]; |
252 | 251 | } |
253 | 252 |
|
254 | | - if (asprintf(&data_file, "%s"OPAL_PATH_SEP"shared_window_%d.%s", |
255 | | - ompi_process_info.job_session_dir, |
256 | | - ompi_comm_get_cid(module->comm), |
257 | | - ompi_process_info.nodename) < 0) { |
258 | | - return OMPI_ERR_OUT_OF_RESOURCE; |
259 | | - } |
260 | | - |
261 | 253 | /* user opal/shmem directly to create a shared memory segment */ |
262 | 254 | state_size = sizeof(ompi_osc_sm_global_state_t) + sizeof(ompi_osc_sm_node_state_t) * comm_size; |
263 | 255 | posts_size = comm_size * post_size * sizeof (uint64_t); |
264 | | - if (0 == ompi_comm_rank (module->comm)) { |
265 | | - ret = opal_shmem_segment_create (&module->seg_ds, data_file, total + pagesize + state_size + posts_size); |
266 | | - if (OPAL_SUCCESS != ret) { |
267 | | - goto error; |
268 | | - } |
269 | | - } |
| 256 | + if (0 == ompi_comm_rank (module->comm)) { |
| 257 | + char *data_file; |
| 258 | + if (asprintf(&data_file, "%s"OPAL_PATH_SEP"shared_window_%d.%s", |
| 259 | + ompi_process_info.proc_session_dir, |
| 260 | + ompi_comm_get_cid(module->comm), |
| 261 | + ompi_process_info.nodename) < 0) { |
| 262 | + return OMPI_ERR_OUT_OF_RESOURCE; |
| 263 | + } |
| 264 | + |
| 265 | + ret = opal_shmem_segment_create (&module->seg_ds, data_file, total + pagesize + state_size + posts_size); |
| 266 | + free(data_file); |
| 267 | + if (OPAL_SUCCESS != ret) { |
| 268 | + goto error; |
| 269 | + } |
| 270 | + } |
270 | 271 |
|
271 | 272 | ret = module->comm->c_coll.coll_bcast (&module->seg_ds, sizeof (module->seg_ds), MPI_BYTE, 0, |
272 | 273 | module->comm, module->comm->c_coll.coll_bcast_module); |
|
0 commit comments