Skip to content

Commit 432b77f

Browse files
committed
Unify READMEs and travis
1 parent d688b38 commit 432b77f

File tree

4 files changed

+43
-10
lines changed

4 files changed

+43
-10
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ before_install:
4949
fi;
5050
echo "CXX_COMPILER=${MYCXX}" >> config.sh;
5151
echo "CXX_FLAGS=\"-O0 -g -Wall -Wno-unused-function ${configopt}\"" >> config.sh;
52-
if [[ "$USE_GCOV" == "TRUE" ]]; then echo "USE_COVERAGE=1" >> config.sh;
52+
if [[ "$USE_GCOV" == "TRUE" ]];
53+
then echo "USE_COVERAGE=1" >> config.sh;
5354
else
5455
echo "USE_COVERAGE=0" >> config.sh;
5556
fi;
@@ -64,15 +65,15 @@ script:
6465
- |
6566
if [[ "$USE_DOCKER" == "TRUE" ]]; then
6667
if [[ "$USE_GCOV" == "TRUE" ]]; then
67-
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/test && ./run.sh";
68+
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/build && make test";
6869
docker run -e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "pip install cpp-coveralls && cd /root/repo/build && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp'";
6970
else
7071
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/test && ./run.sh";
7172
fi;
7273
else
7374
if [[ "$USE_GCOV" == "TRUE" ]]; then
74-
cd build && make test && cd .. ;
75-
pip install --user cpp-coveralls && cd build && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp';
75+
cd build && make test;
76+
sudo pip install cpp-coveralls && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp' && cd .. ;
7677
else
7778
cd test && ./run.sh && cd .. ;
7879
fi;

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,44 @@
55

66
# MCIntegrator++
77

8-
C++ Library for computing numerical integrals with the Monte Carlo method.
9-
Some basic tools for finding the average and standard deviation of an array of data are included.
8+
C++ Library for computing numerical integrals with the Monte Carlo method. Includes some convenient
9+
(optional) methods for automatic step calibration, decorrelation and error estimation. Provides a simple
10+
interface to execute the MC integration in parallel, via Message Passing Interface (MPI).
1011

11-
In `doc/` there is a user manual in pdf.
12+
In `doc/` there is a user manual in pdf and a config for doxygen.
1213

13-
In `examples/` there are examples.
14+
In `examples/` and `test/` there are examples and tests for the library.
1415

16+
In `res/` we provide a true random seed file.
17+
18+
19+
Some subdirectories come with an own `README.md` file which provides further information.
20+
21+
22+
# Supported Systems
23+
24+
Currently, we automatically test the library on Arch Linux (GCC 8) and MacOS (with clang as well as brewed GCC 8).
25+
However, in principle any system with C++11 supporting compiler should work.
26+
27+
28+
# Requirements
29+
30+
- CMake, to use our build process
31+
- (optional) a MPI implementation, to use parallelized integration
32+
- (optional) valgrind, to run `./run.sh` in `test/`
33+
- (optional) pdflatex, to compile the tex file in `doc/`
34+
- (optional) doxygen, to generate doxygen documentation in `doc/doxygen`
1535

1636

1737
# Build the library
1838

19-
We use the CMake build system, so you need to have it on your system to build the library out of the box.
20-
Then copy the file `config_template.sh` to `config.sh`, edit it to your liking and then simply execute the command
39+
Copy the file `config_template.sh` to `config.sh`, edit it to your liking and then simply execute the command
2140

2241
`./build.sh`
2342

2443
Note that we build out-of-tree, so the compiled library and executable files can be found in the directories under `./build/`.
44+
45+
46+
# First steps
47+
48+
You may want to read `doc/user_manual.pdf` to get a quick overview of the libraries functionality. However, it is not guaranteed to be perfectly up-to-date and accurate. Therefore, the best way to get your own code started is by studying the examples in `examples/`. See `examples/README.md` for further guidance.

examples/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# LEGEND OF THE EXAMPLES
22

3+
Make sure the examples are compiled, by running `./build.sh` in the project root folder.
4+
Execute an example by switching into one of the example folders and running `./run.sh`.
5+
Note that the actual example executables reside inside the `build/examples/` folder under the project's root.
36

47

58
## Example 1

test/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
# LEGEND OF THE UNIT TESTS
22

3+
Use `./run.sh` inside the test directory to run the check program and unit tests
4+
with valgrind or use `make test` inside the build directory, to run unit tests without valgrind.
5+
36

47
## Unit Test 1
58

69
`ut1/`: check that calling the integrator again without doing the findMRT2step and initialDecorrelation gives the same results.
710

11+
812
## Unit Test 2
913

1014
`ut2/`: Like ut1, but with one one-dimensional and one three-dimensional observable.
1115

16+
1217
## Unit Test 3
1318

1419
`ut3/`: Like ut1, but checking with fixed number of findMRT2step/decorrelation steps and fixed blocking technique

0 commit comments

Comments
 (0)