- Import scrm as a submodule
- Brief introduction on Automake
- Testing utility
- Continuous intergration
- Doxygen
- Write a simple program
A good git tutorial can be found at https://www.atlassian.com/git/tutorials.
$ git clone https://github.com/shajoezhu/CodeMonkey_scrm.git CodeMonkey_scrm
$ cd CodeMonkey_scrm
Update submodule
$ git submodule init # Initialize the local configuration file
$ git submodule update # Fetch all the data from scrm
$ cat .gitmodules # It shows the included submodule information, as the following.
[submodule "scrm"]
path = scrm
url = https://github.com/scrm/scrm.git
Newly add a git submodule.
$ git submodule add https://github.com/scrm/scrm.git
Compile scrm
$ cd scrm
$ ./bootstrap
$ make -mj4
$ ls tests/unittests/
$ make check -mj4
You should see
PASS: unit_tests
PASS: algorithm_tests
============================================================================
Testsuite summary for scrm 1.3.2.9000
============================================================================
# TOTAL: 2
# PASS: 2
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
$ cat .travis.yml
For more details, please refer to https://travis-ci.org/scrm/scrm/builds/45372001
$ git checkout -b doc origin/doc # Switch to branch doc
$ sudo apt-get install doxygen graphviz # Download programs: doxygen, dot
$ ./bootstrap
$ make doxygen-run # Compile doxygen documentation
$ google-chrome doc/html/index.html # Open doxygen documentation with your favourite web browser
$ git checkout -b omp origin/omp # Switch to branch omp
$ cd .. # Switch to CodeMonkey_scrm root diretory
$ aclocal # Generate aclocal.m4 from configure.ac file
$ autoconf # Generate configuration file
$ automake -a # Generate Makefile
$ ./configure
$ make -mj4
$ time ./codeMonkey_scrm 30 1000 -r 100 10000 -seed 1 > /dev/null
real 0m6.035s
user 0m6.001s
sys 0m0.012s
time ./codeMonkey_scrm_omp 30 1000 -r 100 10000 -seed 1 > /dev/null
real 0m2.081s
user 0m7.533s
sys 0m0.658s