subroutine comm_close() integer :: ierr #ifdef MPI character(len=128) :: msg ! Finalize MPI call MPI_Finalize(ierr) if (ierr /= MPI_SUCCESS) call stop_error("Error finalizing MPI", this_module, 'comm_close') #else ierr = 0 #endif return end subroutine comm_close