[CP2K-user] [CP2K:20049] How to limit RAM when calculating SP in large supercells

Ir Iridium 192.22ir at gmail.com
Thu Mar 21 09:13:27 UTC 2024


Dear CP2K Community,

I am a new user of CP2K and am constantly facing issues with insufficient 
memory when calculating large supercells. According to the manual, memory 
can be limited in the HF section. However, during energy calculations, this 
section is absent from the input file. After starting the calculation, it 
aborts when the program performs the SCF calculation without any error. 
This happens when the program takes up all available memory. Therefore, I 
would like to clarify how to limit the memory usage when calculating the SP 
of a large supercell.

I am using CP2K version 2024.1. To run the calculation, I use the following 
commands:

export OMP_NUM_THREADS=1
mpirun -np 26 cp2k.psmp

&GLOBAL
  PROJECT 1ver0-23857_ASC-28
  PRINT_LEVEL LOW
  RUN_TYPE ENERGY
&END GLOBAL

&FORCE_EVAL
  METHOD Quickstep
  &SUBSYS
    &CELL
      A    68.15734400     0.00000000     0.00000000
      B     0.00000000    42.98582200     0.00000000
      C     0.00000000     0.00000000    52.38106900
      PERIODIC XYZ #Direction(s) of applied PBC (geometry aspect)
    &END CELL
    &COORD
    &END COORD
    &KIND Se
      ELEMENT Se
      BASIS_SET DZVP-MOLOPT-SR-GTH-q6
      POTENTIAL GTH-PBE
    &END KIND
    &KIND O
      ELEMENT O
      BASIS_SET DZVP-MOLOPT-SR-GTH-q6
      POTENTIAL GTH-PBE
    &END KIND
    &KIND N
      ELEMENT N
      BASIS_SET DZVP-MOLOPT-SR-GTH-q5
      POTENTIAL GTH-PBE
    &END KIND
    &KIND C
      ELEMENT C
      BASIS_SET DZVP-MOLOPT-SR-GTH-q4
      POTENTIAL GTH-PBE
    &END KIND
    &KIND H
      ELEMENT H
      BASIS_SET DZVP-MOLOPT-SR-GTH-q1
      POTENTIAL GTH-PBE
    &END KIND
  &END SUBSYS

  &DFT
    BASIS_SET_FILE_NAME  BASIS_MOLOPT
    POTENTIAL_FILE_NAME  POTENTIAL
#   WFN_RESTART_FILE_NAME 1ver0-23857_ASC-28-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
    &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
      &END XC_FUNCTIONAL
      &VDW_POTENTIAL
        POTENTIAL_TYPE PAIR_POTENTIAL
        &PAIR_POTENTIAL
          PARAMETER_FILE_NAME dftd3.dat
          TYPE DFTD3(BJ)
          REFERENCE_FUNCTIONAL PBE
          #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  350
      REL_CUTOFF  50
    &END MGRID
    &SCF
      MAX_SCF 128
      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
      &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
    &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
  &END DFT
&END FORCE_EVAL

For better understanding of the problem, I have attached the relevant 
calculation files. I would be very grateful if you could provide 
recommendations on limiting memory usage in such cases.

Thank you in advance for your help, and I look forward to your response.

Best regards,
Eugene

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/cdae1bfe-0490-4be0-b641-e54f60fcb406n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20240321/db210f47/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ACS_28_cell.inp
Type: chemical/x-gamess-input
Size: 212312 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20240321/db210f47/attachment-0001.inp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ACS_28_cell.out1
Type: application/octet-stream
Size: 10544 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20240321/db210f47/attachment-0001.obj>


More information about the CP2K-user mailing list