Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- export all_dirs=a20[w-z]
- for dir in $all_dirs; do
- [ -d "${dir}" ] || continue # if not a directory, skip
- cd $dir/run
- echo 'cd into directory:' `pwd`
- grep walltotal timing*/model_timing_stats; grep integration timing*/model_timing_stats
- cd ../..
- done
- echo
- echo "Summary, for plotting:"
- for dir in $all_dirs; do
- [ -d "${dir}" ] || continue # if not a directory, skip
- cd $dir/run
- echo $dir ' ' \
- `grep 'i:time integration' timing*/model_timing_stats | cut -c 48-58` \
- `grep 'i:time integration' timing*/model_timing_stats | cut -c 95-105` \
- `grep 'o:time integration' timing*/model_timing_stats | cut -c 48-58` \
- `grep 'o:time integration' timing*/model_timing_stats | cut -c 95-105`
- cd ../..
- done
- echo
- echo "Copy into python for plotting:"
- echo "data = np.array(["
- for dir in $all_dirs; do
- [ -d "${dir}" ] || continue # if not a directory, skip
- cd $dir/run
- echo ' [' \
- `grep 'i:time integration' timing*/model_timing_stats | cut -c 48-58` ', '\
- `grep 'i:time integration' timing*/model_timing_stats | cut -c 95-105` ', '\
- `grep 'o:time integration' timing*/model_timing_stats | cut -c 48-58` ', '\
- `grep 'o:time integration' timing*/model_timing_stats | cut -c 95-105` \
- ' ],'
- cd ../..
- done
- echo " ])"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement