10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 04:43:50 +01:00

MPI_SUCCESS

This commit is contained in:
Anthony Scemama 2017-11-23 18:07:24 +01:00
parent e111130454
commit 11913e211c
3 changed files with 12 additions and 13 deletions

View File

@ -69,7 +69,6 @@ subroutine run_wf
! -------- ! --------
print *, 'Davidson' print *, 'Davidson'
print *, 'PT2'
if (mpi_master) then if (mpi_master) then
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states) call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
endif endif

View File

@ -13,19 +13,19 @@ subroutine mpi_bcast_psi(energy, size_energy)
integer :: ierr integer :: ierr
call MPI_BCAST (N_states, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (N_states, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast N_states' print *, 'Unable to broadcast N_states'
stop -1 stop -1
endif endif
call MPI_BCAST (N_det, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (N_det, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast N_det' print *, 'Unable to broadcast N_det'
stop -1 stop -1
endif endif
call MPI_BCAST (psi_det_size, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (psi_det_size, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast psi_det_size' print *, 'Unable to broadcast psi_det_size'
stop -1 stop -1
endif endif
@ -34,15 +34,15 @@ subroutine mpi_bcast_psi(energy, size_energy)
TOUCH psi_det_size N_det N_states TOUCH psi_det_size N_det N_states
endif endif
print *, size(psi_det), psi_det_size
call MPI_BCAST (psi_det, size(psi_det), MPI_BIT_KIND, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (psi_det, size(psi_det), MPI_BIT_KIND, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast psi_det' print *, 'Unable to broadcast psi_det'
stop -1 stop -1
endif endif
call MPI_BCAST (psi_coef, size(psi_coef), MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (psi_coef, size(psi_coef), MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast psi_coef' print *, 'Unable to broadcast psi_coef'
stop -1 stop -1
endif endif
@ -52,7 +52,7 @@ subroutine mpi_bcast_psi(energy, size_energy)
endif endif
call MPI_BCAST (N_det_generators, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (N_det_generators, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast N_det_generators' print *, 'Unable to broadcast N_det_generators'
stop -1 stop -1
endif endif
@ -62,7 +62,7 @@ subroutine mpi_bcast_psi(energy, size_energy)
endif endif
call MPI_BCAST (N_det_selectors, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (N_det_selectors, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast N_det_selectors' print *, 'Unable to broadcast N_det_selectors'
stop -1 stop -1
endif endif
@ -72,7 +72,7 @@ subroutine mpi_bcast_psi(energy, size_energy)
endif endif
call MPI_BCAST (energy, size(energy), MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST (energy, size(energy), MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'Unable to broadcast energy' print *, 'Unable to broadcast energy'
stop -1 stop -1
endif endif

View File

@ -27,7 +27,7 @@ BEGIN_PROVIDER [ logical, mpi_initialized ]
include 'mpif.h' include 'mpif.h'
integer :: ierr integer :: ierr
call mpi_init(ierr) call mpi_init(ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'ierr = ', ierr print *, 'ierr = ', ierr
stop 'Unable to initialize MPI' stop 'Unable to initialize MPI'
endif endif
@ -48,14 +48,14 @@ END_PROVIDER
integer :: ierr integer :: ierr
call MPI_COMM_RANK (MPI_COMM_WORLD, mpi_rank, ierr) call MPI_COMM_RANK (MPI_COMM_WORLD, mpi_rank, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'ierr = ', ierr print *, 'ierr = ', ierr
stop 'Unable to get MPI rank' stop 'Unable to get MPI rank'
endif endif
call write_int(6,mpi_rank,'MPI rank') call write_int(6,mpi_rank,'MPI rank')
call MPI_COMM_SIZE (MPI_COMM_WORLD, mpi_size, ierr) call MPI_COMM_SIZE (MPI_COMM_WORLD, mpi_size, ierr)
if (ierr /= 0) then if (ierr /= MPI_SUCCESS) then
print *, 'ierr = ', ierr print *, 'ierr = ', ierr
stop 'Unable to get MPI size' stop 'Unable to get MPI size'
endif endif