Skip to content

Defining codes/executables for ShellTask #60

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

Open
GeigerJ2 opened this issue Dec 4, 2024 · 1 comment
Open

Defining codes/executables for ShellTask #60

GeigerJ2 opened this issue Dec 4, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@GeigerJ2
Copy link
Collaborator

GeigerJ2 commented Dec 4, 2024

For future reference:

src: ./statistics_foo
command: "./statistics.py"

with shebang, or, without:

src: ./statistics_foo
command: "python3 ./statistics.py"

with correct Python in the $PATH in the uenv.

  • Also being able to provide the labels of already registered AiiDA Code instances?
  • Possibly copy over directory ourselves before, rather than creating a PortableCode (@agoscinski).
  • Make sure we don't create too many Code instances (e.g., automatically with aiida-shell), neither that we accidentally use the same Code for multiple tasks, where it shouldn't be used (e.g., because an instance is loaded from the DB)
@leclairm leclairm added the enhancement New feature or request label Dec 5, 2024
@leclairm leclairm added this to the Early users milestone Dec 5, 2024
@agoscinski
Copy link
Collaborator

Currently shell might not consider environments that are loaded in the prepend submission script to recover the executables.

plugin: shell
command: "python statistics.py"

We cannot support this for the moment since we do not load the load the environment in the prepend submission script where the executable is loaded and ShellJob cannot determine it with the which command So we rely on running python within a bash script. By default we use bash on remote (that one ShellJob finds with which since it is most likely not in an environment loaded) and if shebang is present in the script file (in the example above it would need to be used./statistics.py) we use it.

Discussion still ongoing. Open problem bash -l, does it mean we should just specify the command as it should be present in the submission script?

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

No branches or pull requests

3 participants