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 *, 'PT2'
if (mpi_master) then
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
endif

View File

@ -13,19 +13,19 @@ subroutine mpi_bcast_psi(energy, size_energy)
integer :: 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'
stop -1
endif
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'
stop -1
endif
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'
stop -1
endif
@ -34,15 +34,15 @@ subroutine mpi_bcast_psi(energy, size_energy)
TOUCH psi_det_size N_det N_states
endif
print *, size(psi_det), psi_det_size
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'
stop -1
endif
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'
stop -1
endif
@ -52,7 +52,7 @@ subroutine mpi_bcast_psi(energy, size_energy)
endif
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'
stop -1
endif
@ -62,7 +62,7 @@ subroutine mpi_bcast_psi(energy, size_energy)
endif
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'
stop -1
endif
@ -72,7 +72,7 @@ subroutine mpi_bcast_psi(energy, size_energy)
endif
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'
stop -1
endif

View File

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