-
Notifications
You must be signed in to change notification settings - Fork 39
Build
The install.sh script can be used to build the dependencies and the rocALUTION library. Common uses of install.sh are in the table below.
install.sh_command | description |
---|---|
./install.sh -h |
Help information. |
./install.sh -d |
Build dependencies and library in your local directory. The -d flag only needs to be used once. For subsequent invocations of install.sh it is not necessary to rebuild the dependencies. |
./install.sh |
Build library in your local directory. It is assumed dependencies have been built |
./install.sh -i |
Build library, then build and install rocALUTION package. You will be prompted for sudo access. It is expected that if you want to install for all users you use the -i flag. If you want to keep rocALUTION in your local directory, you do not need the -i flag. |
./install.sh --host |
Build rocALUTION with GPU support disabled |
./install.sh --no-openmp |
Build rocALUTION with OpenMP support disabled |
./install.sh --mpi |
Build rocALUTION with MPI support enabled |
The install.sh script can be used to build the rocALUTION library and client. The client contains executables in the table below.
executable name | description |
---|---|
rocalution-test | runs Google Tests to test the library |
amg | example code calling AMG solver |
as-precond | example code calling Additive Schwarz preconditioner |
async | example code calling async example |
benchmark | example code benchmarking several blas and sparse routines |
bicgstab | example code calling BiCGStab solver |
block-precond | example code calling Block Preconditioner |
cg | example code calling CG solver |
cg-amg | example code calling AMG preconditioned CG solver |
cmk | example code calling Cuthill-McKee matrix re-ordering |
direct | example code calling dense direct solver |
fgmres | example code calling Flexible GMRES solver |
fixed-point | example code calling Fixed-Point iteration scheme |
gmres | example code calling GMRES solver |
idr | example code calling IDR(s) solver |
key | example code calling matrix key generation function |
me-preconditioner | example code calling Multi-Elimination preconditioner |
mixed-precision | example code calling mixed-precision solver |
power-method | example code calling power-method spectrum estimation |
simple-spmv | example code calling matrix vector multiplication |
sp-precond | example code calling Saddle-Point preconditioner |
stencil | example code using stencil as operator type |
tns | example code calling Truncated Neumann Series preconditioner |
var-precond | example code calling Variable Preconditioner |
Note that the client requires additional dependencies not needed by the library. These include boost, and googletest. Below are common uses of install.sh to build the dependencies, library, and client
install.sh_command | description |
---|---|
./install.sh -h |
Help information. |
./install.sh -dc |
Build dependencies, library, and client in your local directory. The -d flag only needs to be used once. For subsequent invocations of install.sh it is not necessary to rebuild the dependencies. |
./install.sh -c |
Build library and client in your local directory. It is assumed the dependencies have been built. |
./install.sh -idc |
Build dependencies, build the library, build the client, then build and install the rocALUTION package. You will be prompted for sudo access. It is expected that if you want to install for all users you use the -i flag. If you want to keep rocALUTION in your local directory, you do not need the -i flag. |
./install.sh -ic |
Build and install rocALUTION package and build the client. You will be prompted for sudo access. It is expected that if you want to install for all users you use the -i flag. If you want to keep rocALUTION in your local directory, you do not need the -i flag. |
./install.sh --host --mpi --no-openmp |
Build rocALUTION for multi-node systems without GPU support and with OpenMP disabled. |
The build infrastructure for rocALUTION is based on Cmake v3.5. This is the version of cmake available on ROCm supported platforms. If you are on a headless machine without X system, we recommend using ccmake; if you have access to X, we recommend using cmake-gui.
Install one-liners cmake:
- Ubuntu:
sudo apt install cmake-qt-gui
- Fedora:
sudo dnf install cmake-gui
rocALUTION is based on hipBLAS v0.10.3.1. This is the version available in the ROCm repository. You can install it using
- Ubuntu:
sudo apt install hipblas
- Fedora:
sudo dnf install hipblas
rocALUTION is based on hipSPARSE. Currently, while hipSPARSE and rocSPARSE are not available in the public ROCm repositories, you will have to install both packages manually. Current alpha release packages are available in rocALUTION/deps
directory. You can install them using
- Ubuntu:
sudo dpkg -i ./deps/rocsparse-0.1.0.0-Linux.deb ./deps/hipsparse-0.1.0.0-Linux.deb
- Fedura: currently not supported
mkdir -p [ROCALUTION_BUILD_DIR]/release
cd [ROCALUTION_BUILD_DIR]/release
# Default install location is in /opt/rocm, define -DCMAKE_INSTALL_PREFIX=<path> to specify other
# Default build config is 'Release', define -DCMAKE_BUILD_TYPE=<config> to specify other
cmake [ROCALUTION_SOURCE]
make -j$(nproc)
sudo make install # sudo required if installing into system directory such as /opt/rocm
The unit tests and benchmarking applications in the client introduce the following dependencies:
Linux distros typically have an easy installation mechanism for boost through the native package manager.
- Ubuntu:
sudo apt install libboost-program-options-dev
- Fedora:
sudo dnf install boost-program-options
Unfortunately, googletest is not as easy to install. Many distros do not provide a googletest package with pre-compiled libraries. rocALUTION provides a cmake script that builds the above dependencies from source. This is an optional step; users can provide their own builds of these dependencies and help cmake find them by setting the CMAKE_PREFIX_PATH definition. The following is a sequence of steps to build dependencies and install them to the cmake default /usr/local.
mkdir -p [ROCALUTION_BUILD_DIR]/release/deps
cd [ROCALUTION_BUILD_DIR]/release/deps
ccmake -DBUILD_BOOST=OFF [ROCALUTION_SOURCE]/deps # assuming boost is installed through package manager as above
make -j$(nproc) install
Once dependencies are available on the system, it is possible to configure the clients to build. This requires a few extra cmake flags to the library cmake configure script. If the dependencies are not installed into system defaults (e.g. /usr/local ), the user should pass the CMAKE_PREFIX_PATH to cmake to help finding them.
-DCMAKE_PREFIX_PATH="<semicolon separated paths>"
# Default install location is in /opt/rocm, use -DCMAKE_INSTALL_PREFIX=<path> to specify other
CXX=/opt/rocm/bin/hipcc cmake -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_BENCHMARKS=ON -DBUILD_CLIENTS_SAMPLES=ON [ROCALUTION_SOURCE]
make -j$(nproc)
sudo make install # sudo required if installing into system directory such as /opt/rocm
-
Issue: Could not find a package configuration file provided by "hipBLAS" with any of the following names:
HIPBLASConfig.cmake
hipblas-config.cmake
Solution: Install hipBLAS
-
Issue: Could not find a package configuration file provided by "hipSPARSE" with any of the following names:
HIPSPARSEConfig.cmake
hipsparse-config.cmake
Solution: Install hipSPARSE
-
Issue: Could not find a package configuration file provided by "ROCM" with any of the following names:
ROCMConfig.cmake
rocm-config.cmake
Solution: Install ROCm cmake modules