计算化学公社

 找回密码 Forget password
 注册 Register
Views: 613|回复 Reply: 4
打印 Print 上一主题 Last thread 下一主题 Next thread

[CP2K] 求助:使用对角化方法优化晶胞时会报错导致任务中断

[复制链接 Copy URL]

10

帖子

0

威望

271

eV
积分
281

Level 3 能力者

我按照http://bbs.keinsci.com/thread-43924-1-1.html帖子里的方法,在服务器个人目录下安装了cp2k,但在运行晶胞优化时,如果使用OT方法,运行就还能正常执行,一旦换成对角化方法,运行就会报错:
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
[node02:76793] Read -1, expected 10304, errno = 3
[node02:76797] Read -1, expected 6464, errno = 3
[node02:76806] Read -1, expected 9194648, errno = 3
[node02:76793] Read -1, expected 34365056, errno = 3
[node02:76797] Read -1, expected 19429856, errno = 3
--------------------------------------------------------------------------
mpirun noticed that process rank 5 with PID 0 on node node02 exited on signal 9 (Killed).
修改路径后再运行,又出现了新报错

MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
如果是mpi的问题,不应该都运行不起来吗?


894

帖子

3

威望

1685

eV
积分
2639

Level 5 (御坂)

傻傻的木瓜

2#
发表于 Post on 2024-12-8 12:14:49 | 只看该作者 Only view this author
本帖最后由 Uus/pMeC6H4-/キ 于 2024-12-8 12:19 编辑

这俩MPI相关报错都只是次要的衍生现象而已,和Windows版Gaussian那个2070报错类似地没有什么信息量,是CP2K计算遇到故障才要求的终止MPI进程。所以这会应该传所有输入输出文件上来看看有没有计算参数设置问题,而不是折腾已经安装好的CP2K的相关环境路径设置。对角化和OT毕竟有些参数是不同的。
√546=23.36664289109

10

帖子

0

威望

271

eV
积分
281

Level 3 能力者

3#
 楼主 Author| 发表于 Post on 2024-12-8 19:26:41 | 只看该作者 Only view this author
Uus/pMeC6H4-/キ 发表于 2024-12-8 12:14
这俩MPI相关报错都只是次要的衍生现象而已,和Windows版Gaussian那个2070报错类似地没有什么信息量,是CP2K ...

您好,这是我的输入输出以及报错文件
输入
#Generated by Multiwfn (http://sobereva.com/multiwfn)
&GLOBAL
  PROJECT Cs_control
  PRINT_LEVEL LOW
  RUN_TYPE CELL_OPT
&END GLOBAL

