本帖最后由 elvisng 于 2022-11-17 21:31 编辑
请问一下,我在用CP2K 做TDDFT优化时(用的是PBE0-ADMM),每次跑到一半都会出现 Segmentationfault - invalid memory reference 的错误,请问这是什么原因?
网上搜了一下像是爆内存的问题,因此尝试过以下改变:
1. 调低OPT_NUM_THREADS (48 调成24) , 调高OMP_STACKSIZE (从3000m调到 6000m)。机器配置是 48核,196 GB内存。同时把输入档案中&HF下 &MEMORY 下的MAX_MEMORY改成6000
2. 也尝试过把MAX_MEMORY 改成1500,限制它使用太多内存。但每次计算都依然在同样的位置出现报错
请问一下输入档案有没有问题(这是从Multiwfn 生成再作修改的)?
有没有建议可以怎样解决这个问题?或者有没有更适合做这类计算的软件?谢谢
(CP2K是 2022.1, 用的是官方编译好的ssmp 版本)
输入档案内容: ————————————————————————————————— #Generated by Multiwfn &GLOBAL PROJECT 1_opt2_TD1_opt_PBE0 PRINT_LEVEL LOW RUN_TYPE GEO_OPT &END GLOBAL
&FORCE_EVAL METHOD Quickstep &SUBSYS &CELL A 10.33600000 0.00000000 0.00000000 B 0.07281131 13.90580938 0.00000000 C 3.02385053 3.12526993 15.31350962 PERIODIC XYZ #Direction of applied PBC (geometry aspect) &END CELL &COORD [...見附件...] &END COORD &KIND Cd ELEMENT Cd BASIS_SET DZVP-MOLOPT-PBE-GTH-q12 BASIS_SET AUX_FIT admm-dz-q12 POTENTIAL GTH-PBE &END KIND &KIND O ELEMENT O BASIS_SET DZVP-MOLOPT-SCAN-GTH-q6 BASIS_SET AUX_FIT admm-dz-q6 POTENTIAL GTH-PBE &END KIND &KIND C ELEMENT C BASIS_SET DZVP-MOLOPT-PBE-GTH-q4 BASIS_SET AUX_FIT admm-dz-q4 POTENTIAL GTH-PBE &END KIND &KIND H ELEMENT H BASIS_SET DZVP-MOLOPT-SCAN-GTH-q1 BASIS_SET AUX_FIT admm-dz-q1 POTENTIAL GTH-PBE &END KIND &KIND N ELEMENT N BASIS_SET DZVP-MOLOPT-SCAN-GTH-q5 BASIS_SET AUX_FIT admm-dz-q5 POTENTIAL GTH-PBE &END KIND &END SUBSYS
&DFT BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH BASIS_SET_FILE_NAME BASIS_ADMM_UZH POTENTIAL_FILE_NAME POTENTIAL WFN_RESTART_FILE_NAME 1_RESTART.wfn CHARGE 0 #Net charge MULTIPLICITY 1 #Spin multiplicity &QS EPS_DEFAULT 1.0E-11 #Set all EPS_xxx to values such that the energy will be correct up to this value EPS_PGF_ORB 1E-11 #If seeing "Kohn Sham matrix not 100% occupied" when using HF, MP2 or hybrid functional, uncomment this &END QS &POISSON PERIODIC XYZ #Direction(s) of PBC for calculating electrostatics PSOLVER PERIODIC #The way to solve Poisson equation &END POISSON &AUXILIARY_DENSITY_MATRIX_METHOD METHOD BASIS_PROJECTION ADMM_PURIFICATION_METHOD NONE EXCH_SCALING_MODEL NONE EXCH_CORRECTION_FUNC PBEX &END AUXILIARY_DENSITY_MATRIX_METHOD &XC &XC_FUNCTIONAL &PBE SCALE_X 0.75 #75% GGA exchange SCALE_C 1.0 #100% GGA correlation &END PBE &END XC_FUNCTIONAL &HF FRACTION 0.25 &SCREENING EPS_SCHWARZ 1E-8 #Important to improve scaling. The larger the value, the lower the cost and lower the accuracy SCREEN_ON_INITIAL_P T #Screening on product between maximum of density matrix elements and ERI &END SCREENING &INTERACTION_POTENTIAL POTENTIAL_TYPE TRUNCATED CUTOFF_RADIUS 4.7683 #Cutoff radius for truncated 1/r potential T_C_G_DATA t_c_g.dat &END INTERACTION_POTENTIAL &MEMORY MAX_MEMORY 6000 #Memory(MB) per MPI process for calculating HF exchange EPS_STORAGE_SCALING 0.1 &END MEMORY &END HF &END XC &MGRID CUTOFF 350 REL_CUTOFF 50 &END MGRID &SCF MAX_SCF 25 #Maximum number of steps of inner SCF EPS_SCF 5.0E-06 #Convergence threshold of density matrix of inner SCF SCF_GUESS RESTART #Use wavefunction from WFN_RESTART_FILE_NAME file as initial guess &OT PRECONDITIONER FULL_ALL #Usually best but expensive for large system. Cheaper: FULL_SINGLE_INVERSE and FULL_KINETIC (default) MINIMIZER DIIS #CG is worth to consider in difficult cases LINESEARCH 2PNT #1D line search algorithm for CG. 2PNT is default, 3PNT is better but more costly. GOLD is best but very expensive &END OT &OUTER_SCF MAX_SCF 20 #Maximum number of steps of outer SCF EPS_SCF 5.0E-06 #Convergence threshold of outer SCF &END OUTER_SCF &END SCF &PRINT &MO_MOLDEN #Exporting .molden file containing wavefunction information NDIGITS 9 #Output orbital coefficients if absolute value is larger than 1E-9 &END MO_MOLDEN &END PRINT &EXCITED_STATES STATE 1 &END EXCITED_STATES &END DFT &PROPERTIES &TDDFPT #TDDFT calculation NSTATES 5 RKS_TRIPLETS .F. #If calculating triplet rather than singlet excited states ADMM_KERNEL_CORRECTION_SYMMETRIC T CONVERGENCE [eV] 1E-4 #Convergence criterion of all excitation energies MIN_AMPLITUDE 0.01 #The smallest excitation amplitude to print RESTART .T. #If restarting TDDFT calculation. If true, WFN_RESTART_FILE_NAME should be set to previous .tdwfn file WFN_RESTART_FILE_NAME 1_RESTART.tdwfn &END TDDFPT &END PROPERTIES &END FORCE_EVAL
輸出信息:
DBCSR| CPU Multiplication driver BLAS
DBCSR| Multrec recursion limit 512
DBCSR| Multiplication stack size 1000
DBCSR| Maximum elements for images UNLIMITED
DBCSR| Multiplicative factor virtual images 1
DBCSR| Use multiplication densification T
DBCSR| Multiplication size stacks 3
DBCSR| Use memory pool for CPU allocation F
DBCSR| OMP: Current number of threads 24
DBCSR| OMP: Max number of threads 24
DBCSR| Split modifier for TAS multiplication algorithm 1.0E+00
**** **** ****** ** PROGRAM STARTED AT 2022-11-09 09:57:25.568
***** ** *** *** ** PROGRAM STARTED ON c013
** **** ****** PROGRAM STARTED BY elvis
***** ** ** ** ** PROGRAM PROCESS ID 97713
**** ** ******* ** PROGRAM STARTED IN /share/home/elvis/jobs/test
CP2K| version string: CP2K version 2022.1
CP2K| source code revision number: git:2caeb6f
CP2K| cp2kflags: omp libint fftw3 libxc max_contr=4 spglib libvori libbqb
CP2K| is freely available from https://www.cp2k.org/
CP2K| Program compiled at Fri Jul 8 23:59:44 CEST 2022
CP2K| Program compiled on merlin-l-002.psi.ch
CP2K| Program compiled for Linux-gnu-x86_64-static
CP2K| Data directory path /share/home/elvis/apps/cp2k-2022.1/data
CP2K| Input file name 1_opt2_TD1_opt_PBE0.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 1_opt2_TD1_opt_PBE0
GLOBAL| Run type GEO_OPT
GLOBAL| FFT library FFTW3
GLOBAL| Diagonalization library ScaLAPACK
GLOBAL| Orthonormality check for eigenvectors DISABLED
GLOBAL| Matrix multiplication library ScaLAPACK
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 1
GLOBAL| Number of threads for this process 24
GLOBAL| This output is from process 0
GLOBAL| Stack size for threads created by OpenMP (OMP_STACKSIZE) 6000m
GLOBAL| CPU model name Intel(R) Xeon(R) Gold 6240R CPU @ 2.40GHz
MEMORY| system memory details [Kb]
MEMORY| rank 0 min max average
MEMORY| MemTotal 197555140 197555140 197555140 197555140
MEMORY| MemFree 184699260 184699260 184699260 184699260
MEMORY| Buffers 2220 2220 2220 2220
MEMORY| Cached 747188 747188 747188 747188
MEMORY| Slab 434800 434800 434800 434800
MEMORY| SReclaimable 158576 158576 158576 158576
MEMORY| MemLikelyFree 185607244 185607244 185607244 185607244
GENERATE| Preliminary Number of Bonds generated: 0
GENERATE| Achieved consistency in connectivity generation.
*******************************************************************************
*******************************************************************************
** **
** ##### ## ## **
** ## ## ## ## ## **
** ## ## ## ###### **
** ## ## ## ## ## ##### ## ## #### ## ##### ##### **
** ## ## ## ## ## ## ## ## ## ## ## ## ## ## **
** ## ## ## ## ## ## ## #### ### ## ###### ###### **
** ## ### ## ## ## ## ## ## ## ## ## ## **
** ####### ##### ## ##### ## ## #### ## ##### ## **
** ## ## **
** **
** ... make the atoms dance **
** **
** Copyright (C) by CP2K developers group (2000-2022) **
** J. Chem. Phys. 152, 194103 (2020) **
** **
*******************************************************************************
TOTAL NUMBERS AND MAXIMUM NUMBERS
Total number of - Atomic kinds: 5
- Atoms: 166
- Shell sets: 166
- Shells: 722
- Primitive Cartesian functions: 830
- Cartesian basis functions: 1852
- Spherical basis functions: 1734
Maximum angular momentum of- Orbital basis functions: 3
- Local part of the GTH pseudopotential: 2
- Non-local part of the GTH pseudopotential: 4
AUX_FIT ADMM-Basis:
Total number of - Shell sets: 554
- Shells: 554
- Primitive Cartesian functions: 830
- Cartesian basis functions: 1010
- Spherical basis functions: 1006
Maximum angular momentum 2
SCF PARAMETERS Density guess: RESTART
--------------------------------------------------------
max_scf: 25
max_scf_history: 0
max_diis: 4
--------------------------------------------------------
eps_scf: 5.00E-06
eps_scf_history: 0.00E+00
eps_diis: 1.00E-01
eps_eigval: 1.00E-05
--------------------------------------------------------
level_shift [a.u.]: 0.000000
--------------------------------------------------------
Outer loop SCF in use
No variables optimised in outer loop
eps_scf 5.00E-06
max_scf 20
No outer loop optimization
step_size 5.00E-01
BFGS| Use rational function optimization for step estimation: NO
BFGS| Use model Hessian for initial guess: YES
BFGS| Restart Hessian: NO
BFGS| Trust radius: 0.472
*******************************************************************************
*** STARTING GEOMETRY OPTIMIZATION ***
*** BFGS ***
*******************************************************************************
Number of electrons: 552
Number of occupied orbitals: 276
Number of molecular orbitals: 276
Number of orbital functions: 1734
Number of independent orbital functions: 1734
Extrapolation method: initial_guess
SCF WAVEFUNCTION OPTIMIZATION
----------------------------------- OT ---------------------------------------
Minimizer : DIIS : direct inversion
in the iterative subspace
using 7 DIIS vectors
safer DIIS on
Preconditioner : FULL_ALL : diagonalization, state selective
Precond_solver : DEFAULT
stepsize : 0.15000000 energy_gap : 0.08000000
eps_taylor : 0.10000E-15 max_taylor : 4
----------------------------------- OT ---------------------------------------
Step Update method Time Convergence Total energy Change
------------------------------------------------------------------------------
1 OT DIIS 0.15E+00 141.2 0.00000329 -936.1195641758 -9.36E+02
*** SCF run converged in 1 steps ***
Electronic density on regular grids: -552.0000000106 -0.0000000106
Core density on regular grids: 551.9999999958 -0.0000000042
Total charge density on r-space grids: -0.0000000148
Total charge density g-space grids: -0.0000000148
Overlap energy of the core charge distribution: 0.00008427688756
Self energy of the core charge distribution: -2210.06656249213984
Core Hamiltonian energy: 675.78201125856901
Hartree energy: 852.61493202354325
Exchange-correlation energy: -200.97396261866069
Hartree-Fock Exchange energy: -53.47606662396932
Total energy: -936.11956417576982
outer SCF iter = 1 RMS gradient = 0.33E-05 energy = -936.1195641758
outer SCF loop converged in 1 iterations or 1 steps
*******************************************************************************
** **
** ######## ####### ####### ######## ####### ######## **
** ## ## ## ## ## ## ## ## ## **
** ## ## ## ## ## ###### ####### ## **
** ## ## ## ## ## ## ## ## **
** ## ####### ####### ## ## ## **
** **
*******************************************************************************
KERNEL| FULL
FUNCTIONAL| PBE:
FUNCTIONAL| J.P.Perdew, K.Burke, M.Ernzerhof, Phys. Rev. Letter, vol. 77, n 18,
FUNCTIONAL| pp. 3865-3868, (1996)sx=0.750sc=1.000{spin unpolarized}
KERNEL| ADMM exact exchange
KERNEL| symmetric ADMM kernel
KERNEL| Spin symmetry of excitations Singlet
TDDFPT| Number of states calculated 5
TDDFPT| Number of Davidson iterations 50
TDDFPT| Davidson iteration convergence 0.367E-05
TDDFPT| Max. number of Krylov space vectors 5000
-------------------------------------------------------------------------------
- TDDFPT Initial Guess -
-------------------------------------------------------------------------------
State Occupied -> Virtual Excitation
number orbital orbital energy (eV)
-------------------------------------------------------------------------------
1 *** restarted *** 1.92979
2 *** restarted *** 1.93554
3 *** restarted *** 2.04420
4 *** restarted *** 2.07118
5 *** restarted *** 2.13782
Number of active states: 402408
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
- TDDFPT WAVEFUNCTION OPTIMIZATION -
-------------------------------------------------------------------------------
Step Time Convergence Conv. states
-------------------------------------------------------------------------------
1 668.3 7.3639E-05 0
2 672.9 4.4584E-06 3
3 664.6 2.4243E-07 5
-------------------------------------------------------------------------------
- TDDFPT run converged in 3 iteration(s)
-------------------------------------------------------------------------------
R-TDDFPT states of multiplicity 1
Transition dipoles calculated using velocity formulation
State Excitation Transition dipole (a.u.) Oscillator
number energy (eV) x y z strength (a.u.)
------------------------------------------------------------------------
TDDFPT| 1 1.92778 7.9460E-02 -9.6826E-02 -5.3399E-02 8.75668E-04
TDDFPT| 2 1.93360 -2.3257E-02 2.5921E-02 1.7053E-02 7.12301E-05
TDDFPT| 3 2.04246 2.2166E-02 -2.2404E-01 1.4319E-01 3.56229E-03
TDDFPT| 4 2.06941 1.9722E-03 -1.6698E-02 1.0487E-02 1.99093E-05
TDDFPT| 5 2.13579 3.9295E-03 7.2395E-03 -1.7523E-02 1.96180E-05
TDDFPT : CheckSum = 0.166271E+00
-------------------------------------------------------------------------------
- Excitation analysis -
-------------------------------------------------------------------------------
State Occupied Virtual Excitation
number orbital orbital amplitude
-------------------------------------------------------------------------------
1 1.92778 eV
276 277 -0.953134
276 279 0.182200
276 278 0.170841
275 278 -0.120760
275 280 0.086233
275 277 0.051109
275 279 -0.045461
276 280 -0.033741
266 277 0.014736
275 289 -0.011399
2 1.93360 eV
276 278 0.949972
276 280 -0.180481
276 277 0.173745
275 277 0.121778
275 279 -0.118287
275 278 0.047420
275 280 -0.038076
276 279 -0.029671
266 278 -0.014308
275 288 -0.013713
3 2.04246 eV
276 279 0.903770
275 278 -0.284300
276 277 0.231670
275 280 0.204507
275 277 0.049442
275 279 -0.037785
276 280 0.033466
266 279 -0.014796
275 289 -0.014733
275 287 -0.011690
268 280 -0.010662
273 280 -0.010578
276 288 0.010438
報錯信息:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error: #0 0x605a26f in ??? #0 0x605a26f in ??? #0 0x605a26f in ??? #0 0x605a26f in ??? #0 0x605a26f in ??? #0 0x605a26f in ??? #1 0x2368620 in bits2ints_5 at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfxbase/hfx_compression_core_methods.F:3165 #2 0x1589a6e in hfx_decompress_cache at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_compression_methods.F:234 #3 0x158a311 in __hfx_compression_methods_MOD_hfx_get_mult_cache_elements at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_compression_methods.F:450 #0 0x605a26f in ??? #1 0x2368620 in bits2ints_5 at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfxbase/hfx_compression_core_methods.F:3165 #2 0x1589a6e in hfx_decompress_cache at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_compression_methods.F:234 #3 0x158a311 in __hfx_compression_methods_MOD_hfx_get_mult_cache_elements at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_compression_methods.F:450 #1 0x23690a0 in bits2ints_6 at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfxbase/hfx_compression_core_methods.F:3833 #2 0x1589a6e in hfx_decompress_cache at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_compression_methods.F:234 #3 0x158a311 in __hfx_compression_methods_MOD_hfx_get_mult_cache_elements at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_compression_methods.F:450 #4 0x16142d5 in __hfx_energy_potential_MOD_integrate_four_center._omp_fn.0 at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_energy_potential.F:1495 #4 0x16142d5 in __hfx_energy_potential_MOD_integrate_four_center._omp_fn.0 at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_energy_potential.F:1495 #4 0x16142d5 in __hfx_energy_potential_MOD_integrate_four_center._omp_fn.0 at /data/user/krack/github/cp2k/cp2k-2022.1/src/hfx_energy_potential.F:1495 #5 0x602ba9d in gomp_thread_start at /data/user/krack/github/cp2k/cp2k-2022.1/tools/toolchain/build/gcc-12.1.0/libgomp/team.c:129 #6 0x6052e44 in ??? #7 0x60dceb8 in ??? #8 0xffffffffffffffff in ???
|