-
Notifications
You must be signed in to change notification settings - Fork 28
Building
Building DCA++ requires a set of tools and libraries:
-
C++17 compiler (tested: gcc >= 7.5.0)
-
CMake >= 3.3
-
HDF5 with the C++ interface (tested: 1.8.13 and 1.10)
-
FFTW3 or an FFT library with the FFTW3 interface (e.g. Intel MKL)
-
MPI (if requested)
To enable the GPU support:
-
CUDA Toolkit (tested: 7.0, 7.5, 8.0, 10.1, 10.2, 11.0)
-
MAGMA (tested: 2.5.1 with CUDA 10.1)
Further optional requirements:
-
Python, NumPy, SciPy, Matplotlib, h5py
We provide python scripts to prepare input files and job scripts to do a cooldown (see Running) and for analyzing and plotting simulation results.
We provide scripts to load the modules and set the correct cmake variables for a set of compute clusters. The scripts are located in build-aux
. For example building with tests on Summit is done by
git clone https://github.com/CompFUSE/DCA
cd DCA; mkdir -p build; cd build
source ../build-aux/summit_load_modules.sh
cmake -C ../build-aux/summit.cmake -DDCA_WITH_TESTS_FAST=ON -DDCA_WITH_TESTS_EXTENSIVE=ON ..
make -j 16
The tests can be run from a compute node with
ctest
-
Clone the DCA++ repository to obtain the latest version of the master branch:
$ git clone https://github.com/CompFUSE/DCA.git dca_source
Alternatively, you can download a specific version from the releases.
-
Create a clean build directory and change to it:
$ mkdir build && cd build
The directory tree should now look like:
|____build (current working directory) |____dca_source
Note that in-source builds are not allowed.
-
Use CMake to configure the build and generate the build files:
$ cmake ../dca_source -D<variable1>=<value1> -D<variable2>=<value2> ...
The
cmake
command needs to be followed by the path to the source (here../dca_source
) and can be supplemented by a list of options using the-D
flag. Depending on the system built on, some of these options are required.When CMake is run the first time, it automatically detects the C++ compiler and stores it in the variable
CMAKE_CXX_COMPILER
. Note that the compiler cannot be changed later. If you want to use a specific compiler (e.g. an MPI compiler wrapper), you can set it (in a clean build directory) with:$ CXX=/opt/local/bin/clang++-mp-3.6 cmake ...
-
Compile the applications and tests, if enabled:
$ make
On multi-core machines, you can use the
-j
option of themake
command to parallelize the compilation and reduce the compilation time:$ make -j <number-of-cores>
If you want to see the full compiler and linker commands, add the verbose option:
$ make VERBOSE=1
The binaries of the applications
main_dca
andmain_analysis
are located inbuild/applications/dca/
andbuild/applications/analysis/
, respectively. -
If tests have been compiled, you can run them with:
$ make test
Note that on hybrid CPU-GPU systems, you have to set
CRAY_CUDA_MPS
(formerlyCRAY_CUDA_PROXY
) to 1, since some of the tests that use the GPU run multiple MPI tasks per node:$ export CRAY_CUDA_MPS=1