From 8c157a8f08ef591702a732bfacbba84889277f2c Mon Sep 17 00:00:00 2001 From: Marc Joos Date: Thu, 16 Jun 2022 14:12:45 +0200 Subject: [PATCH] change shutdown/finalize order of MPI and OpenACC to avoid UCX crashes --- src/subroutines/parallel.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/subroutines/parallel.f90 b/src/subroutines/parallel.f90 index 2ca1d3f..5db5195 100644 --- a/src/subroutines/parallel.f90 +++ b/src/subroutines/parallel.f90 @@ -173,10 +173,6 @@ subroutine finalize_mpi integer :: error=0, ierr -#if OACC == 1 - call acc_shutdown(acc_device_nvidia) -#endif - #if NCCL == 1 nccl_ierr = ncclCommDestroy(nccl_comm) #endif @@ -185,6 +181,10 @@ subroutine finalize_mpi call MPI_Finalize(ierr) #endif +#if OACC == 1 + call acc_shutdown(acc_device_nvidia) +#endif + return end subroutine finalize_mpi !===============================================================================