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

Merge branch 'feat-parsable-file-names' into 'main'

Feat parsable file names

Closes #2

See merge request !2
parents c59e637d d4716a0f
No related branches found
No related tags found
1 merge request!2Feat parsable file names
#!/bin/bash
# debug the calling convetion of the script
echo $@ >> data/call.log
case $1 in
LIST)
# just concat all file list files into a single file
# use opt parameter $3 as a tag to label the files
cat $2 >> data/listfile-${3}.log
rc=0
;;
TEST) # Respond with success
rc=0
;;
*) # Command not supported by this script
rc=1
;;
esac
exit $rc
/* list of files to include */
define( include_list,
(PATH_NAME LIKE 'FILEPATH%')
)
/* define access_age */
define(access_age,
(DAYS(CURRENT_TIMESTAMP) - DAYS(ACCESS_TIME))
)
RULE 'gather-exec' EXTERNAL LIST 'gather-info' EXEC '' OPTS 'JOBID' ESCAPE '%'
RULE 'list-path' LIST 'gather-info'
SHOW ('|size=' || varchar(FILE_SIZE) ||
'|kballoc='|| varchar(KB_ALLOCATED) ||
'|access=' || varchar(ACCESS_TIME) ||
'|create=' || varchar(CREATION_TIME) ||
'|modify=' || varchar(MODIFICATION_TIME) ||
'|uid=' || varchar(USER_ID) ||
'|gid=' || varchar(GROUP_ID) ||
'|heat=' || varchar(FILE_HEAT) ||
'|pool=' || varchar(POOL_NAME) ||
'|mode=' || varchar(MODE) ||
'|misc=' || varchar(MISC_ATTRIBUTES) ||
'|'
)
WHERE include_list
......@@ -19,12 +19,15 @@ DATESTR=`date +'%Y-%m-%d-%H:%M:%S'`
policy=`basename $policyfile`
filetag="${policy}_slurm-${SLURM_JOBID}_${DATESTR}"
cmd="mmapplypolicy ${filesystem} -I prepare \
cmd="mmapplypolicy ${filesystem} -I defer \
-P $policyfile \
-g $tmpglobal \
-s $tmpscratch \
-f ${DIR}/list-${SLURM_JOBID} \
-M FILEPATH=${filesystem} \
-N ${nodes} -n ${cores}"
-M JOBID=${SLURM_JOBID} \
-M LIST_OUTPUT_FILE=${OUTFILE:-/tmp/gpfs-list-policy}
-N ${nodes} -n ${cores} -m ${cores}"
# report final command in job log
echo $cmd
......
......@@ -10,9 +10,10 @@ ram=$5
partition=$6
filesystem=${7:-scratch}
time=${8:-60}
outfile=${9}
DIR=$outdir POLICYFILE=$policy FILESYSTEM=${filesystem} && \
DIR=$DIR POLICYFILE=$POLICYFILE FILESYSTEM=${FILESYSTEM} \
DIR=$outdir POLICYFILE=$policy FILESYSTEM=${filesystem} OUTFILE=${outfile} && \
DIR=$DIR POLICYFILE=$POLICYFILE FILESYSTEM=${FILESYSTEM} OUTFILE=${OUTFILE} \
sbatch \
-N $nodes \
-c $cores \
......
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