&FORCE_EVAL
  METHOD Quickstep
  &SUBSYS
    &CELL
      A    10.49310000     0.00000000     0.00000000
      B     0.00000000    10.49310000     0.00000000
      C     0.00000000     0.00000000    10.49310000
      PERIODIC XYZ #Direction(s) of applied PBC (geometry aspect)
    &END CELL
    &COORD
      Cs          2.62327500    2.62327500    2.62327500
      Cs          7.86982500    2.62327500    2.62327500
      Cs          2.62327500    7.86982500    7.86982500
      Cs          7.86982500    7.86982500    7.86982500
      Cs          7.86982500    2.62327500    7.86982500
      Cs          2.62327500    2.62327500    7.86982500
      Cs          7.86982500    7.86982500    2.62327500
      Cs          2.62327500    7.86982500    2.62327500
      Sn          0.00000000    0.00000000    0.00000000
      Sn          0.00000000    5.24655000    5.24655000
      Sn          5.24655000    0.00000000    5.24655000
      Sn          5.24655000    5.24655000    0.00000000
      Cl          5.24655000    0.00000000    7.70025650
      Cl          2.45370650    0.00000000    0.00000000
      Cl          5.24655000    2.45370650    5.24655000
      Cl          5.24655000   10.49310000    2.79284350
      Cl          8.03939350    0.00000000    0.00000000
      Cl          5.24655000    2.79284350    0.00000000
      Cl          5.24655000    5.24655000    2.45370650
      Cl          2.45370650    5.24655000    5.24655000
      Cl          5.24655000    7.70025650    0.00000000
      Cl          5.24655000    5.24655000    8.03939350
      Cl          8.03939350    5.24655000    5.24655000
      Cl          5.24655000    8.03939350    5.24655000
      Cl          0.00000000    0.00000000    2.45370650
      Cl          7.70025650    0.00000000    5.24655000
      Cl          0.00000000    2.45370650    0.00000000
      Cl          0.00000000    0.00000000    8.03939350
      Cl          2.79284350    0.00000000    5.24655000
      Cl         10.49310000    2.79284350    5.24655000
      Cl          0.00000000    5.24655000    7.70025650
      Cl          7.70025650    5.24655000    0.00000000
      Cl          0.00000000    7.70025650    5.24655000
      Cl         10.49310000    5.24655000    2.79284350
      Cl          2.79284350    5.24655000    0.00000000
      Cl          0.00000000    8.03939350    0.00000000
    &END COORD
    &KIND Cs
      ELEMENT Cs
      BASIS_SET TZVP-MOLOPT-PBE0-GTH-q9
      POTENTIAL GTH-PBE
    &END KIND
    &KIND Sn
      ELEMENT Sn
      BASIS_SET TZVP-MOLOPT-PBE0-GTH-q4
      POTENTIAL GTH-PBE
    &END KIND
    &KIND Cl
      ELEMENT Cl
      BASIS_SET TZVP-MOLOPT-PBE0-GTH-q7
      POTENTIAL GTH-PBE
    &END KIND
  &END SUBSYS

  &DFT
    BASIS_SET_FILE_NAME  BASIS_MOLOPT_UZH
    POTENTIAL_FILE_NAME  POTENTIAL
    WFN_RESTART_FILE_NAME Cs_control-RESTART.kp
    CHARGE    0 #Net charge
    MULTIPLICITY    1 #Spin multiplicity
    &KPOINTS
      SCHEME MONKHORST-PACK  3  3  3
    &END KPOINTS
    &QS
      EPS_DEFAULT 1.0E-14 #Set all EPS_xxx to values such that the energy will be correct up to this value
      EPS_PGF_ORB 1E-6 #If warning "Kohn Sham matrix not 100% occupied" occurs and meantime calculation is unstable, decrease it
#     EXTRAPOLATION USE_PREV_P #Use converged density matrix of last geometry as initial guess
    &END QS
    &POISSON
      PERIODIC XYZ #Direction(s) of PBC for calculating electrostatics
      PSOLVER PERIODIC #The way to solve Poisson equation
    &END POISSON
    &XC
      &XC_FUNCTIONAL
        &PBE
          SCALE_X 0.75
          SCALE_C 1.0
        &END PBE
      &END XC_FUNCTIONAL
      &HF
        FRACTION 0.25 #HF composition
        &SCREENING
          EPS_SCHWARZ 1E-6 #The larger the value, the lower the cost and lower the accuracy
        &END SCREENING
        &INTERACTION_POTENTIAL
          POTENTIAL_TYPE TRUNCATED
          CUTOFF_RADIUS 6.0 #Cutoff radius (Angstrom) for truncated 1/r Coulomb operator
        &END INTERACTION_POTENTIAL
        &RI #Activate and set RI-HFX
          KP_NGROUPS 1 #Number of MPI subgroup. Larger leads to evidently faster calculation but takes more memory. Total MPI ranks must be divisible by this
          RI_METRIC HFX #Default, using same Coulomb operator as &INTERACTION_POTENTIAL for RI metric
          KP_USE_DELTA_P T #Using incremental Fock, set to F if SCF is difficult to converge
          EPS_PGF_ORB 1E-6 #Set precision of integral tensors, the default 1E-5 is usually fine enough
        &END RI
      &END HF
      &VDW_POTENTIAL
        POTENTIAL_TYPE PAIR_POTENTIAL
        &PAIR_POTENTIAL
          PARAMETER_FILE_NAME dftd3.dat
          TYPE DFTD3
          REFERENCE_FUNCTIONAL PBE0
          #CALCULATE_C9_TERM T #Calculate C9-related three-body term, more accurate for large system
        &END PAIR_POTENTIAL
      &END VDW_POTENTIAL
    &END XC
    &MGRID
      CUTOFF  500
      REL_CUTOFF  55
      NGRIDS 5 #The number of multigrids to use. 5 is optimal for MOLOPT-GTH basis sets
    &END MGRID
    &SCF
      MAX_SCF 500
      EPS_SCF 1.0E-06 #Convergence threshold of density matrix of inner SCF
      SCF_GUESS RESTART #Use wavefunction from WFN_RESTART_FILE_NAME file as initial guess
