10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-08 07:03:52 +01:00
QuantumPackage/src/davidson_keywords/input.irp.f

39 lines
918 B
Fortran
Raw Normal View History

2023-03-15 10:23:48 +01:00
! ---
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
2023-03-15 10:23:48 +01:00
call ezfio_has_davidson_keywords_n_states_diag(has)
2019-01-25 11:39:31 +01:00
if (has) then
2023-03-15 10:23:48 +01:00
call ezfio_get_davidson_keywords_n_states_diag(n_states_diag)
2019-01-25 11:39:31 +01:00
else
2023-03-15 10:23:48 +01:00
print *, 'davidson_keywords/n_states_diag not found in EZFIO file'
2019-01-25 11:39:31 +01:00
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
2023-03-15 10:23:48 +01:00
! ---