2019-01-25 11:39:31 +01:00
|
|
|
BEGIN_PROVIDER [ integer, n_states_diag ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Number of states to consider during the Davdison diagonalization
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
logical :: has
|
|
|
|
PROVIDE ezfio_filename
|
|
|
|
if (mpi_master) then
|
|
|
|
|
|
|
|
call ezfio_has_davidson_n_states_diag(has)
|
|
|
|
if (has) then
|
|
|
|
call ezfio_get_davidson_n_states_diag(n_states_diag)
|
|
|
|
else
|
|
|
|
print *, 'davidson/n_states_diag not found in EZFIO file'
|
|
|
|
stop 1
|
|
|
|
endif
|
2019-11-18 13:21:51 +01:00
|
|
|
n_states_diag = max(2,N_states * N_states_diag)
|
2019-01-25 11:39:31 +01:00
|
|
|
endif
|
|
|
|
IRP_IF MPI_DEBUG
|
|
|
|
print *, irp_here, mpi_rank
|
|
|
|
call MPI_BARRIER(MPI_COMM_WORLD, ierr)
|
|
|
|
IRP_ENDIF
|
|
|
|
IRP_IF MPI
|
|
|
|
include 'mpif.h'
|
|
|
|
integer :: ierr
|
|
|
|
call MPI_BCAST( n_states_diag, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
|
|
|
|
if (ierr /= MPI_SUCCESS) then
|
|
|
|
stop 'Unable to read n_states_diag with MPI'
|
|
|
|
endif
|
|
|
|
IRP_ENDIF
|
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|