From 199bc1c533b4b9cf878249ec55528c922c0a868d Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Fri, 3 Jul 2026 15:28:34 +0300 Subject: [PATCH] Add T3-on-Zeus local config (.t3), drop python-jl, fix st alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds Servers/Zeus/.t3/ — the T3 counterpart of the existing .arc config — so T3 runs on Zeus without hand-edited settings: - t3_settings.py: PBS server + Zeus /opt/pbs/bin command paths (matching the ARC Zeus config); RMG submitted to the queue, ARC run in-process. Keys/values match what T3 actually reads (execution_type incore|local, servers 'max mem', check_status/submit/submit_filenames). - t3_submit.py: PBS RMG submit template using $rmgpy_path, pinned to node n170 on alon_q like Servers/Zeus/ARC/submit.sh; filled by T3 via name/cpus/memory/workdir/max_iterations (max_iterations placed as its own token so spacing is safe). Files are named t3_settings.py / t3_submit.py, the names T3 loads from ~/.t3 (t3.imports); the earlier draft's settings.py would never load. Drops python-jl (no longer used): the RMG submit template, the RMG/submit.sh script, and the rmg/arkane .bashrc aliases now call plain python. RMG/submit.sh also now uses $rmgpy_path (the exported var) instead of the undefined $rmg_code. .bashrc: `st` alias uses `$USER` instead of a hand-edited . Co-Authored-By: Claude Fable 5 --- Servers/Zeus/.bashrc | 7 ++--- Servers/Zeus/.t3/t3_settings.py | 49 +++++++++++++++++++++++++++++++++ Servers/Zeus/.t3/t3_submit.py | 30 ++++++++++++++++++++ Servers/Zeus/RMG/submit.sh | 2 +- 4 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 Servers/Zeus/.t3/t3_settings.py create mode 100644 Servers/Zeus/.t3/t3_submit.py diff --git a/Servers/Zeus/.bashrc b/Servers/Zeus/.bashrc index 088b1b2..aea0f1c 100644 --- a/Servers/Zeus/.bashrc +++ b/Servers/Zeus/.bashrc @@ -1,7 +1,6 @@ # User specific aliases and functions -# Note: Change the keyword of the last "st" command to your own username (without the "<" and ">) # RMG-Py @@ -36,11 +35,11 @@ alias dbcode='cd $rmgdb_path' alias arcode='cd $arc_path' alias t3code='cd $t3_path' -alias rmg='python-jl $rmgpy_path/rmg.py input.py > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)' -alias arkane='python-jl $rmgpy_path/Arkane.py input.py > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)' +alias rmg='python $rmgpy_path/rmg.py input.py > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)' +alias arkane='python $rmgpy_path/Arkane.py input.py > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)' alias arc='python $arc_path/ARC.py input.yml > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)' alias arcrestart='python $arc_path/ARC.py restart.yml > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)' alias t3='python $t3_path/T3.py input.yml > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)' alias sb='qsub submit.sh' -alias st='qstat -u ' +alias st='qstat -u $USER' diff --git a/Servers/Zeus/.t3/t3_settings.py b/Servers/Zeus/.t3/t3_settings.py new file mode 100644 index 0000000..fe15948 --- /dev/null +++ b/Servers/Zeus/.t3/t3_settings.py @@ -0,0 +1,49 @@ +""" +Local T3 settings for the Zeus (PBS) cluster. + +T3 loads this file from ``~/.t3/t3_settings.py`` and any variable defined here +overrides the corresponding one in T3's built-in ``t3/settings/t3_settings.py``. +Each override replaces the whole variable, so dicts below are kept complete. +""" + +# Execution type per software: +# 'incore' - run in the calling T3 process +# 'local' - submit a job to this server's queue +# RMG is submitted to the Zeus queue; ARC runs in-process and submits its own +# ESS jobs via Servers/Zeus/ARC/.arc. +execution_type = { + 'rmg': 'local', + 'arc': 'incore', +} + +servers = { + 'local': { # Each Zeus node has 80 cores and 378 GB RAM + 'cluster_soft': 'PBS', + 'cpus': 16, + 'max mem': 40, # GB + }, +} + +# Zeus keeps its PBS binaries under /opt/pbs/bin (matches Servers/Zeus/ARC/.arc/settings.py). +check_status_command = { + 'OGE': 'export SGE_ROOT=/opt/sge; /opt/sge/bin/lx24-amd64/qstat -u $USER', + 'Slurm': '/usr/bin/squeue -u $USER', + 'PBS': '/opt/pbs/bin/qstat -u $USER', + 'HTCondor': """condor_q -cons 'Member(Jobstatus,{1,2})' -af:j '{"0","P","R","X","C","H",">","S"}[JobStatus]' RequestCpus RequestMemory JobName '(Time() - EnteredCurrentStatus)'""", +} + +submit_command = { + 'OGE': 'export SGE_ROOT=/opt/sge; /opt/sge/bin/lx24-amd64/qsub', + 'Slurm': '/usr/bin/sbatch', + 'PBS': '/opt/pbs/bin/qsub', + 'HTCondor': 'condor_submit', +} + +submit_filenames = { + 'OGE': 'submit.sh', + 'Slurm': 'submit.sl', + 'PBS': 'submit.sh', + 'HTCondor': 'submit.sub', +} + +rmg_initial_memory = 25 # GB, initial memory for an RMG job submitted to the queue diff --git a/Servers/Zeus/.t3/t3_submit.py b/Servers/Zeus/.t3/t3_submit.py new file mode 100644 index 0000000..8c12f54 --- /dev/null +++ b/Servers/Zeus/.t3/t3_submit.py @@ -0,0 +1,30 @@ +""" +Local T3 submit scripts for the Zeus (PBS) cluster. + +T3 loads this file from ``~/.t3/t3_submit.py`` and updates its built-in +``submit_scripts`` with the entries below. T3 fills the 'rmg' template via +str.format() with: name, cpus, memory, workdir, max_iterations. +""" + +submit_scripts = { + 'rmg': """#!/bin/bash -l + +#PBS -N {name} +#PBS -q alon_q +#PBS -l walltime=72:00:00 +#PBS -l select=1:ncpus={cpus}:host=n170 +#PBS -o out.txt +#PBS -e err.txt + +PBS_O_WORKDIR={workdir} +cd $PBS_O_WORKDIR + +conda activate rmg_env + +touch initial_time + +python $rmgpy_path/rmg.py {max_iterations} -n {cpus} input.py + +touch final_time +""", +} diff --git a/Servers/Zeus/RMG/submit.sh b/Servers/Zeus/RMG/submit.sh index a184b0d..9b83e92 100644 --- a/Servers/Zeus/RMG/submit.sh +++ b/Servers/Zeus/RMG/submit.sh @@ -12,5 +12,5 @@ cd $PBS_O_WORKDIR conda activate rmg_env -python-jl $rmg_code/rmg.py -n 10 input.py +python $rmgpy_path/rmg.py -n 10 input.py