|
| 1 | +Installation Instructions |
| 2 | +************************* |
| 3 | + |
| 4 | + Copyright 2025 Koç University and Simula Research Laboratory |
| 5 | + |
| 6 | + Copying and distribution of this file, with or without |
| 7 | + modification, are permitted provided the copyright notice and this |
| 8 | + notice are preserved. |
| 9 | + |
| 10 | + |
| 11 | +Software dependencies |
| 12 | +===================== |
| 13 | + |
| 14 | +To install aCG the following minimum software dependencies must be satisfied: |
| 15 | + |
| 16 | +* CMake 3.12 or newer |
| 17 | + |
| 18 | +* A C/C++ compiler compatible with C++-17 |
| 19 | + |
| 20 | +* For NVIDIA GPUs: NVIDIA CUDA Compiler (NVCC), cuBLAS and cuSPARSE from CUDA Toolkit 11.6 or newer |
| 21 | + |
| 22 | +* For AMD GPUs: HIP C++ compiler, hipBLAS and hipSPARSE from ROCm 6.0.0 or newer |
| 23 | + |
| 24 | +* A GPU-aware MPI library (e.g., HPC-X from NVIDIA HPC SDK, or Cray MPICH) |
| 25 | + |
| 26 | +The following optional software packages may be needed to enable some features: |
| 27 | + |
| 28 | +* METIS 5.1.0 is needed to partition matrices when using multiple GPUs |
| 29 | + |
| 30 | +* NVIDIA Collective Communications Library (NCCL) version 2.18.5 or |
| 31 | + newer is needed to use NCCL-based communication for NVIDIA GPUs |
| 32 | + |
| 33 | +* ROCm Collective Communications Library (RCCL) version 2.18.3 or |
| 34 | + newer is needed to use RCCL-based communication for AMD GPUs |
| 35 | + |
| 36 | +* NVSHMEM version 2.10.0 or newer is needed to use CPU- or |
| 37 | + GPU-initiated one-sided communication for NVIDIA GPUs |
| 38 | + |
| 39 | +* PETSc 3.17 or newer with CUDA or HIP support enabled is needed to |
| 40 | + use PETSc's CG/pipelined CG solvers |
| 41 | + |
| 42 | +* zlib is needed to use gzip-compressed Matrix Market files as input |
| 43 | + |
| 44 | +* If the compiler supports OpenMP, then it can be enabled to use |
| 45 | + multiple threads to speed up some preprocessing steps. |
| 46 | + |
| 47 | + |
| 48 | +Basic Installation |
| 49 | +================== |
| 50 | + |
| 51 | +The CMake build system is used to install aCG. A basic installation |
| 52 | +can be performed by first creating a build directory, e.g., 'build/': |
| 53 | + |
| 54 | + $ mkdir build |
| 55 | + $ cd build |
| 56 | + |
| 57 | +From the build directory, the command |
| 58 | + |
| 59 | + $ cmake ../cuda |
| 60 | + |
| 61 | +builds the CUDA application for NVIDIA GPUs, or |
| 62 | + |
| 63 | + $ cmake ../hip |
| 64 | + |
| 65 | +builds the HIP application for AMD GPUs. |
| 66 | + |
| 67 | +Once the cmake configuration is finished, use `make' to compile the |
| 68 | +application: |
| 69 | + |
| 70 | + $ make |
| 71 | + |
| 72 | + |
| 73 | +Installation options |
| 74 | +==================== |
| 75 | + |
| 76 | +The usual options used by CMake to manage installation are supported. |
| 77 | +In addition, the following options are useful for aCG: |
| 78 | + |
| 79 | +* CMAKE_BUILD_TYPE should be set to Release to enable optimisations |
| 80 | + when conducting performance benchmarks. |
| 81 | + |
| 82 | +* CMAKE_CUDA_ARCHITECTURES can be used to set the CUDA architecture |
| 83 | + when compiling CUDA kernels. By default, the following architectures |
| 84 | + are included: 70 (Volta), 75 (Turing), 80 (Ampere) and 90 (Hopper). |
| 85 | + |
| 86 | +* CMAKE_HIP_FLAGS can be used to set the HIP architecture that is used |
| 87 | + to compile HIP kernels. For example, for AMD Instinct MI250x, it is |
| 88 | + recommended to set -DCMAKE_HIP_FLAGS="--offload-arch=gfx90a". |
| 89 | + |
| 90 | +* ACG_ENABLE_PROFILING can be set to enable detailed CUDA/HIP-based |
| 91 | + event profiling. This can be used to print detailed information |
| 92 | + about time spent in different GPU kernels for some of the CG |
| 93 | + solvers. |
| 94 | + |
| 95 | +* IDXSIZE can be set to 64 to enable the use of 64-bit integers to |
| 96 | + index matrix rows and columns. This may be needed for matrices with |
| 97 | + more than 2 billion rows/columns. |
| 98 | + |
| 99 | +Other options are used to specify locations of third-party libraries: |
| 100 | + |
| 101 | +* METIS_DIR is used to specify the location of the METIS library. |
| 102 | + Alternatively, METIS_INCLUDE_DIR and METIS_LIB_DIR can be set to |
| 103 | + directories containing the METIS header files and library, |
| 104 | + respectively. |
| 105 | + |
| 106 | +* NCCL_HOME or NCCL_ROOT are used to specify the location of the NCCL |
| 107 | + installation. These may also be set as environment variables. |
| 108 | + |
| 109 | +* NVSHMEM_DIR is used to specify the location of the NVSHMEM |
| 110 | + installation. The environment variables NVSHMEM_HOME or |
| 111 | + NVSHMEM_PREFIX may also be used. |
0 commit comments