Hello,
I am running VASP MD/MLFF with a preemptible job, so my NSW gets updated frequently. I noticed that if the last run does not have NSW ending in 0, a few NSW steps are not completed. For example, if I start with 1000 NSW steps, my job might look like this:
run 1: NSW = 1000
-> 245 steps completed this run
run 2: NSW = 755
-> 740 steps completed this run
run 3: NSW = 15
-> 10 steps completed this run
done
-> total: 995 steps
The only thing that I can think of that is related to the number 10 is the NBLOCK, which I have set to 10 as the wiki suggests for MLFF.
I have attached an example, where I have 15 NSW steps in the INCAR but only 10 are completed.
Thank you,
Jeremiah
Final MD NSW steps are not completed
Moderators: Global Moderator, Moderator
-
- Newbie
- Posts: 7
- Joined: Wed Oct 26, 2022 10:07 pm
Final MD NSW steps are not completed
You do not have the required permissions to view the files attached to this post.
-
- Global Moderator
- Posts: 460
- Joined: Mon Nov 04, 2019 12:44 pm
Re: Final MD NSW steps are not completed
The behavior you observe is because NSW is reset in main.F before the loop starts:
DYN%NSW=INT(DYN%NSW/DYN%NBLOCK/DYN%KBLOCK)*DYN%NBLOCK*DYN%KBLOCK
So NSW is integer divided by NBLOCK and then integer multiplied by NBLOCK.
In integer divisions the residuals are simply cut. So if there are any residuals after division it will always result in less steps than specified in the INCAR.
So in your example this would look like:
15/10=1; 1*10=10
We will add this information to the description of NBLOCK in the wiki.
DYN%NSW=INT(DYN%NSW/DYN%NBLOCK/DYN%KBLOCK)*DYN%NBLOCK*DYN%KBLOCK
So NSW is integer divided by NBLOCK and then integer multiplied by NBLOCK.
In integer divisions the residuals are simply cut. So if there are any residuals after division it will always result in less steps than specified in the INCAR.
So in your example this would look like:
15/10=1; 1*10=10
We will add this information to the description of NBLOCK in the wiki.
-
- Newbie
- Posts: 7
- Joined: Wed Oct 26, 2022 10:07 pm
Re: Final MD NSW steps are not completed
Thank you. What is the relationship to KBLOCK? Based on your formula, I get
INT(15/10/1000) * 10 * 1000 = 0 * 10 * 1000 = 0
INT(15/10/1000) * 10 * 1000 = 0 * 10 * 1000 = 0
-
- Newbie
- Posts: 7
- Joined: Wed Oct 26, 2022 10:07 pm
-
- Global Moderator
- Posts: 460
- Joined: Mon Nov 04, 2019 12:44 pm
Re: Final MD NSW steps are not completed
At the beginning of the calculation KBLOCK=NSW is set.
But just right befor the call which recalculates NSW the following is called:
IF (DYN%NSW<DYN%KBLOCK*DYN%NBLOCK) DYN%KBLOCK=1
In your case DYN%KBLOCK*DYN%NBLOCK=10*10=100 which is larger than DYN%NSW=10. So KBLOCK is 1 in the calculation.
But just right befor the call which recalculates NSW the following is called:
IF (DYN%NSW<DYN%KBLOCK*DYN%NBLOCK) DYN%KBLOCK=1
In your case DYN%KBLOCK*DYN%NBLOCK=10*10=100 which is larger than DYN%NSW=10. So KBLOCK is 1 in the calculation.