Skip to content

Commit

Permalink
current version of official merge scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
aaust committed Aug 21, 2024
1 parent 8c5194a commit 74f15eb
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion launch_scripts/merge_trees/cron_exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
date
source ~/env_monitoring_launch.sh
export PATH=/site/bin:${PATH} #because .login isn't executed, and need this path for SWIF
python ~/monitoring/merge_trees/merge_trees.py ~/monitoring/merge_trees/jobs_merge.config 0
python ~/hd_utilities/launch_scripts/merge_trees/merge_trees.py ~/hd_utilities/launch_scripts/merge_trees/jobs_merge.config 0

2 changes: 1 addition & 1 deletion launch_scripts/merge_trees/cron_merge
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Min Hour Day Month Weekday Command
#-----------------------------------------------------------------------------
MAILTO=aaustreg@jlab.org
*/15 * * * * /bin/bash -c ~/monitoring/merge_trees/cron_exec.sh > /home/gxproj1/merge_trees.log 2>&1
*/15 * * * * /bin/bash -c ~/hd_utilities/launch_scripts/merge_trees/cron_exec.sh > /home/gxproj6/merge_trees.log 2>&1
24 changes: 12 additions & 12 deletions launch_scripts/merge_trees/jobs_merge.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
# For files & directories: Must specify full path

# SCICOMP JOB ACCOUNTING
PROJECT halld # http://scicomp.jlab.org/scicomp/#/projects
TRACK production # https://scicomp.jlab.org/docs/batch_job_tracks
OS general
PROJECT halld-pro # http://scicomp.jlab.org/scicomp/#/projects
TRACK production # https://scicomp.jlab.org/docs/batch_job_tracks
OS el9

# JOB RESOURCES
NCORES 1
DISK 500GB
RAM 8GB
TIMELIMIT 8hrs
DISK 1000GB
RAM 4GB
TIMELIMIT 16hrs

RUNPERIOD 2017-01
VERSION 01
BATCH 01
RUNPERIOD 2018-01
VERSION 24
BATCH 04
WORKFLOW analysis_[RUNPERIOD]_ver[VERSION]_batch[BATCH] # Input workflow

# JOB, SCRIPT CONTROL
ENVFILE /home/gxproj1/env_monitoring_launch.sh
SCRIPTFILE /home/gxproj1/monitoring/merge_trees/script.sh
CACHE_PIN_DAYS 60 # max is 60, 0 or comment-out for none
ENVFILE /home/gxproj6/env_analysis_launch.sh
SCRIPTFILE /home/gxproj6/hd_utilities/launch_scripts/merge_trees/script.sh
CACHE_PIN_DAYS 0 # max is 60, 0 or comment-out for none

# FILE INPUT, OUTPUT BASE DIRECTORIES
INDATA_TOPDIR /volatile/halld/analysis/RunPeriod-[RUNPERIOD]/ver[VERSION]/
Expand Down
16 changes: 8 additions & 8 deletions launch_scripts/merge_trees/merge_trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,25 +381,25 @@ def main(argv):
print("Retry failed jobs in the launch workflow: ")
command = "/usr/local/bin/swif2 retry-jobs -workflow " + LAUNCH_WORKFLOW + " -problems SLURM_FAILED SLURM_CANCELLED SLURM_NODE_FAIL SITE_LAUNCH_FAIL SITE_PREP_FAIL SWIF_INPUT_FAIL SWIF_SYSTEM_ERROR"
if VERBOSE > 1:
print(command)
print(command)
try_command(command)

# MODIFY FAILED JOBS
command = "swif2 modify-jobs -ram add 4gb -workflow " + LAUNCH_WORKFLOW + " -problems SLURM_OUT_OF_MEMORY"
command = "swif2 modify-jobs -ram add 4gb -workflow " + LAUNCH_WORKFLOW + " -problems SLURM_OUT_OF_MEMORY"
if VERBOSE > 1:
print command
try_command(command)
print(command)
try_command(command)

command = "swif2 modify-jobs -time add 4h -workflow " + LAUNCH_WORKFLOW + " -problems SLURM_TIMEOUT"
command = "swif2 modify-jobs -time add 4h -workflow " + LAUNCH_WORKFLOW + " -problems SLURM_TIMEOUT"
if VERBOSE > 1:
print command
try_command(command)
print(command)
try_command(command)


print("Retry failed jobs in the merge workflow: ")
command = "/usr/local/bin/swif2 retry-jobs -workflow " + MERGE_WORKFLOW + " -problems SLURM_CANCELLED SLURM_TIMEOUT SLURM_NODE_FAIL SITE_LAUNCH_FAIL SITE_PREP_FAIL SWIF_INPUT_FAIL SWIF_SYSTEM_ERROR"
if VERBOSE > 1:
print (command)
print (command)
try_command(command)


Expand Down
2 changes: 1 addition & 1 deletion launch_scripts/merge_trees/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Merge_Files()

#cp -v $INPUTDIR/$TYPE/$RUN/${TYPE}_${RUN}_*.root .

LD_PRELOAD=/home/gxproj6/monitoring/merge_trees/startup_C.so hadd $TEMP_FILE $INPUTDIR/$TYPE/$RUN/${TYPE}_${RUN}_*.root
LD_PRELOAD=/home/gxproj6/hd_utilities/launch_scripts/merge_trees/startup_C.so hadd $TEMP_FILE $INPUTDIR/$TYPE/$RUN/${TYPE}_${RUN}_*.root
#hadd $TEMP_FILE $INPUTDIR/$TYPE/$RUN/${TYPE}_${RUN}_*.root
# RETURN CODE
RETURN_CODE=$?
Expand Down

0 comments on commit 74f15eb

Please sign in to comment.