Getting Started

Table of Contents

1. Download the code

You can download the CC4S code by typing

  git clone https://gitlab.cc4s.org/cc4s/cc4s.git

This will create a new folder named ./cc4s/ where the complete source code will be downloaded.

2. Compilation

Building the CC4S binary is done in two steps.

In the first step, the external libraries employed by CC4S need to be built. This is done by typing

  make CONFIG=<config> extern

in the main directory.

In the second step, the CC4S code is built. This is done by typing

  make CONFIG=<config>

in the main directory.

Depending on the available set of compilers and MPI libraries, you can choose any configuration that is currently available in the ./etc/config/ folder.

Building the code using the Intel compiler and Intel MPI library is done by typing

  make CONFIG=icc-mkl-impi extern
  make CONFIG=icc-mkl-impi

in the main directory.

3. Running tests

3.1. Quick start

You can test your CC4S binary for a set of test systems. The script test/testis.py is used to run all the tests and fetch the data dependencies.

After having built your binary with the configuration <CONFIG>, you can run the tests like

make -C test run CONFIG=<CONFIG> CC4S_RUN='mpirun -np 48 ${CC4S_PATH}'

You can also run the post-processing step of the tests separately by doing

make -C test check CONFIG=<CONFIG> CC4S_RUN='mpirun -np 48 ${CC4S_PATH}'

3.1.1. Python Dependencies

Please note that testis.py depends on python3.3 or newer. In order to run the check phase, it is also necessary to have the pyyaml python package installed.

You can install the package locally by issuing the command

pip3 install --user pyyaml

or globally by

sudo pip3 install pyyaml

If you are not able to install pyyaml on your own, please contact your system administrator.

3.2. Test failed, what now?

If a test failed, you can go to the directory of the test that failed with the current configuration as this is printed in the output of the failing test.

For every compiler configuration there will be a different sub-directory in the test directory. In it, a series of linked files can be found that are used to run the binary. Importantly, also a link to the used binary should be found there, Cc4s, so that you can enter the test directory and rerun the test with

mpirun -np <number-of-processes> ./Cc4s

3.3. Running additional tests

Every test in cc4s has some tags assigned to it. By default, when a user tests the code, only the tests tagged essential will be run.

You can however change this by defining the environment variable TAGS by issuing the make command, i.e., in the case that you want to run the tests tagged as essential and ccsd, you can issue the following command

make -C test CONFIG=<CONFIG> run TAGS="essential ccsd"

3.4. Fetching data in network-constrained environments

Some tests depend on dependencies such as coulomb integrals coming from various quantum chemical codes in different repositories scattered across the internet. testis.py downloads this data automatically, as you might have seen in its output.

If however your cluster does not allow internet requests for security reasons, you can prefetch the test data and then scp it to the respective cluster.

In the root directory you can issue the make command

make -C test data

This command downloads in test/testis-store the necessary data for the tests. You can then copy this folder to the required computer

scp -r test/testis-store user@remote-computer:path/to/cc4s/test/

Created: 2022-07-06 Wed 11:46