Skip to content

Commit

Permalink
INSTALL.md updates [no CI]
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-petersen committed Jan 23, 2025
1 parent 28d3944 commit 41a1161
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 44 additions & 8 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 41a1161

Please sign in to comment.