go.sh 2.3 KB

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