sci-libs/rocALUTION - 10.0.0 (stuff)

Search

Install

Install this version:

emerge -a =sci-libs/rocALUTION-10.0.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sci-libs/rocALUTION-10.0.0

Or alternatively:

emerge --autounmask-write -a =sci-libs/rocALUTION-10.0.0

Package Information

Description:
Sparse iterative solvers and preconditioners on the ROCm platform
Homepage:
https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocalution
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
10.0.0 8 ~amd64 0/$(ver_cut 1-2)
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

ROCM_VERSION=${PV}

inherit cmake rocm

DESCRIPTION="Sparse iterative solvers and preconditioners on the ROCm platform"
HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocalution"
# AMD retired rocm-* releases; use the rocalution asset from the matching
# TheRock release.
SRC_URI="https://github.com/ROCm/rocm-libraries/releases/download/therock-$(ver_cut 1-2)/rocalution.tar.gz -> rocalution-${PV}.tar.gz"
S="${WORKDIR}/rocalution"

LICENSE="MIT"
# Slot by ROCm release, not upstream's rocm_setup_version(4.1.0).
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"

IUSE="+openmp mpi test"
REQUIRED_USE="${ROCM_REQUIRED_USE}"

RESTRICT="!test? ( test )"

# The HIP backend requires all four ROCm libraries. The shared object links
# everything except header-only rocPRIM, which is build-time only.
# verified 2026-08-30
RDEPEND="
	dev-util/hip:${SLOT}
	sci-libs/rocBLAS:${SLOT}
	sci-libs/rocRAND:${SLOT}
	sci-libs/rocSPARSE:${SLOT}
	mpi? ( virtual/mpi )
"
DEPEND="
	${RDEPEND}
	sci-libs/rocPRIM:${SLOT}
"
BDEPEND="
	dev-build/rocm-cmake:${SLOT}
	test? ( dev-cpp/gtest )
"

src_configure() {
	rocm_use_clang

	local mycmakeargs=(
		-DCMAKE_SKIP_RPATH=ON
		# Legacy FindHIP provides hip_add_library but lies outside CMake's default
		# module path. Without it SUPPORT_HIP silently disables itself; src_install
		# asserts the resulting backend. # verified 2026-08-30
		-DCMAKE_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/cmake/hip"
		-DAMDGPU_TARGETS="$(get_amdgpu_flags)"
		-DROCM_SYMLINK_LIBS=OFF
		# Pin optional backends rather than inherit upstream defaults.
		-DSUPPORT_OMP=$(usex openmp ON OFF)
		-DSUPPORT_MPI=$(usex mpi ON OFF)
		-DBUILD_CLIENTS_SAMPLES=OFF
		-DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
		-DBUILD_CLIENTS_BENCHMARKS=OFF
		-Wno-dev
	)

	cmake_src_configure
}

src_install() {
	# A missing GPU backend otherwise produces a successful CPU-only build.
	[[ -f ${BUILD_DIR}/src/librocalution_hip.so ]] ||
		die "librocalution_hip.so was not built -- SUPPORT_HIP silently degraded to a CPU-only build"

	cmake_src_install
}

USE Flags

Manage flags for this package: euse -i <flag> -p sci-libs/rocALUTION | euse -E <flag> -p sci-libs/rocALUTION | euse -D <flag> -p sci-libs/rocALUTION

Global/Standard Flags

openmp
Default: Enabled (+)
mpi

Inherited Eclasses

Dependencies

DEPEND

	
	dev-util/hip:0/$(ver_cut 1-2)
	sci-libs/rocBLAS:0/$(ver_cut 1-2)
	sci-libs/rocRAND:0/$(ver_cut 1-2)
	sci-libs/rocSPARSE:0/$(ver_cut 1-2)
	mpi? ( virtual/mpi )

	sci-libs/rocPRIM:0/$(ver_cut 1-2)

RDEPEND

	dev-util/hip:0/$(ver_cut 1-2)
	sci-libs/rocBLAS:0/$(ver_cut 1-2)
	sci-libs/rocRAND:0/$(ver_cut 1-2)
	sci-libs/rocSPARSE:0/$(ver_cut 1-2)
	mpi? ( virtual/mpi )

BDEPEND

	dev-build/rocm-cmake:0/$(ver_cut 1-2)
	test? ( dev-cpp/gtest )