scr icon indicating copy to clipboard operation
scr copied to clipboard

scripts: query environment to determine auto resource manager and job launcher

Open adammoody opened this issue 1 year ago • 0 comments

Currently, SCR records the resource manager that was selected at configure time in config.py, which is what AutoResourceManager defaults to. To enable a single SCR install to support multiple systems having different resource managers and/or job launchers, we could improve the AutoResourceManager and AutoJobLauncher methods to try to guess the correct values based on their current environment.

For the resource manager, when running within an allocation, we could check for environment variables set by the host resource manager. For example, we could guess SLURM if SLURM_JOBID is defined. Since some users run Flux within an allocation of another resource manager, perhaps check for Flux first.

For the job launcher, since many resource managers include a job launcher, we could use the resource manager to guess the job launcher. For SLURM assume srun, for LSF assume jsrun, for Flux assume flux run, etc.

And we'll need a way for the user to declare the exact values to override any guesses.

adammoody avatar Nov 02 '23 18:11 adammoody