[CP2K:3224] tests/SE/regtest-2/ch2o_pm6.inp: array RECV_META has value 1 which is greater than the upper bound of 0

Urban Borštnik urban.b... at gmail.com
Fri Apr 29 21:20:19 UTC 2011


Hi,

I believe that the problem is in your MPI implementation.

I could trace the problem to an MPI call:
CALL mpi_alltoallv ( sb, scount, sdispl, MPI_INTEGER, &
         rb, rcount, rdispl, MPI_INTEGER, group, ierr )
where (at least) rb is zero-sized.  While hard to know without your
executable, I believe that the way the compiler handles the zero-sized
rb argument and what your MPI implementation expects from that argument
conflict.  You can write a short program to test whether this is true.

In any realistic system that argument will not be 0-sized.

Cheers,
Urban

On Fri, 2011-04-29 at 04:01 -0700, Thomas Spura wrote:
> Hi list,
> 
> I'm trying to compile cp2k with intel compiler and platform mpi and
> run into a segfault:
> tests/SE/regtest-2$ mpirun -np 2 ../../../exe/Linux-x86-64-intel/
> cp2k.popt ch2o_pm6.inp
> [snip]
>  Number of orbital
> functions:                                                 10
>  Number of independent orbital
> functions:                                     10
> 
>  Extrapolation method: initial_guess
> 
> 
>  SCF WAVEFUNCTION OPTIMIZATION
> 
>   Step     Update method      Time    Convergence         Total
> energy    Change
>  
> ------------------------------------------------------------------------------
> MPI Application rank 1 killed before MPI_Finalize() with signal 9
> ________________________________________________________________________________________
> 
> After compiling with boundchecking, this error is displayed:
> tests/SE/regtest-2$ mpirun -np 2 ../../../exe/Linux-x86-64-intel/
> cp2k.popt ch2o_pm6.inp
> [snip]
>  Number of orbital
> functions:                                                 10
>  Number of independent orbital
> functions:                                     10
> 
>  Extrapolation method: initial_guess
> 
> 
>  SCF WAVEFUNCTION OPTIMIZATION
> 
>   Step     Update method      Time    Convergence         Total
> energy    Change
>  
> ------------------------------------------------------------------------------
> forrtl: severe (408): fort: (2): Subscript #1 of the array RECV_META
> has value 1 which is greater than the upper bound of 0
> 
> Image              PC                Routine            Line
> Source
> cp2k.popt-orig-fl  0000000004F921F1  Unknown               Unknown
> Unknown
> cp2k.popt-orig-fl  0000000004F911C5  Unknown               Unknown
> Unknown
> cp2k.popt-orig-fl  0000000004F3A37A  Unknown               Unknown
> Unknown
> cp2k.popt-orig-fl  0000000004EEE172  Unknown               Unknown
> Unknown
> cp2k.popt-orig-fl  0000000004EED08E  Unknown               Unknown
> Unknown
> cp2k.popt-orig-fl  00000000049B5A2D  dbcsr_transformat        1357
> dbcsr_transformations.F
> cp2k.popt-orig-fl  00000000049A2DA6  dbcsr_transformat         823
> dbcsr_transformations.F
> cp2k.popt-orig-fl  0000000004926AF0  dbcsr_operations_         792
> dbcsr_operations.F
> cp2k.popt-orig-fl  00000000049508A7  dbcsr_operations_        1113
> dbcsr_operations.F
> cp2k.popt-orig-fl  0000000000426540  cp_dbcsr_interfac        2977
> cp_dbcsr_interface.F
> cp2k.popt-orig-fl  0000000002182A54  cp_dbcsr_operatio         778
> cp_dbcsr_operations.F
> cp2k.popt-orig-fl  0000000000D4DB6C  qs_mo_methods_mp_         459
> qs_mo_methods.F
> cp2k.popt-orig-fl  0000000000F6DAFC  qs_scf_diagonaliz         610
> qs_scf_diagonalization.F
> cp2k.popt-orig-fl  0000000000F41B0D  qs_scf_mp_scf_env         650
> qs_scf.F
> cp2k.popt-orig-fl  0000000000F3CE3F  qs_scf_mp_scf_            363
> qs_scf.F
> cp2k.popt-orig-fl  0000000000C1AA5D  qs_energy_mp_qs_e         224
> qs_energy.F
> cp2k.popt-orig-fl  0000000000C19305  qs_energy_mp_qs_e         115
> qs_energy.F
> cp2k.popt-orig-fl  0000000000C38F7E  qs_force_mp_qs_fo         227
> qs_force.F
> cp2k.popt-orig-fl  0000000000598684  force_env_methods         219
> force_env_methods.F
> cp2k.popt-orig-fl  0000000002798FE3  cp_eval_at_               125
> gopt_f77_methods.F
> cp2k.popt-orig-fl  0000000001EFF65B  bfgs_optimizer_mp         190
> bfgs_optimizer.F
> cp2k.popt-orig-fl  00000000005FD9F5  geo_opt_mp_cp_geo          90
> geo_opt.F
> cp2k.popt-orig-fl  0000000000410BF1  cp2k_runs_mp_cp2k         340
> cp2k_runs.F
> cp2k.popt-orig-fl  000000000040E426  cp2k_runs_mp_run_        1114
> cp2k_runs.F
> cp2k.popt-orig-fl  000000000040C6F2  MAIN__                    291
> cp2k.F
> cp2k.popt-orig-fl  000000000040AA9C  Unknown               Unknown
> Unknown
> libc.so.6          00002B11E9BBF154  Unknown               Unknown
> Unknown
> cp2k.popt-orig-fl  000000000040A9C9  Unknown               Unknown
> Unknown
> MPI Application rank 1 exited before MPI_Finalize() with status 152
> 
> Is there a way to further track this down, if this is a compiler
> problem or mpi or cp2k?
> 
> Greetings,
>     Thomas
> 
> ________________________________________________________________________________________
> ________________________________________________________________________________________
> 
> P.S. To be able to compile, I need to add this patch (maybe this could
> be added in cvs, with a better name vor gammmma):
> Index: src/cluster_methods.F
> ===================================================================
> RCS file: /cvsroot/cp2k/cp2k/src/cluster_methods.F,v
> retrieving revision 1.10
> diff -u -r1.10 cluster_methods.F
> --- src/cluster_methods.F	16 Feb 2011 14:29:26 -0000	1.10
> +++ src/cluster_methods.F	29 Apr 2011 10:31:50 -0000
> @@ -411,7 +411,7 @@
>      INTEGER, DIMENSION(:), POINTER           :: part_i
>      INTEGER, DIMENSION(:, :, :), POINTER     :: box_p
>      LOGICAL                                  :: failure, orthorhombic
> -    REAL(dp)                                 :: alpha, beta, gamma
> +    REAL(dp)                                 :: alpha, beta, gammmma
>      REAL(dp), ALLOCATABLE, DIMENSION(:, :)   :: xyz, xyz_tmp
>      REAL(dp), DIMENSION(3)                   :: abc, cell_center,
> dbox, lbox
>      REAL(dp), DIMENSION(3, 3)                :: g, h, h_inv, u
> @@ -429,7 +429,7 @@
>                    h=h, h_inv=h_inv, &
>                    alpha=alpha, &
>                    beta=beta, &
> -                  gamma=gamma, &
> +                  gamma=gammmma, &
>                    abc=abc)
>      !
>      !
> @@ -447,8 +447,8 @@
>      ! g = canonical h
>      g(:,:) = 0.0_dp
>      g(1,1) = abc(1)
> -    g(1,2) = abc(2) * COS(radians * gamma)
> -    g(2,2) = abc(2) * SIN(radians * gamma)
> +    g(1,2) = abc(2) * COS(radians * gammmma)
> +    g(2,2) = abc(2) * SIN(radians * gammmma)
>      g(1,3) = abc(3) * COS(radians * beta)
>      g(2,3) = ( abc(2) * abc(3) * COS(radians * alpha) - g(1,2) *
> g(1,3) ) / g(2,2)
>      g(3,3) = SQRT( abc(3)**2 - g(1,3)**2 - g(2,3)**2 )
> @@ -502,7 +502,7 @@
>         WRITE(*,'(T2,A,3F12.4)') routineN//' u(:,3)=',u(:,3)
>         WRITE(*,'(T2,A,F12.4)') routineN//'  alpha=',alpha
>         WRITE(*,'(T2,A,F12.4)') routineN//'   beta=',beta
> -       WRITE(*,'(T2,A,F12.4)') routineN//'  gamma=',gamma
> +       WRITE(*,'(T2,A,F12.4)') routineN//'  gamma=',gammmma
>         WRITE(*,'(T2,A,3F12.4)') routineN//'    abc=',abc
>         WRITE(*,'(T2,A,3F12.4)') routineN//'lbox(:)=',lbox(:)
>         WRITE(*,'(T2,A,3I4)') routineN//'   nbox=',nbox
> Index: src/qs_ot_minimizer.F
> ===================================================================
> RCS file: /cvsroot/cp2k/cp2k/src/qs_ot_minimizer.F,v
> retrieving revision 1.74
> diff -u -r1.74 qs_ot_minimizer.F
> --- src/qs_ot_minimizer.F	25 Feb 2011 13:54:46 -0000	1.74
> +++ src/qs_ot_minimizer.F	29 Apr 2011 10:31:50 -0000
> @@ -1454,7 +1454,7 @@
>                                                  do_ks, do_scp_dft, &
>                                                  do_scp_nddo,
> enable_flip, &
>                                                  forget_history
> -    REAL(KIND=dp)                            :: beta, eta, gamma,
> omega, &
> +    REAL(KIND=dp)                            :: beta, eta, gammma,
> omega, &
>                                                  sigma, sigma_dec,
> sigma_min, &
>                                                  tmp, tmp2
>      REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: f, x
> @@ -1477,7 +1477,7 @@
>      do_ener = qs_ot_env ( 1 ) % settings % do_ener
> 
>      beta=qs_ot_env ( 1 ) % settings % broyden_beta
> -    gamma=qs_ot_env ( 1 ) % settings % broyden_gamma
> +    gammma=qs_ot_env ( 1 ) % settings % broyden_gamma
>      IF (adaptive_sigma) THEN
>          IF (qs_ot_env ( 1 ) % broyden_adaptive_sigma .LT. 0.0_dp)
> THEN
>              sigma=qs_ot_env ( 1 ) % settings % broyden_sigma
> @@ -1672,10 +1672,10 @@
>              CALL cp_dbcsr_set(qs_ot_env(ispin)%matrix_x,
> 0.0_dp,error=error)
>              CALL cp_dbcsr_add(qs_ot_env(ispin)%matrix_x, &
>                  qs_ot_env(ispin)%matrix_h_x(i)%matrix,&
> -                alpha_scalar=1.0_dp,beta_scalar=(1.0_dp-
> gamma),error=error)
> +                alpha_scalar=1.0_dp,beta_scalar=(1.0_dp-
> gammma),error=error)
>              CALL cp_dbcsr_add(qs_ot_env(ispin)%matrix_x, &
>                  qs_ot_env(ispin)%matrix_h_x(circ_index(diis_bound))
> %matrix,&
> -                alpha_scalar=1.0_dp,beta_scalar=gamma,error=error)
> +                alpha_scalar=1.0_dp,beta_scalar=gammma,error=error)
>          ENDDO
>      ELSE
>          ! Construct G
> 





More information about the CP2K-user mailing list