sci-libs/CombBLAS: new package, add 0_pre20220331

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-05-24 17:13:44 +02:00
parent 379bd24175
commit e4a5f73b57
8 changed files with 189 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
COMMIT="426f6be0b29831025cdcacc1f8f69e3520bfb0ff"
inherit cmake
DESCRIPTION='The Combinatorial BLAS'
HOMEPAGE="https://github.com/PASSIONLab/CombBLAS"
SRC_URI="https://github.com/PASSIONLab/${PN}/archive/${COMMIT}.tar.gz -> ${PF}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
KEYWORDS="~amd64"
LICENSE='BSD'
IUSE=""
SLOT="0"
DEPEND="
~sys-cluster/Graph500-1.2
sys-cluster/usort
virtual/mpi
"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${P}-rename-THRESHOLD.patch"
"${FILESDIR}/${P}-psort.patch"
"${FILESDIR}/${P}-cxx17.patch"
"${FILESDIR}/${P}-system-libs.patch"
"${FILESDIR}/${P}-GNUInstallDirs.patch"
)
src_prepare() {
rm -r graph500-1.2 usort psort-1.0 || die
cmake_src_prepare
}
src_install() {
cmake_src_install
dodoc README.md FAQ.md CombBLASbinaryIO.docx
insinto "/usr/include/CombBLAS"
doins Applications/BipartiteMatchings/*.h
insinto "/usr/share/octave/site/m/${PN}"
doins -r Matlab/*
insinto "/usr/share/doc/${PF}/html"
doins *.html
}

View File

@@ -0,0 +1 @@
DIST CombBLAS-0_pre20220331.tar.gz 43783582 BLAKE2B b80e871a21832b2210642bacddeef0c5447cee1e46be3aab2accaaddd393bc0fc05c6d7505a154d303dc3449ec5772d789300b6a78dd97e8119739495aba642f SHA512 5cb6156ab0d8a3fa9c13b9599d2e2bd3f6d3a1fd81f101cf2cadbe72d4b3bcd35013687835549f98fef3ea8e371e562ac55d2f4aa91720a0ef1bdf6da3a97640

View File

@@ -0,0 +1,37 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,7 @@
endif()
# set include directories
+include(GNUInstallDirs)
target_include_directories(CombBLAS PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
target_include_directories(CombBLAS PUBLIC /usr/include/psort $<INSTALL_INTERFACE:include>)
target_include_directories(CombBLAS PRIVATE include/CombBLAS)
@@ -54,7 +55,7 @@
# modifications to CombBLAS and have the changes automatically recompiled for
# dependent projects.
# Either way, we need to create a CombBLASConfig.cmake.
-set(ConfigPackageLocation lib/cmake/CombBLAS)
+set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/CombBLAS)
# Generate version number header
include(GenerateExportHeader)
@@ -62,12 +63,12 @@
set_target_properties(CombBLAS PROPERTIES VERSION ${CombBLAS_VERSION})
# installation
-install(DIRECTORY include/ DESTINATION include)
+install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS CombBLAS EXPORT CombBLASTargets
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- RUNTIME DESTINATION bin
- INCLUDES DESTINATION include
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
include(CMakePackageConfigHelpers)

View File

@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@
project(CombBLAS VERSION 1.16.0 LANGUAGES C CXX)
# require c++14
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS OFF)

View File

@@ -0,0 +1,22 @@
--- a/include/CombBLAS/SpParHelper.cpp
+++ b/include/CombBLAS/SpParHelper.cpp
@@ -121,7 +121,7 @@
{
long * dist_in = new long[nprocs];
for(int i=0; i< nprocs; ++i) dist_in[i] = (long) dist[i];
- vpsort::parallel_sort (array, array+length, dist_in, comm);
+ psort::parallel_sort (array, array+length, dist_in, comm);
delete [] dist_in;
}
else
@@ -157,7 +157,7 @@
MPI_Comm_create(comm, real_group, &real_comm);
if(!excluded)
{
- vpsort::parallel_sort (array, array+length, dist_in, real_comm);
+ psort::parallel_sort (array, array+length, dist_in, real_comm);
MPI_Comm_free(&real_comm);
}
MPI_Group_free(&real_group);
Solo in /var/tmp/portage/sci-libs/CombBLAS-0_pre20220331/work/CombBLAS-426f6be0b29831025cdcacc1f8f69e3520bfb0ff: psort-1.0
Solo in /var/tmp/portage/sci-libs/CombBLAS-0_pre20220331/work/CombBLAS-426f6be0b29831025cdcacc1f8f69e3520bfb0ff: usort

View File

@@ -0,0 +1,24 @@
--- a/include/CombBLAS/dcsc.cpp
+++ b/include/CombBLAS/dcsc.cpp
@@ -1223,7 +1223,7 @@
template<class VT>
void Dcsc<IT,NT>::FillColInds(const VT * colnums, IT nind, std::vector< std::pair<IT,IT> > & colinds, IT * aux, IT csize) const
{
- if ( aux == NULL || (nzc / nind) < THRESHOLD) // use scanning indexing
+ if ( aux == NULL || (nzc / nind) < COMBBLAS_THRESHOLD) // use scanning indexing
{
IT mink = std::min(nzc, nind);
std::pair<IT,IT> * isect = new std::pair<IT,IT>[mink];
--- a/include/CombBLAS/SpDefs.h
+++ b/include/CombBLAS/SpDefs.h
@@ -122,8 +122,8 @@
#define ALIGN 8
#endif
-#ifndef THRESHOLD
-#define THRESHOLD 4 // if range1.size() / range2.size() < threshold, use scanning based indexing
+#ifndef COMBBLAS_THRESHOLD
+#define COMBBLAS_THRESHOLD 4 // if range1.size() / range2.size() < threshold, use scanning based indexing
#endif
#ifndef MEMORYINBYTES

View File

@@ -0,0 +1,33 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@
# set include directories
target_include_directories(CombBLAS PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
-target_include_directories(CombBLAS PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/psort-1.0/include> $<INSTALL_INTERFACE:include>)
+target_include_directories(CombBLAS PUBLIC /usr/include/psort $<INSTALL_INTERFACE:include>)
target_include_directories(CombBLAS PRIVATE include/CombBLAS)
# MPI and OpenMP dependencies
@@ -43,11 +43,9 @@
target_link_libraries(CombBLAS PUBLIC "${OpenMP_CXX_FLAGS}")
endif()
-add_subdirectory(usort)
-target_link_libraries(CombBLAS PUBLIC Usortlib)
+target_link_libraries(CombBLAS PUBLIC -lUsortlib)
-add_subdirectory(graph500-1.2/generator)
-target_link_libraries(CombBLAS PUBLIC GraphGenlib)
+target_link_libraries(CombBLAS PUBLIC -lGraphGenlib)
# Set up exported configuration
# This allows CombBLAS to be installed in two ways:
@@ -65,7 +63,6 @@
# installation
install(DIRECTORY include/ DESTINATION include)
-install(DIRECTORY psort-1.0/include/ DESTINATION include)
install(TARGETS CombBLAS EXPORT CombBLASTargets
LIBRARY DESTINATION lib64
ARCHIVE DESTINATION lib64

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>Alessandro Barbieri</name>
<email>lssndrbarbieri@gmail.com</email>
</maintainer>
<upstream>
<bugs-to>https://github.com/PASSIONLab/CombBLAS/issues</bugs-to>
<remote-id type="github">PASSIONLab/CombBLAS</remote-id>
</upstream>
</pkgmetadata>