Skip to content

Commit

Permalink
finish draft of queue templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Sep 15, 2024
1 parent 976396a commit 28f2ed8
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 5 deletions.
9 changes: 9 additions & 0 deletions docs/examples/slurm_cfour.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
#SBATCH --job-name={{.filename}}
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH -o {{.filename}}.out
#SBATCH --no-requeue
#SBATCH --mem=8gb

CFOUR_CMD="cfour"
9 changes: 9 additions & 0 deletions docs/examples/slurm_dftb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
#SBATCH --job-name={{.filename}}
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH -o {{.filename}}.out
#SBATCH --no-requeue
#SBATCH --mem=8gb

DFTB_CMD="dftb+"
92 changes: 89 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@





<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -115,9 +117,9 @@ <h2>Table of Contents</h2>
<li><a href="#local">Local</a></li>
<ul>
<li><a href="#mopac---">MOPAC </a></li>
<li><a href="#dftb+---">DFTB+ </a></li>
<li><a href="#molpro---">Molpro </a></li>
<li><a href="#cfour---">CFOUR </a></li>
<li><a href="#dftb+---">DFTB+ </a></li>
</ul>
</ul>
<li><a href="#derivative-types">Derivative Types</a></li>
Expand Down Expand Up @@ -1265,6 +1267,14 @@ <h5 id=molpro-><a href="#molpro-">Molpro </a></h5>
<p>

<h5 id=cfour-><a href="#cfour-">CFOUR </a></h5>
<p>
This template and the following are pretty much the same, as were the
previous two, so there's not much more to say. In general, the top portion
of each template just consists of normal PBS directives with optional
template parameters, followed by a single command or couple of commands
(for MOPAC) to set the variable used by pbqff.
</p>

