Skip to content

Conversation

aerorahul
Copy link

This PR:

  • enables the user to provide an option -n | --dryrun to rocotorun, rocotoboot commands. When combined with -v 10, this option returns to stdout the jobcard that would have been submitted to the batch queuing system (BQS).
  • ensures that the database is cleaned when -n is invoked, so that there is no record of the dryrun call
  • ensures the logging is captured on the tasks that were invoked with -n.

Resolves #114

A few sample outputs are included here as examples:

 ❯❯❯ rocotorun -n -v 10 -d ttt.db -w ttt.xml
06/05/25 09:11:01 EDT :: ttt.xml :: Submitting gfs_stage_ic using sbatch < /tmp/sbatch.in20250605-543006-11ti70d with input
{{
#! /bin/sh
#SBATCH --job-name=ttt_gfs_stage_ic_12
#SBATCH --account=da-cpu
#SBATCH --qos=batch
#SBATCH --partition=service
#SBATCH -t 00:15:00
#SBATCH --nodes=1-1
#SBATCH --tasks-per-node=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4096
#SBATCH -o /xxx/ttt/logs/2021032312/gfs_stage_ic.log
#SBATCH --export=NONE
#SBATCH --comment=043efe193d6aa501d63c92ba7b192cf6
export RUN_ENVIR='emc'
export HOMEgfs='/xxx/global-workflow'
export EXPDIR='/xxx/ttt'
export NET='gfs'
export RUN='gfs'
export CDATE='2021032312'
export PDY='20210323'
export cyc='12'
export COMROOT='/xxx/COMROOT'
export DATAROOT='/xxx/ttt/gfs.2021032312'
/xxx/global-workflow/dev/jobs/stage_ic.sh
}}

A peek in logs/ after issuing the above call successively, reveals:

❯❯❯ cat logs/2021032312.log
2025-06-05 09:01:31 -0400 :: hfe09 :: Submitting gfs_stage_ic
2025-06-05 09:01:31 -0400 :: hfe09 :: Submission of gfs_stage_ic was a dryrun!
2025-06-05 09:02:06 -0400 :: hfe09 :: Submitting gfs_stage_ic
2025-06-05 09:02:06 -0400 :: hfe09 :: Submission of gfs_stage_ic was a dryrun!
2025-06-05 09:04:46 -0400 :: hfe09 :: Submitting gfs_stage_ic
2025-06-05 09:04:46 -0400 :: hfe09 :: Submission of gfs_stage_ic was a dryrun!
2025-06-05 09:07:14 -0400 :: hfe09 :: Submitting gfs_stage_ic
2025-06-05 09:07:14 -0400 :: hfe09 :: Submission of gfs_stage_ic was a dryrun!
2025-06-05 09:08:45 -0400 :: hfe09 :: Submitting gfs_stage_ic
2025-06-05 09:08:45 -0400 :: hfe09 :: Submission of gfs_stage_ic was a dryrun!
2025-06-05 09:11:01 -0400 :: hfe09 :: Submitting gfs_stage_ic
2025-06-05 09:11:01 -0400 :: hfe09 :: Submission of gfs_stage_ic was a dryrun!

@aerorahul aerorahul marked this pull request as ready for review September 10, 2025 15:59
@aerorahul
Copy link
Author

aerorahul commented Sep 10, 2025

@christopherwharrop-noaa
We have used this branch for a while on RDHPCS machines [Hera and GaeaC6] with Slurm and WCOSS with PBS, as we previously discussed.
I am happy to address any questions you have.
Thank you for considering this feature for inclusion in your future releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to perform a dryrun with some rocoto commands
2 participants