diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2020-02-01 13:07:46 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2020-02-01 13:07:46 +0100 |
commit | 0ce4e8d52fd491268a56c10dbb32fd5c996e2589 (patch) | |
tree | afe5defc2a845f0b65936a1874e4658412eff2cd /tests/roof.sh | |
parent | 44cef2cb16dd2bc55ad34d0b8313f7f314b0107a (diff) | |
download | ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.tar.gz ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.tar.bz2 ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.tar.xz ufo-roof-temp-0ce4e8d52fd491268a56c10dbb32fd5c996e2589.zip |
Initial Python infrastructure to build more complex processing pipelines and the corresponding changes in ROOF filters
Diffstat (limited to 'tests/roof.sh')
-rwxr-xr-x | tests/roof.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/roof.sh b/tests/roof.sh new file mode 100755 index 0000000..a8fa89e --- /dev/null +++ b/tests/roof.sh @@ -0,0 +1,32 @@ +#! /bin/bash + +. config.sh + +function pyroof { + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib$arch" GI_TYPELIB_PATH="/usr/local/lib$arch/girepository-1.0/" \ + python3 roof.py "$@" +} + +if [[ "$0" =~ roof-vma ]]; then + function roof { + bufs=800000 + bufs=$((bufs * 4)) + + ulimit -l unlimited + echo 1000000000 > /proc/sys/kernel/shmmax # 18446744073692774399 + echo 8000 > /proc/sys/vm/nr_hugepages # 0 + + VMA_THREAD_MODE=3 VMA_MTU=0 VMA_RX_POLL=0 VMA_SELECT_POLL=0 VMA_RING_ALLOCATION_LOGIC_RX=20 VMA_RX_BUFS=$bufs LD_PRELOAD=$vma_lib \ + pyroof "$@" + } +else + function roof { + pyroof "$@" + } +fi + +#cat roof.yaml | sed '/simulation/,$d' | yq . > roof.json +#cat roof.yaml | yq r - -j | jq '' | sed -r '/\[$/ {:a;N;s/\]/&/;Ta;s/\n +//g;s/,(.)/, \1/}' > roof.json +cat roof.yaml | python3 yaml2json.py | sed -r '/\[$/ {:a;N;s/\]/&/;Ta;s/\n +//g;s/,(.)/, \1/}' > roof.json + +roof "$@" |