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

Resolving shell task command #127

Open
leclairm opened this issue Mar 17, 2025 · 2 comments
Open

Resolving shell task command #127

leclairm opened this issue Mar 17, 2025 · 2 comments

Comments

@leclairm
Copy link
Contributor

  • In workgraph.py, if relative, the command path is resolved relatively to the config rootdir which is where AiiDA runs so won't be available on the HPC.

  • Generally, I don't see the use for resolving the command path. What if the command is only known once an environment is activated on the HPC? Why can't we rely on the users making sure they specified what is necessary to have the command available in $PATH at runtime (specifying the scripts Sirocco should copy to the HPC in the task workdir, loading modules, activating environments, etc ...)?

@agoscinski
Copy link
Collaborator

I feel like it is intransparent to use relative or absolute path to decide whether it is on the local machine or on the remote computer. In aiida the code is associated to the computer which makes sense to me. But we already have a computer argument to specify where the task is run. One could add another section code and there use computer but that seems like a complicated solution for what we want to do. Can't we just assume it is always local? The user can then specify something remote in the script and use this local script just as a way to pass the PORT arguments.

https://github.com/C2SM/Sirocco/pull/125/files#r2002744931

@agoscinski
Copy link
Collaborator

For me for clarification and to remember. If user provides src for a task in the sirocco config we copy it over to the submission/working directory on remote. The src is always relative to the root_dir (the directory where the sirocco config is). In the submission script we execute the specified command. AiiDA requires code to be specified, the easiest solution would be to define a FolderData for the src and always use bash as code with the arguments given in command. A cleaner solution would be to always create a new code, then the command in the submission command is the same as specified in the Sirocco file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants