Commit 487d4146 authored by paulatto's avatar paulatto

Added cleaning of orthpools (used in exx) with a subroutine that only releases the communicators if they had been initialized.




git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13766 c92efa57-630b-4861-b058-cf58834340f0
parent 4ac53a86
......@@ -127,6 +127,7 @@ CONTAINS
CALL mp_comm_free ( intra_pool_comm )
CALL mp_comm_free ( inter_pool_comm )
CALL mp_world_end( )
CALL mp_stop_orthopools( ) ! cleans orthopools if used in exx
!
RETURN
!
......
......@@ -117,9 +117,23 @@ MODULE mp_orthopools
INTEGER :: inter_orthopool_comm = 0 ! inter orthopool communicator
INTEGER :: intra_orthopool_comm = 0 ! intra orthopool communicator
!
LOGICAL :: init_orthopools = .false.
LOGICAL,PRIVATE :: init_orthopools = .false.
!
CONTAINS
!
!----------------------------------------------------------------------------
SUBROUTINE mp_stop_orthopools( )
USE mp, ONLY : mp_comm_free
IMPLICIT NONE
! Free the orthopools communicators (if they had been set up)
IF(init_orthopools) THEN
CALL mp_comm_free ( inter_orthopool_comm )
CALL mp_comm_free ( intra_orthopool_comm )
init_orthopools = .false.
ENDIF
!
RETURN
END SUBROUTINE
!
!----------------------------------------------------------------------------
SUBROUTINE mp_start_orthopools( parent_comm )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment