Repository navigation
Add Son of Grid Engine (SGE) executor - #579
Merged
Merged
Conversation
Adds an `sge` executor (alias `gridengine`) built on BatchSchedulerExecutor. Jobs are submitted with qsub, tracked with qstat -xml and canceled with qdel. - Slots are process_count * cpu_cores_per_process, requested through a parallel environment. The PE comes from SGEExecutorConfig, the PSIJ_SGE_PE environment variable, or the per-job `sge.pe` custom attribute. - Memory is requested per slot (h_vmem by default). Exclusive node use is requested with -l exclusive=true. Both resource names are configurable. - GPUs are requested through a configurable resource (e.g. ngpus), counted per job by default or per slot with gpu_per_slot. - Job names are sanitized for SGE. Other `sge.*` custom attributes become `#$ -<key> <value>` directives. - SGE cannot request a node count, so a warning is logged when a job asks for more than one node, and test_nodes is skipped for sge. - Adds unit tests and registers sge in conftest, test_resources, psijcli and the user guide.
Collaborator
|
Thank you @jonmarks12. This looks good. I think it's fine to have PSIJ_SGE_PE as long as the PE can also be set in the standard way with attributes, and it's my understanding from the code that it can. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
sgeexecutor (aliasgridengine) for Son of Grid Engine and compatible Grid Engine schedulers, built onBatchSchedulerExecutor.What's included
SGEJobExecutor/SGEExecutorConfig(src/psij/executors/batch/sge.py) and thesge.mustachesubmit templateqsub -terse, status viaqstat -xml, cancel viaqdelqw,hqw,r,t,Rr,s/S/T,Eqw,dr/dt); error states report FAILED with a pointer toqstat -jqstat) are reported as CANCELED rather than COMPLETEDprocess_count * cpu_cores_per_processPSIJ_NODEFILEbuilt from$PE_HOSTFILE, one line per slot-NrestrictionsSite-specific configuration
SGEExecutorConfig(parallel_environment=...)orPSIJ_SGE_PE; per-job override with thesge.pecustom attributeh_vmemby default); exclusive use viaexclusive=true; both resource names are configurablegpu_cores_per_process) are requested only ifgpu_resourceis set (e.g.ngpus), since GPU resource names vary by site; counted per job by default, or per slot withgpu_per_slot=Truesge.<key>custom attributes render as#$ -<key> <value>As far as I can tell no other executor reads an environment variable for configuration. I added
PSIJ_SGE_PEbecause the PE is needed for nearly every multi-slot job and is fixedper site, but I'm happy to drop it and go config-only if you'd prefer.
Limitation
GE has no node-count request that I know of. Host placement depends on the PE's
allocation_rule, sonode_count/processes_per_nodeare honored only when the PE matches. Theexecutor logs a warning when more than one node is requested, and
test_nodesis skipped forsge.Tests
tests/test_sge.py(status parsing, state mapping, cancel handling, script generation including slots, memory, and GPU requests)executors=sge:single,sge:mpirun(Open MPI 4.1.4,smpPE): all pass excepttest_nodes(skipped, see above) and thetest_executor_loadingtests which fail identically onmainwithout plugin path setup