10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 04:43:45 +01:00

NEED dav ok

This commit is contained in:
AbdAmmar 2022-09-07 15:54:47 +02:00
parent 4665357587
commit 40cb9e6f35

View File

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