Final MD NSW steps are not completed

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
jeremiah
Newbie
Newbie
Posts: 7
Joined: Wed Oct 26, 2022 10:07 pm

Final MD NSW steps are not completed

#1 Post by jeremiah » Wed Jan 04, 2023 6:05 am

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
You do not have the required permissions to view the files attached to this post.

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

Re: Final MD NSW steps are not completed

#2 Post by ferenc_karsai » Wed Jan 04, 2023 9:22 am

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.

jeremiah
Newbie
Newbie
Posts: 7
Joined: Wed Oct 26, 2022 10:07 pm

Re: Final MD NSW steps are not completed

#3 Post by jeremiah » Wed Jan 04, 2023 5:08 pm

Thank you. What is the relationship to KBLOCK? Based on your formula, I get

INT(15/10/1000) * 10 * 1000 = 0 * 10 * 1000 = 0

jeremiah
Newbie
Newbie
Posts: 7
Joined: Wed Oct 26, 2022 10:07 pm

Re: Final MD NSW steps are not completed

#4 Post by jeremiah » Thu Jan 05, 2023 12:20 am

jeremiah wrote: Wed Jan 04, 2023 5:08 pm Thank you. What is the relationship to KBLOCK? Based on your formula, I get

INT(15/10/1000) * 10 * 1000 = 0 * 10 * 1000 = 0
I found that my run with 10000 < NSW < 20000 steps stopped after 10000 had completed. For NSW < 10000, it stops at factors of 10.

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

Re: Final MD NSW steps are not completed

#5 Post by ferenc_karsai » Thu Jan 05, 2023 10:11 am

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.

Post Reply