@@ -116,6 +116,7 @@ (define-module (gnu packages maths)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages datamash)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages disk)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
#:use-module (gnu packages emacs)
@@ -6403,6 +6404,56 @@ (define-public lpsolve
revised simplex and the branch-and-bound methods.")
(license license:lgpl2.1+)))
+(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
+
;; Private Trilinos package for dealii-openmpi (similar to
;; trilinos-serial-xyce and trilinos-parallel-xyce).
;; This version is the latest known to be compatible with deal.II [1].