#     IGNORE_CONVERGENCE_FAILURE #Continue calculation even if SCF not converged, works for version >= 2024.1
      &DIAGONALIZATION
        ALGORITHM STANDARD #Algorithm for diagonalization
      &END DIAGONALIZATION
      &MIXING #How to mix old and new density matrices
        METHOD BROYDEN_MIXING #PULAY_MIXING is also a good alternative
        ALPHA 0.4 #Default. Mixing 40% of new density matrix with the old one
        NBROYDEN 8 #Default is 4. Number of previous steps stored for the actual mixing scheme
      &END MIXING
      &PRINT
        &RESTART #Note: Use "&RESTART OFF" can prevent generating .wfn file
          BACKUP_COPIES 0 #Maximum number of backup copies of wfn file. 0 means never
        &END RESTART
      &END PRINT
    &END SCF
  &END DFT
  &PRINT
    &STRESS_TENSOR ON #Print stress tensor
    &END STRESS_TENSOR
  &END PRINT
  STRESS_TENSOR ANALYTICAL #Compute full stress tensor analytically
&END FORCE_EVAL

&MOTION
  &CELL_OPT
    MAX_ITER 400 #Maximum number of geometry optimization
    EXTERNAL_PRESSURE  1.01325E+00 #External pressure for cell optimization (bar)
    CONSTRAINT NONE #Constraint of cell length, can be: NONE, X, Y, Z, XY, XZ, YZ
    KEEP_ANGLES F #If T, then cell angles will be kepted
    KEEP_SYMMETRY F #If T, then cell symmetry specified by &CELL / SYMMETRY will be kepted
    KEEP_SPACE_GROUP F #If T, then space group will be detected and preserved
    TYPE DIRECT_CELL_OPT #Geometry and cell are optimized at the same time. Can also be GEO_OPT, MD
    #The following thresholds of optimization convergence are the default ones
    MAX_DR 3E-3 #Maximum geometry change
    RMS_DR 1.5E-3 #RMS geometry change
    MAX_FORCE 4.5E-4 #Maximum force
    RMS_FORCE 3E-4 #RMS force
    PRESSURE_TOLERANCE 100 #Pressure tolerance (w.r.t EXTERNAL_PRESSURE)
    OPTIMIZER BFGS #Can also be CG (more robust for difficult cases) or LBFGS
    &BFGS
      TRUST_RADIUS 0.2 #Trust radius (maximum stepsize) in Angstrom
#     RESTART_HESSIAN T #If read initial Hessian, uncomment this line and specify the file in the next line
#     RESTART_FILE_NAME to_be_specified
    &END BFGS
  &END CELL_OPT
  &PRINT
    &TRAJECTORY
      FORMAT pdb
    &END TRAJECTORY
    &RESTART
      BACKUP_COPIES 0 #Maximum number of backing up restart file, 0 means never
    &END RESTART
    &RESTART_HISTORY OFF
    &END RESTART_HISTORY
  &END PRINT
