parsing.sh: Remove assumption about calc args
Calc can have several args for useless_loop and line prods and for comm and barriere bench. Hence: * Change use_histo to reflect that * Set list of args per bench/prod instead of globally * No need for the argument (since there is several) in create_complex_dat_body
This commit is contained in:
parent
74f5176116
commit
09afc1ed2b
|
@ -41,11 +41,6 @@ init_log_vars ()
|
|||
|
||||
cacheList=`ls *log | perl -ni -e '/cache_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}' | sed -r "s/ +\$//"`
|
||||
prodList=`ls *.log | perl -ni -e '/typeProd_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||
if ls "*typeProd_useless_loop*_comm.log" >/dev/null 2>&1
|
||||
then
|
||||
firstBarriereComm=`echo $barriereList | sed -r "s/^[^ ]* .*$//"`
|
||||
argTypeProdList=`eval ls *typeProd_useless_loop*${firstBarriereComm}_comm.log | perl -ni -e '/argTypeProd_([\d]+)-/; $a{$1}=""; END { foreach ( sort { $a <=> $b } keys %a ) {print "$_ "}}'`
|
||||
fi
|
||||
metriqueList="cache_hits cache_miss cycles total_time"
|
||||
nbIter=`ls -1 *.log | head -1 | sed -r "s/^.*nbIter_([[:digit:]]+).*$/\1/"`
|
||||
valuePerCacheLine=$(grep "^buf size: " *.log | head -1 | sed -r "s/^.*:buf size: ([[:digit:]]+)[^[:digit:]+]$/\1/")
|
||||
|
@ -85,7 +80,7 @@ use_histo ()
|
|||
prod="$1"
|
||||
bench="$2"
|
||||
|
||||
[ "$bench" = "communication" -o "$prod" != "useless_loop" ]
|
||||
[ "$prod" != "useless_loop" -a "$prod" != "line" ]
|
||||
return $?
|
||||
}
|
||||
|
||||
|
@ -114,8 +109,11 @@ contains_zero()
|
|||
done
|
||||
else
|
||||
iMin=$((lineNum + numCacheConfigs * 4 + 1))
|
||||
# Count the number of spaces in the list + the line feed
|
||||
nbArg=$(echo $argTypeProdList | sed -r "s/[^ ]//g" | wc -c)
|
||||
# Number of lines in the file
|
||||
nbArg=$(wc -l $datFile | cut -d ' ' -f 1)
|
||||
nbArg=$((nbArg + 1)) # Last line doesn't contain a newline
|
||||
nbArg=$((nbArg - 4 * numCacheConfigs + 1))
|
||||
nbArg=$((nbArg / numCacheConfigs / 4))
|
||||
iMax=$((iMin + nbArg * numCacheConfigs * 4 - 4))
|
||||
for i in $(seq $iMin 4 $iMax)
|
||||
do
|
||||
|
@ -226,12 +224,14 @@ create_simple_dat_body ()
|
|||
|
||||
create_complex_dat_body ()
|
||||
{
|
||||
local prod bench metrique -
|
||||
local prod bench metrique firstComm argTypeProdList argTypeProd -
|
||||
prod="$1"
|
||||
bench="$2"
|
||||
metrique="$3"
|
||||
argTypeProd="$4"
|
||||
metriquePattern="$5"
|
||||
metriquePattern="$4"
|
||||
|
||||
firstComm=$(ls -1 *typeProd_$prod*.log | head -1 | sed -r "s/^.*nbIter_[^-]+-([^.]+)\.log$/\1/")
|
||||
argTypeProdList=`eval ls *typeProd_$prod*${firstComm}.log | perl -ni -e '/argTypeProd_([\d]+)-/; $a{$1}=""; END { foreach ( sort { $a <=> $b } keys %a ) {print "$_ "}}'`
|
||||
|
||||
for argTypeProd in $argTypeProdList
|
||||
do
|
||||
|
@ -270,7 +270,7 @@ create_dat_body ()
|
|||
then
|
||||
create_simple_dat_body "$prod" "$bench" "$metrique" "$argTypeProd" "$metriquePattern"
|
||||
else
|
||||
create_complex_dat_body "$prod" "$bench" "$metrique" "$argTypeProd" "$metriquePattern"
|
||||
create_complex_dat_body "$prod" "$bench" "$metrique" "$metriquePattern"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue