Skip to content
Snippets Groups Projects
Commit 523dad27 authored by John-Paul Robinson's avatar John-Paul Robinson
Browse files

Merge branch '1-list-parameter-is-used-incorrectly-as-a-file-tag' into 'main'

Resolve "LIST parameter is used incorrectly as a file tag"

Closes #1

See merge request !1
parents dcf7bf46 c4ec7ba3
No related branches found
No related tags found
1 merge request!1Resolve "LIST parameter is used incorrectly as a file tag"
......@@ -8,8 +8,7 @@ define(access_age,
(DAYS(CURRENT_TIMESTAMP) - DAYS(ACCESS_TIME))
)
/* note: subtitution via -M for file tag */
RULE 'old_files' LIST 'FILETAG'
RULE 'old_files' LIST 'no_extern_list'
SHOW ('|size=' || varchar(FILE_SIZE) ||
'|kballoc='|| varchar(KB_ALLOCATED) ||
'|access=' || varchar(ACCESS_TIME) ||
......
......@@ -14,13 +14,13 @@ cores="${SLURM_CPUS_PER_TASK}"
DATESTR=`date +'%Y-%m-%d-%H:%M:%S'`
filetag=$policyfile_$DATESTR
policy=`basename $policyfile`
filetag="${policy}_slurm-${SLURM_JOBID}_${DATESTR}"
cmd="mmapplypolicy scratch -I prepare \
-P $policyfile \
-g $tmpglobal \
-s $tmpscratch \
-M "FILETAG=$filetag"
-N ${nodes} -n ${cores}"
# report final command in job log
......@@ -28,3 +28,15 @@ echo $cmd
# run policy command
$cmd
rcode=$?
if [ $rcode -ne 0 ]
then
echo error: mmapplypoicy failed: code $rcode
exit $rcode
fi
# tag output file with run metadata
outfile=`ls -t $tmpglobal | head -1`
mv -n $tmpglobal/$outfile $tmpglobal/$outfile_$filetag
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