qe_pztrtri and qe_pdtrtri: split communicators were created on all processors

but freed only on active processors. Should fix the crashes occurring in long
runs, reported in issue #140. Found by Carlo Cavazzoni.
This commit is contained in:
giannozz 2019-09-10 10:34:12 +02:00 committed by Samuel Ponce
parent 01f11169ed
commit 45d91af273
1 changed files with 7 additions and 9 deletions

View File

@ -3846,11 +3846,10 @@ SUBROUTINE qe_pztrtri ( sll, ldx, n, desc )
END IF
END DO
IF( myrow >= mycol ) THEN
CALL mpi_comm_free( col_comm, ierr )
IF( ierr /= 0 ) &
! split communicator is present and must be freed on all processors
CALL mpi_comm_free( col_comm, ierr )
IF( ierr /= 0 ) &
CALL lax_error__( " pztrtri ", " in mpi_comm_free 25 ", ABS( ierr ) )
END IF
DEALLOCATE(B)
DEALLOCATE(C)
@ -3908,7 +3907,7 @@ END SUBROUTINE qe_pztrtri
SUBROUTINE qe_pdtrtri ( sll, ldx, n, desc )
! pztrtri computes the parallel inversion of a lower triangular matrix
! pdtrtri computes the parallel inversion of a lower triangular matrix
! distribuited among the processes using a 2-D block partitioning.
! The algorithm is based on the schema below and executes the model
! recursively to each column C2 under the diagonal.
@ -4210,11 +4209,10 @@ SUBROUTINE qe_pdtrtri ( sll, ldx, n, desc )
END IF
END DO
IF( myrow >= mycol ) THEN
CALL mpi_comm_free( col_comm, ierr )
IF( ierr /= 0 ) &
! split communicator is present and must be freed on all processors
CALL mpi_comm_free( col_comm, ierr )
IF( ierr /= 0 ) &
CALL lax_error__( " pdtrtri ", " in mpi_comm_free 25 ", ABS( ierr ) )
END IF
DEALLOCATE(B)
DEALLOCATE(C)