test-darshan-log-formats.sh 712 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#!/bin/bash 
#
# Test darshan-parser/darshan-job-summary.pl on the previous versions
# of the darshan log format.
#

LOGS=../example-output
RUNLOG=/tmp/run.log
PATH=../:${PATH}
namelist=()

for log in $(ls ${LOGS});
do
    if [ $log = 'README.txt' ];
    then
        continue;
    fi

    name=${log/.gz/.pdf}
    namelist=(${namelist[*]} $name)
    ../util/bin/darshan-job-summary.pl --output=${LOGS}/$name ${LOGS}/$log >> $RUNLOG 2>&1
    rc=$?
    if [ $rc -ne 0 ];
    then
        echo "failed: $rc : $log";
    fi
done

for name in ${namelist[*]};
do
    if [ -f ${LOGS}/$name ];
    then
        xpdf ${LOGS}/$name;
        rm ${LOGS}/$name;
    else
        echo "summary not found: $name";
    fi
done