From 3aa8421f1f1ce1ae448d017214c602b9def19c90 Mon Sep 17 00:00:00 2001 From: Konstantinos Parasyris Date: Thu, 20 Jul 2023 18:03:13 -0700 Subject: [PATCH] Update installation instructions --- INSTALL.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 ++ 2 files changed, 87 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..02f3b036 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,84 @@ +# Setup and Build + +AMSLib depends on the following packages: +* UMPIRE (Mandatory) +* MPI (Mandatory) +* CALIPER (Optional) +* FAISS (Optional) +* MFEM (Optional) +* PY-TORCH (Optional) +* MFEM (Optional) +* REDIS (Optional) +* HDF5 (Optional) +* CUDA (Optional) + +## Spack Installation + +AMS depends on multiple complex external libraries, our preferred and suggested mechanism to install AMS is through [spack](https://github.com/spack/spack) as follows: + +```bash +spack install ams +``` + +If you are a developer and would like to extend AMS you can do so by using the `spack dev-build' command. +For more instructions look [here](https://spack-tutorial.readthedocs.io/en/lanl19/tutorial_developer_workflows.html) + + +## Manual cmake installation + +Below you can find a `cmake` command to configure to configure AMS, build and install it. + +```bash +$ mkdir build; cd build +$ cmake \ + -DWITH_DB=On -DWITH_RMQ=On \ + -Damqpcpp_DIR=$AMS_AMQPCPP_PATH \ + -DBUILD_SHARED_LIBS=On \ + -DCMAKE_PREFIX_PATH=$INSTALL_DIR \ + -DWITH_CALIPER=On \ + -DWITH_HDF5=On \ + -DWITH_EXAMPLES=On \ + -DHDF5_Dir=$AMS_HDF5_PATH \ + -DCMAKE_INSTALL_PREFIX=./install \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_CUDA=On \ + -DUMPIRE_DIR=$AMS_UMPIRE_PATH \ + -DMFEM_DIR=$AMS_MFEM_PATH \ + -DWITH_FAISS=On \ + -DWITH_MPI=On \ + -DWITH_TORCH=On \ + -DWITH_TESTS=Off \ + -DTorch_DIR=$AMS_TORCH_PATH \ + -DFAISS_DIR=$AMS_FAISS_PATH \ + -DAMS_CUDA_ARCH=${AMS_CUDA_ARCH} \ + -DWITH_AMS_DEBUG=On \ + ../ + +$ make -j6 +$ make install +``` + +Most of the compile time options are optional. + +## Building AMS with PerfFlowAspect + +To built AMS with [PFA](https://github.com/flux-framework/PerfFlowAspect) support you first need to install a PFA clang/llvm version and add it to `$PATH`. Next to configure, built and install perform the following: + +``` +$ cd $CODE_ROOT/setup +$ mkdir build; cd build +$ cmake \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_COMPILER=clang \ + -DMFEM_DIR=$AMS_MFEM_PATH \ + -DUMPIRE_DIR=$AMS_UMPIRE_PATH \ + -DWITH_CUDA=On \ + -DWITH_CALIPER=On \ + -DWITH_TORCH=On -DTorch_DIR=$AMS_TORCH_PATH \ + -DWITH_FAISS=On -DFAISS_DIR=$AMS_FAISS_PATH \ + -DWITH_PERFFLOWASPECT=On \ + -Dperfflowaspect_DIR=$AMS_PFA_PATH/share \ + ../ +$ make -j6 +``` + diff --git a/README.md b/README.md index 82a470bb..87dc78e1 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,6 @@ AMSLib is released under Apache License (Version 2.0) with LLVM exceptions. For `LLNL-CODE-851455` +# Installation Instructions + +See [INSTALL.md](./INSTALL.md) for full instructions.