oshmem: Add skew to the oshmem_preconnect_all
Этот коммит содержится в:
родитель
351bd03249
Коммит
c4fc1ec081
@ -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 */
|
/* force qp creation and rkey exchange for memheap. Does not force exchange of static vars */
|
||||||
if (oshmem_preconnect_all) {
|
if (oshmem_preconnect_all) {
|
||||||
long val;
|
long val;
|
||||||
int nproc = 0;
|
int nproc;
|
||||||
|
int my_pe;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
val = 0xdeadbeaf;
|
val = 0xdeadbeaf;
|
||||||
@ -206,11 +207,12 @@ int oshmem_shmem_preconnect_all(void)
|
|||||||
SHMEM_API_ERROR("shmem_preconnect_all failed");
|
SHMEM_API_ERROR("shmem_preconnect_all failed");
|
||||||
return OSHMEM_ERR_OUT_OF_RESOURCE;
|
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++) {
|
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_barrier_all();
|
||||||
SHMEM_API_VERBOSE(5, "Preconnected all PEs");
|
SHMEM_API_VERBOSE(5, "Preconnected all PEs");
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user