Skip to content
Snippets Groups Projects
Commit c3f407ad authored by Matthew K Defenderfer's avatar Matthew K Defenderfer
Browse files

change log directory and naming scheme to correctly add metadata without...

change log directory and naming scheme to correctly add metadata without needing to manually create a symlink
parent 54b3bf18
No related branches found
No related tags found
6 merge requests!24Release v0.2.0,!22Update main to rel_v0.1.1-1,!21Fix some merge errors,!20Refactoring run-mmpol scripts,!19BUGFIX: Change ownership to executing USER and group to atlab. Also automatically gzip the log output,!18ENH: Change log storage organization and correctly apply log prefix and metadata to file name
......@@ -127,11 +127,16 @@ if [[ -z "${dry_run}" ]]; then
# run policy command
$cmd
log_name="${output_log_prefix}_${filetag}"
log_dir="${outdir}/${log_name}.d"
mkdir ${log_dir}
# tag output file with run metadata
outfile=`ls -t $tmpglobal | head -1`
if [[ "$outfile" != "" ]]
raw_log_file=$(find ${outdir} -name "list-${SLURM_JOBID}*" -type d | head -1)
if [[ "$raw_log_file" != "" ]]
then
mv -n $tmpglobal/$outfile $tmpglobal/../${output_log_prefix}_$filetag
mv -n ${raw_log_file} ${log_dir}/${log_name}
fi
rmdir $tmpglobal
fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment