diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 2 | ||||
-rw-r--r-- | gnu/packages/maths.scm | 51 | ||||
-rw-r--r-- | gnu/packages/patches/combinatorial-blas-awpm.patch | 67 | ||||
-rw-r--r-- | gnu/packages/patches/combinatorial-blas-io-fix.patch | 14 |
4 files changed, 134 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 7500571be8..fb19c1a93c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -692,6 +692,8 @@ dist_patch_DATA = \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/clx-remove-demo.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-fix-array-size.patch \ %D%/packages/patches/cool-retro-term-memory-leak-1.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 2f52b4a0ff..b53fa7fad1 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -48,6 +48,7 @@ (define-module (gnu packages maths) #:use-module (ice-9 regex) + #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -4215,3 +4216,53 @@ easily be incorporated into existing simulation codes.") (add-before 'check 'mpi-setup ,%openmpi-setup))))) (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 diff --git a/gnu/packages/patches/combinatorial-blas-awpm.patch b/gnu/packages/patches/combinatorial-blas-awpm.patch new file mode 100644 index 0000000000..86d4ab2dcf --- /dev/null +++ b/gnu/packages/patches/combinatorial-blas-awpm.patch @@ -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 diff --git a/gnu/packages/patches/combinatorial-blas-io-fix.patch b/gnu/packages/patches/combinatorial-blas-io-fix.patch new file mode 100644 index 0000000000..0ad28e5e0b --- /dev/null +++ b/gnu/packages/patches/combinatorial-blas-io-fix.patch @@ -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; + } + |