-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Should prev job INCAR be merged into next job #453
Comments
Forgot to mention, one potential upside of this default is that any Custodian corrections applied to the INCAR will trickle down to follow up jobs. But I think this can swing both ways. It could help a follow-on job succeed but it could also make it fail or give erroneous results if the correction doesn't apply e.g. due to change of functional. |
Yes, inheritance is definitely expected behaviour. This is how atomate1 worked, and it has the benefits of:
If you need to set However, whether this is something we should continue doing I'm not so sure. It can definitely add confusion, and it adds a lot of logic to the input set generators that could be removed if we disabled inheritance. On point 2: the standardised logic in atomate2 for applying input set updates means that it is easier than ever to configure inputs for all jobs (previously this was a bit more effort in atomate1). So perhaps inheritance is not necessary. That said, I wouldn't minimise the benefits of inheriting custodian fixes. It can waste a lot of CPU cycles finding an ALGO that gives convergence. As this would be a major change to how atomate2 works, I'd be interested to hear other people's thoughts. In particular, as far as I'm aware, quacc doesn't use inheritance. Have you found any downsides to this @arosen93? |
@utf. This is a very good question. I haven't done a detailed comparison, but at the same time I haven't had major issues by not carrying flags over (that I'm aware of --- these things can be subtle). I think this is something that likely needs further detailed investigation. There are definitely pros and cons. That said, part of me wonders if this logic makes more sense to have within Custodian. For instance, maybe a 'prior_dir' kwarg could be added and then it would check to see what fixes were applied in the prior run. Then it would be easy to adjust whether inheritance (of fixes) is used via a global Atomate2 setting that could be set to |
Another person to ping is @computron. IIRC he expressed an opinion on INCAR inheritance at the |
@computron Thanks for the advice. Done in c98fe98. |
Great. Maybe this is a topic to discuss at the next atomate2 meeting. It would be great if you could post the outcome of the discussion on this thread. |
@utf I brought this up in the last atomate2 meeting where we didn't come to any firm opinions because we were lacking the full background you posted above. Now that we have that we can discuss again next meeting and see what everyone thinks. I'll offer my opinion upfront that I think INCAR inheritance should not be the default so as not to surprise users. It should either be a boolean flag in the input set generator or maybe even better also support a tuple |
We might also consider adding it as a global config setting. |
I would be open to that idea. But I would like to hear what other users of the VASP workflows think about removing inheritance. For example @JaGeo (when she is back in the office). |
Very insightful discussions. The next atomate2 monthly meeting is on 08/25 (11 am PST). From a VASP workflow user's perspective, in my humble opinion (after knowing all the background): Benefits I want to keep on incar inheritance:
Problems that might be caused by inheritance :
What @arosen93 said, "This would just carry over the fixes, not the full list of INCAR flags" sounds super reasonable to me (although it may take more effort to discuss which tags/fixes by Custodian in INCAR should be inherited or not). |
We discussed this at the atomate2 meeting on 8/25/23. The universal (~6 people) consensus was that they do not want INCAR inheritance by default. I agree with this as I find that when developing workflows, the principle of least surprise is one of the most important principles to abide by. Otherwise, we end up with 100,000 DFT calculations, all of which are entirely useless, because someone tried to be clever and automatically "help" the user by fixing their parameters for them in a way they did not request. Thus, if I don't hear big objections in the next week, I say we turn off INCAR inheritance by default. Next was whether to have optional INCAR inheritance, and what what form it would take if we introduced optional inheritance. At the meeting I asked when people would want to switch this on if they had the option, and didn't get any takers. I personally could see some argument for doing this in double relaxation jobs which are now split up into two jobs rather than one, but it wouldn't even necessarily be a strong preference. We are looking for opinions about how much time could potentially be saved by inheriting parameters rather than just starting from scratch. Some considerations:
Do we have evidence (informal is fine, anything really) of significant time savings by inheriting custodian fixes between jobs? This usually means inheriting parameters between jobs of vastly different types, e.g. a static job inheriting things from a relaxation job. Finally, a note that @arosen93 brought up only inheriting fixes from the |
In my experience, I have found the current inheritance to be a minor negative, as it has sometimes overwritten settings I wanted to keep. This has caused me to resort to just using the |
This is actually a huge problem - apparently VASP will use both GGA and METAGGA tags, at least in some versions (6.3.2 in the attached example). There are three subdirectories in the attached, all for the same sapphire Al2O3 structure taken from MP: one using (ISMEAR = 0, METAGGA = R2SCAN), one using (ISMEAR = -5, METAGGA = R2SCAN), and the last using (ISMEAR = -5, GGA = PS, METAGGA = R2SCAN) (ISMEAR_-5_gga) The crazy thing is that specifying GGA = PS, which happens in our R2SCAN WFs from prev_incar inheritance, increases the total energies in OSZICAR by an order of magnitude I'll also add that this behavior is consistent across >1,000 structures that I repeated this test for |
Thanks for the discussion, I'll try to response to @computron soon but in general I agree. But just to reply to @esoteric-ephemera. If GGA needs to be unset for a R2SCAN calculation, then this should be specified in the input set |
@utf I'd argue this shows that inheritance isn't the best choice, because we did not want both tags specified, but the inheritance propagated the GGA tag |
I agree that inheritance adds extra complexity for developers and users. But I was just responding to your point that this is a huge problem. It isn't a problem, provided the input sets are written with inheritance in mind. |
I think he meant it's a huge problem for MP as it stands right now... 😅 |
Inheritance was disabled in #594 |
The new MP r2SCAN workflow in #362 defaults to a PBESol pre-relax followed by the r2SCAN relax. Currently
atomate2
merges the previous job's INCAR into the next one in theVaspInputGenerator
.atomate2/src/atomate2/vasp/sets/base.py
Lines 402 to 411 in ff60708
This means
GGA: PS
from the PBESol's INCAR ends up in the r2SCAN relax INCAR together with theMETAGGA: R2SCAN
that's there anyway. Up until VASP 6.3.2, that's fine since theMETAGGA
takes precedence. Starting in 6.4, VASP raises an error if GGA and METAGGA are set simultaneously. I think it's worth adding having the ability to disable INCAR inheritance on a case by case basis and/or change the default behavior to not inherit. I think a previous job's INCAR affecting the next job goes against the principle of least surprise for newatomate2
users.The text was updated successfully, but these errors were encountered: