converted roc_shmemx to roc_shmem

This commit is contained in:
Yiltan Temucin
2024-11-12 08:37:56 -06:00
parent 958575d8a4
commit c2b736ef3d
10 changed files with 244 additions and 244 deletions
+4 -4
View File
@@ -44,7 +44,7 @@ using namespace rocshmem;
#define LOOPS 25000
static double shmemx_wtime(void) {
static double shmem_wtime(void) {
struct timeval tv;
gettimeofday(&tv, NULL);
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0;
@@ -86,11 +86,11 @@ int main(int argc, char *argv[]) {
roc_shmem_barrier_all();
neighbor = (my_pe + 1) % npes;
start_time = shmemx_wtime();
start_time = shmem_wtime();
for (j = 0, elapsed = 0.0; j < loops; j++) {
start_time = shmemx_wtime();
start_time = shmem_wtime();
lval = roc_shmem_int64_atomic_fetch_inc((int64_t *)&data[1], neighbor);
elapsed += shmemx_wtime() - start_time;
elapsed += shmem_wtime() - start_time;
if (lval != (long)j) {
fprintf(stderr, "[%d] Test: FAIL previous val %ld != %d Exit.\n", my_pe,
lval, j);