Skip to content

Commit b6cccf0

Browse files
authored
Merge pull request #437 from ExaWorks/identify_more_schedulers
Add (lousy) detection of schedulers other than Slurm.
2 parents 92525d9 + af10707 commit b6cccf0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ def _translate_executor(config: Dict[str, str], executor: str) -> List[str]:
123123
if executor == 'auto_q':
124124
if config.option.environment.get('has_slurm'):
125125
return ['slurm']
126+
elif config.option.environment.get('has_pbs'):
127+
return ['pbs']
128+
elif config.option.environment.get('has_lsf'):
129+
return ['lsf']
130+
elif config.option.environment.get('has_cobalt'):
131+
return ['cobalt']
126132
elif config.option.environment.get('has_flux'):
127133
return ['flux']
128134
else:
@@ -408,6 +414,10 @@ def _discover_environment(config):
408414
logger.warning('Cannot get git repository information.')
409415
try:
410416
env['has_slurm'] = shutil.which('sbatch') is not None
417+
if 'has_slurm' not in env:
418+
env['has_pbs'] = shutil.which('qsub') is not None
419+
env['has_lsf'] = shutil.which('bsub') is not None
420+
env['has_cobalt'] = shutil.which('cqsub') is not None
411421
env['has_mpirun'] = shutil.which('mpirun') is not None
412422
env['has_flux'] = _has_flux()
413423
env['can_ssh_to_localhost'] = _try_run_command(['ssh', '-oBatchMode=yes',

0 commit comments

Comments
 (0)