shajoezhu / CodeMonkey_scrm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeMonkey_scrm

A good git tutorial can be found at https://www.atlassian.com/git/tutorials.

Import scrm as a submodule

$ 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

Brief introduction on Automake

Compile scrm

$ cd scrm
$ ./bootstrap
$ make -mj4

Testing utility

$ 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
============================================================================

Continuous intergration

$ cat .travis.yml

For more details, please refer to https://travis-ci.org/scrm/scrm/builds/45372001

Doxygen

$ 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

Forest class

Write a simple program

$ 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

About

License:GNU General Public License v3.0


Languages

Language:C++ 100.0%