Cc4s provides a cmake build system.
Cc4s depends on two libraries:
These dependencies are built automatically by the cmake program.
Load the relevant modules in your computer, you'll need
- BLAS
- lapack
- Scalapack
run the build script,
./build.shThis will build by default the project in the directory build.
To make the project, create a folder and build it there as follows
mkdir build
cd build
cmake ../ -DCMAKE_CXX_COMPILER=mpicxxAll the project will be built in the build directory, including its dependencies.
You may have several build directories if you intend to compile with different flags,
compilers or settings.
If you want to make the debug version of Cc4s, you should pass to cmake the
-DCMAKE_BUILD_TYPE=Debug flag, for example
mkdir build
cd build
cmake ../ -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=DebugThis will compile with the -O0 flag all the source files.
- a
cc4soperation file, e.g.mp2.yaml, can be run withmpirun ./build/Cc4s -i mp2.yaml
-
Once you have built the project, you can run the tests by issuing the cmake test command
ctest -V -
The test scripts are found in the test directory inside the build directory, you can edit them to have more fine control on which tests to run:
test/run: A general script to run teststest/run-in-dir: A general script to run tests in a given directorytest/run-integration-tests: Run all the essential teststest/run-integration-tests-run: only run the tests, do not check the resultstest/run-integration-tests-check: only check the results of the test runs.
-
By default the tests are ran using
4processes andmpirun. If want to run the tests using more cores, you can run any of the above scripts with the first argument being the number of cores, e.g.,./test/run-integration-tests-run 8
You may also edit the test scripts at will in order to run more tailored workflows.
-
If you want to run a test case in a given directory, you can run
./test/run-in-dir 8 ./test/tests/h2o2