MPI_Cart_create(
Posted: Tue Mar 27, 2012 8:38 am
Hi,
My vasp runs into error when I used it to do NEB calculations.
I tracked down the error source which is failed in calling MPI_Cart_create()
Image PC Routine Line Source
libmpi.so.0 00002AE43237B0D7 Unknown Unknown Unknown
libmpi.so.0 00002AE43237B57D Unknown Unknown Unknown
libmpi.so.0 00002AE43234E2F1 Unknown Unknown Unknown
libmpi_f77.so.0 00002AE4320EC20E Unknown Unknown Unknown
vasp 00000000004E0A52 mpimy_mp_m_divide 199 mpi.F
vasp 00000000004FBD29 main_mpi_mp_init_ 129 main_mpi.F
vasp 0000000000498AD8 MAIN__ 376 main.F
vasp 00000000004989EC Unknown Unknown Unknown
libc.so.6 0000003E4CA1D994 Unknown Unknown Unknown
vasp 00000000004988F9 Unknown Unknown Unknown
forrtl: severe (71): integer divide by zero
The source code:
SUBROUTINE M_divide( COMM, NPAR, COMM_INTER, COMM_INB, reorder)
IMPLICIT NONE
INCLUDE "pm.inc"
TYPE(communic) COMM, COMM_INTER, COMM_INB, COMM_CART
INTEGER NPAR,NPAR_2
INTEGER, PARAMETER :: ndims=2
INTEGER :: dims(ndims)
LOGICAL :: periods(ndims), reorder, remain_dims(ndims)
INTEGER :: ierror
WRITE(*,*) "NPAR1=", NPAR
WRITE(*,*) "COMM%NCPU=",COMM%NCPU
IF (NPAR >= COMM%NCPU) NPAR=COMM%NCPU
dims(1) = NPAR
dims(2) = COMM%NCPU/ NPAR
WRITE(*,*) "NPAR=", NPAR
WRITE(*,*) "COMM%NCPU=",COMM%NCPU
WRITE(*,*) "dims(1)=",dims(1)
WRITE(*,*) "dims(2)=",dims(2)
IF (dims(1)*dims(2) /= COMM%NCPU ) THEN
WRITE(0,*) 'M_divide: can not subdivide ',COMM%NCPU,'nodes by',NPAR
ENDIF
periods(ndims)=.FALSE.
CALL MPI_Cart_create( COMM%MPI_COMM , ndims, dims, periods, reorder, &
COMM_CART%MPI_COMM , ierror)
IF ( ierror /= MPI_success ) &
CALL M_stop_ierr('Dividepm: Error in MPI_Cart_create', ierror)
!# failed here
The printout
NPAR1= 6
COMM%NCPU= 72
NPAR= 6
COMM%NCPU= 72
dims(1)= 6
dims(2)= 12
Where the INCAR
NEB setting
MAXMOVE=0.2
TIMESTEP=0.1
ICHAIN=0
IMAGES=6
SPRING=-5
NPAR=6
And I can not find the subroutine of MPI_Cart_creat.
grep "MPI_Cart_create(" * -in
mpi.F:195: CALL MPI_Cart_create( COMM%MPI_COMM , ndims, dims, periods, reorder, &
mpi.f90:334: CALL MPI_Cart_create( COMM%MPI_COMM , ndims, dims, periods, reorder, &
So the subroutine of MPI_Cart_creat is the intrinsic subroutine of MPI.
The vasp program runs well except NEB. So I think the subroutine of MPI_Cart_creat is correct.
Then what's wrong?
Thanks
My vasp runs into error when I used it to do NEB calculations.
I tracked down the error source which is failed in calling MPI_Cart_create()
Image PC Routine Line Source
libmpi.so.0 00002AE43237B0D7 Unknown Unknown Unknown
libmpi.so.0 00002AE43237B57D Unknown Unknown Unknown
libmpi.so.0 00002AE43234E2F1 Unknown Unknown Unknown
libmpi_f77.so.0 00002AE4320EC20E Unknown Unknown Unknown
vasp 00000000004E0A52 mpimy_mp_m_divide 199 mpi.F
vasp 00000000004FBD29 main_mpi_mp_init_ 129 main_mpi.F
vasp 0000000000498AD8 MAIN__ 376 main.F
vasp 00000000004989EC Unknown Unknown Unknown
libc.so.6 0000003E4CA1D994 Unknown Unknown Unknown
vasp 00000000004988F9 Unknown Unknown Unknown
forrtl: severe (71): integer divide by zero
The source code:
SUBROUTINE M_divide( COMM, NPAR, COMM_INTER, COMM_INB, reorder)
IMPLICIT NONE
INCLUDE "pm.inc"
TYPE(communic) COMM, COMM_INTER, COMM_INB, COMM_CART
INTEGER NPAR,NPAR_2
INTEGER, PARAMETER :: ndims=2
INTEGER :: dims(ndims)
LOGICAL :: periods(ndims), reorder, remain_dims(ndims)
INTEGER :: ierror
WRITE(*,*) "NPAR1=", NPAR
WRITE(*,*) "COMM%NCPU=",COMM%NCPU
IF (NPAR >= COMM%NCPU) NPAR=COMM%NCPU
dims(1) = NPAR
dims(2) = COMM%NCPU/ NPAR
WRITE(*,*) "NPAR=", NPAR
WRITE(*,*) "COMM%NCPU=",COMM%NCPU
WRITE(*,*) "dims(1)=",dims(1)
WRITE(*,*) "dims(2)=",dims(2)
IF (dims(1)*dims(2) /= COMM%NCPU ) THEN
WRITE(0,*) 'M_divide: can not subdivide ',COMM%NCPU,'nodes by',NPAR
ENDIF
periods(ndims)=.FALSE.
CALL MPI_Cart_create( COMM%MPI_COMM , ndims, dims, periods, reorder, &
COMM_CART%MPI_COMM , ierror)
IF ( ierror /= MPI_success ) &
CALL M_stop_ierr('Dividepm: Error in MPI_Cart_create', ierror)
!# failed here
The printout
NPAR1= 6
COMM%NCPU= 72
NPAR= 6
COMM%NCPU= 72
dims(1)= 6
dims(2)= 12
Where the INCAR
NEB setting
MAXMOVE=0.2
TIMESTEP=0.1
ICHAIN=0
IMAGES=6
SPRING=-5
NPAR=6
And I can not find the subroutine of MPI_Cart_creat.
grep "MPI_Cart_create(" * -in
mpi.F:195: CALL MPI_Cart_create( COMM%MPI_COMM , ndims, dims, periods, reorder, &
mpi.f90:334: CALL MPI_Cart_create( COMM%MPI_COMM , ndims, dims, periods, reorder, &
So the subroutine of MPI_Cart_creat is the intrinsic subroutine of MPI.
The vasp program runs well except NEB. So I think the subroutine of MPI_Cart_creat is correct.
Then what's wrong?
Thanks