mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: Add Combinatorial BLAS.
* gnu/packages/maths.scm (combinatorial-blas): New variable. * gnu/packages/patches/combinatorial-blas-awpm.patch, gnu/packages/patches/combinatorial-blas-io-fix.patch: New files * gnu/local.mk(dist_patch_DATA): Add them.
This commit is contained in:
parent
519be98c35
commit
a6b9ebc2fc
4 changed files with 134 additions and 0 deletions
|
@ -692,6 +692,8 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/clucene-pkgconfig.patch \
|
%D%/packages/patches/clucene-pkgconfig.patch \
|
||||||
%D%/packages/patches/clx-remove-demo.patch \
|
%D%/packages/patches/clx-remove-demo.patch \
|
||||||
%D%/packages/patches/coda-use-system-libs.patch \
|
%D%/packages/patches/coda-use-system-libs.patch \
|
||||||
|
%D%/packages/patches/combinatorial-blas-awpm.patch \
|
||||||
|
%D%/packages/patches/combinatorial-blas-io-fix.patch \
|
||||||
%D%/packages/patches/cool-retro-term-dont-check-uninit-member.patch \
|
%D%/packages/patches/cool-retro-term-dont-check-uninit-member.patch \
|
||||||
%D%/packages/patches/cool-retro-term-fix-array-size.patch \
|
%D%/packages/patches/cool-retro-term-fix-array-size.patch \
|
||||||
%D%/packages/patches/cool-retro-term-memory-leak-1.patch \
|
%D%/packages/patches/cool-retro-term-memory-leak-1.patch \
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
(define-module (gnu packages maths)
|
(define-module (gnu packages maths)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
@ -4215,3 +4216,53 @@ (define-public sundials-openmpi
|
||||||
(add-before 'check 'mpi-setup
|
(add-before 'check 'mpi-setup
|
||||||
,%openmpi-setup)))))
|
,%openmpi-setup)))))
|
||||||
(synopsis "SUNDIALS with OpenMPI support")))
|
(synopsis "SUNDIALS with OpenMPI support")))
|
||||||
|
|
||||||
|
(define-public combinatorial-blas
|
||||||
|
(package
|
||||||
|
(name "combinatorial-blas")
|
||||||
|
(version "1.6.2")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/"
|
||||||
|
"CombBLAS_beta_"
|
||||||
|
(match (string-split version #\.)
|
||||||
|
((major minor patch)
|
||||||
|
(string-append major minor "_" patch))) ;e.g. "16_2"
|
||||||
|
".tgz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1a9wbgdqyy1whhfc0yl0yqkax3amnqa6iihhq48d063gc0jwfd9a"))
|
||||||
|
(patches (search-patches "combinatorial-blas-awpm.patch"
|
||||||
|
"combinatorial-blas-io-fix.patch"))))
|
||||||
|
(build-system cmake-build-system)
|
||||||
|
(inputs
|
||||||
|
`(("mpi" ,openmpi)
|
||||||
|
("test-data" ,(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "https://people.eecs.berkeley.edu/~aydin/"
|
||||||
|
"CombBLAS_FILES/testdata_combblas1.6.1.tgz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87"))))))
|
||||||
|
(arguments
|
||||||
|
`(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
|
||||||
|
"-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL")
|
||||||
|
#:parallel-tests? #f ;tests use 'mpiexec -n4'
|
||||||
|
#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(add-before 'check 'mpi-setup
|
||||||
|
,%openmpi-setup)
|
||||||
|
(add-before 'check 'test-setup
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(setenv "OMP_NUM_THREADS" "2")
|
||||||
|
(invoke "tar" "xf" (assoc-ref inputs "test-data")))))))
|
||||||
|
(home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/")
|
||||||
|
(synopsis "Linear algebra primitives for graph analytics")
|
||||||
|
(description "The Combinatorial BLAS (CombBLAS) is an extensible
|
||||||
|
distributed-memory parallel graph library offering a small but powerful set of
|
||||||
|
linear algebra primitives specifically targeting graph analytics.")
|
||||||
|
(license (list
|
||||||
|
license:gpl2+ ;include/psort/(funnel|sort)*.h
|
||||||
|
license:x11 ;usort and psort
|
||||||
|
license:bsd-3)))) ;CombBLAS and MersenneTwister.h
|
||||||
|
|
67
gnu/packages/patches/combinatorial-blas-awpm.patch
Normal file
67
gnu/packages/patches/combinatorial-blas-awpm.patch
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
Install BipartiteMatchings headers for SuperLU_DIST.
|
||||||
|
|
||||||
|
--- a/BipartiteMatchings/ApproxWeightPerfectMatching.h
|
||||||
|
+++ b/BipartiteMatchings/ApproxWeightPerfectMatching.h
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
#ifndef ApproxWeightPerfectMatching_h
|
||||||
|
#define ApproxWeightPerfectMatching_h
|
||||||
|
|
||||||
|
-#include "../CombBLAS.h"
|
||||||
|
+#include "CombBLAS.h"
|
||||||
|
#include "BPMaximalMatching.h"
|
||||||
|
#include "BPMaximumMatching.h"
|
||||||
|
#include <parallel/algorithm>
|
||||||
|
--- a/BipartiteMatchings/BPMaximalMatching.h
|
||||||
|
+++ b/BipartiteMatchings/BPMaximalMatching.h
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
#ifndef BP_MAXIMAL_MATCHING_H
|
||||||
|
#define BP_MAXIMAL_MATCHING_H
|
||||||
|
|
||||||
|
-#include "../CombBLAS.h"
|
||||||
|
+#include "CombBLAS.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <functional>
|
||||||
|
#include <algorithm>
|
||||||
|
--- a/BipartiteMatchings/BPMaximumMatching.h
|
||||||
|
+++ b/BipartiteMatchings/BPMaximumMatching.h
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
#ifndef BP_MAXIMUM_MATCHING_H
|
||||||
|
#define BP_MAXIMUM_MATCHING_H
|
||||||
|
|
||||||
|
-#include "../CombBLAS.h"
|
||||||
|
+#include "CombBLAS.h"
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <iostream>
|
||||||
|
--- a/BipartiteMatchings/MatchingDefs.h
|
||||||
|
+++ b/BipartiteMatchings/MatchingDefs.h
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
#ifndef MatchingDefs_h
|
||||||
|
#define MatchingDefs_h
|
||||||
|
|
||||||
|
-#include "../CombBLAS.h"
|
||||||
|
+#include "CombBLAS.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
namespace combblas {
|
||||||
|
--- a/BipartiteMatchings/Utility.h
|
||||||
|
+++ b/BipartiteMatchings/Utility.h
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
#ifndef BP_UTILITY_H
|
||||||
|
#define BP_UTILITY_H
|
||||||
|
|
||||||
|
-#include "../CombBLAS.h"
|
||||||
|
+#include "CombBLAS.h"
|
||||||
|
|
||||||
|
namespace combblas {
|
||||||
|
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -68,6 +68,7 @@ set_property(TARGET CombBLAS PROPERTY VERSION ${CombBLAS_VERSION})
|
||||||
|
# installation
|
||||||
|
install(DIRECTORY include/ DESTINATION include)
|
||||||
|
install(DIRECTORY psort-1.0/include/ DESTINATION include)
|
||||||
|
+install(DIRECTORY BipartiteMatchings DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||||
|
install(TARGETS CombBLAS EXPORT CombBLASTargets
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
14
gnu/packages/patches/combinatorial-blas-io-fix.patch
Normal file
14
gnu/packages/patches/combinatorial-blas-io-fix.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
IO not appropriate in the context of a sorting routine, and in any case the
|
||||||
|
proper headers are not included, so gcc emits an undefined symbol error.
|
||||||
|
Remove the "printf" statement.
|
||||||
|
|
||||||
|
--- CombBLAS_beta_16_2/usort/include/usort/seqUtils.tcc
|
||||||
|
+++ CombBLAS_beta_16_2/usort/include/usort/seqUtils.tcc
|
||||||
|
@@ -142,7 +142,6 @@
|
||||||
|
}
|
||||||
|
if ( (a[nmax]==a[nmin]) && (ctr==0) )
|
||||||
|
{
|
||||||
|
- printf("All the numbers are identical, the list is sorted\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue