ezpzbz / aiida-catmat

Collection of AiiDA WorkChains Developed in CATMAT project
MIT License
3 stars 1 forks source link

[Feature] Moving to aiida-core BaseRestartWorkChain #6

Closed ezpzbz closed 4 years ago

ezpzbz commented 4 years ago

Currently, we are using the BaseRestartWorkchain from aiida-vasp plugin. It is the implementation that was introduced in aiida-quantumespresso at the first place and then started to being used in every plugin. However, as it was quite useful, AiiDA team has moved it to the aiida-core and improved it by adding nice error handling mechanism. Therefore, it is a good idea that we also start using it in our workchain. It requires:

ezpzbz commented 4 years ago

These are implemented in base_restart branch. The required error handling stuffs within the workchain need to be impleneted at plugin level. The reason is that we can spot if a subprocess has failed but relating it to the error cannot be done easily at this level. Thefore, we define the exit codes in plugin, then we have an error parser which acts at workchain level. If it spots subprocess failures, it registers the error code coming from plugin. The handler then acts based on that (again at workchain level)