Skip to content

Conversation

gwangmu
Copy link
Contributor

@gwangmu gwangmu commented Aug 21, 2025

Resolves: VCUE-1014

As specifying "--environment" as an "#SBATCH" option has caused many nonsensical problems, the container team decided to add an explicit warning (alongside some mitigations to known errors). To avoid distraction, the warning message was kept short in the main usage page ("Using container engine") and linked to the main warning message ("Known issues").

@gwangmu gwangmu marked this pull request as draft August 21, 2025 14:23
Copy link

preview available: https://docs.tds.cscs.ch/237

...
```

As the use of `--environment` as an `#SBATCH` option is reserved for highly customized workflows, users should have a high level of proficiency and a full understanding of the risk to encounter cryptic behaviors. Should users encounter a problem while using `--environment` as `#SBATCH`, it's recommended to move `--environment` from `#SBATCH` to each `srun` and see if the problem disappears.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also mention a benefit of only using --environment as an argument to srun: if you have more than one srun command in the batch script, you can easily use different containers for the different commands.

Copy link

preview available: https://docs.tds.cscs.ch/237

1 similar comment
Copy link

preview available: https://docs.tds.cscs.ch/237

@gwangmu
Copy link
Contributor Author

gwangmu commented Aug 25, 2025

For the benefit of the revision, let me briefly summarize the revision items suggested by people.

  • @bcumming Introducing the benefit of --environment on srun: using different containers on a single SBATCH script.
  • @fcruzcscs Add some more details on "the execution environment is not the host system" (via Slack, Link)
  • @fcruzcscs Move up the conclusion and the suggestion, as people may not read up to that far. (via Slack, Link)

Thanks for all the comments, as always, but I need to figure out how to fit these suggestions into this PR because it's currently focused on the warning part; it can easily look awkward if we're talking about benefits and suggestions when the title is "why we discourage it."

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

Successfully merging this pull request may close these issues.

2 participants