-
Notifications
You must be signed in to change notification settings - Fork 54
Building and testing
Edgar Solomonik edited this page Jun 14, 2018
·
12 revisions
Cyclops can be built in a few different ways, depending on your intended usage. For the most basic library build, only MPI header files are required as a prerequisite. The following components can be built
- Cyclops C++ library (static or dynamic)
-
- with/without OpenMP
-
- with/without HPTT (high performance tensor transpose)
-
- with/without MKL sparse BLAS functionality
-
- with/without ScaLAPACK functionality
-
- with/without CUDA offloading (experimental)
- Cyclops Python library
- C++ test suite and examples
- Python test suite
The first-step to any build is to run the configure
script, which sets up a config.mk
and setup.py
file with appropriate build parameters, flags, and libraries. The script tests some of the configuration parameters and attempts standard linux defaults (such as -llapack
and -lblas
). The script can also build with external optional dependencies via --build-hptt
and --build-scalapack
. For a full, up-to-date list of configuration parameters, execute
./configure --help
Usage: configure [options]
--install-dir=dir Specify where to install header and lib files (default is /usr/local/,
so headers will be installed to /usr/local/include and libs to /usr/local/lib)
--build-dir=dir Specify where to build object files, library, and executable (default is .)
--with-lapack Tells CTF build to enable LAPACK functionality regardless of whether LAPACK libs have been given.
--with-scalapack Tells CTF build to enable ScaLAPACK functionality regardless of whether ScaLAPACK libs have been given.
--build-scalapack Tells CTF to download and build ScaLAPACK library.
--with-hptt Tells CTF build to enable HPTT functionality.
--build-hptt Tells CTF to download and build HPTT library.
--with-cuda Tells CTF to setup and use NVCC, NVCCFLAGS, and CUBLAS libs
--no-dynamic Turns off configuration and build of dynamic (shared) libraries (these are needed for Python codes and some C++ codes)
--no-static Turns off configuration and build of static libraries (these are needed for C++ codes)
--verbose Does not suppress tests of compile/link commands
LIB_PATH=-Ldir Specify paths to static libraries, e.g. -L/usr/local/lib/ to be used for test executables
LD_LIB_PATH=-Ldir Specify paths to dynamic libraries to be used for test executables as part of LD_LIBRARY_PATH
LIBS=-llibname Specify list of static libraries to link to, by default "-lblas -llapack -lscalapack" or a subset
(for each -l<name> ensure lib<name>.a is found in LIBRARY_PATH or LIB_PATH)
LD_LIBS=-llibname Specify list of dynamic libraries to link to, by default "-lblas -llapack -lscalapack" or a subset
(for each -l<name> ensure lib<name>.a is found in LD_LIBRARY_PATH or LD_LIB_PATH)
CXX=compiler Specify the C++ compiler (e.g. mpicxx)
CXXFLAGS=flags Specify the compiler flags (e.g. "-g -O0" for a lightweight debug build),
can also be used to specify macros like -DOMP_OFF (turn off OpenMP) -DPROFILE -DPMPI (turn on performance profiling)
-DVERBOSE=1 -DDEBUG, see docs and generated config.mk for details)
LINKFLAGS=flags Specify flags for creating the static library
LDFLAGS=flags Specify flags for creating the dynamic library
INCLUDES=-Idir Specify directories and header files to include (e.g. -I/path/to/mpi/header/file/)
Additionally, the variables AR, NVCC, NVCCFLAGS, and WARNFLAGS
can be set on the command line, e.g. ./configure CXX=g++ CXXFLAGS="-fopenmp -O2 -g".