Found by a Codex global repository scan of deepmodeling/dpdispatcher at commit 98a9e08.
Problem
Several scheduler headers emit queue or GPU directives even when the corresponding resource value is empty or zero.
Relevant code
|
pbs_script_header_dict["queue_name_line"] = f"#PBS -q {resources.queue_name}" |
|
pbs_script_header_dict["queue_name_line"] = f"#PBS -q {resources.queue_name}" |
|
"lsf_nodes_line": f"#BSUB -n {resources.number_node * resources.cpu_per_node}", |
|
"lsf_ptile_line": f"#BSUB -R 'span[ptile={resources.cpu_per_node}]'", |
|
"lsf_partition_line": f"#BSUB -q {resources.queue_name}", |
|
"JH_UniScheduler_nodes_line": f"#JSUB -n {resources.number_node * resources.cpu_per_node}", |
|
"JH_UniScheduler_ptile_line": f"#JSUB -R 'span[ptile={resources.cpu_per_node}]'", |
|
"JH_UniScheduler_partition_line": f"#JSUB -q {resources.queue_name}", |
|
} |
|
custom_gpu_line = resources.kwargs.get("custom_gpu_line", None) |
|
if not custom_gpu_line: |
|
script_header_dict["JH_UniScheduler_number_gpu_line"] = ( |
|
f"#JSUB -gpgpu {resources.gpu_per_node}" |
|
fugaku_script_header_dict["queue_name_line"] = ( |
|
f'#PJM -L "rscgrp={resources.queue_name}"' |
Impact
Default CPU jobs can generate directives such as #PBS -q , #BSUB -q , #JSUB -q , #JSUB -gpgpu 0, or rscgrp=. Some scheduler installations reject these instead of applying defaults.
Suggested fix
Follow the Slurm-style behavior: omit queue directives when queue_name is empty and omit GPU directives when gpu_per_node == 0, unless a scheduler-specific custom line is explicitly supplied.
Found by a Codex global repository scan of deepmodeling/dpdispatcher at commit 98a9e08.
Problem
Several scheduler headers emit queue or GPU directives even when the corresponding resource value is empty or zero.
Relevant code
dpdispatcher/dpdispatcher/machines/pbs.py
Line 37 in 98a9e08
dpdispatcher/dpdispatcher/machines/pbs.py
Line 169 in 98a9e08
dpdispatcher/dpdispatcher/machines/lsf.py
Lines 35 to 37 in 98a9e08
dpdispatcher/dpdispatcher/machines/JH_UniScheduler.py
Lines 35 to 42 in 98a9e08
dpdispatcher/dpdispatcher/machines/fugaku.py
Lines 29 to 30 in 98a9e08
Impact
Default CPU jobs can generate directives such as
#PBS -q,#BSUB -q,#JSUB -q,#JSUB -gpgpu 0, orrscgrp=. Some scheduler installations reject these instead of applying defaults.Suggested fix
Follow the Slurm-style behavior: omit queue directives when
queue_nameis empty and omit GPU directives whengpu_per_node == 0, unless a scheduler-specific custom line is explicitly supplied.