diff --git a/policy/list-30day-with-excludes b/policy/list-30day-with-excludes index ac3cb5b05e7678664bcc2870b449c6ea497a0a56..670752f6d37619b8d192b1be5687720cfaf4dc8e 100644 --- a/policy/list-30day-with-excludes +++ b/policy/list-30day-with-excludes @@ -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) || diff --git a/run-mmpol.sh b/run-mmpol.sh index e45ba4758a50234cd8296f70741758cd09a3ad33..81df4511059e4e49733f0ef3468c9a4c19892adc 100755 --- a/run-mmpol.sh +++ b/run-mmpol.sh @@ -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