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

Environment Variables Not Preserved During gridtk resubmit #12

Open
183amir opened this issue Oct 2, 2024 · 0 comments
Open

Environment Variables Not Preserved During gridtk resubmit #12

183amir opened this issue Oct 2, 2024 · 0 comments

Comments

@183amir
Copy link
Collaborator

183amir commented Oct 2, 2024

Issue:

When jobs are submitted using gridtk, only the command is saved, and the environment variables active at submission time (e.g., from an activated conda environment) are not captured or preserved. This becomes problematic during resubmission because gridtk uses sbatch to resubmit jobs, and sbatch only applies the environment variables present at resubmission time.

Since environment variables are critical for tasks such as selecting the correct Python binary in a virtual or conda environment, this oversight may cause unexpected behavior during resubmission if the original environment isn't re-established.

Example Problem:

If you activate a conda environment before submitting a job with gridtk submit --- python, the active conda environment’s version of Python will be used during the initial submission. However, during resubmission, if the conda environment is not activated, gridtk resubmit may invoke a different Python version from the system environment, leading to potential failures or incorrect execution.

Proposed Solution:

To avoid issues during resubmission, gridtk should either capture the environment variables at the time of the original submission or warn users to ensure they activate the same environment before resubmission. Alternatively, a mechanism could be added to gridtk resubmit to reapply the origin environment settings, ensuring consistent execution across submissions and resubmissions.

@183amir 183amir changed the title resubmit command takes environment variables at resubmission time Environment Variables Not Preserved During gridtk resubmit Oct 23, 2024
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

1 participant