Skip to content

Commit

Permalink
Release 1.2.10 (#12)
Browse files Browse the repository at this point in the history
* Build system fixes
* Fix warnings and errors
* remove cinch; use googletest directly
* fixes for building with LAPACKE; Also, use QR decomp if not LAPACK
* Improve coding for least squares computation
* Matrix inversion options and fixes
* Initial work for non-cartesian coordinate systems
* Efficiency improvements
* Changes to swarm class (easier to construct and use)
* MPI ghost update manager
  • Loading branch information
raovgarimella authored Jan 12, 2021
1 parent 4caf172 commit 48e5628
Show file tree
Hide file tree
Showing 33 changed files with 2,301 additions and 386 deletions.
29 changes: 9 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif ()

set(WONTON_VERSION_MAJOR 1)
set(WONTON_VERSION_MINOR 2)
set(WONTON_VERSION_PATCH 2)
set(WONTON_VERSION_PATCH 8)


# Top level target
Expand Down Expand Up @@ -117,6 +117,12 @@ endif()
#------------------------------------------------------------------------------#

set(WONTON_ENABLE_Jali False CACHE BOOL "Jali Interface enabled?")

# If MPI is enabled,allow the user to set Jali. If no MPI, throw an error.
if (WONTON_ENABLE_Jali AND NOT WONTON_ENABLE_MPI)
message(FATAL_ERROR "Jali cannot be enabled without mpi. Please set WONTON_ENABLE_MPI=True")
endif()

if (WONTON_ENABLE_Jali AND WONTON_ENABLE_MPI AND NOT Jali_LIBRARIES)
# Look for the Jali package

Expand Down Expand Up @@ -148,28 +154,11 @@ endif ()

set(WONTON_ENABLE_THRUST False CACHE BOOL "Is the Thrust library being used?")
if (WONTON_ENABLE_THRUST)

# Allow for swapping backends
set(THRUST_HOST_BACKEND "THRUST_HOST_SYSTEM_CPP" CACHE STRING "Thrust host backend")
set(THRUST_HOST_BACKEND "THRUST_HOST_SYSTEM_OMP" CACHE STRING "Thrust host backend")
set(THRUST_DEVICE_BACKEND "THRUST_DEVICE_SYSTEM_OMP" CACHE STRING "Thrust device backend")

if ((${THRUST_HOST_BACKEND} STREQUAL "THRUST_HOST_SYSTEM_OMP") OR
(${THRUST_DEVICE_BACKEND} STREQUAL "THRUST_DEVICE_SYSTEM_OMP"))
list(APPEND _components OpenMP)
endif ()
if (${THRUST_DEVICE_BACKEND} STREQUAL "THRUST_DEVICE_SYSTEM_CUDA")
list(APPEND _components CUDA)
endif ()

find_package(THRUST COMPONENTS ${_components} REQUIRED MODULE)

find_package(THRUST COMPONENTS OpenMP REQUIRED MODULE)
message(STATUS "Enabling compilation with Thrust")
message(STATUS "Using THRUST_ROOT=${THRUST_ROOT}")
message(STATUS "THRUST_INCLUDE_DIRS ${THRUST_INCLUDE_DIRS}")

message(STATUS "Using ${THRUST_HOST_BACKEND} as Thrust host backend")
message(STATUS "Using ${THRUST_DEVICE_BACKEND} as Thrust device backend")

else ()

#-----------------------------------------------------------------------------
Expand Down
30 changes: 19 additions & 11 deletions cmake/FindTHRUST.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
# THRUST_COMPONENTS - Which backends were found (OpenMP, TBB, CUDA)
#------------------------------------------------------------------------------#

# Create an INTERFACE library

set(THRUST_LIBRARIES THRUST::THRUST)
add_library(${THRUST_LIBRARIES} INTERFACE IMPORTED)

#------------------------------------------------------------------------------#
# Find the header file
#------------------------------------------------------------------------------#
Expand All @@ -29,7 +24,6 @@ else ()
endif ()
endif ()

target_include_directories(${THRUST_LIBRARIES} INTERFACE ${THRUST_INCLUDE_DIRS})

#------------------------------------------------------------------------------#
# Find the backend components
Expand All @@ -38,25 +32,39 @@ target_include_directories(${THRUST_LIBRARIES} INTERFACE ${THRUST_INCLUDE_DIRS})
set(THRUST_COMPONENTS "")
foreach (_component IN LISTS THRUST_FIND_COMPONENTS)
if (${_component} STREQUAL "OpenMP")
find_package(OpenMP)
find_package(OpenMP COMPONENTS CXX)
if (OpenMP_FOUND)
target_link_libraries(${THRUST_LIBRARIES} INTERFACE OpenMP::OpenMP_CXX)
list(APPEND THRUST_COMPONENTS OpenMP)
endif ()
elseif (${_component} STREQUAL "CUDA")
find_package(CUDA)
if (CUDA_FOUND)
target_link_libraries(${THRUST_LIBRARIES} INTERFACE "${CUDA_LIBRARIES}")
list(APPEND THRUST_COMPONENTS CUDA)
endif ()
elseif ()
message(FATAL_ERROR "Unknown component ${_component) requested for THRUST")
else ()
message(FATAL_ERROR "Unknown component ${_component} requested for THRUST")
endif ()
endforeach ()


message(STATUS "THRUST components found: ${THRUST_COMPONENTS}")

# Create an INTERFACE library

set(THRUST_LIBRARIES THRUST::THRUST)
if (NOT TARGET ${THRUST_LIBRARIES})
add_library(${THRUST_LIBRARIES} INTERFACE IMPORTED)
target_include_directories(${THRUST_LIBRARIES} INTERFACE ${THRUST_INCLUDE_DIRS})
foreach (_component IN LISTS THRUST_COMPONENTS)
if (${_component} STREQUAL "OpenMP" AND OpenMP_FOUND)
target_link_libraries(${THRUST_LIBRARIES} INTERFACE OpenMP::OpenMP_CXX)
endif ()
if (${_component} STREQUAL "CUDA" AND CUDA_FOUND)
target_link_libraries(${THRUST_LIBRARIES} INTERFACE "${CUDA_LIBRARIES}")
endif ()
endforeach ()
endif ()

#------------------------------------------------------------------------------#
# Set standard args stuff
#------------------------------------------------------------------------------#
Expand Down
14 changes: 13 additions & 1 deletion cmake/wontonConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,19 @@ if (WONTON_ENABLE_LAPACKE)
endif ()

if (WONTON_ENABLE_THRUST)
find_dependency(THRUST COMPONENTS ${THRUST_COMPONENTS})
set(THRUST_LIBRARIES THRUST::THRUST)

# First try discovery through a config file
find_package(THRUST NAMES Thrust CONFIG)
if (THRUST_FOUND)
string(REPLACE "THRUST_HOST_SYSTEM_" "" HOST_SYSTEM ${THRUST_HOST_BACKEND})
string(REPLACE "THRUST_DEVICE_SYSTEM_" "" DEVICE_SYSTEM ${THRUST_DEVICE_BACKEND})
if (NOT TARGET ${THRUST_LIBRARIES})
thrust_create_target(${THRUST_LIBRARIES} HOST ${HOST_SYSTEM} DEVICE ${DEVICE_SYSTEM})
endif ()
else ()
find_dependency(THRUST COMPONENTS ${THRUST_COMPONENTS} REQUIRED MODULE)
endif ()
endif ()

if (WONTON_ENABLE_Kokkos)
Expand Down
6 changes: 3 additions & 3 deletions jenkins/axis_hpc.yml → jenkins/axis_hpc_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COMPILER:
- gcc6
- gcc7

BUILD_TYPE:
CONFIG_TYPE:
- base
- debug
- serial
Expand All @@ -12,7 +12,7 @@ BUILD_TYPE:

exclude:
- COMPILER: gcc6
BUILD_TYPE: readme
CONFIG_TYPE: readme
- COMPILER: gcc7
BUILD_TYPE: readme
CONFIG_TYPE: readme

21 changes: 21 additions & 0 deletions jenkins/axis_hpc_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# axis_hpc_nightly.yml (some other combinations will get weeded out inside the script)
COMPILER:
- intel18
- gcc6
- gcc7

CONFIG_TYPE:
- base
- debug
- serial
- readme
- thrust
- kokkos

exclude:
- COMPILER: gcc6
CONFIG_TYPE: readme
- COMPILER: gcc7
CONFIG_TYPE: readme
- COMPILER: intel18
CONFIG_TYPE: kokkos
4 changes: 2 additions & 2 deletions jenkins/axis_hpc_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ COMPILER:
- intel18
- gcc7

BUILD_TYPE:
CONFIG_TYPE:
- base
- debug
- serial
Expand All @@ -11,5 +11,5 @@ BUILD_TYPE:

exclude:
- COMPILER: gcc7
BUILD_TYPE: readme
CONFIG_TYPE: readme

18 changes: 0 additions & 18 deletions jenkins/axis_varan.yml

This file was deleted.

5 changes: 3 additions & 2 deletions jenkins/axis_varan_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ COMPILER:
- gcc6
- gcc7

BUILD_TYPE:
CONFIG_TYPE:
- base
- debug
- serial
- thrust
- kokkos

exclude:
- COMPILER: intel18
BUILD_TYPE: kokkos
CONFIG_TYPE: kokkos

21 changes: 21 additions & 0 deletions jenkins/axis_varan_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# axis_varan.yml (some other combinations will get weeded out inside the script)
COMPILER:
- intel18
- gcc6
- gcc7

CONFIG_TYPE:
- base
- debug
- serial
- readme
- thrust
- kokkos

exclude:
- COMPILER: gcc6
CONFIG_TYPE: readme
- COMPILER: gcc7
CONFIG_TYPE: readme
- COMPILER: intel18
CONFIG_TYPE: kokkos
6 changes: 3 additions & 3 deletions jenkins/axis_varan_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COMPILER:
- gcc6
- gcc7

BUILD_TYPE:
CONFIG_TYPE:
- base
- debug
- serial
Expand All @@ -12,7 +12,7 @@ BUILD_TYPE:

exclude:
- COMPILER: gcc6
BUILD_TYPE: readme
CONFIG_TYPE: readme
- COMPILER: gcc7
BUILD_TYPE: readme
CONFIG_TYPE: readme

3 changes: 3 additions & 0 deletions jenkins/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ set -e
# Echo each command
set -x

# Set umask so installations have rwx permissions for the group
umask 007

JALI_VERSION=1.0.0
openmpi_version=2.1.2

Expand Down
Loading

0 comments on commit 48e5628

Please sign in to comment.