Skip to content
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

Update inputs in Base in case of iterations to solve issue of calculation #35

Open
ezpzbz opened this issue Sep 1, 2020 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@ezpzbz
Copy link
Owner

ezpzbz commented Sep 1, 2020

Context

Currently, if VaspBaseWorkChain gets triggered to solve an issue and updates the INCAR, it goes to second iterations. However, if the issue would not be solved, it will do the same without knowing that the same actions has been taken, therefore, it continues until it hits the maximum iteration.
For example, see below log for workchain trial to solve ZBRENT issue:

2020-09-01 11:15:01 [14823 | REPORT]: [24367|VaspMultiStageWorkChain|run_stage]: Submitted VaspBaseWorkchain <pk>:25457 for stage_1_relaxation
2020-09-01 11:15:01 [14824 | REPORT]:   [25457|VaspBaseWorkChain|run_process]: launching VaspCalculation<25458> iteration #1
2020-09-01 13:46:46 [15063 | REPORT]:   [25457|VaspBaseWorkChain|report_error_handled]: VaspCalculation<25458> failed with exit status 0: None
2020-09-01 13:46:46 [15064 | REPORT]:   [25457|VaspBaseWorkChain|report_error_handled]: Action taken: ERROR_ZBRENT: EDIFF is decreased by 10% to 1e-07
2020-09-01 13:46:47 [15065 | REPORT]:   [25457|VaspBaseWorkChain|apply_modifications]: Applied all modifications for VaspCalculation<25458>
2020-09-01 13:46:47 [15066 | REPORT]:   [25457|VaspBaseWorkChain|inspect_process]: VaspCalculation<25458> finished successfully but a handler was triggered, restarting
2020-09-01 13:46:48 [15067 | REPORT]:   [25457|VaspBaseWorkChain|run_process]: launching VaspCalculation<25907> iteration #2
2020-09-01 15:50:47 [15200 | REPORT]:   [25457|VaspBaseWorkChain|report_error_handled]: VaspCalculation<25907> failed with exit status 0: None
2020-09-01 15:50:47 [15201 | REPORT]:   [25457|VaspBaseWorkChain|report_error_handled]: Action taken: ERROR_ZBRENT: EDIFF is decreased by 10% to 1e-07
2020-09-01 15:50:48 [15202 | REPORT]:   [25457|VaspBaseWorkChain|apply_modifications]: Applied all modifications for VaspCalculation<25907>
2020-09-01 15:50:48 [15203 | REPORT]:   [25457|VaspBaseWorkChain|inspect_process]: VaspCalculation<25907> finished successfully but a handler was triggered, restarting

It redices the EDIFF by an order of magnitude for the second iteration, and then it is same over and over. The reason is that we have cls.setup outside of running loop in outline:

spec.outline(
            cls.setup,
            while_(cls.should_run_process)(
                cls.run_process,
                cls.inspect_process,
            ),
            cls.results,
        )

How to solve it?

There can be several solutions which need to be tested:

  • We can have a switch to check if we are in the second and above iterations and then re-read the INCAR
  • We can have a step in outline to make running it conditional.
  • We can have a dictionary with error keys and values be the count of taken action.
    NOTE It is particularly a good way to go, not only to solve this issue. The reason is that we may not want to repeadatley decrease EDIFF or other parameters without improvement. Also, there can be errors that we just wanna try once and not again and again.
@ezpzbz ezpzbz self-assigned this Sep 1, 2020
@ezpzbz ezpzbz added bug Something isn't working enhancement New feature or request labels Sep 1, 2020
@ezpzbz ezpzbz added this to the v0.4.0 milestone Sep 1, 2020
@ezpzbz ezpzbz modified the milestones: v0.4.0, v1.0.0 Sep 3, 2020
@ezpzbz
Copy link
Owner Author

ezpzbz commented Sep 9, 2020

As explained in #5 , I have made some modifications which will let us to keep track of modifications within the run. It has been pushed for only #5 case, once I am sure about its robustness, it would be enabled for all other relevant handlers. The current fix is in #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant