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 !===============================================================================