Development Quick Start - lanl/Draco GitHub Wiki
Previous: [Home]] ](/lanl/Draco/wiki/Next:-[[Installing-Third-Party-Vendors)
Obtaining the source code
To clone draco (read only access)
$ git clone https://github.com/lanl/Draco.git
Compiling
Prerequisites:
- cmake-3.17 or later
- cmake must be in your PATH
- A modern C++ compiler (g++, icpc, pgCC, clang++, cl) that supports C++14.
- A modern Fortran compiler (gfortran, ifort)
- MPI (openMPI, mpich) that supports version 3.0 (openmpi 1.10 or later)
- mpirun/mpiexec must be in your PATH
- Random123
- export RANDOM123_INC_DIR=/some/path/Random123-1.08/include
- Gnu Scientific Library
- gsl-config must be in your PATH
- python 3
- Spack can be used to install these support tools and libraries.
- Only needed for testing:
- numdiff
- numdiff must be in your PATH
- numdiff
Configure:
- Use a separate build directory
$ mkdir build
$ [C_FLAGS='-Werror'] cmake ../Draco.git [-Doption=value]
- Common configure options
-DCMAKE_BUILD_TYPE=Release|Debug|RelWithDebInfo-DBUILD_TESTING=OFF- After running cmake once,
ccmake .will provide summary of configure options. - To disable the MPI requirement, use
-DDRACO_C4=SCALAR -DDRACO_DIAGNOSTICS=1will enable caliper timers.-DDRACO_DBC_LEVEL=[0-31]will enable Design-by-Contract Checks.-DDRACO_STATIC_CANALYZER=clang-tidy(must compile withCXX,CC = clang).-DCODE_COVERAGE=ONwill enable gcov/lcov- after configuring with cmake, build the code and run your tests, then run
make covrep.
- after configuring with cmake, build the code and run your tests, then run
Optional components:
- Additional libraries will be built if certain features are available in the build environment:
-
lapack_wrapwill be built if LAPACK or equivalent (MKL, OpenBLAS) is available. -
cdi_eospacwill be built if LANL's libeospac is available. -
cdi_ndiwill be built if LANL's ndi is available. -
devicewill be built if the CUDA toolkit is available and the build machine has a GPU. -
plot2Dwill be built if the Grace headers and library are found. -
comptonwill be built if the CSK libraries are found.
-
- Additional features are available if certain features are available in the build environment:
- Detailed timers in
diagnosticare available if caliper is available. - Dynamic processor affinity and MPI_COMM_WORLD are available if libquo is available.
- metis
- parmetis
- lcov can be used to generate coverage reports.
- ccache, f90cache are supported
- Detailed timers in
Build:
$ make [-j [N]] [-l N]
- Common Make targets
- all
- install
- Lib_quadrature # build a library (and any needed deps)
- Exe_draco_info # build an executable (and any needed deps)
- Ut_dsxx_tstSlice_exe # build one unit test (and any needed deps)
- help
- clean
- rebuild_cache
- autodoc
- covrep # Generate a coverage report after code is built and tests are run.
Test:
$ ctest [-VV] [-j [N]] [--rerun-failed] [-R regex_test_name] [-L test_label]
Install:
$ make install
Previous: [Home]] ](/lanl/Draco/wiki/Next:-[[Installing-Third-Party-Vendors)