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

Support modification of the subprocess environment created when groups fork to execute operations #523

Open
vyasr opened this issue May 25, 2021 · 1 comment

Comments

@vyasr
Copy link
Contributor

vyasr commented May 25, 2021

Feature description

Operations that require forking, either via an explicit fork directive or using any other directives that trigger forking like nranks (via MPI) or executable, end up executing operations in a subprocess of the process where the job script and the original signac-flow launch occur. Our Jinja templates offer various methods for modifying the parent process, and users can also write custom templates to modify the environment however they need. However, we don't currently offer any method for controlling the child processes. It would be nice to include some way of doing so.

Proposed solution

Currently the best solution I was able to suggest was to use the executable directive to just include a compound command, something like DO_THIS && DO_THIS && NOW_RUN_ORIGINAL_COMMAND. Maybe something like this is the best that we can do; if so we should document it as such in places like here.

@b-butler
Copy link
Member

b-butler commented May 25, 2021

We could allow for a setup script for any forked commands to ensure that the modules are loaded as necessary. Otherwise we could document using the correct configuration files on a user shell to load necessary modules.

This could be like a template effectively except there would be no default.

Edit: Elaborated.

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