Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
19b1a67
Add Kokkos numerics core support
rochi00 May 6, 2026
37c9464
Fix Kokkos backend device and link support
rochi00 May 6, 2026
1d82eb8
Add Kokkos numerics oracle tests
rochi00 May 6, 2026
2ddeb11
Regenerate configure and Makefile.in files
rochi00 May 6, 2026
a326237
Add Kokkos FE implementation headers
rochi00 May 5, 2026
bebe8b7
Add Kokkos FE oracle test suite
rochi00 May 5, 2026
4cc3a11
Fix installed Kokkos FE header support
rochi00 May 6, 2026
9b1aa45
Export enum_fe_elem_class header
rochi00 May 6, 2026
c9dab84
Add Kokkos configuration and device plumbing
rochi00 May 8, 2026
3d8327b
Make vector and tensor value types device-usable
rochi00 May 8, 2026
ad6101f
Add Kokkos numerics storage and operator headers
rochi00 May 8, 2026
de66cbd
Add Kokkos numerics oracle test infrastructure
rochi00 May 8, 2026
acb22ee
Add Kokkos vector and tensor oracle tests
rochi00 May 8, 2026
63d0098
Regenerate configure and Makefile.in files
rochi00 May 8, 2026
7daa2e6
Include method CXX flags in pkg-config cflags
rochi00 May 11, 2026
57b4840
Run tensor foundation oracle on device
rochi00 May 11, 2026
93fee21
Make Point constructors device-callable
rochi00 May 11, 2026
77d0333
Inline tensor equality into constrained operators
rochi00 May 12, 2026
d26c43a
Differentiate leading tensor determinant helper
rochi00 May 12, 2026
ac897f2
Inline vector equality and remove contract shim
rochi00 May 12, 2026
e83887c
Hide tensor helper API and share in-place Kokkos ops
rochi00 May 12, 2026
b4d1336
Make remaining tensor helpers internal-only
rochi00 May 12, 2026
ee53d8b
Reduce Kokkos algebra wrapper layers
rochi00 May 12, 2026
b93e873
Update vector oracle to use Kokkos ref operators
rochi00 May 12, 2026
c8427b1
Rename tensor combination kernel
rochi00 May 12, 2026
37230df
Forward libMesh error macros into device code
rochi00 May 12, 2026
1b773ea
Probe Kokkos toolchain configuration
rochi00 May 12, 2026
2ca983d
Regenerate configure and tests Makefile.in
rochi00 May 12, 2026
3a89c4c
Force C++ mode for Kokkos configure probe
rochi00 May 12, 2026
e6ddbe6
Add Kokkos FE implementation headers
rochi00 May 5, 2026
c21018b
Add Kokkos FE oracle test suite
rochi00 May 5, 2026
5ebe357
Fix installed Kokkos FE header support
rochi00 May 6, 2026
0f30e7b
Export enum_fe_elem_class header
rochi00 May 6, 2026
f7fdf89
Share FE kernels and reference traits with Kokkos FE
rochi00 May 12, 2026
2ffc6ca
Share Kokkos FE shape dispatch with oracle tests
rochi00 May 12, 2026
5d30593
Share FE reference traits across host and Kokkos
rochi00 May 13, 2026
befa74f
Add native Kokkos Hilbert system path
rochi00 May 14, 2026
11d632e
Refine Kokkos Hilbert assembly storage path
rochi00 May 17, 2026
9d39177
Merge origin/kokkos-fe-refactor
rochi00 May 17, 2026
ffc51d0
Refine Kokkos Hilbert direct PETSc storage
rochi00 May 19, 2026
55102af
Fix libMesh Kokkos autotools CUDA wiring
rochi00 May 19, 2026
a8b02f9
Use Kokkos compiler for Kokkos-enabled builds
rochi00 May 19, 2026
e503260
Move Kokkos compiler selection into configure
rochi00 May 19, 2026
f5959ea
Initialize AM_CXXFLAGS for Kokkos build flags
rochi00 May 19, 2026
24b2525
Require nvcc_wrapper for CUDA Kokkos builds
rochi00 May 19, 2026
0083a70
Preserve MPI link flags for Kokkos wrapper builds
rochi00 May 20, 2026
4203587
Teach nvcc_wrapper the MPI host compiler
rochi00 May 20, 2026
46b89c0
Shim nvcc_wrapper for automake deps
rochi00 May 20, 2026
4392154
Use absolute path for nvcc_wrapper shim
rochi00 May 20, 2026
6ad97cb
Split Kokkos device error macros by compilation pass
rochi00 May 20, 2026
973098c
Keep libmesh_error_msg on the host error path
rochi00 May 20, 2026
3ec0e0c
Split HilbertSystem Kokkos implementation
rochi00 May 20, 2026
3e44e08
Hide Kokkos headers from host HilbertSystem code
rochi00 May 20, 2026
802c4d1
Hide core Kokkos cache types from host TUs
rochi00 May 20, 2026
ced70eb
Drop global Kokkos host build flag injection
rochi00 May 20, 2026
34ec57d
Match Kokkos storage layout and fix cache deleters
rochi00 May 20, 2026
7207410
Compile split Kokkos sources explicitly
rochi00 May 20, 2026
b34230f
Use raw nvcc for Kokkos CUDA compilation
rochi00 May 20, 2026
b2dbcb4
Regenerate libmesh include symlink makefile
rochi00 May 20, 2026
eeb9c29
Regenerate Kokkos build makefiles
rochi00 May 20, 2026
e525c40
Fix Kokkos parsed function forward declarations
rochi00 May 20, 2026
3a51075
Avoid duplicate Kokkos parsed defaults
rochi00 May 20, 2026
be1c611
Avoid libMesh Kokkos namespace ambiguity
rochi00 May 20, 2026
8a0a010
Fix HilbertSystem Kokkos namespace split
rochi00 May 20, 2026
e831cc5
Fix HilbertSystem Kokkos scope imports
rochi00 May 20, 2026
698d9a5
Make shared FE and quadrature accessors device safe
rochi00 May 21, 2026
db50e0f
Fix MPI rpath handling in Kokkos libmesh links
rochi00 May 21, 2026
67d54a1
Keep Kokkos flags out of host link lines
rochi00 May 21, 2026
6ba43f3
Split calculator Kokkos build from host libmesh links
rochi00 May 21, 2026
66e1781
Restore raw nvcc Kokkos configure path
rochi00 May 21, 2026
5f2228c
Keep raw nvcc links off MPI wrapper flags
rochi00 May 21, 2026
94a0260
Preserve C++ standard flags in Kokkos probe
rochi00 May 21, 2026
9cb5405
Propagate PETSc CUDA arch into Kokkos configure
rochi00 May 21, 2026
14ad870
Fix Kokkos include symlink rules in Makefile.in
rochi00 May 22, 2026
2d59c60
Add Kokkos header symlink prerequisites
rochi00 May 22, 2026
c43fd18
Sanitize CUDA probe link flags
rochi00 May 22, 2026
f449dcf
Sanitize MPI flags in CUDA probe
rochi00 May 22, 2026
4fdd7a4
Link Kokkos objects into libmesh
rochi00 May 22, 2026
420e258
Split calculator Kokkos translation units
rochi00 May 22, 2026
ca9d6e7
Use discovered MPI link flags in Kokkos probe
rochi00 May 22, 2026
4184420
Fix calculator Kokkos app build rules
rochi00 May 22, 2026
661ebbd
Fix Kokkos backend handling in configure probe
rochi00 May 22, 2026
c30b970
Relax caller-provided Kokkos configure probe
rochi00 May 22, 2026
5f6d812
Fix L2system Kokkos calculator build split
rochi00 May 22, 2026
ad39a95
Split L2system Kokkos app backend from host code
rochi00 May 25, 2026
b87295f
Refactor Kokkos FE tests into shared dbg/opt runners
rochi00 May 25, 2026
b354200
Remove dead Kokkos oracle wrappers
rochi00 May 25, 2026
095db31
Stabilize Kokkos FE refactor build and tests
rochi00 May 25, 2026
40a1632
Fix Kokkos runtime initialization and cache setup
rochi00 May 26, 2026
e1493ab
Refresh generated autotools files
rochi00 May 18, 2026
317671e
Move Kokkos configuration to its own m4
roystgnr May 20, 2026
76729c9
Re-bootstrap
roystgnr May 20, 2026
24c7d5b
Give some messages when Kokkos is disabled
roystgnr May 20, 2026
6a0cf56
Re-bootstrap
roystgnr May 20, 2026
21a7350
Add independent Kokkos include/lib options
roystgnr May 20, 2026
9b555e7
Re-bootstrap
roystgnr May 20, 2026
d0bf004
Don't request GNU extensions
roystgnr May 20, 2026
012cd61
Re-bootstrap
roystgnr May 20, 2026
7ac6887
Add --enable-kokkos-required configure option
roystgnr May 20, 2026
62e0272
Re-bootstrap
roystgnr May 20, 2026
17dff46
Cleaner error message
roystgnr May 20, 2026
302a9c2
More error message cleanup
roystgnr May 20, 2026
b727063
Fixup
roystgnr May 20, 2026
e15c6ae
Re-bootstrap
roystgnr May 20, 2026
97b3eb0
Strip KOKKOS_MPI_CPPFLAGS of conflicts
roystgnr May 20, 2026
bcefb59
Re-bootstrap
roystgnr May 20, 2026
d97e03c
Don't strip an $MPI_INCLUDES, do comment code
roystgnr May 20, 2026
693a485
Fix MPICH+Kokkos case
roystgnr May 20, 2026
5bb132e
Re-bootstrap
roystgnr May 20, 2026
61c931d
Propagate PETSc CUDA arch into Kokkos configure
rochi00 May 21, 2026
8b44fe1
Update MetaPhysicL for Kokkos test build fix
rochi00 May 22, 2026
6204074
Refresh generated libMesh configure script
rochi00 May 22, 2026
0b393b0
Update MetaPhysicL for TimPI flag fix
rochi00 May 24, 2026
273bb83
Use kokkos-build-numerics configure wiring
May 26, 2026
a44e84f
Align Kokkos macro with build-numerics
May 26, 2026
85fc5fa
Update MetaPhysicL to rebased bootstrapped commit
May 26, 2026
c30f9f6
Update MetaPhysicL to reviewed bootstrapped commit
May 26, 2026
6f0b7dc
Filter MPI wrapper flags for Kokkos nvcc builds
May 26, 2026
ea42b98
Avoid host CXXFLAGS in Kokkos compile rules
May 26, 2026
1a3b0fc
Use only Kokkos CXXFLAGS for Kokkos sources
May 26, 2026
ff660d0
Use single-token NVCC language flag
May 26, 2026
3594391
Update generated Kokkos configure flags
May 26, 2026
66522ac
Update generated Kokkos object rules
May 26, 2026
5f4e3d7
Update MetaPhysicL bootstrapped submodule
May 27, 2026
097fb92
Match MOOSE nvcc language flag
May 27, 2026
b6fc1d9
Place Kokkos nvcc flags before host flags
May 27, 2026
3875b6d
Avoid iquote in Kokkos nvcc rules
May 27, 2026
cb85963
Make reference element tables inline constexpr
May 27, 2026
4897861
Use device inline reference element table accessors
May 27, 2026
313576c
Let LibMeshInit own Kokkos lifetime for calculator
May 27, 2026
d609a0c
Keep host L2 calculator path off Kokkos goal cache
May 27, 2026
5591727
Use host geometry metadata in L2 Kokkos planning
May 27, 2026
8c338c4
Finalize PETSc before Kokkos
May 27, 2026
8adb4ee
Use PETSc COO values for Kokkos L2 assembly
May 27, 2026
71ccf25
Use PETSc COO values for Kokkos L2 RHS
May 27, 2026
107793a
Fix Kokkos L2 parsed goal capture
May 27, 2026
2daa407
Fix Kokkos L2 diagnostic scope
May 27, 2026
8d370c3
Avoid zero-solution Kokkos FE interpolation
May 27, 2026
461286d
Diagnose Kokkos L2 residual inputs
May 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 191 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,171 @@ export TAR_OPTIONS
# codes. These will be augmented with method-specific
# cppflags later on
AM_CPPFLAGS = -DLIBMESH_IS_COMPILING_ITSELF \
-iquote $(top_builddir)/include \
-iquote $(top_srcdir)/contrib/netgen \
$(libmesh_contrib_INCLUDES) \
$(libmesh_optional_INCLUDES) \
-I$(top_builddir)/include # required for libmesh_version.h

