ab inition MD running out of memory, IWAVRP = 2 no longer available?

Question on input files/tags, interpreting output, etc.

Please check whether the answer to your question is given in the VASP online manual or has been discussed in this forum previously!

Moderators: Global Moderator, Moderator

Locked
Message
Author
peterklaver
Newbie
Newbie
Posts: 31
Joined: Thu Apr 21, 2005 9:28 am
Location: Netherlands
Contact:

ab inition MD running out of memory, IWAVRP = 2 no longer available?

#1 Post by peterklaver » Tue Sep 13, 2022 11:37 am

I'm trying to run ab initio MD for a fairly large system, 2024 atoms. Initially things work fine, but at the end of the second iteration my job crashes with an out of memory error.

I thought one of the ways to reduce the required memory would be to set IWAVPR = 2, so that a number of arrays would be stored on disk rather than kept in memory. However, a post on the forum here from 2015 tells me that the file TMPCAR is no longer used (I use VASP 5.4.4). And indeed, even if I set IWAVPR = 2 in the INCAR file, the OUTCAR file tells me IWAVPR set to 12.

Is there a way in VASP 5.4.4 to reduce memory requirements in ab initio MD by having the arrays with old orbital data stored on disk?

My INCAR file and a few stdout/stderr lines around the crash point are shown below.

-----------------------------------------

I24 ab initio MD

ISTART = 1

ENCUT = 250.0
IALGO = 48
PREC = low
LREAL = .TRUE.
ISMEAR = 1
SIGMA = 0.3
VOSKOWN = 1

ISPIN = 2
MAGMOM = 2024*2

IBRION = 0
POTIM = 2.0
NELM = 150
NSW = 100000
TEBEG = 400
TEEND = 400
NBLOCK = 1
KBLOCK = 100000
SMASS = 0
NWRITE = 0
IWAVPR = 2

LCHARG = .FALSE.

NCORE = 48

----------------------------------------

RMM: 26 -0.165121636729E+05 -0.21999E-03 -0.12381E-04 25373 0.428E-03 0.205E-01
RMM: 27 -0.165121636908E+05 -0.17904E-04 -0.11692E-04 25320 0.430E-03
2 T= 397. E= -.16408298E+05 F= -.16512164E+05 E0= -.16514090E+05 EK= 0.10387E+03 SP= -.64E-04 SK= 0.16E-04 mag= 4422.593
slurmstepd: error: Detected 10 oom-kill event(s) in StepId=1065044.0. Some of your processes may have been killed by the cgroup out-of-memory handler.
srun: error: cmp094: tasks 442,464,478: Out Of Memory

ferenc_karsai
Global Moderator
Global Moderator
Posts: 422
Joined: Mon Nov 04, 2019 12:44 pm

Re: ab inition MD running out of memory, IWAVRP = 2 no longer available?

#2 Post by ferenc_karsai » Wed Sep 14, 2022 7:41 am

I looked into the code where IWAVPR is set in reader.F:

IF (IBRION==0) IWAVPR=2
CALL PROCESS_INCAR(LOPEN, IU0, IU5, 'IWAVPR', IWAVPR, IERR, WRITEXMLINCAR)
IF (IWAVPR==1) IWAVPR=11
#ifdef MPI
IWAVPR=MOD(IWAVPR,10)+10
#endif
later in main.F
WAVPRE (the routine which writes out to the disk) is only called if IWAPR>=2.AND.IWAPR<10.
Otherwise WAVPRE_NOIO is called which keeps stuff in memory and is way more efficient.

So this means WAVPRE is only called if you compile without MPI, but then you have surely efficiency problems.

You could try to modify the IWAPR reader.F so the IWAVPR=2 can be truly set, but I haven't tried which side effects that would have.

2000 atoms for ab-initio MD sound very much and I guess it will be very resource consuming to get meaningful statistics.
This is why we introduced machine-learned force fields in the latest VASP.

peterklaver
Newbie
Newbie
Posts: 31
Joined: Thu Apr 21, 2005 9:28 am
Location: Netherlands
Contact:

Re: ab inition MD running out of memory, IWAVRP = 2 no longer available?

#3 Post by peterklaver » Wed Sep 14, 2022 7:50 am

Thanks ferenc_karsai for your insightful reply. :)

Locked