&END MOTION
输出
DBCSR| CPU Multiplication driver                                           XSMM (U)
DBCSR| Multrec recursion limit                                              512 (U)
DBCSR| Multiplication stack size                                           1000 (D)
DBCSR| Maximum elements for images                                    UNLIMITED (U)
DBCSR| Multiplicative factor virtual images                                   1 (U)
DBCSR| Use multiplication densification                                       T (D)
DBCSR| Multiplication size stacks                                             3 (U)
DBCSR| Use memory pool for CPU allocation                                     F (U)
DBCSR| Number of 3D layers                                               SINGLE (U)
DBCSR| Use MPI memory allocation                                              F (U)
DBCSR| Use RMA algorithm                                                      F (U)
DBCSR| Use Communication thread                                               T (U)
DBCSR| Communication thread load                                             87 (D)
DBCSR| MPI: My process id                                                     0
DBCSR| MPI: Number of processes                                              16
DBCSR| OMP: Current number of threads                                         1
DBCSR| OMP: Max number of threads                                             1
DBCSR| Split modifier for TAS multiplication algorithm                  1.0E+00 (U)


  **** **** ******  **  PROGRAM STARTED AT               2024-12-08 19:16:01.289
***** ** ***  *** **   PROGRAM STARTED ON                                node03
**    ****   ******    PROGRAM STARTED BY                                   ljd
***** **    ** ** **   PROGRAM PROCESS ID                                 61620
  **** **  *******  **  PROGRAM STARTED IN         /home/ljd/small-OT-basic/diag

CP2K| version string:                                       CP2K version 2024.1
CP2K| source code revision number:                                  git:b4a17a5
CP2K| cp2kflags: omp libint fftw3 libxc libgrpp elpa parallel mpi_f08 scalapack
CP2K|             cosma xsmm plumed2 spglib mkl libvori libbqb
CP2K| is freely available from                            https://www.cp2k.org/
CP2K| Program compiled at                          Wed Dec  4 22:38:55 CST 2024
CP2K| Program compiled on                                                node01
CP2K| Program compiled for                                                local
CP2K| Data directory path                            /home/ljd/cp2k-2024.1/data
CP2K| Input file name                                            Cs_control.inp

GLOBAL| Force Environment number                                              1
GLOBAL| Basis set file name                                    BASIS_MOLOPT_UZH
GLOBAL| Potential file name                                           POTENTIAL
GLOBAL| MM Potential file name                                     MM_POTENTIAL
GLOBAL| Coordinate file name                                      __STD_INPUT__
GLOBAL| Method name                                                        CP2K
GLOBAL| Project name                                                 Cs_control
GLOBAL| Run type                                                       CELL_OPT
GLOBAL| FFT library                                                       FFTW3
GLOBAL| Diagonalization library                                            ELPA
GLOBAL| DGEMM library                                                      BLAS
GLOBAL| Minimum number of eigenvectors for ELPA usage                        16
GLOBAL| Orthonormality check for eigenvectors                          DISABLED
GLOBAL| Matrix multiplication library                                     COSMA
GLOBAL| All-to-all communication in single precision                          F
GLOBAL| FFTs using library dependent lengths                                  F
GLOBAL| Grid backend                                                       AUTO
GLOBAL| Global print level                                                  LOW
GLOBAL| MPI I/O enabled                                                       T
GLOBAL| Total number of message passing processes                            16
GLOBAL| Number of threads for this process                                    1
GLOBAL| This output is from process                                           0
GLOBAL| Stack size for threads created by OpenMP (OMP_STACKSIZE)        default
GLOBAL| CPU model name            Intel(R) Xeon(R) Platinum 8336C CPU @ 2.30GHz
GLOBAL| CPUID                                                              1003
GLOBAL| Compiled for CPUID                                                    0

*** HINT in environment.F:920 :: The compiler target flags (generic) used ***
*** to build this binary cannot exploit all extensions of this CPU model  ***
*** (x86_avx512). Consider compiler target flags as part of FCFLAGS and   ***
*** CFLAGS (ARCH file).                                                   ***


MEMORY| system memory details [Kb]
MEMORY|                        rank 0           min           max       average
MEMORY| MemTotal            263611792     263611792     263611792     263611792
MEMORY| MemFree             134070304     134070304     134070304     134070304
MEMORY| Buffers                  8080          8080          8080          8080
MEMORY| Cached                2999796       2999796       2999796       2999796
MEMORY| Slab                   308728        308728        308728        308728
MEMORY| SReclaimable           121036        121036        121036        121036
MEMORY| MemLikelyFree       137199216     137199216     137199216     137199216


