Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kokkos + KokkosKernels Promotion To Version 2.5.00 #2078

Merged
merged 27 commits into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
afcd4f0
Use new kokkos functionality
kruger Oct 18, 2017
620c090
Changes based on MH code review
kruger Oct 22, 2017
b6773c0
Update based on namechange in kokkos.
kruger Nov 29, 2017
e85c264
More name change fixes.
kruger Nov 29, 2017
6e8b7f5
More name changes.
kruger Nov 29, 2017
7a76582
Automatic snapshot commit from tribits at 1fd597c
bartlettroscoe Nov 30, 2017
1aed80c
Merge branch 'trilinos-kokkos-1400' into kokkos-promotion
crtrott Dec 1, 2017
9cba202
Fix renaming of a make target
crtrott Dec 1, 2017
845e4c4
Setting CMAKE_CXX_FLAGS based on KOKKOS_CXX_FLAGS
crtrott Dec 1, 2017
c3930c8
Skip TriBITS setting C++11 and OpenMP flags when Kokkos flags are use…
bartlettroscoe Dec 1, 2017
191250f
Automatic snapshot commit from tribits at b9d3531
bartlettroscoe Dec 2, 2017
43d3446
Merge branch 'tribits_github_snapshot' into kokkos-promotion (#1400)
bartlettroscoe Dec 2, 2017
bd99f0c
Use RST table format, not raw text (#1400)
bartlettroscoe Dec 2, 2017
ff80e92
Simplify RST table and add some more text to Kokkos config (#1400)
bartlettroscoe Dec 2, 2017
bdb9cda
More fixes for CMake doc (#1400)
bartlettroscoe Dec 2, 2017
c5b265b
Merge remote-tracking branch 'rab-github/enable-scotch-2051' into kok…
bartlettroscoe Dec 5, 2017
69f6580
Merge branch 'develop' into kokkos-promotion
crtrott Dec 11, 2017
ec7fa08
Fixing usage of Experimental KokkosKernels Handle after interface change
crtrott Dec 12, 2017
bb94901
ShyLu: Check whether kokkos tasking is enabled, fix bugs on Power
crtrott Dec 12, 2017
bc18c90
Assert Kokkos var name (#2075)
bartlettroscoe Dec 12, 2017
edf05cf
ShyLU Basker: Change KOKKOS_HAVE_OPENMP to KOKKOS_ENABLE_OPENMP
ndellingwood Dec 12, 2017
9cb7526
ShyLU Basker: Replace KOKKOS_HAVE_OPENMP with KOKKOS_ENABLE_OPENMP
ndellingwood Dec 12, 2017
a065ec9
ShyLu doesn't work with the Kokkos Pthreads backend right now
crtrott Dec 12, 2017
523ff16
Fix typo
crtrott Dec 13, 2017
bb52522
Stokhos/Sacado fix KOKKOS Macro usage
crtrott Dec 14, 2017
38962a1
Snapshot of kokkos from commit 62e760fa7d3b9e65ac170c8ca1ef5c1b39c8e818
crtrott Dec 15, 2017
f303cb3
Snapshot of kokkos-kernels from commit 00b16484786e45bb4cf5ce3ab659b2…
crtrott Dec 15, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
61 changes: 61 additions & 0 deletions cmake/ProjectCompilerPostConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
IF (${Trilinos_ENABLE_Kokkos})

# This is where to generate the gen_kokkos.cmake and KokkosCore_config.h
# that we will use in the configuration
set(Kokkos_GEN_DIR ${CMAKE_BINARY_DIR})

# Basic initialization (Used in KOKKOS_SETTINGS)
set(KOKKOS_SRC_PATH ${Kokkos_SOURCE_DIR})
set(KOKKOS_PATH ${KOKKOS_SRC_PATH})

#------------ COMPILER AND FEATURE CHECKS ------------------------------------
include(${KOKKOS_SRC_PATH}/cmake/kokkos_functions.cmake)
set_kokkos_cxx_compiler()
set_kokkos_cxx_standard()

#------------ GET OPTIONS ----------------------------------------------------
set(KOKKOS_CMAKE_VERBOSE True)
set(KOKKOS_HAS_TRILINOS True)
include(${KOKKOS_SRC_PATH}/cmake/kokkos_options.cmake)

#------------ COMPUTE KOKKOS_SETTINGS ----------------------------------------
include(${KOKKOS_SRC_PATH}/cmake/kokkos_settings.cmake)

#------------ GENERATE HEADER AND SOURCE FILES -------------------------------
execute_process(
COMMAND ${KOKKOS_SETTINGS} make -f ${KOKKOS_SRC_PATH}/cmake/Makefile.generate_cmake_settings CXX=${CMAKE_CXX_COMPILER} generate_build_settings
WORKING_DIRECTORY "${Kokkos_GEN_DIR}"
OUTPUT_FILE ${Kokkos_GEN_DIR}/core_src_make.out
RESULT_VARIABLE res
)
include(${Kokkos_GEN_DIR}/kokkos_generated_settings.cmake)

IF (NOT KOKKOS_ARCH STREQUAL "None")

# Convert CMakeList into string for CXX_FLAGS
set(CMAKE_CXX_FLAGSl "")
foreach(opt ${KOKKOS_CXX_FLAGS})
set(CMAKE_CXX_FLAGSl "${CMAKE_CXX_FLAGSl} ${opt}")
endforeach()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGSl}")

# TODO -- need to remove the -lkokkos. Check on LDFlags
#set(KOKKOS_LINK_DEPENDS libkokkos.a CACHE STRING "")
#set(KOKKOS_LIBS -lkokkos -ldl -lpthread CACHE STRING "")
#set(KOKKOS_LDFLAGS -L/scr_gabrielle/kruger/builds-ptsolve/trilinos/par2 --gcc-toolchain=/usr CACHE STRING "")

MESSAGE("-- " "Skip adding flags for C++11 because Kokkos flags does that ...")
SET(${PROJECT_NAME}_CXX11_FLAGS " ")

MESSAGE("-- " "Skip adding flags for OpenMP because Kokkos flags does that ...")
SET(OpenMP_CXX_FLAGS_OVERRIDE " ")

ENDIF()

# Above, It is important not to distrube the default configuraiton of
# Trilinos if KOKKOS_ARCH is not set. But the implementation of the new
# Kokkos TriBITS CMake files requires kokkos_generated_settings.cmake be
# included.

ENDIF()
16 changes: 13 additions & 3 deletions cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1951,10 +1951,10 @@ MACRO(TRIBITS_SETUP_ENV)
IF(${PROJECT_NAME}_ENABLE_OpenMP)
FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
TRIBITS_SET_OPENMP_FLAGS(CXX)
TRIBITS_SET_OPENMP_FLAGS(C)
IF(OpenMP_Fortran_FLAGS)
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
TRIBITS_SET_OPENMP_FLAGS(Fortran)
ELSE()
# Older versions of FindOpenMP.cmake don't find Fortran flags. Mike H said this is safe.
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_C_FLAGS}")
Expand Down Expand Up @@ -2012,6 +2012,16 @@ MACRO(TRIBITS_SETUP_ENV)

ENDMACRO()


MACRO(TRIBITS_SET_OPENMP_FLAGS LANG)
IF (NOT "${OpenMP_${LANG}_FLAGS_OVERRIDE}" STREQUAL "")
SET(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} ${OpenMP_${LANG}_FLAGS_OVERRIDE}")
ELSE()
SET(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} ${OpenMP_${LANG}_FLAGS}")
ENDIF()
ENDMACRO()


#
# Set mapping of labels to subprojects (i.e. TriBITS packages) for local CTest
# only.
Expand Down
20 changes: 20 additions & 0 deletions cmake/tribits/doc/build_ref/TribitsBuildReferenceBody.rst
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,15 @@ cache variable::

-D <Project>_CXX11_FLAGS="<compiler flags>"

In order to enable C++11 but not have the default system set any flags for
C++11, use::

-D <Project>_ENABLE_CXX11=ON
-D <Project>_CXX11_FLAGS=" "

The empty space " " will result in the system assuming that no flags needs to
be set.


Enabling explicit template instantiation for C++
------------------------------------------------
Expand Down Expand Up @@ -1096,6 +1105,17 @@ To enable OpenMP support, one must set::
Note that if you enable OpenMP directly through a compiler option (e.g.,
``-fopenmp``), you will NOT enable OpenMP inside <Project> source code.

To skip adding flags for OpenMP for ``<LANG>`` = ``C``, ``CXX``, or
``Fortran``, use::

-D OpenMP_<LANG>_FLAGS_OVERRIDE=" "

The single space " " will result in no flags getting added. This is needed
since one can't set the flags ``OpenMP_<LANG>_FLAGS`` to an empty string or
the ``FIND_PACKAGE(OpenMP)`` command will fail. Setting the variable
``-DOpenMP_<LANG>_FLAGS_OVERRIDE= " "`` is the only way to enable OpenMP but
skip adding the OpenMP flags provided by ``FIND_PACKAGE(OpenMP)``.

.. _BUILD_SHARED_LIBS:

Building shared libraries
Expand Down
67 changes: 62 additions & 5 deletions doc/build_ref/TrilinosBuildReferenceTemplate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Enabling/disabling thread safety
By default, many Trilinos classes are not thread-safe. However, some of these
classes can be made thread safe by configuring with::

-D <Project>_ENABLE_THREAD_SAFE:BOOL=ON
-D Trilinos_ENABLE_THREAD_SAFE:BOOL=ON

This will set the default value ``Teuchos_ENABLE_THREAD_SAFE=ON`` which makes
the Teuchos Memory Management classes (Teuchos::RCP, Teuchos::Ptr,
Expand All @@ -92,16 +92,73 @@ Enabling/disabling time monitors

I order to enable instrumentation of select code to generate timing statistics, set::

-D <Project>_ENABLE_TEUCHOS_TIME_MONITOR:BOOL=ON
-D Trilinos_ENABLE_TEUCHOS_TIME_MONITOR:BOOL=ON

This will enable Teuchos time monitors by default in all Trilinos packages
that support them. To print the timers at the end of the program, call
``Teuchos::TimeMonitor::summarize()``.

In order do co-development of TriBTS and Trilinos (see http://http://trac.trilinos.org/wiki/TriBITSTrilinosDev), set::
Select different TriBITS implementation
----------------------------------------

In order do co-development of TriBTS and Trilinos (see
http://http://trac.trilinos.org/wiki/TriBITSTrilinosDev), set, for example::

-D <Project>_TRIBITS_DIR:STRING=TriBITS \
-D <Project>_TRIBITS_PACKAGE_USE_TRIBITS_DIR=TRUE
-D Trilinos_TRIBITS_DIR:STRING=TriBITS/tribits

(NOTE: You have to use the data-type ``STRING`` with ``Trilinos_TRIBITS_DIR``
or CMake will automatically assume it is relative to the build dir!)


Configuring with Kokkos and advanced back-ends
----------------------------------------------

Kokkos (https://github.com/kokkos/kokkos) is a C++ implementation of a
cross-platform shared-memory parallel programming model. Many Trilinos packages,
and other stand-alone applications, use it to implement parallel algorithms.

If the Kokkos package is enabled (e.g. ``-DTrilinos_ENABLE_Kokkos=ON``), then
the following CMake cache variables can be used to get the included Kokkos
configuration system to select compiler and other build related flags for the
target machine. These build-related flags are selected to create correct and
perforamnt code and for C++ software that uses Kokkos.

============================ ======================================
Functionality CMake Cache Varaible
============================ ======================================
Specify architecture ``KOKKOS_HOST_ARCH``
Debug builds ``KOKKOS_DEBUG``
Device options:
* Enable Cuda ``TPL_ENABLE_CUDA``
* Enable OpenMP ``Trilinos_ENABLE_OpenMP``
* Enable Pthread ``TPL_ENABLE_PThread``
* Specify Serial ``TPL_ENABLE_MPI=FALSE``
Advanced options:
* Enable compiler warnings ``KOKKOS_ENABLE_COMPILER_WARNINGS``
* Aggressive Vectorization ``KOKKOS_ENABLE_AGGRESSIVE_VECTORIZATION``
* Profiling ``KOKKOS_ENABLE_PROFILING``
* Enable profile load print ``KOKKOS_ENABLE_PROFILE_LOAD_PRINT``
* Enable dualview modify chk ``KOKKOS_ENABLE_DUALVIEW_MODIFY_CHECK``
Kokkos TPLs:
* Use hwloc library ``TPL_ENABLE_HWLOC``
* Use memkind library ``KOKKOS_ENABLE_MEMKIND``
* Use librt ``KOKKOS_ENABLE_LIBRT``
CUDA Options:
* Enable CUDA LDG ``KOKKOS_ENABLE_CUDA_LDG_INTRINSIC`` (global mem load)
* Enable CUDA UVM ``KOKKOS_ENABLE_CUDA_UVM`` (unified virtual mem)
* Enable CUDA RDC ``KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE``
* Enable CUDA LAMBDA ``KOKKOS_ENABLE_CUDA_LAMBDA``
============================ ======================================

If the cache var ``KOKKOS_HOST_ARCH`` is not set (or is set to ``None``) then
the Kokkos settings are not used and the default Trilinos CMake configuration
is used as described below.

If ``KOKKOS_HOST_ARCH != None`` is set, then the correct compiler flags for
C++11 and OpenMP are selected by the Kokkos system and the values of the cache
vars ``Trilinos_CXX11_FLAGS`` and ``OpenMP_CXX_FLAGS`` set by the user will be
ignored.

To see more documentation for each of these options, run a configure with
``-DTrilinos_ENABLE_Kokkos=ON`` and then look in the CMakeCache.txt file (as
raw text or using the CMake QT GUI or ``ccmake``).
2 changes: 1 addition & 1 deletion packages/ifpack2/src/Ifpack2_Relaxation_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ class Relaxation :
typedef typename local_matrix_type::StaticCrsGraphType::device_type PersistentWorkSpace;
typedef typename local_matrix_type::StaticCrsGraphType::execution_space MyExecSpace;
typedef typename KokkosKernels::Experimental::KokkosKernelsHandle
<lno_row_view_t,lno_nonzero_view_t, scalar_nonzero_view_t,
<typename lno_row_view_t::const_value_type, local_ordinal_type,typename scalar_nonzero_view_t::value_type,
MyExecSpace, TemporaryWorkSpace,PersistentWorkSpace > mt_kernel_handle_type;
Teuchos::RCP<mt_kernel_handle_type> mtKernelHandle_;
#endif // HAVE_IFPACK2_EXPERIMENTAL_KOKKOSKERNELS_FEATURES
Expand Down
63 changes: 63 additions & 0 deletions packages/kokkos-kernels/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Change Log

## [2.5.00](https://github.com/kokkos/kokkos-kernels/tree/2.5.00) (2017-12-15)
[Full Changelog](https://github.com/kokkos/kokkos-kernels/compare/0.10.03...2.5.00)

**Implemented enhancements:**

- KokkosBlas: Add GEMM interface [\#105](https://github.com/kokkos/kokkos-kernels/issues/105)
- KokkosBlas: Add GEMM default Kernel [\#125](https://github.com/kokkos/kokkos-kernels/issues/125)
- KokkosBlas: Add GEMV that wraps BLAS \(and cuBLAS\) [\#16](https://github.com/kokkos/kokkos-kernels/issues/16)
- KokkosSparse: Make SPMV test not print GBs of output if something goes wrong. [\#111](https://github.com/kokkos/kokkos-kernels/issues/111)
- KokkosSparse: ETI SpGEMM and Gauss Seidel and take it out of Experimental namespace [\#74](https://github.com/kokkos/kokkos-kernels/issues/74)
- BuildSystem: Fix Makesystem to correctly build library after aborted install [\#104](https://github.com/kokkos/kokkos-kernels/issues/104)
- BuildSystem: Add option ot generate\_makefile.bash to define memoryspaces for instantiation [\#89](https://github.com/kokkos/kokkos-kernels/issues/89)
- BuildSystem: generate makefile tpl option [\#66](https://github.com/kokkos/kokkos-kernels/issues/66)
- BuildSystem: Add a simpler compilation script, README update etc [\#96](https://github.com/kokkos/kokkos-kernels/issues/96)

**Fixed bugs:**

- Internal Compiler Error GCC in GEMM [\#129](https://github.com/kokkos/kokkos-kernels/issues/129)
- Batched Team LU: bug for small team\_size [\#110](https://github.com/kokkos/kokkos-kernels/issues/110)
- Compiler BUG in IBM XL pragma unrolling [\#92](https://github.com/kokkos/kokkos-kernels/issues/92)
- Fix Blas TPL enables build [\#77](https://github.com/kokkos/kokkos-kernels/issues/77)
- Batched Gemm Failure [\#73](https://github.com/kokkos/kokkos-kernels/issues/73)
- CUDA 7.5 \(GCC 4.8.4\) build errors [\#72](https://github.com/kokkos/kokkos-kernels/issues/72)
- Cuda BLAS tests fail with UVM if CUDA\_LAUNCH\_BLOCKING=1 is not defined on Kepler [\#51](https://github.com/kokkos/kokkos-kernels/issues/51)
- CrsMatrix: sumIntoValues and replaceValues incorrectly count the number of valid column indices. [\#11](https://github.com/kokkos/kokkos-kernels/issues/11)
- findRelOffset test assumes UVM [\#32](https://github.com/kokkos/kokkos-kernels/issues/32)

## [0.10.03](https://github.com/kokkos/kokkos-kernels/tree/0.10.03) (2017-09-11)

**Implemented enhancements:**

- KokkosSparse: Fix unused variable warnings in spmv\_impl\_omp, spmv Test and graph color perf\_test [\#63](https://github.com/kokkos/kokkos-kernels/issues/63)
- KokkosBlas: dot: Add unit test [\#15](https://github.com/kokkos/kokkos-kernels/issues/15)
- KokkosBlas: dot: Add special case for multivector \* vector \(or vector \* multivector\) [\#13](https://github.com/kokkos/kokkos-kernels/issues/13)
- BuildSystem: Make KokkosKernels build independently of Trilinos [\#1](https://github.com/kokkos/kokkos-kernels/issues/1)
- BuildSystem: Fix ETI System not to depend on Tpetra ETI [\#5](https://github.com/kokkos/kokkos-kernels/issues/5)
- BuildSystem: Change CMake to work with new ETI system [\#19](https://github.com/kokkos/kokkos-kernels/issues/19)
- BuildSystem: Fix TpetraKernels names to KokkosKernels [\#4](https://github.com/kokkos/kokkos-kernels/issues/4)
- BuildSystem: Trilinos/KokkosKernels reports no ETI in almost any circumstance [\#29](https://github.com/kokkos/kokkos-kernels/issues/29)
- General: Kokkos::ArithTraits\<double\>::nan\(\) is very slow [\#35](https://github.com/kokkos/kokkos-kernels/issues/35)
- General: Design and Define New UnitTest infrastructure [\#28](https://github.com/kokkos/kokkos-kernels/issues/28)
- General: Move Tpetra::Details::OrdinalTraits to KokkosKernels [\#22](https://github.com/kokkos/kokkos-kernels/issues/22)
- General: Rename files and NameSpace to KokkosKernels [\#12](https://github.com/kokkos/kokkos-kernels/issues/12)
- General: PrepareStandalone: Get rid of Teuchos usage [\#2](https://github.com/kokkos/kokkos-kernels/issues/2)
- General: Fix warning with char being either signed or unsigned in ArithTraits [\#60](https://github.com/kokkos/kokkos-kernels/issues/60)
- Testing: Make all tests run with -Werror [\#68](https://github.com/kokkos/kokkos-kernels/issues/68)

**Fixed bugs:**

- SPGEMM Test Fails for Cuda when compiled through Trilinos [\#49](https://github.com/kokkos/kokkos-kernels/issues/49)
- Fix ArithTraits min for floating points [\#47](https://github.com/kokkos/kokkos-kernels/issues/47)
- Pthread ETI error [\#25](https://github.com/kokkos/kokkos-kernels/issues/25)
- Fix CMake Based ETI for Threads backend [\#46](https://github.com/kokkos/kokkos-kernels/issues/46)
- KokkosKernels\_ENABLE\_EXPERIMENTAL causes build error [\#59](https://github.com/kokkos/kokkos-kernels/issues/59)
- ArithTraits warnings in CUDA build [\#71](https://github.com/kokkos/kokkos-kernels/issues/71)
- Graph coloring build warnings [\#3](https://github.com/kokkos/kokkos-kernels/issues/3)




\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
7 changes: 6 additions & 1 deletion packages/kokkos-kernels/Makefile.kokkos-kernels
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_HOSTSPACE=$(strip $(shell echo $(KOKKOSKERN
KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_HBWSPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "HBWSpace" | wc -l))
KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDASPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "CudaSpace" | wc -l))
KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAUVMSPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "CudaUVMSpace" | wc -l))
KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAHOSTPINNEDSPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "CudaHostPinnedSpace" | wc -l))

tmp := $(shell echo "" >> KokkosKernels_config.tmp)
tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp)
Expand All @@ -207,6 +208,10 @@ endif
ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAUVMSPACE), 1)
tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE" >> KokkosKernels_config.tmp )
endif
ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAHOSTPINNEDSPACE), 1)
tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_CUDAHOSTPINNEDSPACE" >> KokkosKernels_config.tmp )
endif

ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA), 1)
ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDASPACE), 0)
ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAUVMSPACE), 0)
Expand Down Expand Up @@ -256,7 +261,7 @@ ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_CUBLAS}, 1)
tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_CUBLAS" >> KokkosKernels_config.tmp )
endif

tmp := $(shell echo "\#if defined(KOKKOSKERNELS_ENABLE_TPL_MKL)" >> KokkosKernels_config.tmp )
tmp := $(shell echo "\#if defined(KOKKOSKERNELS_ENABLE_TPL_MKL) || defined(KOKKOSKERNELS_ENABLE_TPL_CUBLAS)" >> KokkosKernels_config.tmp )
tmp := $(shell echo "\#if !defined(KOKKOSKERNELS_ENABLE_TPL_BLAS)" >> KokkosKernels_config.tmp )
tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_BLAS" >> KokkosKernels_config.tmp )
tmp := $(shell echo "\#endif" >> KokkosKernels_config.tmp )
Expand Down
17 changes: 14 additions & 3 deletions packages/kokkos-kernels/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Kokkos C++ Performance Portability Programming EcoSystem: Math Kernels -
Provides BLAS, Sparse BLAS and Graph Kernels

KokkosKernels implements local computational kernels for linear
algebra and graph operations, using the Kokkos shared-memory parallel
programming model. "Local" means not using MPI, or running within a
Expand All @@ -19,7 +22,7 @@ Computational kernels in this subpackage include the following:
- Gauss-Seidel with coloring (generalization of red-black)
- Other linear algebra and graph operations

Kokkos is licensed under standard 3-clause BSD terms of use. For
KokkosKernels is licensed under standard 3-clause BSD terms of use. For
specifics, please refer to the LICENSE file contained in the
repository or distribution.

Expand All @@ -43,7 +46,9 @@ We organize this directory as follows:
3. Correctness tests live in the unit_test/ subdirectory, and
performance tests live in the perf_test/ subdirectory

4. Compact batched BLAS: Refer the README in src/stage/batched/.
4. Simple example scripts to build Kokkoskernels are in
example/buildlib/


Do NOT use or rely on anything in the KokkosBlas::Impl namespace, or
on anything in the impl/ subdirectory.
Expand All @@ -59,6 +64,12 @@ for certain template parameter combinations. It also improves
performance, since compilers have an easier time optimizing code in
shorter .cpp files.

Building Kokkoskernels
----------------------


1. Modify example/buildlib/compileKokkosKernelsSimple.sh or
example/buildlib/compileKokkosKernels.sh for your environment
and run it to generate the required makefiles.

2. Run "make build-test" to compile the tests.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
KOKKOS_PATH=${HOME}/proj/kokkos #path to kokkos source
KOKKOSKERNELS_SCALARS=double #the scalar types to instantiate =double,float...
KOKKOSKERNELS_LAYOUTS=LayoutLeft #the layout types to instantiate.
KOKKOSKERNELS_ORDINALS=int #ordinal types to instantiate
KOKKOSKERNELS_OFFSETS=int #offset types to instantiate
KOKKOSKERNELS_PATH=../.. #path to kokkos-kernels top directory.
CXX=icpc #${KOKKOS_PATH}/config/nvcc_wrapper #icpc #
KOKKOSKERNELS_OPTIONS=eti-only #options for kokkoskernels
KOKKOS_DEVICES=OpenMP # other devices Cuda,Serial ..
KOKKOS_ARCHS=KNL
CXXFLAGS="-Wall -pedantic -Werror -O3 -g -Wshadow -Wsign-compare -Wtype-limits -Wuninitialized"

../../scripts/generate_makefile.bash --kokkoskernels-path=${KOKKOSKERNELS_PATH} --with-scalars=${KOKKOSKERNELS_SCALARS} --with-ordinals=${KOKKOSKERNELS_ORDINALS} --with-offsets=${KOKKOSKERNELS_OFFSETS} --kokkos-path=${KOKKOS_PATH} --with-devices=${KOKKOS_DEVICES} --arch=${KOKKOS_ARCHS} --compiler=${CXX} --with-options=${KOKKOSKERNELS_OPTIONS} --cxxflags="${CXXFLAGS}"
2 changes: 2 additions & 0 deletions packages/kokkos-kernels/master_history.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
tag: 0.10.00 date: 08/22/1017 master: xxxxxxxx develop: e323bcb0
tag: 0.10.03 date: 09/11/2017 master: e323bcb0 develop: 4cb87390
tag: 2.5.00 date: 12/15/2017 master: e4c645e9 develop: 04d58766

Loading