Use new naming scheme

[ROCm/rocshmem commit: fd8dbc7fb6]
This commit is contained in:
Brandon Potter
2024-11-25 14:12:15 -06:00
parent 07088f0f2b
commit 913ce47ef1
179 changed files with 5250 additions and 5251 deletions
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <roc_shmem/roc_shmem.hpp>
#include <rocshmem/rocshmem.hpp>
using namespace rocshmem;
@@ -40,14 +40,14 @@ int main(void) {
long *min_psync, *max_psync;
long *min_pwrk, *max_pwrk;
roc_shmem_init();
rocshmem_init();
me = roc_shmem_my_pe();
npes = roc_shmem_n_pes();
me = rocshmem_my_pe();
npes = rocshmem_n_pes();
src = (long *)roc_shmem_malloc(NELEM * sizeof(long));
dst_max = (long *)roc_shmem_malloc(NELEM * sizeof(long));
dst_min = (long *)roc_shmem_malloc(NELEM * sizeof(long));
src = (long *)rocshmem_malloc(NELEM * sizeof(long));
dst_max = (long *)rocshmem_malloc(NELEM * sizeof(long));
dst_min = (long *)rocshmem_malloc(NELEM * sizeof(long));
for (i = 0; i < NELEM; i++) {
src[i] = me;
@@ -56,22 +56,22 @@ int main(void) {
}
max_psync =
(long *)roc_shmem_malloc(ROC_SHMEM_REDUCE_SYNC_SIZE * sizeof(long));
(long *)rocshmem_malloc(ROCSHMEM_REDUCE_SYNC_SIZE * sizeof(long));
min_psync =
(long *)roc_shmem_malloc(ROC_SHMEM_REDUCE_SYNC_SIZE * sizeof(long));
for (i = 0; i < ROC_SHMEM_REDUCE_SYNC_SIZE; i++) {
max_psync[i] = ROC_SHMEM_SYNC_VALUE;
min_psync[i] = ROC_SHMEM_SYNC_VALUE;
(long *)rocshmem_malloc(ROCSHMEM_REDUCE_SYNC_SIZE * sizeof(long));
for (i = 0; i < ROCSHMEM_REDUCE_SYNC_SIZE; i++) {
max_psync[i] = ROCSHMEM_SYNC_VALUE;
min_psync[i] = ROCSHMEM_SYNC_VALUE;
}
max_pwrk = (long *)roc_shmem_malloc(
(NELEM / 2 + ROC_SHMEM_REDUCE_MIN_WRKDATA_SIZE) * sizeof(long));
min_pwrk = (long *)roc_shmem_malloc(
(NELEM / 2 + ROC_SHMEM_REDUCE_MIN_WRKDATA_SIZE) * sizeof(long));
max_pwrk = (long *)rocshmem_malloc(
(NELEM / 2 + ROCSHMEM_REDUCE_MIN_WRKDATA_SIZE) * sizeof(long));
min_pwrk = (long *)rocshmem_malloc(
(NELEM / 2 + ROCSHMEM_REDUCE_MIN_WRKDATA_SIZE) * sizeof(long));
if (me == 0) printf("Shrinking active set test\n");
roc_shmem_barrier_all();
rocshmem_barrier_all();
/* A total of npes tests are performed, where the active set in each test
* includes PEs i..npes-1 */
@@ -81,7 +81,7 @@ int main(void) {
if (me == i)
printf(" + PE_start=%d, logPE_stride=0, PE_size=%d\n", i, npes - i);
roc_shmem_ctx_long_max_to_all(ROC_SHMEM_CTX_DEFAULT, dst_max, src, NELEM, i,
rocshmem_ctx_long_max_to_all(ROCSHMEM_CTX_DEFAULT, dst_max, src, NELEM, i,
0, npes - i, max_pwrk, max_psync);
/* Validate reduced data */
@@ -96,7 +96,7 @@ int main(void) {
}
}
roc_shmem_ctx_long_min_to_all(ROC_SHMEM_CTX_DEFAULT, dst_min, src, NELEM, i,
rocshmem_ctx_long_min_to_all(ROCSHMEM_CTX_DEFAULT, dst_min, src, NELEM, i,
0, npes - i, min_pwrk, min_psync);
/* Validate reduced data */
@@ -112,17 +112,17 @@ int main(void) {
}
}
roc_shmem_free(src);
roc_shmem_free(dst_max);
roc_shmem_free(dst_min);
rocshmem_free(src);
rocshmem_free(dst_max);
rocshmem_free(dst_min);
roc_shmem_free(max_psync);
roc_shmem_free(min_psync);
rocshmem_free(max_psync);
rocshmem_free(min_psync);
roc_shmem_free(max_pwrk);
roc_shmem_free(min_pwrk);
rocshmem_free(max_pwrk);
rocshmem_free(min_pwrk);
roc_shmem_finalize();
rocshmem_finalize();
return errors != 0;
}