GENERATE|  Preliminary Number of Bonds generated:                             0
GENERATE|  Achieved consistency in connectivity generation.

*******************************************************************************
*******************************************************************************
**                                                                           **
**     #####                         ##              ##                      **
**    ##   ##            ##          ##              ##                      **
**   ##     ##                       ##            ######                    **
**   ##     ##  ##   ##  ##   #####  ##  ##   ####   ##    #####    #####    **
**   ##     ##  ##   ##  ##  ##      ## ##   ##      ##   ##   ##  ##   ##   **
**   ##  ## ##  ##   ##  ##  ##      ####     ###    ##   ######   ######    **
**    ##  ###   ##   ##  ##  ##      ## ##      ##   ##   ##       ##        **
**     #######   #####   ##   #####  ##  ##  ####    ##    #####   ##        **
**           ##                                                    ##        **
**                                                                           **
**                                                ... make the atoms dance   **
**                                                                           **
**            Copyright (C) by CP2K developers group (2000-2024)             **
**                      J. Chem. Phys. 152, 194103 (2020)                    **
**                                                                           **
*******************************************************************************


TOTAL NUMBERS AND MAXIMUM NUMBERS

  Total number of            - Atomic kinds:                                   3
                             - Atoms:                                         36
                             - Shell sets:                                    36
                             - Shells:                                       260
                             - Primitive Cartesian functions:                160
                             - Cartesian basis functions:                    656
                             - Spherical basis functions:                    620

  Maximum angular momentum of- Orbital basis functions:                        2
                             - Local part of the GTH pseudopotential:          2
                             - Non-local part of the GTH pseudopotential:      4


SCF PARAMETERS         Density guess:                                   RESTART
                        --------------------------------------------------------
                        max_scf:                                             500
                        max_scf_history:                                       0
                        max_diis:                                              4
                        --------------------------------------------------------
                        eps_scf:                                        1.00E-06
                        eps_scf_history:                                0.00E+00
                        eps_diis:                                       1.00E-01
                        eps_eigval:                                     1.00E-05
                        --------------------------------------------------------
                        level_shift [a.u.]:                             0.000000
                        --------------------------------------------------------
                        Mixing method:                            BROYDEN_MIXING
                                                charge density mixing in g-space
                        --------------------------------------------------------
                        No outer SCF

CELL_OPT| Pressure tolerance [bar]:                                       100.0
CELL_OPT| Keep angles between the cell vectors:                              NO
CELL_OPT| Keep cell symmetry:                                                NO
CELL_OPT| Constraint:                                                      NONE

BFGS| Use rational function optimization for step estimation:                NO
BFGS| Use model Hessian for initial guess:                                   NO
BFGS| Restart Hessian:                                                       NO
BFGS| Trust radius:                                                       0.378

*******************************************************************************
***                     STARTING   CELL   OPTIMIZATION                      ***
***                                   BFGS                                  ***
*******************************************************************************

CELL| Volume [angstrom^3]:                                          1155.344324
CELL| Vector a [angstrom]:      10.493     0.000     0.000   |a| =    10.493100
CELL| Vector b [angstrom]:       0.000    10.493     0.000   |b| =    10.493100
CELL| Vector c [angstrom]:       0.000     0.000    10.493   |c| =    10.493100
CELL| Angle (b,c), alpha [degree]:                                    90.000000
CELL| Angle (a,c), beta  [degree]:                                    90.000000
CELL| Angle (a,b), gamma [degree]:                                    90.000000
CELL| Numerically orthorhombic:                                             YES
CELL| Periodicity                                                           XYZ

Number of electrons:                                                        256
Number of occupied orbitals:                                                128
Number of molecular orbitals:                                               128

Number of orbital functions:                                                620
Number of independent orbital functions:                                    620

Extrapolation method: initial_guess

