go.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. echo Compile with gcc -O2
  3. rm -f *.bin
  4. rm -f ../scattnlay
  5. g++ -Ofast -std=c++11 compare.cc nmie.cc nmie-wrapper.cc -lm -lrt -o scattnlay.bin -static
  6. g++ -Ofast -std=c++11 compare.cc nmie.cc nmie-wrapper.cc -lm -lrt -o scattnlay-pg.bin -static -pg
  7. # clang++ -g -O1 -fsanitize=address -fno-optimize-sibling-calls -fno-omit-frame-pointer -std=c++11 compare.cc nmie.cc nmie-wrapper.cc -lm -lrt -o scattnlay.bin
  8. cp scattnlay.bin ../scattnlay
  9. cp scattnlay-pg.bin ../scattnlay-pg
  10. cd tests/shell
  11. # for file in `ls *.sh`; do
  12. # if [ "$file" != "test03.sh" ]; then
  13. # ./$file > /dev/null
  14. # echo $file
  15. # fi
  16. # done
  17. PROGRAM='../../../scattnlay'
  18. time ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4 $PROGRAM -l 5 0.4642 1.8000 1.7000 0.7114 0.8000 0.7000 0.7393 1.2000 0.0900 0.9168 2.8000 0.2000 1.0000 1.5000 0.4000 -t 0.0 90.0 5 -c test01
  19. # echo valgring
  20. # valgrind --tool=callgrind $PROGRAM -l 5 0.4642 1.8000 1.7000 0.7114 0.8000 0.7000 0.7393 1.2000 0.0900 0.9168 2.8000 0.2000 1.0000 1.5000 0.4000 -t 0.0 90.0 5 -c test01
  21. # ./gprof2dot.py --output=out.dot --format=callgrind callgrind.out.*
  22. # mv callgrind.out.* callgrind
  23. # dot -Tsvg out.dot -o graph.svg
  24. rm gmon.out
  25. rm analysis.txt
  26. PROGRAM='../../../scattnlay-pg'
  27. time $PROGRAM -l 5 0.4642 1.8000 1.7000 0.7114 0.8000 0.7000 0.7393 1.2000 0.0900 0.9168 2.8000 0.2000 1.0000 1.5000 0.4000 -t 0.0 90.0 5 -c test01
  28. gprof $PROGRAM gmon.out > analysis.txt
  29. # repeats=30
  30. # echo Run test for $repeats times
  31. # time for i in `seq $repeats`; do ./test01.sh; done
  32. # echo Run test with original binary for $repeats times
  33. # cp ../../../scattnlay-0.3.0 ../../../scattnlay
  34. # time for i in `seq $repeats`; do ./test01.sh; done