<pre><code>queue_template = """
#!/bin/sh
#PBS -N {{.basename}}
Expand Down Expand Up @@ -1308,16 +1318,92 @@ <h5 id=dftb+-><a href="#dftb+-">DFTB+ </a></h5>

<h4 id=slurm><a href="#slurm">Slurm</a></h4>

<p>
The general approach for Slurm and the local queue is identical to PBS, so
you may want to read the previous section even if you're intending to use
one of these other queues. Here I will just present some example templates
for quick reference.
</p>

<h5 id=mopac--><a href="#mopac--">MOPAC </a></h5>

<p>
This template and the Molpro one below are embedded directly from psqs,
where the templates for pbqff are defined. psqs doesn't currently define
default templates for CFOUR or DFTB+, so you'll have to provide
a <code>queue_template</code> of your own for those programs.
</p>

<pre><code>#!/bin/bash
#SBATCH --job-name=semp
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH -o {{.filename}}.out
#SBATCH --no-requeue
#SBATCH --mem=1gb
export LD_LIBRARY_PATH=/home/qc/mopac2016/
export MOPAC_CMD=/home/qc/mopac2016/MOPAC2016.exe
echo $SLURM_JOB_ID
date
hostname
</code></pre>
<h5 id=molpro--><a href="#molpro--">Molpro </a></h5>
<pre><code>#!/bin/bash
#SBATCH --job-name={{.filename}}
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH -o {{.filename}}.out
#SBATCH --no-requeue
#SBATCH --mem=8gb

MOLPRO_CMD="/home/qc/bin/molpro2020.sh 1 1"
</code></pre>
<h5 id=cfour--><a href="#cfour--">CFOUR </a></h5>
<pre><code>#!/bin/bash
#SBATCH --job-name={{.filename}}
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH -o {{.filename}}.out
#SBATCH --no-requeue
#SBATCH --mem=8gb

CFOUR_CMD="cfour"
</code></pre>
<h5 id=dftb+--><a href="#dftb+--">DFTB+ </a></h5>

<pre><code>#!/bin/bash
#SBATCH --job-name={{.filename}}
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH -o {{.filename}}.out
#SBATCH --no-requeue
#SBATCH --mem=8gb

DFTB_CMD="dftb+"
</code></pre>
<h4 id=local><a href="#local">Local</a></h4>

<p>
Like for Slurm, pbqff includes only two default templates for the local
queue option, which is primarily used for testing. Because the local queue
simply "submits" jobs using bash scripts rather than PBS or Slurm
submission scripts, a local queue template can be much simpler than a PBS
or Slurm template, essentially just defining the path to the executable to
be run. Of course, you can add any additional commands you want, but this
is all that pbqff requires.
</p>

<h5 id=mopac---><a href="#mopac---">MOPAC </a></h5>
<pre><code>export MOPAC_CMD=/opt/mopac/mopac
export LD_LIBRARY_PATH=/opt/mopac/ </code></pre>

<h5 id=dftb+---><a href="#dftb+---">DFTB+ </a></h5>
<pre><code>DFTB_CMD=/opt/dftb+/dftb+ </code></pre>

<h5 id=molpro---><a href="#molpro---">Molpro </a></h5>
<pre><code>MOLPRO_CMD=molpro </code></pre>

<h5 id=cfour---><a href="#cfour---">CFOUR </a></h5>
<h5 id=dftb+---><a href="#dftb+---">DFTB+ </a></h5>
<pre><code>CFOUR_CMD=cfour </code></pre>

<h3 id=derivative-types><a href="#derivative-types">Derivative Types</a></h3>
<!-- TODO -->
Expand Down
60 changes: 59 additions & 1 deletion docs/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
define({{head4}}, {{<h4 id=make_id($1)><a href="#make_id($1)">$1</a></h4>}})
define({{head5}}, {{<h5 id=make_id($1)><a href="#make_id($1)">$1</a></h5>}})
define({{code_block}}, {{<pre><code>include($1)</code></pre>}})
define({{qcode_block}}, {{changequote({{`}}, {{'}})dnl
code_block($1)dnl
changequote(`{{', `}}')dnl}})
define({{icode_block}}, {{<pre><code>dnl
$1 </code></pre>}})
define({{csv_table}}, {{syscmd({{./tables/convert.awk $1}})}})

<!DOCTYPE html>
Expand Down Expand Up @@ -892,23 +897,76 @@ <h2>Table of Contents</h2>
<p>

head5(CFOUR )
<p>
This template and the following are pretty much the same, as were the
previous two, so there's not much more to say. In general, the top portion
of each template just consists of normal PBS directives with optional
template parameters, followed by a single command or couple of commands
(for MOPAC) to set the variable used by pbqff.
</p>

code_block(examples/pbs_cfour.toml)

head5(DFTB+ )
code_block(examples/pbs_dftb.toml)

head4(Slurm)

<p>
The general approach for Slurm and the local queue is identical to PBS, so
you may want to read the previous section even if you're intending to use
one of these other queues. Here I will just present some example templates
for quick reference.
</p>

head5(MOPAC )

<p>
This template and the Molpro one below are embedded directly from psqs,
where the templates for pbqff are defined. psqs doesn't currently define
default templates for CFOUR or DFTB+, so you'll have to provide
a <code>queue_template</code> of your own for those programs.
</p>

qcode_block(../../psqs/templates/slurm/mopac)

head5(Molpro )
qcode_block(../../psqs/templates/slurm/molpro)

head5(CFOUR )
qcode_block(examples/slurm_cfour.toml)

head5(DFTB+ )
qcode_block(examples/slurm_dftb.toml)

head4(Local)

<p>
Like for Slurm, pbqff includes only two default templates for the local
queue option, which is primarily used for testing. Because the local queue
simply "submits" jobs using bash scripts rather than PBS or Slurm
submission scripts, a local queue template can be much simpler than a PBS
or Slurm template, essentially just defining the path to the executable to
be run. Of course, you can add any additional commands you want, but this
is all that pbqff requires.
</p>

head5(MOPAC )
icode_block(
export MOPAC_CMD=/opt/mopac/mopac
export LD_LIBRARY_PATH=/opt/mopac/)

head5(DFTB+ )
icode_block(
DFTB_CMD=/opt/dftb+/dftb+)

head5(Molpro )
icode_block(
MOLPRO_CMD=molpro)

head5(CFOUR )
head5(DFTB+ )
icode_block(
CFOUR_CMD=cfour)

head3(Derivative Types)
<!-- TODO -->
Expand Down
2 changes: 1 addition & 1 deletion docs/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
<li><a href="#local">Local</a></li>
<ul>
<li><a href="#mopac---">MOPAC </a></li>
<li><a href="#dftb+---">DFTB+ </a></li>
<li><a href="#molpro---">Molpro </a></li>
<li><a href="#cfour---">CFOUR </a></li>
<li><a href="#dftb+---">DFTB+ </a></li>
</ul>
</ul>
<li><a href="#derivative-types">Derivative Types</a></li>
Expand Down

0 comments on commit 28f2ed8

Please sign in to comment.