1
1

Merge pull request #1178 from igor-ivanov/pr/oshmem-fix-preconnect_all

oshmem: Add skew to the oshmem_preconnect_all
Этот коммит содержится в:
Mike Dubman 2015-12-03 21:00:52 +02:00
родитель a25cf8065d c4fc1ec081
Коммит dc3b138b7f

Просмотреть файл

@ -193,7 +193,8 @@ int oshmem_shmem_preconnect_all(void)
/* force qp creation and rkey exchange for memheap. Does not force exchange of static vars */
if (oshmem_preconnect_all) {
long val;
int nproc = 0;
int nproc;
int my_pe;
int i;
val = 0xdeadbeaf;
@ -206,11 +207,12 @@ int oshmem_shmem_preconnect_all(void)
SHMEM_API_ERROR("shmem_preconnect_all failed");
return OSHMEM_ERR_OUT_OF_RESOURCE;
}
nproc = _num_pes();
nproc = oshmem_num_procs();
my_pe = oshmem_my_proc_id();
for (i = 0; i < nproc; i++) {
shmem_long_p(preconnect_value, val, i);
shmem_long_p(preconnect_value, val, (my_pe + i) % nproc);
}
shmem_fence();
shmem_barrier_all();
SHMEM_API_VERBOSE(5, "Preconnected all PEs");
}