Multi-Node rocshmem_finalize() bug (#138)

This commit is contained in:
Yiltan
2025-06-04 10:02:03 -04:00
committed by GitHub
parent ca5fdd4718
commit 3f01d89207
18 changed files with 175 additions and 237 deletions
+5 -18
View File
@@ -54,19 +54,9 @@
*/
#include <iostream>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime.h>
#include <rocshmem/rocshmem.hpp>
#define CHECK_HIP(condition) { \
hipError_t error = condition; \
if(error != hipSuccess){ \
fprintf(stderr,"HIP error: %d line: %d\n", error, __LINE__); \
MPI_Abort(MPI_COMM_WORLD, error); \
} \
}
#include "util.h"
using namespace rocshmem;
@@ -121,16 +111,13 @@ int main(int argc, char **argv)
nelem = atoi(argv[1]);
}
int my_pe = rocshmem_my_pe();
int npes = rocshmem_n_pes();
int ndevices, my_device = 0;
CHECK_HIP(hipGetDeviceCount(&ndevices));
my_device = my_pe % ndevices;
CHECK_HIP(hipSetDevice(my_device));
CHECK_HIP(hipSetDevice(get_launcher_local_rank()));
rocshmem_init();
int my_pe = rocshmem_my_pe();
int npes = rocshmem_n_pes();
int *source = (int *)rocshmem_malloc(nelem * sizeof(int));
int *dest = (int *)rocshmem_malloc(nelem * sizeof(int));
if (NULL == source || NULL == dest) {