Skip to content

Commit

Permalink
Merge Pull Request #10406 from kyungjoo-kim/Trilinos/tacho-refactor
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: Tacho structure symmetric LU solver for CPU and GPU
PR Author: kyungjoo-kim
  • Loading branch information
trilinos-autotester authored Jun 16, 2022
2 parents ac60e46 + 49b917b commit 15ddb12
Show file tree
Hide file tree
Showing 381 changed files with 84,485 additions and 23,878 deletions.
26 changes: 13 additions & 13 deletions cmake/RepositoryDependenciesSetup.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
if (TPL_ENABLE_CUDA AND NOT Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
if ("${${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho}" STREQUAL "")
message(
"-- " "NOTE: Setting ${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho=OFF by default since TPL_ENABLE_CUDA='${TPL_ENABLE_CUDA}' AND Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE='${Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE}'!\n"
"-- NOTE: To allow the enable of ShyLU_NodeTacho, please set Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE=ON.")
set(${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho OFF)
# NOTE: Above we set the non-cache var
# ${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho so that each reconfigure will
# show this same note.
elseif (${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho)
message(FATAL_ERROR "ERROR: ${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho=ON but TPL_ENABLE_CUDA='${TPL_ENABLE_CUDA}' AND Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE='${Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE}' which is not allowed!")
endif()
endif()
# if (TPL_ENABLE_CUDA AND NOT Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
# if ("${${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho}" STREQUAL "")
# message(
# "-- " "NOTE: Setting ${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho=OFF by default since TPL_ENABLE_CUDA='${TPL_ENABLE_CUDA}' AND Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE='${Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE}'!\n"
# "-- NOTE: To allow the enable of ShyLU_NodeTacho, please set Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE=ON.")
# set(${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho OFF)
# # NOTE: Above we set the non-cache var
# # ${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho so that each reconfigure will
# # show this same note.
# elseif (${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho)
# message(FATAL_ERROR "ERROR: ${PROJECT_NAME}_ENABLE_ShyLU_NodeTacho=ON but TPL_ENABLE_CUDA='${TPL_ENABLE_CUDA}' AND Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE='${Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE}' which is not allowed!")
# endif()
# endif()

#########################################################################
# STKBalance does not work with GO=INT or GO=UNSIGNED
Expand Down
40 changes: 15 additions & 25 deletions packages/shylu/shylu_node/tacho/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,29 @@ IF (Kokkos_ENABLE_CUDA)
IF (DEFINED CUDA_VERSION AND (CUDA_VERSION VERSION_LESS "8.0"))
MESSAGE(FATAL_ERROR "Tacho requires CUDA 8 if CUDA is enabled")
ENDIF()
# If RDC is off, emits a warning message
IF (NOT Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
MESSAGE(WARNING "Tacho requires CUDA relocatable device code to be enabled if CUDA is enabled. Set: Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE=ON ")
ENDIF()
ENDIF()

IF (Kokkos_ENABLE_THREADS)
IF (NOT Kokkos_ENABLE_OPENMP)
MESSAGE(FATAL_ERROR "Tacho can not be build with Pthreads as the Kokkos Host Backend.")
ENDIF()
ENDIF()

# Set cmake variable to control examples and tests
IF (Kokkos_ENABLE_CUDA)
IF (DEFINED CUDA_VERSION AND (CUDA_VERSION VERSION_LESS "8.0"))
SET(TACHO_HAVE_KOKKOS_TASK OFF)
ELSE()
IF (Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
SET(TACHO_HAVE_KOKKOS_TASK ON)
ELSE()
SET(TACHO_HAVE_KOKKOS_TASK OFF)
ENDIF()
ENDIF()
ELSE()
SET(TACHO_HAVE_KOKKOS_TASK ON)
ADD_SUBDIRECTORY(src)

IF (NOT DEFINED Tacho_ENABLE_EXAMPLES)
SET(Tacho_ENABLE_EXAMPLES ${Trilinos_ENABLE_EXAMPLES})
ENDIF()
IF (NOT DEFINED Tacho_ENABLE_TESTS)
SET(Tacho_ENABLE_TESTS ${Trilinos_ENABLE_TESTS})
ENDIF()

ADD_SUBDIRECTORY(src)
IF (TACHO_HAVE_KOKKOS_TASK)
IF (Trilinos_ENABLE_Gtest)
TRIBITS_ADD_EXAMPLE_DIRECTORIES(example)
TRIBITS_ADD_TEST_DIRECTORIES(unit-test)
ELSE()
MESSAGE(STATUS "Tacho disables examples and tests as Trilinos disables Gtest")
ENDIF()
IF (Tacho_ENABLE_EXAMPLES)
TRIBITS_ADD_EXAMPLE_DIRECTORIES(example)
ENDIF()

IF (Tacho_ENABLE_TESTS)
TRIBITS_ADD_TEST_DIRECTORIES(unit-test)
ENDIF()

TRIBITS_SUBPACKAGE_POSTPROCESS()
4 changes: 2 additions & 2 deletions packages/shylu/shylu_node/tacho/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SET(LIB_REQUIRED_DEP_PACKAGES Kokkos)
SET(LIB_OPTIONAL_DEP_PACKAGES)
SET(TEST_REQUIRED_DEP_PACKAGES Kokkos KokkosAlgorithms Gtest)
SET(TEST_REQUIRED_DEP_PACKAGES Kokkos KokkosAlgorithms)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_OPTIONAL_DEP_TPLS METIS Scotch Cholmod HWLOC HYPRE MKL LAPACK BLAS Pthread QTHREAD VTune CUSOLVER CUSPARSE CUBLAS CUDA)
SET(LIB_OPTIONAL_DEP_TPLS METIS HWLOC HYPRE MKL LAPACK BLAS Pthread QTHREAD VTune CUSOLVER CUSPARSE CUBLAS CUDA)
SET(TEST_REQUIRED_DEP_TPLS BLAS LAPACK)
SET(TEST_OPTIONAL_DEP_TPLS METIS HWLOC Cholmod MKL LAPACK BLAS Pthread QTHREAD CUSOLVER CUSPARSE CUBLAS CUDA)
12 changes: 0 additions & 12 deletions packages/shylu/shylu_node/tacho/cmake/Tacho_config.h.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef __TACHO_CONFIG_H__
#define __TACHO_CONFIG_H__

/* Define if kokkos tasking is enabled */
#cmakedefine TACHO_HAVE_KOKKOS_TASK

/* Define if want to build with size_type (int) enabled */
#cmakedefine TACHO_USE_INT_INT

Expand All @@ -22,21 +19,12 @@
/* Define if want to build with METIS enabled */
#cmakedefine TACHO_HAVE_METIS

/* Define if want to build with METIS enabled */
//#cmakedefine TACHO_HAVE_METIS_MT

/* Define if want to build with Scotch enabled */
//#cmakedefine TACHO_HAVE_SCOTCH

/* Define if want to build with CHOLMOD enabled */
#cmakedefine TACHO_HAVE_SUITESPARSE

/* Define if want to build with VTune enabled */
#cmakedefine TACHO_HAVE_VTUNE

///* Define if want to build with Teuchos enabled */
#cmakedefine TACHO_HAVE_TRILINOS_SS

#ifndef F77_BLAS_MANGLE
# define F77_BLAS_MANGLE@F77_BLAS_MANGLE@
#endif
Expand Down
Loading

0 comments on commit 15ddb12

Please sign in to comment.