diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2022-12-01 22:38:20 +0100 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2022-12-01 22:39:32 +0100 |
commit | 7be9956c54ca0e17129298337f375aa9de057321 (patch) | |
tree | a12eaac7e69e5c7b22ee9cbdfa7b9522859b1c4e /dev-libs | |
parent | */*: drop dead/outdated intel packages and eclass (diff) | |
download | sci-7be9956c54ca0e17129298337f375aa9de057321.tar.gz sci-7be9956c54ca0e17129298337f375aa9de057321.tar.bz2 sci-7be9956c54ca0e17129298337f375aa9de057321.zip |
dev-libs/oneCCL: new package, add 2021.7.1
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/oneCCL/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/oneCCL/files/oneCCL-2021.7.1-use-system-libs.patch | 102 | ||||
-rw-r--r-- | dev-libs/oneCCL/metadata.xml | 11 | ||||
-rw-r--r-- | dev-libs/oneCCL/oneCCL-2021.7.1.ebuild | 54 |
4 files changed, 168 insertions, 0 deletions
diff --git a/dev-libs/oneCCL/Manifest b/dev-libs/oneCCL/Manifest new file mode 100644 index 000000000..825fc0a11 --- /dev/null +++ b/dev-libs/oneCCL/Manifest @@ -0,0 +1 @@ +DIST oneCCL-2021.7.1.tar.gz 35807233 BLAKE2B 0608b548f42c28983453a1e693c922aff0f6c77ffbf35f92b69113ba9fb02263bf8e1efa94ba47330559bb97b81493923cac10ce2c68c5fb50181677152fcc28 SHA512 e77d836afdcccbc2a1d2f9903916f17698a0d5ad795cd76dbb19a835375e89d0ecfa4695d87758e1ca6078bc23e30416d0a228ad3060816409b91851ad0b0790 diff --git a/dev-libs/oneCCL/files/oneCCL-2021.7.1-use-system-libs.patch b/dev-libs/oneCCL/files/oneCCL-2021.7.1-use-system-libs.patch new file mode 100644 index 000000000..0f9a785b4 --- /dev/null +++ b/dev-libs/oneCCL/files/oneCCL-2021.7.1-use-system-libs.patch @@ -0,0 +1,102 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 74c4fc0..92c4d16 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -87,15 +87,13 @@ add_definitions(-DCCL_CXX_COMPILER="${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILE + SET(CCL_ENABLE_ZE OFF CACHE BOOL "Enable Level Zero support") + + set(CCL_COMMON_INSTALL_PREFIX "intel64") +-set(CMAKE_INSTALL_LIBDIR "lib") + set(CCL_INSTALL_LIB "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + set(CCL_INSTALL_INCLUDE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") + set(CCL_INSTALL_DOC "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}") + set(CCL_INSTALL_BIN "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") +-set(CCL_INSTALL_ENV "${CMAKE_INSTALL_PREFIX}/env") +-set(CCL_INSTALL_ETC "${CMAKE_INSTALL_PREFIX}/etc") +-set(CCL_INSTALL_LICENSE "${CMAKE_INSTALL_PREFIX}/licensing") +-set(CCL_INSTALL_MODULE "${CMAKE_INSTALL_PREFIX}/modulefiles") ++set(CCL_INSTALL_ENV "${CMAKE_INSTALL_FULL_SYSCONFDIR}/env") ++set(CCL_INSTALL_ETC "${CMAKE_INSTALL_FULL_SYSCONFDIR}") ++set(CCL_INSTALL_MODULE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/modulefiles") + set(CCL_INSTALL_EXAMPLES "${CMAKE_INSTALL_PREFIX}/examples") + set(CCL_INSTALL_TESTS "${CMAKE_INSTALL_PREFIX}/tests") + set(CCL_INSTALL_KERNELS "${CMAKE_INSTALL_PREFIX}/lib/kernels") +@@ -103,23 +101,23 @@ set(CCL_INSTALL_KERNELS "${CMAKE_INSTALL_PREFIX}/lib/kernels") + # setup dependency directories + set(DEPS_DIR "${PROJECT_SOURCE_DIR}/deps") + +-set(MPI_INCLUDE_DIR "${DEPS_DIR}/mpi/include/") +-set(MPI_LIB_DIR "${DEPS_DIR}/mpi/lib/") ++set(MPI_INCLUDE_DIR "/usr/include/") ++set(MPI_LIB_DIR "/usr/lib64/") + message(STATUS "MPI_INCLUDE_DIR: ${MPI_INCLUDE_DIR}") + message(STATUS "MPI_LIB_DIR: ${MPI_LIB_DIR}") + + if ("${LIBFABRIC_DIR}" STREQUAL "") +- set(LIBFABRIC_INCLUDE_DIR "${DEPS_DIR}/ofi/include") +- set(LIBFABRIC_LIB_DIR "${DEPS_DIR}/ofi/lib/") ++ set(LIBFABRIC_INCLUDE_DIR "${DEPS_DIR}/ofi/include/") ++ set(LIBFABRIC_LIB_DIR "${DEPS_DIR}/ofi/lib64/") + else() + set(LIBFABRIC_INCLUDE_DIR "${LIBFABRIC_DIR}/include/") +- set(LIBFABRIC_LIB_DIR "${LIBFABRIC_DIR}/lib") ++ set(LIBFABRIC_LIB_DIR "${LIBFABRIC_DIR}/lib64/") + endif() + message(STATUS "LIBFABRIC_LIB_DIR: ${LIBFABRIC_LIB_DIR}") + message(STATUS "LIBFABRIC_INCLUDE_DIR: ${LIBFABRIC_INCLUDE_DIR}") + +-set(HWLOC_INCLUDE_DIR "${DEPS_DIR}/hwloc/include/") +-set(HWLOC_LIB_DIR "${DEPS_DIR}/hwloc/lib/") ++set(HWLOC_INCLUDE_DIR "/usr/include/") ++set(HWLOC_LIB_DIR "/usr/lib64/") + message(STATUS "HWLOC_INCLUDE_DIR: ${HWLOC_INCLUDE_DIR}") + message(STATUS "HWLOC_LIB_DIR: ${HWLOC_LIB_DIR}") + +@@ -128,7 +126,7 @@ set(ITT_LIB_DIR "${DEPS_DIR}/itt/lib64") + message(STATUS "ITT_INCLUDE_DIR: ${ITT_INCLUDE_DIR}") + message(STATUS "ITT_LIB_DIR: ${ITT_LIB_DIR}") + +-set(LEVEL_ZERO_INCLUDE_DIR "${DEPS_DIR}/level_zero/include/") ++set(LEVEL_ZERO_INCLUDE_DIR "/usr/include/level_zero") + message(STATUS "LEVEL_ZERO_INCLUDE_DIR: ${LEVEL_ZERO_INCLUDE_DIR}") + + set(CMAKE_SKIP_INSTALL_RPATH TRUE) +@@ -241,8 +239,6 @@ configure_file(third-party-programs.txt ${CMAKE_CURRENT_BINARY_DIR}/third-party- + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vars.sh DESTINATION ${CCL_INSTALL_ENV}) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/setvars.sh DESTINATION ${CCL_INSTALL_ENV}) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/ccl DESTINATION ${CCL_INSTALL_MODULE}) +-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/third-party-programs.txt DESTINATION ${CCL_INSTALL_LICENSE}) +-install(PROGRAMS ${PROJECT_SOURCE_DIR}/LICENSE DESTINATION ${CCL_INSTALL_LICENSE}) + + # copy kernels + if (COMPUTE_BACKEND AND EXISTS "${PROJECT_SOURCE_DIR}/src/kernels") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7b4cff9..7ef00f8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -263,7 +263,7 @@ list(APPEND SRC_LINK_LIBS + pthread + ${EXTERNAL_LIBS} + fabric +- ${HWLOC_LIB_DIR}/libhwloc.a ++ ${HWLOC_LIB_DIR}/libhwloc.so + ${ITT_LIB_DIR}/libittnotify.a) + + if (ENABLE_MPI) +@@ -335,16 +335,3 @@ if ("${LIBFABRIC_DIR}" STREQUAL "") + install(DIRECTORY ${DEPS_DIR}/ofi/lib/ + DESTINATION ${CCL_INSTALL_LIB}) + endif() +- +-if (ENABLE_MPI) +- file(GLOB mpi_bins "${DEPS_DIR}/mpi/bin/*") +- install(PROGRAMS ${mpi_bins} DESTINATION ${CCL_INSTALL_BIN}) +- install(DIRECTORY ${DEPS_DIR}/mpi/include/ +- DESTINATION ${CCL_INSTALL_INCLUDE}) +- install(DIRECTORY ${DEPS_DIR}/mpi/lib/ +- DESTINATION ${CCL_INSTALL_LIB}) +- install(DIRECTORY ${DEPS_DIR}/mpi/etc/ +- DESTINATION ${CCL_INSTALL_ETC}) +- install(DIRECTORY ${DEPS_DIR}/mpi/licensing/ +- DESTINATION ${CCL_INSTALL_LICENSE}/mpi/) +-endif() diff --git a/dev-libs/oneCCL/metadata.xml b/dev-libs/oneCCL/metadata.xml new file mode 100644 index 000000000..ad55412d9 --- /dev/null +++ b/dev-libs/oneCCL/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>andrewammerlaan@gentoo.org</email> + <name>Andrew Ammerlaan</name> + </maintainer> + <upstream> + <remote-id type="github">oneapi-src/oneCCL</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-libs/oneCCL/oneCCL-2021.7.1.ebuild b/dev-libs/oneCCL/oneCCL-2021.7.1.ebuild new file mode 100644 index 000000000..ae069bb2a --- /dev/null +++ b/dev-libs/oneCCL/oneCCL-2021.7.1.ebuild @@ -0,0 +1,54 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="oneAPI Collective Communications Library" +HOMEPAGE="https://github.com/oneapi-src/oneCCL" +SRC_URI="https://github.com/oneapi-src/oneCCL/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="mpi" + +DEPEND=" + dev-libs/level-zero + sys-apps/hwloc + sys-block/libfabric + mpi? ( virtual/mpi ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-2021.7.1-use-system-libs.patch" +) + +src_prepare() { + # No -Werror + find . -name "CMakeLists.txt" -exec sed -i "s/-Werror//g" {} + || die + + # Use system libs instead + rm -r deps/hwloc deps/level_zero deps/mpi deps/ofi || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_EXAMPLES=OFF + # BUILD_CONFIG causes sandbox violation + -DBUILD_CONFIG=OFF + -DCCL_ENABLE_ZE=ON + # TODO: Find out how to execute the tests + -DBUILD_FT=OFF + -DENABLE_MPI_TESTS=OFF + -DENABLE_MPI="$(usex mpi)" + # Use system fabric + -DLIBFABRIC_DIR="${ESYSROOT}/usr" + ) + cmake_src_configure +} |