Enable TheRock to build rocALUTION#5888
Open
jsandham wants to merge 5 commits into
Open
Conversation
ScottTodd
reviewed
Jun 22, 2026
ScottTodd
left a comment
Member
There was a problem hiding this comment.
First pass review just looking through the CI logs: https://github.com/ROCm/TheRock/actions/runs/27967403102?pr=5888
- some build failures to solve
- overall build time so far is reasonable (~68 seconds until build failure, we have some components that take 30+ minutes to build and have historically had some that take 5+ hours, so we're on the lookout for anything that will introduce new bottlenecks or strain CI resources)
Comment on lines
+433
to
+436
| BUILD_DEPS | ||
| rocm-cmake | ||
| rocPRIM | ||
| therock-googletest |
Member
There was a problem hiding this comment.
There are build errors on Windows:
- https://github.com/ROCm/TheRock/actions/runs/27967403102/job/82768669980?pr=5888#step:18:616
- https://therock-ci-artifacts-external.s3.amazonaws.com/ROCm-TheRock/27967403102-windows/logs/math-libs/gfx1151/rocALUTION_build.log
[rocALUTION] [67/93] Building CXX object src/CMakeFiles/rocalution.dir/solvers/preconditioners/preconditioner_blockjacobi.cpp.obj
[rocALUTION] [68/93] Building CXX object src/CMakeFiles/rocalution.dir/base/backend_manager.cpp.obj
[rocALUTION] FAILED: src/CMakeFiles/rocalution.dir/base/backend_manager.cpp.obj
[rocALUTION] ccache B:\build\core\clr\dist\lib\llvm\bin\clang++.exe -DSUPPORT_COMPLEX -Drocalution_EXPORTS -IB:/build/math-libs/rocALUTION/build/include -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -fms-extensions -fms-compatibility -D_ENABLE_EXTENDED_ALIGNED_STORAGE -resource-dir B:/build/core/clr/dist/lib/llvm/lib/clang/23 -Wno-documentation-unknown-command -Wno-documentation-pedantic -Wno-unused-command-line-argument -Wno-explicit-specialization-storage-class -Wno-ignored-attributes -Wno-unknown-attributes -Wno-duplicate-decl-specifier --hip-path=B:/build/core/clr/dist --hip-device-lib-path=B:/build/core/clr/dist/lib/llvm/amdgcn/bitcode -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=c++17 -fvisibility-inlines-hidden -O3 -fopenmp=libomp -MD -MT src/CMakeFiles/rocalution.dir/base/backend_manager.cpp.obj -MF src\CMakeFiles\rocalution.dir\base\backend_manager.cpp.obj.d -o src/CMakeFiles/rocalution.dir/base/backend_manager.cpp.obj -c C:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/src/base/backend_manager.cpp
[rocALUTION] C:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/src/base/backend_manager.cpp:161:56: error: use of undeclared identifier 'omp_get_max_active_levels'
[rocALUTION] 161 | _get_backend_descriptor()->OpenMP_def_nested = omp_get_max_active_levels();
[rocALUTION] | ^~~~~~~~~~~~~~~~~~~~~~~~~
[rocALUTION] C:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/src/base/backend_manager.cpp:168:9: error: use of undeclared identifier 'omp_set_max_active_levels'
[rocALUTION] 168 | omp_set_max_active_levels(0);
[rocALUTION] | ^~~~~~~~~~~~~~~~~~~~~~~~~
[rocALUTION] C:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/src/base/backend_manager.cpp:240:9: error: use of undeclared identifier 'omp_set_max_active_levels'
[rocALUTION] 240 | omp_set_max_active_levels(_get_backend_descriptor()->OpenMP_def_nested);
[rocALUTION] | ^~~~~~~~~~~~~~~~~~~~~~~~~
[rocALUTION] 3 errors generated.
[rocALUTION] [69/93] Building CXX object clients/tests/CMakeFiles/rocalution-test.dir/test_preconditioner.cpp.obj
[rocALUTION] FAILED: clients/tests/CMakeFiles/rocalution-test.dir/test_preconditioner.cpp.obj
[rocALUTION] ccache B:\build\core\clr\dist\lib\llvm\bin\clang++.exe -DGOOGLE_TEST -IC:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/clients/tests/../include -IB:/build/math-libs/rocALUTION/build/include -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -fms-extensions -fms-compatibility -D_ENABLE_EXTENDED_ALIGNED_STORAGE -resource-dir B:/build/core/clr/dist/lib/llvm/lib/clang/23 -Wno-documentation-unknown-command -Wno-documentation-pedantic -Wno-unused-command-line-argument -Wno-explicit-specialization-storage-class -Wno-ignored-attributes -Wno-unknown-attributes -Wno-duplicate-decl-specifier --hip-path=B:/build/core/clr/dist --hip-device-lib-path=B:/build/core/clr/dist/lib/llvm/amdgcn/bitcode -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=c++14 -MD -MT clients/tests/CMakeFiles/rocalution-test.dir/test_preconditioner.cpp.obj -MF clients\tests\CMakeFiles\rocalution-test.dir\test_preconditioner.cpp.obj.d -o clients/tests/CMakeFiles/rocalution-test.dir/test_preconditioner.cpp.obj -c C:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/clients/tests/test_preconditioner.cpp
[rocALUTION] In file included from C:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/clients/tests/test_preconditioner.cpp:24:
[rocALUTION] C:/home/runner/_work/TheRock/TheRock/rocm-libraries/projects/rocalution/clients/tests/../include\testing_preconditioner.hpp:28:10: fatal error: 'gtest/gtest.h' file not found
[rocALUTION] 28 | #include <gtest/gtest.h>
[rocALUTION] | ^~~~~~~~~~~~~~~
[rocALUTION] 1 error generated.
This therock-googletest build dep seems like it should be correct. OpenMP may be trickier, I'd need to check where that is expected to come from...
We might want to start with rocALUTION only enabled on Linux to start bringup one platform at a time.
| BUILD_DEPS | ||
| rocm-cmake | ||
| rocPRIM | ||
| therock-googletest |
Member
There was a problem hiding this comment.
Oh, this also fails on Linux:
- https://github.com/ROCm/TheRock/actions/runs/27967403102/job/82769015910?pr=5888#step:14:1951
- https://therock-ci-artifacts-external.s3.amazonaws.com/ROCm-TheRock/27967403102-linux/logs/math-libs/gfx1151/rocALUTION_build.log
[rocALUTION] [116/116] Linking CXX executable clients/staging/rocalution-test
[rocALUTION] FAILED: clients/staging/rocalution-test
[rocALUTION] : && /__w/TheRock/TheRock/build/core/clr/dist/lib/llvm/bin/clang++ -resource-dir /__w/TheRock/TheRock/build/core/clr/dist/lib/llvm/lib/clang/23 -Wno-documentation-unknown-command -Wno-documentation-pedantic -Wno-unused-command-line-argument -Wno-explicit-specialization-storage-class --hip-path=/__w/TheRock/TheRock/build/core/clr/dist --hip-device-lib-path=/__w/TheRock/TheRock/build/core/clr/dist/lib/llvm/amdgcn/bitcode -O3 -DNDEBUG -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zlib/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zlib/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zstd/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zstd/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/numactl/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/numactl/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/bzip2/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/bzip2/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/liblzma/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/liblzma/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/elfutils/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/elfutils/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libdrm/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libdrm/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/compiler/amd-llvm/stage/lib/llvm/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/compiler/amd-llvm/stage/lib/llvm/lib -L/__w/TheRock/TheRock/build/compiler/amd-comgr/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/compiler/amd-comgr/stage/lib -L/__w/TheRock/TheRock/build/core/rocm-kpack/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/rocm-kpack/stage/lib -L/__w/TheRock/TheRock/build/base/rocprofiler-register/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/base/rocprofiler-register/stage/lib -L/__w/TheRock/TheRock/build/core/ROCR-Runtime/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/ROCR-Runtime/stage/lib -L/__w/TheRock/TheRock/build/core/clr/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/clr/stage/lib -L/__w/TheRock/TheRock/build/third-party/host-blas/host-blas/stage/lib/host-math/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/host-blas/host-blas/stage/lib/host-math/lib -L/__w/TheRock/TheRock/build/profiler/roctracer/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/profiler/roctracer/stage/lib -L/__w/TheRock/TheRock/build/profiler/aqlprofile/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/profiler/aqlprofile/stage/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/sqlite3/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/sqlite3/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/profiler/rocprofiler-sdk/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/profiler/rocprofiler-sdk/stage/lib -L/__w/TheRock/TheRock/build/profiler/rocprofiler-sdk/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/profiler/rocprofiler-sdk/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libmnl/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libmnl/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libnl/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libnl/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/base/rocm_smi_lib/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/base/rocm_smi_lib/stage/lib -L/__w/TheRock/TheRock/build/third-party/host-blas/host-blas64/stage/lib/host-math/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/host-blas/host-blas64/stage/lib/host-math/lib clients/tests/CMakeFiles/rocalution-test.dir/rocalution_host_gtest_main.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_qr.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_lu.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_inversion.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_backend.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_bicgstab.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_bicgstabl.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_cg.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_cr.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_fcg.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_fgmres.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_gmres.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_idr.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_qmrcgstab.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_pairwise_amg.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_ruge_stueben_amg.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_saamg.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_uaamg.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_preconditioner.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_itersolver.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_chebyshev.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_mixed_precision.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_local_matrix.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_local_matrix_multicoloring.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_local_matrix_itsolve.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_local_matrix_solve.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_local_stencil.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/test_local_vector.cpp.o clients/tests/CMakeFiles/rocalution-test.dir/__/include/random.cpp.o -o clients/staging/rocalution-test -Wl,-rpath,"\$ORIGIN/../lib/rocm_sysdeps/lib:\$ORIGIN/../lib/llvm/lib:\$ORIGIN/../lib:\$ORIGIN/../lib/host-math/lib" src/librocalution.so.1.0 -lpthread -Wl,-rpath-link,/__w/TheRock/TheRock/build/math-libs/rocALUTION/build/src:/__w/TheRock/TheRock/build/math-libs/BLAS/rocSPARSE/dist/lib:/__w/TheRock/TheRock/build/math-libs/BLAS/rocBLAS/dist/lib:/__w/TheRock/TheRock/build/math-libs/rocRAND/dist/lib:/__w/TheRock/TheRock/build/core/clr/dist/lib && :
[rocALUTION] ld.lld: error: undefined symbol: testing::InitGoogleTest(int*, char**)
[rocALUTION] >>> referenced by rocalution_host_gtest_main.cpp
[rocALUTION] >>> clients/tests/CMakeFiles/rocalution-test.dir/rocalution_host_gtest_main.cpp.o:(main)
[rocALUTION]
[rocALUTION] ld.lld: error: undefined symbol: testing::FLAGS_gtest_death_test_style[abi:cxx11]
[rocALUTION] >>> referenced by rocalution_host_gtest_main.cpp
[rocALUTION] >>> clients/tests/CMakeFiles/rocalution-test.dir/rocalution_host_gtest_main.cpp.o:(main)
[rocALUTION]
[rocALUTION] ld.lld: error: undefined symbol: testing::UnitTest::GetInstance()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Recently we added rocALUTION to rocm-libraries. This PR adds rocALUTION to the TheRock build system. This PR separates the build portion of #5884 into its own PR.
Technical Details
rocALUTION is a sparse linear algebra library targeting iterative solution of large sparse linear systems on CPUs and AMD GPUs. It provides a unified C++/HIP API across Host, OpenMP, HIP, and MPI backends, with a comprehensive set of iterative solvers (CG, GMRES, BiCGStab, AMG variants, etc.) and preconditioners (ILU, IC, SPAI, FSAI, Chebyshev polynomial, etc.).
This PR does the following:
Note: This PR requires that the rocm-libraries commit id used by TheRock CI get bumped to a commit that includes the addition of rocalution.
ROCM-25191