DEPENDENCIES
Dependencies required before running the CMakeLists.txt script
You will need an MPI development framework installed, compatible with the MPI 3.0 or newer standard : tested implementations :
- Open MPI 1.10.2 (from Ubuntu 16.04 repositories)
CMake will try to locate it automatically.
You will need the SQLite3 dynamic library on your system. See :
Dependencies downloaded automatically via the script "build/download_deps_and_run_cmake.sh"
The script "build/download_deps_and_run_cmake.sh" will download and compile if required the OpenMM and LuaJIT Dependencies.
You can however use your own version of the OpenMM library, or any Lua implementation (either compiled yourself or downloaded somewhere).
Ressources (OpenMM):
-
tested with version 7.0 to 7.3.
You may need NVIDIA CUDA or AMD OpenCL toolkit for enabling GPU acceleration ; see OpenMM documentation. You may also need to edit CMakeLists.txt for specifying path to the include and lib directories of OpenMM. CMake will try to locate it automatically.
Ressources (Lua/LuaJIT):
A Lua implementation compatible with Lua API version >= 5.1 is required :
-
A release of Lua 5.x is usually already installed by default for recent linux versions, try to execute 'lua' and/or 'locate liblua'
-
You can Download and compile the official implementation : http://www.lua.org/download.html
-
The LuaJIT implementation can provide an important speedup : http://luajit.org/download.html
Please download and compile any of the two. See below for hints for setting DCMAKE_PREFIX_PATH in case of a manual install. CMake will try to locate it automatically.
Dependencies provided in directory "external"
The excellent Sol2 (header-only Lua<->c++ interface) and LuaSQLite3 (a Lua/SQLite3 binding) Dependencies are provided in the './external' directory and are automatically included/compiled if required, and thus should not require extra configuration. See :
COMPILE & INSTALL
C and C++ compiler compatible with the C99 and C++14 standards are required. Tested compilers:
- gcc/g++ 5.4.0 and 6.2.0 (from Ubuntu 16.04 repositories)
Be sure to have CMake installed (http://www.cmake.org/), available on most repositories. Tested version :
- CMake 3.5.1 (from Ubuntu 16.04 repositories)
Create a build directory and move to that directory:
- mkdir build && cd build
For building a debug or release or an intermediate release with debug information, do:
-
cmake -DCMAKE_BUILD_TYPE=Debug ..
-
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
-
cmake -DCMAKE_BUILD_TYPE=Release .. (default, with cpu targeting for the current compilation machine)
Debug builds are possibly slower, usually more memory consuming, but useful when debugging with gdb or Valgrind.
If some dependencies were note detected (e.g. because they are not available within /usr/local) it is required to add the path where the were installed to CMAKE_PREFIX_PATH, e.g.:
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$HOME/bin/something" ..
Then, once CMake built a Makefile without error, just execute the following in order to build the executable:
- make
For a verbose make, use:
- make VERBOSE=1
For a faster multi-core (on N cores) build, use:
- make -j N
Please never edit the automatically generated Makefile, edit the CMakeLists.txt instead.
For specifying another compiler on linux, for example clang, or a proprietary one like Intel icc (untested) :
-
CC=clang CXX=clang++ cmake ..
-
CC=icc CXX=icpc cmake ..
In any case, you may need to edit the variables CMAKE_C_FLAGS_* and CMAKE_CXX_FLAGS_* for setting proper levels of optimization. By default
When using OpenMPI and forcing another C/C++ compilers version, the following might be required (possibly unsafe !):
- OMPI_CC=gcc-5 OMPI_CXX=g++-5 CC=gcc-5 CXX=g++-5 ccmake ..