Installation

Prerequisites

Compack3D is implemented in C++ using the C++20 standard. The parallelization follows the “MPI+X” paradiam. The following packages are required:

  • C++ compiler
  • “X” compiler for CUDA or HIP
  • CMake (minimum version 3.23)
  • Message Passing Interface (MPI)

Download Compack3D

The source code of Compack3D is hosted on GitHub. We highly recommend that users obtain the source code using Git. To do this, navigate to the target directory where the Compack3D will be placed and paste the following command:

git clone git@github.com:songhanglucky/Compack3D.git

Configuration using CMake

Compack3D provides CMake support to build the project. CMake v3.23 or above is required. To build Compack3D, first navigate into the Compack3D root directory <path/to>/Compack3D/. Then, create a build directory and navigate into it.

mkdir build && cd build

Make sure to load all necessary modules, e.g., compilers, CMake, and MPI.

cmake -D<optoinal_var_0>=<val_0> -D<optional_var_1>=<val_1> ..

For more detailed usage of CMake, please refer to the official CMake documentation Available optional variables are listed in the following table.

Variable NameTypeExplanation
CMAKE_BUILD_TYPESTRINGValid values are Debug, Release, Profiling, or Help. The Debug mode enables safe launch check and does not enable compiler optimization. Default value is Release.
CMAKE_INSTALL_PREFIXSTRINGA valid path with rwx permission. Install root directory. Default is ./
COMPACK3D_ENABLE_DEVICE_{TYPE}BOOLDefault is OFF. Valid of {TYPE} is CUDA or HIP. Different devices cannot be enabled in one build.
COMPACK3D_DEVICE_ARCHSTRINGSpecification of the device architecture. Needs to be consistent with the specified device type. Valid values are Default, V100.
COMPACK3D_ENABLE_DEVICE_AWARE_COMMBOOLIf enabled, use GPU-to-GPU communication.
COMPACK3D_BUILD_UNIT_TESTSBOOLCompile unit tests associated with the specified device.
COMPACK3D_BUILD_BENCHMARK_TESTSBOOLCompile benchmark tests associated with the specified device.
COMPACK3D_MPI_EXEC_PREFIXSTRINGMPI launcher and flags, required for unit tests. This value can be alternatively set by environmental variable COMPACK3D_MPI_EXEC_PREFIX. Default value is mpiexec -n 1, and a warning will be raised.

Linking to your own project

We working on it…