This project evaluates several libraries implementing an AMG-preconditioned conjugate gradient solver on the GPU for solving linear systems derived from the TRUST platform CFD code (TRUST platform).
git clone https://github.com/rbourgeois33/GPU-AMG-libraries-evaluation
cd GPU-AMG-libraries-evaluation
git submodule update --init --recursivemodule load cuda/12.1.0 \
cmake/3.18.4 \
openmpi/gcc_11.2.0/4.1.4module load cuda/12.4.0 openmpi/gcc_13.3.0/module load cuda/12.4.1 \
openmpi/4.1.5 \
cmake/3.18.0module load rocm/6.2.0 \
openmpi/gcc_13.3.0/ \
cmake/3.21.1cd lib/ginkgo
mkdir build && cd build
mkdir install- On Jean Zay, Petra & Ada
cmake -DGINKGO_BUILD_EXAMPLES=ON \
-DGINKGO_BUILD_OMP=ON \
-DGINKGO_BUILD_CUDA=ON \
-DGINKGO_CUDA_ARCHITECTURES=Ampere \
-DCMAKE_INSTALL_PREFIX=install/ ..- On AMD GPU Machine
cmake -DGINKGO_BUILD_EXAMPLES=ON \
-DGINKGO_BUILD_OMP=ON \
-DGINKGO_BUILD_HIP=ON \
-DCMAKE_INSTALL_PREFIX=install/ ..- On Petra & AMD GPU Machine
make -j 48 install- On Jean Zay
srun -p compil -A pri@v100 -t 00:30:00 -c 24 --hint=nomultithread make -j24 installcd lib/AMGX
mkdir build && cd build
cmake ..
make -j 16cd lib/hypre
mkdir build && cd build
mkdir install
cmake -DHYPRE_ENABLE_OPENMP=ON -DHYPRE_ENABLE_CUDA=ON -DCMAKE_INSTALL_PREFIX=install/ ../src/
make -j12 installmkdir build
cd build
cmake ..
make -j 12./ginkgo_eval _backend_where _backend_ can be:
cudaompreferencehip
Generate the AMGX Matrix Market formatted input file (AMGX requires A and b in the same file):
cd data/
./AMGX_formatter.sh A.mtx rhs.mtxRun AMGX solver:
./AMGX_eval ../config_AMGX/file.jsonOptional: Add write_w to the command to write the output of the resolution in .mtx format.
./amgcl_cuda_eval ../data/aij_2592000.mtx ../data/rhs_2592000.mtxRun the Hypre solver with appropriate input files and configuration.