# nvcc does not reliably treat GCC-style two-token -iquote options as
# preprocessor options, so keep Kokkos .K rules on -I include paths.
KOKKOS_AM_CPPFLAGS = -DLIBMESH_IS_COMPILING_ITSELF \
-I$(top_builddir)/include \
-I$(top_srcdir)/contrib/netgen \
$(libmesh_contrib_INCLUDES) \
$(libmesh_optional_INCLUDES) \
-I$(top_builddir)/include # required for libmesh_version.h

if LIBMESH_ENABLE_KOKKOS
KOKKOS_LIBMESH_DBG_OBJECTS = src/base/dof_map_kokkos_dbg.lo src/base/libmesh_kokkos_dbg.lo src/mesh/mesh_base_kokkos_dbg.lo
KOKKOS_LIBMESH_DEVEL_OBJECTS = src/base/dof_map_kokkos_devel.lo src/base/libmesh_kokkos_devel.lo src/mesh/mesh_base_kokkos_devel.lo
KOKKOS_LIBMESH_OPT_OBJECTS = src/base/dof_map_kokkos_opt.lo src/base/libmesh_kokkos_opt.lo src/mesh/mesh_base_kokkos_opt.lo
KOKKOS_LIBMESH_PROF_OBJECTS = src/base/dof_map_kokkos_prof.lo src/base/libmesh_kokkos_prof.lo src/mesh/mesh_base_kokkos_prof.lo
KOKKOS_LIBMESH_OPROF_OBJECTS = src/base/dof_map_kokkos_oprof.lo src/base/libmesh_kokkos_oprof.lo src/mesh/mesh_base_kokkos_oprof.lo

