You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code: add validate_remote_exec_path method to check executable (#5184)
A common problem is that the filepath of the executable for remote codes
is mistyped by accident. The user often doesn't realize until they
launch a calculation and it mysteriously fails with a non-descript
error. They have to look into the output files to find that the
executable could not be found.
At that point, it is not trivial to correct the mistake because the
`Code` cannot be edited nor can it be deleted, without first deleting
the calculation that was just run first. Therefore, it would be nice to
warn the user at the time of the code creation or storing.
However, the check requires opening a connection to the associated
computer which carries both significant overhead, and it may not always
be available at time of the code creation. Setup scripts for automated
environments may want to configure the computers and codes at a time
when they cannot be necessarily reached. Therefore, preventing codes
from being created in this case is not acceptable.
The compromise is to implement the check in `validate_remote_exec_path`
which can then freely be called by a user to check if the executable of
the remote code is usable. The method is added to the CLI through the
addition of the command `verdi code test`. Also here, we decide to not
add the check by default to `verdi code setup` as that should be able to
function without internet connection and with minimal overhead. The docs
are updated to encourage the user to run `verdi code test` before using
it in any calculations if they want to make sure it is functioning. In
the future, additional checks can be added to this command.
0 commit comments