sphuber / aiida-shell

AiiDA plugin that makes running shell commands easy.
MIT License
14 stars 7 forks source link

`ShellJob`: Remove `tot_num_mpiprocs` from `resources` default #40

Closed sphuber closed 1 year ago

sphuber commented 1 year ago

The ShellJob specified tot_num_mpiprocs: 1 in the resources option input. This is problematic as it would always override the attribute default_mpiprocs_per_machine of the computer. This made it essentially impossible for a user to specify a pre-configured computer with a number of MPI processes per machine other than 1.

By removing the default, this does now mean that the tot_num_mpiprocs or the mpiprocs_per_machine key in the resources have to be set or the validation of the resources by the scheduler plugin may fail. It is not desirable that the user has to specify this manually, so the localhost that is automatically generated by prepare_computer when going through launch_shell_job has default_mpiprocs_per_machine set to 1. The same goes for the localhost computer used in the unit tests.