Skip to content

cc4s/cc4s

Repository files navigation

Coupled Cluster for Solids

Cc4s provides a cmake build system.

Cc4s depends on two libraries:

These dependencies are built automatically by the cmake program.

Super Quick start

Load the relevant modules in your computer, you'll need

  • BLAS
  • lapack
  • Scalapack

run the build script,

./build.sh

This will build by default the project in the directory build.

Building the project

To make the project, create a folder and build it there as follows

mkdir build
cd build
cmake ../ -DCMAKE_CXX_COMPILER=mpicxx

All 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=Debug

This will compile with the -O0 flag all the source files.

Running

  • a cc4s operation file, e.g. mp2.yaml, can be run with
    mpirun ./build/Cc4s -i mp2.yaml
    

Testing

Running tests

  • 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 tests
    • test/run-in-dir: A general script to run tests in a given directory
    • test/run-integration-tests: Run all the essential tests
    • test/run-integration-tests-run: only run the tests, do not check the results
    • test/run-integration-tests-check: only check the results of the test runs.
  • By default the tests are ran using 4 processes and mpirun. 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