* [bug#66516] [PATCH 0/2] gnu: dealii: Update to 9.5.1.
@ 2023-10-13 12:33 Paul A. Patience
2023-10-13 12:35 ` [bug#66516] [PATCH 1/2] gnu: Add kokkos Paul A. Patience
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Paul A. Patience @ 2023-10-13 12:33 UTC (permalink / raw)
To: 66516; +Cc: Paul A. Patience
Hi,
The prerequisite-patch-id refers to the Trilinos build fix [1], which is not
strictly required (dealii-openmpi will just not build without it).
Unfortunately, I am flummoxed by the unset-cpath phase's fixing the build with
Kokkos.
[1]: https://bugs.gnu.org/66462
Paul A. Patience (2):
gnu: Add kokkos.
gnu: dealii: Update to 9.5.1.
gnu/packages/maths.scm | 79 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 74 insertions(+), 5 deletions(-)
base-commit: f4e8baf3806e79d7111d2943859865ae4ee0b59d
prerequisite-patch-id: 15b686dd7cb363b42432fb9bc83701cd33bed641
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#66516] [PATCH 1/2] gnu: Add kokkos.
2023-10-13 12:33 [bug#66516] [PATCH 0/2] gnu: dealii: Update to 9.5.1 Paul A. Patience
@ 2023-10-13 12:35 ` Paul A. Patience
2023-10-13 14:27 ` Paul A. Patience
2023-10-13 12:35 ` [bug#66516] [PATCH 2/2] gnu: dealii: Update to 9.5.1 Paul A. Patience
2023-10-14 20:39 ` bug#66516: [PATCH 0/2] " Ludovic Courtès
2 siblings, 1 reply; 5+ messages in thread
From: Paul A. Patience @ 2023-10-13 12:35 UTC (permalink / raw)
To: 66516; +Cc: Paul A. Patience
* gnu/packages/maths.scm (kokkos): New variable.
---
gnu/packages/maths.scm | 51 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 7a87fcb54e..2762e13a4f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -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].
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#66516] [PATCH 2/2] gnu: dealii: Update to 9.5.1.
2023-10-13 12:33 [bug#66516] [PATCH 0/2] gnu: dealii: Update to 9.5.1 Paul A. Patience
2023-10-13 12:35 ` [bug#66516] [PATCH 1/2] gnu: Add kokkos Paul A. Patience
@ 2023-10-13 12:35 ` Paul A. Patience
2023-10-14 20:39 ` bug#66516: [PATCH 0/2] " Ludovic Courtès
2 siblings, 0 replies; 5+ messages in thread
From: Paul A. Patience @ 2023-10-13 12:35 UTC (permalink / raw)
To: 66516; +Cc: Paul A. Patience
* gnu/packages/maths.scm (dealii): Update to 9.5.1.
[propagated-inputs]: Add kokkos.
[arguments]<#:phases>: Add 'unset-cpath' phase.
(dealii-openmpi)[propagated-inputs]: Remove kokkos.
[arguments]<#:phases>: Delete 'unset-cpath' phase.
---
gnu/packages/maths.scm | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2762e13a4f..e8d3cfed99 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6613,17 +6613,17 @@ (define trilinos-for-dealii-openmpi
(define-public dealii
(package
(name "dealii")
- (version "9.4.0")
+ (version "9.5.1")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/dealii/dealii/releases/"
"download/v" version "/dealii-" version ".tar.gz"))
(sha256
- (base32 "0v73q6f35f2yrjihaq6vh9lma07qc4cdv75nwmc3c5yrdh07g1i3"))
+ (base32 "0phgcfnil4rb41xipsdbm4lxrymlqxbiccakg3pkm3a8wqsva658"))
(modules '((guix build utils)))
(snippet
- ;; Remove bundled boost, muparser, TBB and UMFPACK.
+ ;; Remove bundled boost, Kokkos, muparser, TBB and UMFPACK.
#~(delete-file-recursively "bundled"))))
(build-system cmake-build-system)
(outputs '("out" "doc"))
@@ -6647,6 +6647,7 @@ (define-public dealii
;; the requisite interpreter to its native inputs.
(list boost
hdf5
+ kokkos
suitesparse ; For UMFPACK.
sundials
tbb))
@@ -6671,6 +6672,18 @@ (define-public dealii
"/examples")))
#:phases
#~(modify-phases %standard-phases
+ ;; Without unsetting CPATH, the build fails with the following
+ ;; error (similar to <https://bugs.gnu.org/30756>):
+ ;;
+ ;; /gnu/store/…-gcc-11.3.0/include/c++/math.h:30:16: fatal error: math.h: No such file or directory
+ ;; 30 | # include_next <math.h>
+ ;; | ^~~~~~~~
+ ;;
+ ;; Why does unsetting CPATH magically fix the error?
+ ;; TODO: Properly fix this issue.
+ (add-after 'set-paths 'unset-cpath
+ (lambda _
+ (unsetenv "CPATH")))
(add-after 'install 'remove-build-logs
;; These build logs leak the name of the build directory by
;; storing the values of CMAKE_SOURCE_DIR and
@@ -6702,7 +6715,7 @@ (define-public dealii-openmpi
scalapack)))
(propagated-inputs
(modify-inputs (package-propagated-inputs dealii)
- (delete "hdf5" "sundials")
+ (delete "hdf5" "kokkos" "sundials")
(prepend hdf5-parallel-openmpi
openmpi
p4est-openmpi
@@ -6713,7 +6726,12 @@ (define-public dealii-openmpi
(arguments
(substitute-keyword-arguments (package-arguments dealii)
((#:configure-flags flags)
- #~(cons "-DDEAL_II_WITH_MPI=ON" #$flags))))
+ #~(cons "-DDEAL_II_WITH_MPI=ON" #$flags))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ ;; The build failure fixed by this phase does not manifest when
+ ;; Kokkos is included via Trilinos.
+ (delete 'unset-cpath)))))
(synopsis "Finite element library (with MPI support)")))
(define-public flann
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#66516] [PATCH 1/2] gnu: Add kokkos.
2023-10-13 12:35 ` [bug#66516] [PATCH 1/2] gnu: Add kokkos Paul A. Patience
@ 2023-10-13 14:27 ` Paul A. Patience
0 siblings, 0 replies; 5+ messages in thread
From: Paul A. Patience @ 2023-10-13 14:27 UTC (permalink / raw)
To: 66516
Hi,
Come to think of it, I placed kokkos in gnu/packages/maths.scm only so
that it would be right above trilinos-for-dealii-openmpi, because
Trilinos includes a version of Kokkos.
However, it seems that Kokkos is a project in its own right; perhaps it
should go into gnu/packages/cpp.scm, near where I placed Taskflow in
https://bugs.gnu.org/66521.
If you think this is a good idea, feel free to make the change or
request that I do so.
Best regards,
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#66516: [PATCH 0/2] gnu: dealii: Update to 9.5.1.
2023-10-13 12:33 [bug#66516] [PATCH 0/2] gnu: dealii: Update to 9.5.1 Paul A. Patience
2023-10-13 12:35 ` [bug#66516] [PATCH 1/2] gnu: Add kokkos Paul A. Patience
2023-10-13 12:35 ` [bug#66516] [PATCH 2/2] gnu: dealii: Update to 9.5.1 Paul A. Patience
@ 2023-10-14 20:39 ` Ludovic Courtès
2 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-10-14 20:39 UTC (permalink / raw)
To: Paul A. Patience; +Cc: 66516-done
"Paul A. Patience" <paul@apatience.com> skribis:
> The prerequisite-patch-id refers to the Trilinos build fix [1], which is not
> strictly required (dealii-openmpi will just not build without it).
>
> Unfortunately, I am flummoxed by the unset-cpath phase's fixing the build with
> Kokkos.
Yeah, #include_next is super sensitive to CPATH and duplicated entries
therein, so I’m unfortunately not surprised.
> gnu: Add kokkos.
> gnu: dealii: Update to 9.5.1.
Applied, and I moved Kokkos to cpp.scm as you suggested.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-14 20:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13 12:33 [bug#66516] [PATCH 0/2] gnu: dealii: Update to 9.5.1 Paul A. Patience
2023-10-13 12:35 ` [bug#66516] [PATCH 1/2] gnu: Add kokkos Paul A. Patience
2023-10-13 14:27 ` Paul A. Patience
2023-10-13 12:35 ` [bug#66516] [PATCH 2/2] gnu: dealii: Update to 9.5.1 Paul A. Patience
2023-10-14 20:39 ` bug#66516: [PATCH 0/2] " Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.