diff --git a/CMakeLists.txt b/CMakeLists.txt index 70a4dc53..df647b23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ find_package(OpenMP) find_package(FFTW REQUIRED) find_package(HDF5 COMPONENTS C CXX HL REQUIRED) find_package(TIRPC) # Check for alternative Sun rpc support -find_package(Eigen3 REQUIRED) +find_package(Eigen3 3.4 REQUIRED) find_package(PNG) # Check for FE diff --git a/INSTALL.md b/INSTALL.md index 449daac4..efaeef46 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,5 +1,28 @@ # Configuring and building EXP +EXP uses CMake for building a configuration. + +We recommend building "out of source" to allow for multiple +configurations. This allows one to have build various versions +available from the same source, such as `Release` and `Debug` (see below). + +## Required Libraries for installation + +Most required libraries will be available on HPC systems, but a local +user may need to install some libraries (e.g. using `apt-get` on linux, +and `homebrew` or `macports` on OSX). + +| Library | Version | +|---------|-----------| +| Eigen | >= 3.4 | +| FFTW | >= 2.0 | +| HDF5 | >=1.12 | +| OpenMPI | >=4.0 | + +Other libraries are automatically installed along with EXP using `git submodule` (see next step). + +### Obtaining Additional libraries + We are now using git submodules to provide `yaml-cpp`, which is not common in the HPC environments. So, from the top-level directory, do the following: @@ -12,18 +35,31 @@ This will install `yaml-cpp` in the `extern` directory. The png++ C++ wrappers to the png library are also installed in `extern`. Note: png support is optional. -## EXP uses CMake for building a configuration - -I recommend building "out of source" to allow for multiple -configurations. This allows one to have build various versions -available from the same source, such as `Release` and `Debug`. To -begin, make a build directory and change to that: +## Building using CMake +To begin the CMake configuration, make a build directory and change to that: ``` mkdir -p build cd build ``` +The next step is to create the CMake configuration, +``` + cmake .. +``` +build, +``` + make -j 4 +``` +and finally install. +``` + make install +``` + +More details are available below, and troubleshooting can be found in the GitHub discussions. + +## In more detail... + CMake is designed to detect commonly used utilities and libraries automatically, but sometimes needs help and hints. For example, if CMake does not find a library, you can add the location of the library @@ -48,7 +84,7 @@ Generally, the install location will need to be changed in the example below. E.g. I would use `-DCMAKE_INSTALL_PREFIX=/home/mdw_umass_edu` on the UMass Unity cluster to install in my home directory. -## EXP options +### EXP options There are a number of EXP-specific options that control the build. The most important of these are: @@ -114,7 +150,7 @@ Putting these together so far, your CMake call would be: ``` export CUDAARCHS="75;80;86" cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=YES -DENABLE_USER=YES -DEigen3_DIR=$EIGEN_BASE/share/eigen3/cmake -DCMAKE_INSTALL_PREFIX=/home/user -Wno-dev .. -```` +``` ## Configuring without CUDA