*** WARNING in qs_initial_guess.F:306 :: User requested to restart the   ***
*** wavefunction from the file named: Cs_control-RESTART.kp. This file   ***
*** does not exist. Please check the existence of the file or change     ***
*** properly the value of the keyword WFN_RESTART_FILE_NAME. Calculation ***
*** continues using ATOMIC GUESS.                                        ***



SCF WAVEFUNCTION OPTIMIZATION

  Step     Update method      Time    Convergence         Total energy    Change
  ------------------------------------------------------------------------------

报错
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
[node03:61620] Read -1, expected 6288, errno = 3
[node03:61620] Read -1, expected 28061872, errno = 3
[node03:61622] Read -1, expected 5408, errno = 3
[node03:61622] Read -1, expected 24926256, errno = 3
[node03:61626] Read -1, expected 4640, errno = 3
[node03:61626] Read -1, expected 16952472, errno = 3
[node03:61632] Read -1, expected 5584, errno = 3
[node03:61632] Read -1, expected 20265288, errno = 3
--------------------------------------------------------------------------
mpirun noticed that process rank 5 with PID 0 on node node03 exited on signal 9 (Killed).
--------------------------------------------------------------------------

894

帖子

3

威望

1685

eV
积分
2639

Level 5 (御坂)

傻傻的木瓜

4#
发表于 Post on 2024-12-9 12:03:57 | 只看该作者 Only view this author
本帖最后由 Uus/pMeC6H4-/キ 于 2024-12-9 13:10 编辑
辰暮商 发表于 2024-12-8 19:26
您好,这是我的输入输出以及报错文件
输入
#Generated by Multiwfn (http://sobereva.com/multiwfn)

我说的“传所有输入输出文件上来”是指在论坛发帖的编辑框上点击回形针图案的附件按钮上传输入输出文件作为帖子附件,不是把输入输出文件这么长一串文本直接复制粘贴到编辑框里作为帖子正文,这样一是搞得帖子太长不方便浏览,二是容易搞乱原始文件的空格和回车等格式,三是别人要检查还得复制粘贴一次也麻烦。参考社员必读帖http://bbs.keinsci.com/thread-25-1-1.html了解正确附件上传方式。

虽能预料到计算参数会有问题但一看输入还是很惊讶,这里面的关键设置完全不是一个“对角化方法优化晶胞”就够概括的,而且计算机有多少核多少内存也得说清楚。参考下述社长博文了解合适的提问方式。
在网上求助计算化学问题的时候必须把问题描述得详细、具体、准确、清楚
http://sobereva.com/620http://bbs.keinsci.com/thread-25787-1-1.html

看输入文件,是打算在PBE0-D3/TZVP-MOLOPT-PBE0-GTH级别下,结合对角化方法下3*3*3的k点设置和RI-HFX技术(但没用任何辅助基组,虽设置读取初猜波函数.kp文件但看输出未能读到),对Cs2SnCl6边长为10.4931埃的立方原胞做变胞优化。那么CP2K终止计算任务、输出卡在SCF WAVEFUNCTION OPTIMIZATION的直接原因可以明确是杂化泛函计算设置不合理导致内存占用过多。

在下一步做任何CP2K计算之前,先仔细想想:Multiwfn创建的CP2K输入文件里所有关键词的含义是否完全理解?CP2K里对角化、杂化泛函计算和RI-HFX技术、变胞优化的关键要点是否掌握?如果没有,那或许需要参加一个CP2K第一性原理计算培训班系统学习。
√546=23.36664289109

10

帖子

0

威望

271

eV
积分
281

Level 3 能力者

5#
 楼主 Author| 发表于 Post on 2024-12-9 21:57:25 | 只看该作者 Only view this author
Uus/pMeC6H4-/キ 发表于 2024-12-9 12:03
我说的“传所有输入输出文件上来”是指在论坛发帖的编辑框上点击回形针图案的附件按钮上传输入输出文件作 ...

好的,谢谢您的指导

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2025-8-16 09:13 , Processed in 0.196633 second(s), 23 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list