include/libmesh/dof_map_kokkos.h:
@$(MAKE) -C $(top_builddir)/include/libmesh dof_map_kokkos.h

include/libmesh/mesh_base_kokkos.h:
@$(MAKE) -C $(top_builddir)/include/libmesh mesh_base_kokkos.h

src/base/dof_map_kokkos_dbg.lo: src/base/dof_map_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DBG) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/dof_map_kokkos_devel.lo: src/base/dof_map_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DEVEL) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/dof_map_kokkos_opt.lo: src/base/dof_map_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_OPT) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/dof_map_kokkos_prof.lo: src/base/dof_map_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_PROF) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/dof_map_kokkos_oprof.lo: src/base/dof_map_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_OPROF) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/libmesh_kokkos_dbg.lo: src/base/libmesh_kokkos.K
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DBG) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/libmesh_kokkos_devel.lo: src/base/libmesh_kokkos.K
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DEVEL) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/libmesh_kokkos_opt.lo: src/base/libmesh_kokkos.K
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_OPT) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/libmesh_kokkos_prof.lo: src/base/libmesh_kokkos.K
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_PROF) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/base/libmesh_kokkos_oprof.lo: src/base/libmesh_kokkos.K
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_OPROF) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/mesh/mesh_base_kokkos_dbg.lo: src/mesh/mesh_base_kokkos.K include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DBG) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/mesh/mesh_base_kokkos_devel.lo: src/mesh/mesh_base_kokkos.K include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DEVEL) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/mesh/mesh_base_kokkos_opt.lo: src/mesh/mesh_base_kokkos.K include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_OPT) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/mesh/mesh_base_kokkos_prof.lo: src/mesh/mesh_base_kokkos.K include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_PROF) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/mesh/mesh_base_kokkos_oprof.lo: src/mesh/mesh_base_kokkos.K include/libmesh/mesh_base_kokkos.h
$(LIBTOOL) $(AM_V_lt) --tag=CXX --mode=compile $(KOKKOS_CXX) \
$(KOKKOS_CXXFLAGS) \
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_OPROF) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

