Commit ae584b5a authored by Andreas Marek's avatar Andreas Marek
Browse files

Print info message only at first call

parent 2c4bfd8b
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
integer(kind=MPI_KIND) :: my_pMPI, my_prowMPI, my_pcolMPI, np_rowsMPI, np_colsMPI integer(kind=MPI_KIND) :: my_pMPI, my_prowMPI, my_pcolMPI, np_rowsMPI, np_colsMPI
integer(kind=ik) :: BuffLevelInt, use_cannon integer(kind=ik) :: BuffLevelInt, use_cannon
integer(kind=MPI_KIND) :: mpierr integer(kind=MPI_KIND) :: mpierr
logical, save :: firstCall = .true.
MATH_DATATYPE(kind=rck) :: tmp(self%local_nrows, self%local_ncols) MATH_DATATYPE(kind=rck) :: tmp(self%local_nrows, self%local_ncols)
...@@ -93,17 +94,19 @@ ...@@ -93,17 +94,19 @@
call self%get("cannon_for_generalized",use_cannon,error) call self%get("cannon_for_generalized",use_cannon,error)
#if !defined(WITH_MPI) #if !defined(WITH_MPI)
if(my_p == 0) then if ((my_p == 0) .and. firstCall) then
write(*,*) "Cannons algorithm can only be used with MPI" write(*,*) "Cannons algorithm can only be used with MPI"
write(*,*) "Switching to elpa Hermitian and scalapack" write(*,*) "Switching to elpa Hermitian and scalapack"
firstCall = .false.
end if end if
use_cannon = 0 use_cannon = 0
#endif #endif
if (mod(np_cols, np_rows) /= 0) then if (mod(np_cols, np_rows) /= 0) then
if(my_p == 0) then if ((my_p == 0) .and. firstCall) then
write(*,*) "To use Cannons algorithm, np_cols must be a multiple of np_rows." write(*,*) "To use Cannons algorithm, np_cols must be a multiple of np_rows."
write(*,*) "Switching to elpa Hermitian and scalapack" write(*,*) "Switching to elpa Hermitian and scalapack"
firstCall = .false.
end if end if
use_cannon = 0 use_cannon = 0
endif endif
......
Supports Markdown
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