From 28f2ed85c65bff9ac511178b70bc7f024438647f Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Sun, 15 Sep 2024 13:01:51 -0400 Subject: [PATCH] finish draft of queue templates --- docs/examples/slurm_cfour.toml | 9 ++++ docs/examples/slurm_dftb.toml | 9 ++++ docs/index.html | 92 ++++++++++++++++++++++++++++++++-- docs/template.html | 60 +++++++++++++++++++++- docs/toc.html | 2 +- 5 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 docs/examples/slurm_cfour.toml create mode 100644 docs/examples/slurm_dftb.toml diff --git a/docs/examples/slurm_cfour.toml b/docs/examples/slurm_cfour.toml new file mode 100644 index 00000000..8ecb307b --- /dev/null +++ b/docs/examples/slurm_cfour.toml @@ -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" diff --git a/docs/examples/slurm_dftb.toml b/docs/examples/slurm_dftb.toml new file mode 100644 index 00000000..0a7f163b --- /dev/null +++ b/docs/examples/slurm_dftb.toml @@ -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+" diff --git a/docs/index.html b/docs/index.html index 73a248dc..03b74d39 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,6 +9,8 @@ + + @@ -115,9 +117,9 @@

Table of Contents

  • Local
  • Derivative Types
  • @@ -1265,6 +1267,14 @@
    Molpro

    CFOUR
    +

    + 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. +

    +
    queue_template = """
     #!/bin/sh
     #PBS -N {{.basename}}
    @@ -1308,16 +1318,92 @@ 
    DFTB+

    Slurm

    +

    + 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. +

    +
    MOPAC
    + +

    + 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 queue_template of your own for those programs. +

    + +
    #!/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
    +
    Molpro
    +
    #!/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"
    +
    CFOUR
    +
    #!/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"
    +
    DFTB+
    - +
    #!/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+"
    +

    Local

    + +

    + 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. +

    +
    MOPAC
    +
    export MOPAC_CMD=/opt/mopac/mopac
    +export LD_LIBRARY_PATH=/opt/mopac/ 
    + +
    DFTB+
    +
    DFTB_CMD=/opt/dftb+/dftb+ 
    +
    Molpro
    +
    MOLPRO_CMD=molpro 
    +
    CFOUR
    -
    DFTB+
    +
    CFOUR_CMD=cfour 

    Derivative Types

    diff --git a/docs/template.html b/docs/template.html index 55c37cd6..96b5def0 100644 --- a/docs/template.html +++ b/docs/template.html @@ -9,6 +9,11 @@ define({{head4}}, {{

    $1

    }}) define({{head5}}, {{
    $1
    }}) define({{code_block}}, {{
    include($1)
    }}) +define({{qcode_block}}, {{changequote({{`}}, {{'}})dnl +code_block($1)dnl +changequote(`{{', `}}')dnl}}) +define({{icode_block}}, {{
    dnl
    +$1 
    }}) define({{csv_table}}, {{syscmd({{./tables/convert.awk $1}})}}) @@ -892,6 +897,14 @@

    Table of Contents

    head5(CFOUR ) +

    + 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. +

    + code_block(examples/pbs_cfour.toml) head5(DFTB+ ) @@ -899,16 +912,61 @@

    Table of Contents

    head4(Slurm) +

    + 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. +

    + head5(MOPAC ) + +

    + 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 queue_template of your own for those programs. +

    + + 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) + +

    + 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. +

    + 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) diff --git a/docs/toc.html b/docs/toc.html index 77b70158..e0dca70f 100644 --- a/docs/toc.html +++ b/docs/toc.html @@ -48,9 +48,9 @@
  • Local
  • Derivative Types