Skip to content

Commit

Permalink
Update ACME batch configs, do not lock env_batch.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfouca committed Jan 25, 2017
1 parent 20f5614 commit 49b1e4a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
53 changes: 29 additions & 24 deletions cime_config/acme/machines/config_batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
<batch_directive></batch_directive>
<jobid_pattern>(\d+)</jobid_pattern>
<depend_string> --dependencies</depend_string>
<walltime_format>%H:%M:%S</walltime_format>
<walltime_format>%H:%M:%s</walltime_format>
<submit_args>
<arg flag="--cwd" name="CASEROOT"/>
<arg flag="-A" name="PROJECT"/>
<arg flag="-t" name="JOB_WALLCLOCK_TIME"/>
<!-- space is required here so that variable is resolved correctly -->
<arg flag="-n" name=" $TOTALPES/$PES_PER_NODE"/>
<arg flag="-n" name=" $TOTALPES / $PES_PER_NODE"/>
<arg flag="-q" name="JOB_QUEUE"/>
<arg flag="--mode script"/>
</submit_args>
Expand All @@ -72,43 +72,43 @@
<batch_redirect>&lt;</batch_redirect>
<batch_directive>#BSUB</batch_directive>
<jobid_pattern>&lt;(\d+)&gt;</jobid_pattern>
<depend_string> -w "done(jobid)"</depend_string>
<depend_string> -w 'done(jobid)'</depend_string>
<walltime_format>%H:%M</walltime_format>
<submit_args>
<arg flag="-q" name="$JOB_QUEUE"/>
<arg flag="-W" name="$JOB_WALLCLOCK_TIME"/>
<arg flag="-P" name="$PROJECT"/>
</submit_args>
<directives>
<directive > -n {{ totaltasks }} </directive>
<directive > -R "span[ptile={{ ptile }}]"</directive>
<directive > -q {{ job_queue }} </directive>
<directive > -n {{ total_tasks }} </directive>
<directive > -R "span[ptile={{ tasks_per_node }}]"</directive>
<directive > -N </directive>
<directive default="poe" > -a {{ poe }} </directive>
<directive > -x {{ queue_exclusive }} </directive>
<directive default="acme.stdout" > -o {{ acme_stdout }}.%J </directive>
<directive default="acme.stderr" > -e {{ acme_stderr }}.%J </directive>
<directive default="acme.stdout" > -o {{ output_error_path }}.%J </directive>
<directive default="acme.stderr" > -e {{ output_error_path }}.%J </directive>
<directive > -J {{ job_id }} </directive>
<directive > -W {{ job_wallclock_time }} </directive>
<directive > -P {{ account }} </directive>
</directives>
</batch_system>

<batch_system type="pbs" >
<batch_query args="-u $USER" >qselect</batch_query>
<batch_query args="-f" >qstat</batch_query>
<batch_submit>qsub </batch_submit>
<batch_directive>#PBS</batch_directive>
<jobid_pattern>^(\d+)</jobid_pattern>
<jobid_pattern>^(\S+)$</jobid_pattern>
<depend_string> -W depend=afterok:jobid</depend_string>
<walltime_format>%H:%M:%S</walltime_format>
<submit_args>
<arg flag="-q" name="JOB_QUEUE"/>
<arg flag="-l walltime=" name="JOB_WALLCLOCK_TIME"/>
<arg flag="-A" name="PROJECT"/>
<arg flag="-q" name="$JOB_QUEUE"/>
<arg flag="-l walltime=" name="$JOB_WALLCLOCK_TIME"/>
<arg flag="-A" name="$PROJECT"/>
</submit_args>
<directives>
<directive> -V </directive>
<directive> -N {{ job_id }}</directive>
<directive default="n"> -r {{ rerunnable }} </directive>
<!-- <directive> -j oe {{ output_error_path }} </directive> -->
<directive> -j oe </directive>
<directive default="ae" > -m {{ mail_options }} </directive>
<directive default="/bin/bash" > -S {{ shell }} </directive>
<directive> -V </directive>
</directives>
</batch_system>

Expand All @@ -119,32 +119,37 @@
<jobid_pattern>(\d+)$</jobid_pattern>
<depend_string> -W depend=afterok:jobid</depend_string>
<walltime_format>%H:%M:%S</walltime_format>
<submit_args>
<arg flag="-l walltime=" name="$JOB_WALLCLOCK_TIME"/>
<arg flag="-A" name="$PROJECT"/>
</submit_args>
<directives>
<directive> -N {{ job_id }}</directive>
<directive> -l walltime={{ job_wallclock_time }}</directive>
<directive> -j oe </directive>
<directive> -A {{ project }} </directive>
<directive default="n"> -r {{ rerunnable }} </directive>
<directive default="ae" > -m {{ mail_options }} </directive>
<directive default="/bin/bash" > -S {{ shell }}</directive>
</directives>
</batch_system>

<batch_system type="slurm" >
<batch_query args="-o '%i' -h -u $USER">squeue </batch_query>
<batch_query>squeue</batch_query>
<batch_submit>sbatch</batch_submit>
<batch_directive>#SBATCH</batch_directive>
<jobid_pattern>(\d+)$</jobid_pattern>
<depend_string> --dependency=afterok:jobid</depend_string>
<walltime_format>%H:%M:%S</walltime_format>
<submit_args>
<arg flag="--time" name="$JOB_WALLCLOCK_TIME"/>
<arg flag="-p" name="$JOB_QUEUE"/>
<arg flag="--account" name="$PROJECT"/>
</submit_args>
<directives>
<directive> --job-name={{ job_id }}</directive>
<directive> --nodes={{ num_nodes }}</directive>
<directive> --ntasks-per-node={{ tasks_per_node }}</directive>
<directive> --output={{ output_error_path }} </directive>
<directive> --exclusive </directive>
<directive> --time={{ job_wallclock_time }}</directive>
<directive> --partition={{ job_queue }}</directive>
<directive> --account={{ project }}</directive>
</directives>
</batch_system>

Expand Down
5 changes: 0 additions & 5 deletions utils/python/CIME/case_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False):
os.remove("case.testdriver")
logger.info("Successfully cleaned test script case.testdriver")

unlock_file("env_batch.xml")

logger.info("Successfully cleaned batch script case.run")

msg = "case.setup clean complete"
Expand Down Expand Up @@ -179,9 +177,6 @@ def _case_setup_impl(case, caseroot, clean=False, test_mode=False, reset=False):
logger.info("Writing %s script from input template %s" % (job, input_batch_script))
env_batch.make_batch_script(input_batch_script, job, case, pestot, tasks_per_node, num_nodes, thread_count)

# Lock env_batch
lock_file("env_batch.xml")

# Make sure pio settings are consistant
for comp in models:
pio_stride = case.get_value("PIO_STRIDE_%s"%comp)
Expand Down

0 comments on commit 49b1e4a

Please sign in to comment.