Skip to content

Commit

Permalink
Fixes adding the qos queue on Edison
Browse files Browse the repository at this point in the history
Moves the batch option insertion to a point where it's valid
Changes the command from sed to awk, may revert this in the future
Also removes the check for Cori for the qos queue
[BFB]
  • Loading branch information
mfdeakin-sandia committed May 17, 2017
2 parents 91b4e2f + 351e069 commit 4f18a49
Showing 1 changed file with 31 additions and 29 deletions.
60 changes: 31 additions & 29 deletions run_acme.template.csh
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ endsw
# Note: we also want to change the group id for the files.
# But this can only be done once the run_root_dir has been created,
# so it is done later.
# TODO: CIME does this to some extent; determine how much and
umask 022

set cime_dir = ${code_root_dir}/${tag_name}/cime
Expand Down Expand Up @@ -586,8 +585,8 @@ acme_newline
acme_print '-------- Starting create_newcase --------'
acme_newline

acme_print $create_newcase_exe $configure_options
$create_newcase_exe $configure_options
acme_print ${create_newcase_exe} ${configure_options}
${create_newcase_exe} ${configure_options}

cd ${case_scripts_dir}

Expand Down Expand Up @@ -987,32 +986,6 @@ else
endif
endif

#============================================
# QUEUE OPTIONS
#============================================
# Edit the default queue and batch job lengths.

#HINT: To change queue after run submitted, the following works on most machines:
# qalter -lwalltime=00:29:00 <run_descriptor>
# qalter -W queue=debug <run_descriptor>

#NOTE: we are currently not modifying the archiving scripts to run in debug queue when $debug_queue=true
# under the assumption that if you're debugging you shouldn't be archiving.

#NOTE: there was 1 space btwn MSUB or PBS and the commands before cime and there are 2 spaces
# in post-cime versions. This is fixed by " \( \)*" in the lines below. The "*" here means
# "match zero or more of the expression before". The expression before is a single whitespace.
# The "\(" and "\)" bit indicate to sed that the whitespace in between is the expression we
# care about. The space before "\(" makes sure there is at least one whitespace after #MSUB.
# Taken all together, this stuff matches lines of the form #MSUB<one or more whitespaces>-<stuff>.

set machine = `lowercase $machine`

### Only specially authorized people can use the special_acme qos on Cori or Edison. Don't uncomment unless you're one.
### if ( `lowercase $debug_queue` == false && ( $machine == core || $machine == edison ) ) then
### sed -i /"#SBATCH \( \)*--account"/a"#SBATCH --qos=special_acme" ${case_run_exe}
### endif

#============================================
# BATCH JOB OPTIONS
#============================================
Expand Down Expand Up @@ -1059,6 +1032,35 @@ else
acme_print ' Assuming default ACME values.'
endif

#============================================
# QUEUE OPTIONS
#============================================
# Edit the default queue and batch job lengths.

#HINT: To change queue after run submitted, the following works on most machines:
# qalter -lwalltime=00:29:00 <run_descriptor>
# qalter -W queue=debug <run_descriptor>

#NOTE: we are currently not modifying the archiving scripts to run in debug queue when $debug_queue=true
# under the assumption that if you're debugging you shouldn't be archiving.

#NOTE: there was 1 space btwn MSUB or PBS and the commands before cime and there are 2 spaces
# in post-cime versions. This is fixed by " \( \)*" in the lines below. The "*" here means
# "match zero or more of the expression before". The expression before is a single whitespace.
# The "\(" and "\)" bit indicate to sed that the whitespace in between is the expression we
# care about. The space before "\(" makes sure there is at least one whitespace after #MSUB.
# Taken all together, this stuff matches lines of the form #MSUB<one or more whitespaces>-<stuff>.

set machine = `lowercase $machine`

### Only specially authorized people can use the special_acme qos on Cori or Edison. Don't uncomment unless you're one.
#if ( `lowercase $debug_queue` == false && $machine == edison ) then
# set update_run = ${case_run_exe}.updated
# awk '/--account/{print; print "#SBATCH --qos=special_acme";next}1' ${case_run_exe} > ${update_run}
# mv ${update_run} ${case_run_exe}
# unset update_run
#endif

#============================================
# SETUP SHORT AND LONG TERM ARCHIVING
#============================================
Expand Down

0 comments on commit 4f18a49

Please sign in to comment.