guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

12/13: gnu: Add kokkos.


From: guix-commits
Subject: 12/13: gnu: Add kokkos.
Date: Sat, 14 Oct 2023 16:49:27 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 50b82ea44e0cc19034058cfdac167284716d6471
Author: Paul A. Patience <paul@apatience.com>
AuthorDate: Fri Oct 13 12:35:37 2023 +0000

    gnu: Add kokkos.
    
    * gnu/packages/cpp.scm (kokkos): New variable.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/cpp.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index f3f6d8df64..d89fcaeb1e 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -83,6 +83,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages datastructures)
+  #:use-module (gnu packages disk)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gcc)
@@ -95,6 +96,7 @@
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages mpi)
   #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
@@ -1062,6 +1064,56 @@ development of concurrent and multithreaded applications 
in C++.")
 programs.")
     (license license:expat)))
 
+(define-public kokkos
+  (package
+    (name "kokkos")
+    (version "4.1.00")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/kokkos/kokkos";)
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "15kjpa54ssrrbid9h2nr94nh85qna5c4vq2152i4iy7gaagigy3c"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Remove bundled googletest.
+        #~(delete-file-recursively "tpls/gtest"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags
+           ;; deal.II uses only the serial backend, so do not enable the
+           ;; others yet.
+           #~(list "-DBUILD_SHARED_LIBS=ON"
+                   "-DKokkos_ENABLE_SERIAL=ON"
+                   "-DKokkos_ENABLE_TESTS=ON"
+                   "-DKokkos_ENABLE_EXAMPLES=ON"
+                   "-DKokkos_ENABLE_HWLOC=ON"
+                   "-DKokkos_ENABLE_MEMKIND=ON")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install-license-files 'remove-cruft
+                 (lambda _
+                   (delete-file
+                    (string-append #$output "/share/doc/"
+                                   #$name "-" #$version
+                                   "/LICENSE_FILE_HEADER")))))))
+    (native-inputs
+     (list googletest python))
+    (inputs
+     (list `(,hwloc "lib") memkind))
+    (home-page "https://github.com/kokkos/kokkos";)
+    (synopsis "C++ abstractions for parallel execution and data management")
+    (description
+     "Kokkos Core implements a programming model in C++ for writing performance
+portable applications targeting all major HPC platforms.  For that purpose it
+provides abstractions for both parallel execution of code and data management.
+Kokkos is designed to target complex node architectures with N-level memory
+hierarchies and multiple types of execution resources.")
+    (license license:asl2.0))) ; With LLVM exception
+
 (define-public tweeny
   (package
     (name "tweeny")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]