<?xml version="1.0"?>
<file id="env_batch.xml" version="2.0">
  <header>
      These variables may be changed anytime during a run, they
      control arguments to the batch submit command.
    </header>
  <group id="config_batch">
    <entry id="BATCH_SYSTEM" value="pbs">
      <type>char</type>
      <valid_values>nersc_slurm,lc_slurm,moab,pbs,lsf,slurm,cobalt,cobalt_theta,none</valid_values>
      <desc>The batch system type to use for this machine.</desc>
    </entry>
  </group>
  <batch_system type="pbs">
    <batch_query args="-f">qstat</batch_query>
    <batch_submit>qsub </batch_submit>
    <batch_cancel>qdel</batch_cancel>
    <batch_env>-v</batch_env>
    <batch_directive>#PBS</batch_directive>
    <jobid_pattern>^(\S+)$</jobid_pattern>
    <depend_string> -W depend=afterok:jobid</depend_string>
    <depend_allow_string> -W depend=afterany:jobid</depend_allow_string>
    <depend_separator>:</depend_separator>
    <walltime_format>%H:%M:%S</walltime_format>
    <batch_mail_flag>-M</batch_mail_flag>
    <batch_mail_type_flag>-m</batch_mail_type_flag>
    <batch_mail_type>, bea, b, e, a</batch_mail_type>
    <submit_args>
      <arg flag="-q" name="$JOB_QUEUE"/>
      <arg flag="-l walltime=" name="$JOB_WALLCLOCK_TIME"/>
      <arg flag="-A" name="$PROJECT"/>
    </submit_args>
    <directives>
      <directive> -N {{ job_id }}</directive>
      <directive default="n"> -r {{ rerunnable }} </directive>
      <directive> -j oe </directive>
      <directive> -V </directive>
    </directives>
  </batch_system>
  <batch_system MACH="vilje" type="pbs">
    <submit_args>
      <arg flag="-N cesmRun"/>
    </submit_args>
    <directives>
      <directive>-A nn2345k</directive>
      <directive>-l select={{ num_nodes }}:ncpus={{ MAX_TASKS_PER_NODE }}:mpiprocs={{ tasks_per_node }}:ompthreads={{ thread_count }}</directive>
    </directives>
    <queues>
      <queue default="true" nodemax="9999" nodemin="1" walltimemax="48:00:00">workq</queue>
    </queues>
  </batch_system>
  <group id="case.run">
    <entry id="prereq" value="$BUILD_COMPLETE and not $TEST">
      <type>char</type>
    </entry>
    <entry id="template" value="template.case.run">
      <type>char</type>
    </entry>
    <entry id="PROJECT_REQUIRED" value="TRUE">
      <type>logical</type>
      <valid_values>TRUE,FALSE</valid_values>
      <desc>whether the PROJECT value is required on this machine</desc>
    </entry>
    <entry id="CHARGE_ACCOUNT">
      <type>char</type>
      <desc>project to charge in scripts if different from PROJECT</desc>
    </entry>
    <entry id="PROJECT" value="nn9560k">
      <type>char</type>
      <desc>project for project-sensitive build and run paths, and job scripts</desc>
    </entry>
    <entry id="BATCH_COMMAND_FLAGS">
      <type>char</type>
      <valid_values/>
      <desc>Override the batch submit command this job. Do not include executable or dependencies</desc>
    </entry>
    <entry id="JOB_WALLCLOCK_TIME" value="48:00:00">
      <type>char</type>
      <valid_values/>
      <desc>The machine wallclock setting.  Default determined in config_machines.xml can be overwritten by testing</desc>
    </entry>
    <entry id="JOB_QUEUE" value="workq">
      <type>char</type>
      <valid_values/>
      <desc>The machine queue in which to submit the job.  Default determined in config_machines.xml can be overwritten by testing</desc>
    </entry>
    <entry id="USER_REQUESTED_WALLTIME">
      <type>char</type>
      <desc>Store user override for walltime</desc>
    </entry>
    <entry id="USER_REQUESTED_QUEUE">
      <type>char</type>
      <desc>Store user override for queue</desc>
    </entry>
  </group>
  <group id="case.st_archive">
    <entry id="dependency" value="case.run or case.test">
      <type>char</type>
    </entry>
    <entry id="prereq" value="$DOUT_S">
      <type>char</type>
    </entry>
    <entry id="task_count" value="1">
      <type>char</type>
    </entry>
    <entry id="template" value="template.st_archive">
      <type>char</type>
    </entry>
    <entry id="walltime" value="03:59:00">
      <type>char</type>
    </entry>
    <entry id="PROJECT_REQUIRED" value="TRUE">
      <type>logical</type>
      <valid_values>TRUE,FALSE</valid_values>
      <desc>whether the PROJECT value is required on this machine</desc>
    </entry>
    <entry id="CHARGE_ACCOUNT">
      <type>char</type>
      <desc>project to charge in scripts if different from PROJECT</desc>
    </entry>
    <entry id="PROJECT" value="nn9560k">
      <type>char</type>
      <desc>project for project-sensitive build and run paths, and job scripts</desc>
    </entry>
    <entry id="BATCH_COMMAND_FLAGS">
      <type>char</type>
      <valid_values/>
      <desc>Override the batch submit command this job. Do not include executable or dependencies</desc>
    </entry>
    <entry id="JOB_WALLCLOCK_TIME" value="03:59:00">
      <type>char</type>
      <valid_values/>
      <desc>The machine wallclock setting.  Default determined in config_machines.xml can be overwritten by testing</desc>
    </entry>
    <entry id="JOB_QUEUE" value="workq">
      <type>char</type>
      <valid_values/>
      <desc>The machine queue in which to submit the job.  Default determined in config_machines.xml can be overwritten by testing</desc>
    </entry>
    <entry id="USER_REQUESTED_WALLTIME">
      <type>char</type>
      <desc>Store user override for walltime</desc>
    </entry>
    <entry id="USER_REQUESTED_QUEUE">
      <type>char</type>
      <desc>Store user override for queue</desc>
    </entry>
  </group>
</file>
