Hi,
with the attached patches Jochen and I could successfully separated the
Kokkos (v4.5.1) package from the Trilinos (v16.1.0) package.
Kokkos is still closely related to Trilinos but by now developed and
maintained externally.
For downstream users of Kokkos this is more obvious if a separate kokkos
package is available.
To give an example: PETSc which is independent of Trilinos can take a
dependency on Kokkos
(https://petsc.org/release/install/install/#installing-petsc-to-use-gpus-and-accelerators).
We have successfully rebuild Kokkos and Trilinos packages with the
patches below.
Additionally, we have tested the update process of deal.ii package which
was build against a Trilinos version containing Kokkos to a Trilinos
version which has been build with an external Kokkos package in Debian
testing.
Some comments on future updates of Trilinos and Kokkos.
To my knowledge Trilinos is always tested and compiled with a specific
version of Kokkos.
Therefore, a future update of one of these packages (Trilinos,Kokkos)
will require an update of the other package as well if Trilinos is not
configured with Tpetra_IGNORE_KOKKOS_COMPATIBILITY.
Below are two diffs which can be applied to the Kokkos and the Trilinos
package.
Then Trilinos would depend on the Kokkos Debian package.
The libtrilinos-kokkos-16.1 and libtrilinos-kokkos-dev packages are
replaced by transitional packages which can be removed at a later stage.
Are there any change requests, recommendations, or objections to these
changes?
Before we apply any of these changes we wait until #1120018 is closed.
Best,
Nils
Kokkos diff:
diff --git a/debian/changelog b/debian/changelog
index 1e3efa5..7ed57d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+kokkos (4.5.01-1.3) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Package transition from Trilinos-Kokkos to Kokkos (Closes:
#1101487)
+ * Enable serial backend of Kokkos required to build Trilinos
+ * Create transitional package for libtrilinos-kokkos-dev,
+ libtrilinos-kokkos-16.1
+
+ -- Nils Schild <[email protected]> Sat, 27 Sep 2025 15:52:08
+0200
+
kokkos (4.5.01-1.2) unstable; urgency=medium
* Non-maintainer upload.
diff --git a/debian/control b/debian/control
index cd74df4..9f752a7 100644
--- a/debian/control
+++ b/debian/control
@@ -29,9 +31,9 @@ Package: libkokkos4.5
Architecture: any
Multi-Arch: same
Section: libs
-Depends:
- ${shlibs:Depends},
- ${misc:Depends}
+Breaks: libtrilinos-kokkos-16.1 (<< 16.1.0-2.1)
+Replaces: libtrilinos-kokkos-16.1 (<< 16.1.0-2.1)
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: C++ Performance Portability Programming
This implements a programming model in C++ for writing performance
portable applications targeting all major HPC platforms. For that
purpose it
@@ -45,6 +47,8 @@ Package: libkokkos-dev
Architecture: any
Multi-Arch: same
Section: libdevel
+Breaks: libtrilinos-kokkos-dev (<< 16.1.0-2.1)
+Replaces: libtrilinos-kokkos-dev (<< 16.1.0-2.1)
Depends:
${misc:Depends},
libkokkos4.5 (= ${binary:Version}),
@@ -58,3 +62,4 @@ Description: C++ Performance Portability Programming
backends in development.
.
This is a development package of kokkos.
+
diff --git a/debian/rules b/debian/rules
index cfa53bf..81ac75a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,7 @@ endif
override_dh_auto_configure:
dh_auto_configure -- \
-DBUILD_SHARED_LIBS=ON \
+ -DKokkos_ENABLE_SERIAL=ON \
-DKokkos_ENABLE_OPENMP=ON \
$(RUN_TESTS)
Trilinos diff:
diff --git a/debian/changelog b/debian/changelog
index 1e64a892b3..56b0a5272e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+trilinos (16.1.0-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Transition package Trilinos-Kokkos to Kokkos
+ * Enable OpenMP for Kokkos package compatibility
+
+ -- Nils Schild <[email protected]> Sat, 27 Sep 2025 19:07:14
+0200
+
trilinos (16.1.0-2) unstable; urgency=medium
* Revert 'switch to mold linker', it seems to have
diff --git a/debian/control b/debian/control
index d0bb41076a..488cf1f360 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,8 @@ Build-Depends: debhelper-compat (= 13),
libmumps-dev (>= 4.10),
libptscotch-dev (>= 6.0.3),
openmpi-bin,
- zlib1g-dev
+ zlib1g-dev,
+ libkokkos-dev
Build-Depends-Indep: bc,
doxygen,
ghostscript,
@@ -54,7 +55,7 @@ Package: trilinos-dev
Architecture: any
Multi-Arch: same
Section: libs
-Depends: ${misc:Depends}
+Depends: libkokkos-dev, ${misc:Depends}
Suggests: trilinos-doc
Description: object-oriented framework for large-scale problems -
development files
The Trilinos Project is an effort to develop algorithms and enabling
@@ -65,6 +66,22 @@ Description: object-oriented framework for
large-scale problems - development fi
.
This package contains the development header and some makefile
templates.
+Package: libtrilinos-kokkos-16.1
+Depends: libkokkos4.5, ${misc:Depends}
+Architecture: all
+Priority: optional
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
+
+Package: libtrilinos-kokkos-dev
+Depends: libkokkos-dev, ${misc:Depends}
+Architecture: all
+Priority: optional
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
+
Package: libtrilinos-amesos-16.1
Architecture: any
Multi-Arch: same
@@ -436,37 +453,6 @@ Description: partitioning, load balancing, coloring
of sparse matrices - develop
.
This package provides headers.
-Package: libtrilinos-kokkos-16.1
-Architecture: any
-Multi-Arch: same
-Section: libs
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Trilinos Kokkos programming model - runtime files
- Kokkos 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. It currently
can use
- OpenMP, Pthreads and CUDA as backend programming models.
- .
- This package contains the dynamic libraries.
-
-Package: libtrilinos-kokkos-dev
-Architecture: any
-Multi-Arch: same
-Section: libdevel
-Depends: libtrilinos-kokkos-16.1 (= ${binary:Version}), trilinos-dev,
${misc:Depends}
-Suggests: trilinos-doc
-Description: Trilinos Kokkos programming model - development files
- Kokkos 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. It currently
can use
- OpenMP, Pthreads and CUDA as backend programming models.
- .
- This package provides headers.
-
Package: libtrilinos-kokkos-kernels-16.1
Architecture: any
Multi-Arch: same
diff --git a/debian/rules b/debian/rules
index 728a78d3de..9223462e2c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,6 @@ LIB_PACKAGES = \
intrepid \
intrepid2 \
isorropia \
- kokkos \
kokkos-kernels \
ml \
muelu \
@@ -123,9 +122,7 @@ configure-stamp:
-DTrilinos_ENABLE_Intrepid:BOOL=ON \
-DTrilinos_ENABLE_Intrepid2:BOOL=ON \
-DTrilinos_ENABLE_Isorropia:BOOL=ON \
- -DTrilinos_ENABLE_Kokkos:BOOL=ON \
- -DKokkosCore_ENABLE_TESTS:BOOL=OFF \
- -DKokkos_ENABLE_TESTS:BOOL=OFF \
+ -DTrilinos_ENABLE_OpenMP:BOOL=ON \
-DTrilinos_ENABLE_KokkosKernels:BOOL=ON \
-DKokkosKernels_ENABLE_TESTS:BOOL=OFF \
-DTrilinos_ENABLE_ML:BOOL=ON \
@@ -174,6 +171,7 @@ configure-stamp:
-DTPL_ENABLE_HDF5:BOOL=ON \
-DHDF5_INCLUDE_DIRS:PATH=/usr/include/hdf5/openmpi/ \
-DHDF5_LIBRARY_DIRS:PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/openmpi/ \
+ -DTPL_ENABLE_Kokkos:BOOL=ON \
-DTPL_ENABLE_Matio:BOOL=OFF \
-DTPL_ENABLE_MATLAB:BOOL=OFF \
-DTPL_ENABLE_MPI:BOOL=ON \