go-cc-examples.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. path=$PWD
  3. PROGRAM='scattnlay-example.bin'
  4. # file=example-eval-force.cc
  5. # echo Compile $file with gcc
  6. # rm -f $PROGRAM
  7. # g++ -Ofast -std=c++11 $file ../src/shell-generator.cc -lm -lrt -o $PROGRAM -march=native -mtune=native -msse4.2 -Wall
  8. # # g++ -Ofast -std=c++11 $file ../src/nmie.cc ../src/nmie-applied.cc ../src/shell-generator.cc -lm -lrt -o $PROGRAM -march=native -mtune=native -msse4.2
  9. # echo Compilation done. Running...
  10. # time ./$PROGRAM
  11. file=test-surf-integral.cc
  12. echo Compile $file with gcc
  13. rm -f $PROGRAM
  14. g++ -Ofast -std=c++11 $file ../src/shell-generator.cc -lm -lrt -o $PROGRAM -march=native -mtune=native -msse4.2
  15. # g++ -Ofast -std=c++11 $file ../src/nmie.cc ../src/nmie-applied.cc ../src/shell-generator.cc -lm -lrt -o $PROGRAM -march=native -mtune=native -msse4.2
  16. echo Compilation done. Running...
  17. ./$PROGRAM
  18. # file=example-minimal.cc
  19. # echo Compile $file with gcc
  20. # rm -f $PROGRAM
  21. # g++ -Ofast -std=c++11 $file ../src/nmie.cc ../src/nmie-applied.cc -lm -lrt -o $PROGRAM -march=native -mtune=native -msse4.2
  22. # echo Compilation done. Running...
  23. # ./$PROGRAM
  24. # file=example-get-Mie.cc
  25. # echo Compile $file with gcc
  26. # rm -f $PROGRAM
  27. # # Production for multiprecision
  28. # #g++ -Ofast -std=c++11 $file ../src/nmie.cc ../src/nmie-applied.cc read-spectra.cc -DMULTI_PRECISION=200 -lm -lrt -o $PROGRAM /usr/lib/libtcmalloc_minimal.so.4 -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -march=native -mtune=native -msse4.2
  29. # # Simplified for multiprecision
  30. # #g++ -Ofast -std=c++11 $file ../src/nmie.cc ../src/nmie-applied.cc ./read-spectra.cc -DMULTI_PRECISION=200 -lm -lrt -o $PROGRAM -march=native -mtune=native -msse4.2
  31. # # Simplified for double precision
  32. # g++ -Ofast -std=c++11 $file ../src/nmie.cc ../src/nmie-applied.cc ./read-spectra.cc -lm -lrt -o $PROGRAM -march=native -mtune=native -msse4.2
  33. # echo Compilation done. Running...
  34. # ./$PROGRAM