go.sh 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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
  19. 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
  20. # echo valgring
  21. # 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
  22. # ./gprof2dot.py --output=out.dot --format=callgrind callgrind.out.*
  23. # mv callgrind.out.* callgrind
  24. # dot -Tsvg out.dot -o graph.svg
  25. # rm gmon.out
  26. # rm analysis.txt
  27. # PROGRAM='../../../scattnlay-pg'
  28. # 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
  29. # gprof $PROGRAM gmon.out > analysis.txt
  30. # repeats=30
  31. # echo Run test for $repeats times
  32. # time for i in `seq $repeats`; do ./test01.sh; done
  33. # echo Run test with original binary for $repeats times
  34. # cp ../../../scattnlay-0.3.0 ../../../scattnlay
  35. # time for i in `seq $repeats`; do ./test01.sh; done