Skip to content

Commit 37352e3

Browse files
committed
Update templates and settings
1 parent d8edff5 commit 37352e3

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

arc/job/pipe/pipe_coordinator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ def submit_pipe_run(self, run_id: str, tasks: List[TaskSpec],
154154
tasks=tasks,
155155
cluster_software=cluster_software,
156156
max_workers=pipe_settings.get('max_workers', 100),
157+
max_concurrent=pipe_settings.get('max_concurrent'),
157158
max_attempts=pipe_settings.get('max_attempts', 3),
158159
pipe_root=pipe_root,
159160
)

arc/settings/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@
306306
'enabled': False, # Set to True to enable pipe mode (it is off by default, use it for large compute campaigns).
307307
'min_tasks': 10, # Minimum batch size to trigger pipe mode.
308308
'max_workers': 100, # Upper bound on array worker slots per PipeRun.
309+
'max_concurrent': None, # Max array workers running simultaneously (like PBS `%N`). None = unthrottled.
309310
'max_attempts': 3, # Retry budget per task before terminal failure.
310311
'lease_duration_hrs': 1, # Worker lease duration in hours (default 1h).
311312
'env_setup': {}, # Engine-specific shell setup commands, e.g.,

arc/settings/submit.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
#SBATCH -N 1
5555
#SBATCH -n {cpus}
5656
#SBATCH --mem={memory}
57-
#SBATCH --array=1-{max_task_num}
57+
#SBATCH --array={array_range}
5858
#SBATCH -o {pipe_root}/out_%a.txt
5959
#SBATCH -e {pipe_root}/err_%a.txt
60-
60+
{extra_directives}
6161
{env_setup}
6262
WORKER_ID=$SLURM_ARRAY_TASK_ID
6363
@@ -68,8 +68,8 @@
6868
#PBS -q {queue}
6969
#PBS -l ncpus={cpus}
7070
#PBS -l mem={memory}mb
71-
#PBS -J 1-{max_task_num}
72-
71+
#PBS -J {array_range}
72+
{extra_directives}
7373
{env_setup}
7474
WORKER_ID="$PBS_ARRAY_INDEX"
7575
@@ -80,10 +80,10 @@
8080
#$ -q {queue}
8181
#$ -pe smp {cpus}
8282
#$ -l h_vmem={memory}M
83-
#$ -t 1-{max_task_num}
83+
#$ -t {array_range}
8484
#$ -o {pipe_root}/out_$SGE_TASK_ID.txt
8585
#$ -e {pipe_root}/err_$SGE_TASK_ID.txt
86-
86+
{extra_directives}
8787
{env_setup}
8888
WORKER_ID=$SGE_TASK_ID
8989
@@ -96,7 +96,8 @@
9696
output = {pipe_root}/out_$(Process).txt
9797
error = {pipe_root}/err_$(Process).txt
9898
log = {pipe_root}/condor.log
99-
queue {max_task_num}
99+
{extra_directives}
100+
queue {array_range}
100101
""",
101102
}
102103

0 commit comments

Comments
 (0)