if LIBMESH_ENABLE_PETSC
if LIBMESH_ENABLE_COMPLEX
KOKKOS_CALCULATOR_DBG_OBJECTS =
KOKKOS_CALCULATOR_DEVEL_OBJECTS =
KOKKOS_CALCULATOR_OPT_OBJECTS =
else
KOKKOS_CALCULATOR_DBG_OBJECTS = src/apps/L2system_kokkos_dbg.o
KOKKOS_CALCULATOR_DEVEL_OBJECTS = src/apps/L2system_kokkos_devel.o
KOKKOS_CALCULATOR_OPT_OBJECTS = src/apps/L2system_kokkos_opt.o

src/apps/L2system_kokkos_dbg.o: src/apps/L2system_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(KOKKOS_CXX) $(KOKKOS_CXXFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DBG) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/apps/L2system_kokkos_devel.o: src/apps/L2system_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(KOKKOS_CXX) $(KOKKOS_CXXFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_DEVEL) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<

src/apps/L2system_kokkos_opt.o: src/apps/L2system_kokkos.K include/libmesh/dof_map_kokkos.h include/libmesh/mesh_base_kokkos.h
$(KOKKOS_CXX) $(KOKKOS_CXXFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(CPPFLAGS_OPT) $(KOKKOS_AM_CPPFLAGS) $(CPPFLAGS) $(KOKKOS_MPI_CPPFLAGS) $(KOKKOS_CPPFLAGS) \
-c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
endif
else
KOKKOS_CALCULATOR_DBG_OBJECTS =
KOKKOS_CALCULATOR_DEVEL_OBJECTS =
KOKKOS_CALCULATOR_OPT_OBJECTS =
endif
endif

LIBS = $(libmesh_optional_LIBS) $(libmesh_precision_LIBS)

# additional files which must be included in 'make dist'
Expand Down Expand Up @@ -268,7 +429,7 @@ if LIBMESH_DBG_MODE
libmesh_dbg_la_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
libmesh_dbg_la_CXXFLAGS = $(CXXFLAGS_DBG)
libmesh_dbg_la_CFLAGS = $(CFLAGS_DBG)
libmesh_dbg_la_LIBADD = contrib/libcontrib_dbg.la $(LIBS)
libmesh_dbg_la_LIBADD = contrib/libcontrib_dbg.la $(KOKKOS_LIBMESH_DBG_OBJECTS) $(LIBS)
endif

if LIBMESH_DEVEL_MODE
Expand All @@ -277,7 +438,7 @@ if LIBMESH_DEVEL_MODE
libmesh_devel_la_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
libmesh_devel_la_CXXFLAGS = $(CXXFLAGS_DEVEL)
libmesh_devel_la_CFLAGS = $(CFLAGS_DEVEL)
libmesh_devel_la_LIBADD = contrib/libcontrib_devel.la $(LIBS)
libmesh_devel_la_LIBADD = contrib/libcontrib_devel.la $(KOKKOS_LIBMESH_DEVEL_OBJECTS) $(LIBS)
endif

if LIBMESH_OPT_MODE
Expand All @@ -286,7 +447,7 @@ if LIBMESH_OPT_MODE
libmesh_opt_la_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
libmesh_opt_la_CXXFLAGS = $(CXXFLAGS_OPT)
libmesh_opt_la_CFLAGS = $(CFLAGS_OPT)
libmesh_opt_la_LIBADD = contrib/libcontrib_opt.la $(LIBS)
libmesh_opt_la_LIBADD = contrib/libcontrib_opt.la $(KOKKOS_LIBMESH_OPT_OBJECTS) $(LIBS)
endif

if LIBMESH_PROF_MODE
Expand All @@ -295,7 +456,7 @@ if LIBMESH_PROF_MODE
libmesh_prof_la_CPPFLAGS = $(CPPFLAGS_PROF) $(AM_CPPFLAGS)
libmesh_prof_la_CXXFLAGS = $(CXXFLAGS_PROF)
libmesh_prof_la_CFLAGS = $(CFLAGS_PROF)
libmesh_prof_la_LIBADD = contrib/libcontrib_prof.la $(LIBS)
libmesh_prof_la_LIBADD = contrib/libcontrib_prof.la $(KOKKOS_LIBMESH_PROF_OBJECTS) $(LIBS)
endif

if LIBMESH_OPROF_MODE
Expand All @@ -304,7 +465,7 @@ if LIBMESH_OPROF_MODE
libmesh_oprof_la_CPPFLAGS = $(CPPFLAGS_OPROF) $(AM_CPPFLAGS)
libmesh_oprof_la_CXXFLAGS = $(CXXFLAGS_OPROF)
libmesh_oprof_la_CFLAGS = $(CFLAGS_OPROF)
libmesh_oprof_la_LIBADD = contrib/libcontrib_oprof.la $(LIBS)
libmesh_oprof_la_LIBADD = contrib/libcontrib_oprof.la $(KOKKOS_LIBMESH_OPROF_OBJECTS) $(LIBS)
endif

# Make sure we build the library before we test it
Expand Down Expand Up @@ -468,6 +629,31 @@ calculator_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
calculator_dbg_CXXFLAGS = $(CXXFLAGS_DBG)
calculator_dbg_LDADD = libmesh_dbg.la

if LIBMESH_ENABLE_KOKKOS
if LIBMESH_ENABLE_PETSC
if LIBMESH_ENABLE_COMPLEX
else
calculator_opt_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS)
calculator_opt_LDADD += $(KOKKOS_CALCULATOR_OPT_OBJECTS) $(KOKKOS_LIBS)
calculator_opt_LINK = \
$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(KOKKOS_CXX) \
$(calculator_opt_LDFLAGS) $(LDFLAGS) -o $@

calculator_devel_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS)
calculator_devel_LDADD += $(KOKKOS_CALCULATOR_DEVEL_OBJECTS) $(KOKKOS_LIBS)
calculator_devel_LINK = \
$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(KOKKOS_CXX) \
$(calculator_devel_LDFLAGS) $(LDFLAGS) -o $@

calculator_dbg_LDFLAGS = $(AM_LDFLAGS) $(KOKKOS_LDFLAGS)
calculator_dbg_LDADD += $(KOKKOS_CALCULATOR_DBG_OBJECTS) $(KOKKOS_LIBS)
calculator_dbg_LINK = \
$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(KOKKOS_CXX) \
$(calculator_dbg_LDFLAGS) $(LDFLAGS) -o $@
endif
endif
endif

# compare
opt_programs += compare-opt
compare_opt_SOURCES = src/apps/compare.C
Expand Down
Loading