Skip to content

Commit 9354f1e

Browse files
committed
fix nvshmem free
1 parent 3ad0480 commit 9354f1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nvshmem/mpi_all_to_all_builtin/mpi_all_to_all_builtin.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ int main(int argc, char *argv[]) {
9292
random_fill_host(tmp, data_size * size);
9393

9494
nvshmemx_putmem_on_stream(sendbuff, tmp, data_size * size, mype_node, stream);
95-
nvshmemx_barrier_all_on_stream(stream);
9695
CUDA_CHECK(cudaStreamSynchronize(stream));
96+
nvshmemx_barrier_all_on_stream(stream);
9797

9898
free(tmp);
9999

@@ -134,7 +134,7 @@ int main(int argc, char *argv[]) {
134134

135135
// free device buffers
136136

137-
CUDA_CHECK(cudaFree(sendbuff));
137+
nvshmem_free(sendbuff);
138138
nvshmem_free(recvbuff);
139139

140140
nvshmem_finalize();

0 commit comments

Comments
 (0)