diff --git a/INSTALL.rst b/INSTALL.rst index 70111858..59a680d7 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -209,7 +209,7 @@ EZFIO *EZFIO* is the Easy Fortran Input/Output library generator. -* Download EZFIO here : ``_ and move +* Download EZFIO here : ``_ and move the downloaded archive in the :file:`${QP_ROOT}/external` directory * Extract the archive, and rename it as :file:`${QP_ROOT}/external/ezfio` diff --git a/TODO b/TODO index 89312770..36946689 100644 --- a/TODO +++ b/TODO @@ -4,9 +4,7 @@ repertoire plugins * Mettre les fichiers de test dans le directory source * Separer les integrales bielectroniques en AO et MO -* Une facon simple de lancer les calculs en parallele * Creer une page web pas trop degueu et la mettre ici : http://lcpq.github.io/quantum_package -* Version binaire en tar.gz * Un module pour lire les integrales Moleculaires depuis un FCIDUMP * Un module pour lire des integrales Atomiques (voir module de Mimi pour lire les AO Slater) * Include la DFT si c'est propre @@ -40,8 +38,6 @@ * Programmers doc: - * Fetch all IRP documentation via scripts * Example : Simple Hartree-Fock program from scratch - * Config file for Cray diff --git a/include/.gitignore b/include/.gitignore index a3bc38a3..d52be2d2 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -1,3 +1,7 @@ zmq.h +gmp.h +zconf.h +zconf.h +zlib.h zmq_utils.h f77_zmq_free.h diff --git a/plugins/.gitignore b/plugins/.gitignore new file mode 100644 index 00000000..241e560d --- /dev/null +++ b/plugins/.gitignore @@ -0,0 +1,2 @@ +* + diff --git a/src/MPI/mpi.irp.f b/src/MPI/mpi.irp.f index 3517754a..d947f1b9 100644 --- a/src/MPI/mpi.irp.f +++ b/src/MPI/mpi.irp.f @@ -97,3 +97,13 @@ integer8 ; integer*8 ; 8 ; INTEGER8 ;; END_TEMPLATE +subroutine mpi_print(string) + implicit none + BEGIN_DOC +! Print string to stdout if the MPI rank is zero. + END_DOC + character*(*) :: string + if (mpi_master) then + print *, string + endif +end diff --git a/src/Slave/slave_cipsi.irp.f b/src/Slave/slave_cipsi.irp.f index e5cb86f2..3d37047f 100644 --- a/src/Slave/slave_cipsi.irp.f +++ b/src/Slave/slave_cipsi.irp.f @@ -93,12 +93,33 @@ subroutine run_wf ! --------- call wall_time(t0) + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_psi') + IRP_ENDIF if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector threshold_generators') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_generators',threshold_generators,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector threshold_selectors') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_selectors',threshold_selectors,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector energy') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_N_det_generators') + IRP_ENDIF if (zmq_get_N_det_generators (zmq_to_qp_run_socket, 1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_N_det_selectors') + IRP_ENDIF if (zmq_get_N_det_selectors(zmq_to_qp_run_socket, 1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector state_average_weight') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle psi_energy(1:N_states) = energy(1:N_states) TOUCH psi_energy state_average_weight threshold_selectors threshold_generators @@ -114,18 +135,21 @@ subroutine run_wf call wall_time(t1) call write_double(6,(t1-t0),'Broadcast time') + IRP_IF MPI_DEBUG + call mpi_print('Entering OpenMP section') + IRP_ENDIF !$OMP PARALLEL PRIVATE(i) i = omp_get_thread_num() call run_selection_slave(0,i,energy) !$OMP END PARALLEL - print *, 'Selection done' + print *, mpi_rank, ': Selection done' IRP_IF MPI call MPI_BARRIER(MPI_COMM_WORLD, ierr) if (ierr /= MPI_SUCCESS) then print *, irp_here, 'error in barrier' endif IRP_ENDIF - print *, 'All selection done' + call mpi_print('----------') else if (zmq_state(1:8) == 'davidson') then @@ -133,26 +157,33 @@ subroutine run_wf ! -------- call wall_time(t0) + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_N_states_diag') + IRP_ENDIF if (zmq_get_N_states_diag(zmq_to_qp_run_socket,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_psi') + IRP_ENDIF if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector energy') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states_diag) == -1) cycle call wall_time(t1) - if (mpi_master) then - call write_double(6,(t1-t0),'Broadcast time') - endif + call write_double(6,(t1-t0),'Broadcast time') call omp_set_nested(.True.) call davidson_slave_tcp(0) call omp_set_nested(.False.) - print *, 'Davidson done' + print *, mpi_rank, ': Davidson done' IRP_IF MPI call MPI_BARRIER(MPI_COMM_WORLD, ierr) if (ierr /= MPI_SUCCESS) then print *, irp_here, 'error in barrier' endif IRP_ENDIF - print *, 'All Davidson done' + call mpi_print('----------') else if (zmq_state(1:3) == 'pt2') then @@ -166,13 +197,37 @@ subroutine run_wf endif IRP_ENDIF call wall_time(t0) + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_psi') + IRP_ENDIF if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_N_det_generators') + IRP_ENDIF if (zmq_get_N_det_generators (zmq_to_qp_run_socket, 1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_N_det_selectors') + IRP_ENDIF if (zmq_get_N_det_selectors(zmq_to_qp_run_socket, 1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector threshold_generators') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_generators',threshold_generators,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector threshold_selectors') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_selectors',threshold_selectors,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector energy') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_ivector pt2_stoch_istate') + IRP_ENDIF if (zmq_get_ivector(zmq_to_qp_run_socket,1,'pt2_stoch_istate',pt2_stoch_istate,1) == -1) cycle + IRP_IF MPI_DEBUG + call mpi_print('zmq_get_dvector state_average_weight') + IRP_ENDIF if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle psi_energy(1:N_states) = energy(1:N_states) TOUCH psi_energy state_average_weight pt2_stoch_istate threshold_selectors threshold_generators @@ -194,14 +249,17 @@ subroutine run_wf endif IRP_ENDIF + IRP_IF MPI_DEBUG + call mpi_print('Entering OpenMP section') + IRP_ENDIF if (.true.) then !$OMP PARALLEL PRIVATE(i) i = omp_get_thread_num() call run_pt2_slave(0,i,pt2_e0_denominator) !$OMP END PARALLEL endif - print *, 'PT2 done' FREE state_average_weight + print *, mpi_rank, ': PT2 done' IRP_IF MPI call MPI_BARRIER(MPI_COMM_WORLD, ierr) @@ -209,7 +267,7 @@ subroutine run_wf print *, irp_here, 'error in barrier' endif IRP_ENDIF - print *, 'All PT2 done' + call mpi_print('----------') endif