aiidateam / aiida-testing

A pytest plugin to simplify testing of AiiDA plugins.
MIT License
5 stars 6 forks source link

add tests + exception for MPI runs #62

Open ltalirz opened 1 year ago

ltalirz commented 1 year ago

Will merge https://github.com/aiidateam/aiida-testing/pull/47 since it is needed by aiida-lsmo, but one should add

greschd commented 1 year ago

or implement a solution for it

Maybe this can be done with mpi4py? Something like:

Not sure if this would work, but might be worth doing a PoC for.

ltalirz commented 1 year ago

Thanks for the suggestion @greschd, yes I guess that could work!

In my view, it does look a bit convoluted though, and perhaps it is better to go the monkeypatching route https://github.com/aiidateam/aiida-testing/pull/49. Besides making the handling of MPI codes straightforward, it also has the key benefit of improving debugging info when the call to the mock executable does not go as expected (which, in my experience, is the main pain point in using mock_code at the moment, and hinders its wider adoption).