go.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #google profiler
  8. # g++ -Ofast -std=c++11 compare.cc nmie.cc nmie-wrapper.cc -lm -lrt -o scattnlay.bin /usr/lib/libtcmalloc.so.4 -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
  9. #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
  10. cp scattnlay.bin ../scattnlay
  11. cp scattnlay-pg.bin ../scattnlay-pg
  12. cd tests/shell
  13. # for file in `ls *.sh`; do
  14. # if [ "$file" != "test03.sh" ]; then
  15. # ./$file > /dev/null
  16. # echo $file
  17. # fi
  18. # done
  19. PROGRAM='../../../scattnlay'
  20. # time ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4
  21. #time
  22. 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
  23. echo valgring
  24. # 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
  25. # rm out.dot
  26. # ./gprof2dot.py --output=out.dot --format=callgrind callgrind.out.*
  27. # mv callgrind.out.* callgrind
  28. # dot -Tsvg out.dot -o graph.svg
  29. # rm *.aprof
  30. # /home/mmedia/soft/aprof-0.2.1/inst/bin/valgrind --tool=aprof $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
  31. # rm gmon.out
  32. # rm analysis.txt
  33. # PROGRAM='../../../scattnlay-pg'
  34. # 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
  35. # gprof $PROGRAM gmon.out > analysis.txt
  36. # repeats=30
  37. # echo Run test for $repeats times
  38. # time for i in `seq $repeats`; do ./test01.sh; done
  39. # echo Run test with original binary for $repeats times
  40. # cp ../../../scattnlay-0.3.0 ../../../scattnlay
  41. # time for i in `seq $repeats`; do ./test01.sh; done