Merge branch 'develop' of github.com:lammps/lammps into local-composition
This commit is contained in:
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -1,6 +1,6 @@
|
|||||||
# Contributing to LAMMPS via GitHub
|
# Contributing to LAMMPS via GitHub
|
||||||
|
|
||||||
Thank your for considering to contribute to the LAMMPS software project.
|
Thank you for considering to contribute to the LAMMPS software project.
|
||||||
|
|
||||||
The following is a set of guidelines as well as explanations of policies and work flows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.
|
The following is a set of guidelines as well as explanations of policies and work flows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.
|
||||||
|
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -57,3 +57,6 @@ out/x86
|
|||||||
out/x64
|
out/x64
|
||||||
src/Makefile.package-e
|
src/Makefile.package-e
|
||||||
src/Makefile.package.settings-e
|
src/Makefile.package.settings-e
|
||||||
|
/cmake/build/x64-Debug-Clang
|
||||||
|
/install/x64-GUI-MSVC
|
||||||
|
/install
|
||||||
|
|||||||
@ -136,15 +136,15 @@ if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL
|
|||||||
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# we require C++11 without extensions. Kokkos requires at least C++14 (currently)
|
# we require C++11 without extensions. Kokkos requires at least C++17 (currently)
|
||||||
if(NOT CMAKE_CXX_STANDARD)
|
if(NOT CMAKE_CXX_STANDARD)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CXX_STANDARD LESS 11)
|
if(CMAKE_CXX_STANDARD LESS 11)
|
||||||
message(FATAL_ERROR "C++ standard must be set to at least 11")
|
message(FATAL_ERROR "C++ standard must be set to at least 11")
|
||||||
endif()
|
endif()
|
||||||
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 14))
|
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17))
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
||||||
@ -192,6 +192,7 @@ option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
|||||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON)
|
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON)
|
||||||
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
|
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
|
||||||
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
|
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
|
||||||
|
option(BUILD_LAMMPS_GUI "Build and install the LAMMPS GUI" OFF)
|
||||||
|
|
||||||
# Support using clang-tidy for C++ files with selected options
|
# Support using clang-tidy for C++ files with selected options
|
||||||
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
|
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
|
||||||
@ -278,7 +279,6 @@ set(STANDARD_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
ORIENT
|
ORIENT
|
||||||
PERI
|
PERI
|
||||||
@ -384,11 +384,6 @@ if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0")
|
|||||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
|
target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(LAMMPS_EXCEPTIONS "enable the use of C++ exceptions for error messages (useful for library interface)" ${ENABLE_TESTING})
|
|
||||||
if(LAMMPS_EXCEPTIONS)
|
|
||||||
target_compile_definitions(lammps PUBLIC -DLAMMPS_EXCEPTIONS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# "hard" dependencies between packages resulting
|
# "hard" dependencies between packages resulting
|
||||||
# in an error instead of skipping over files
|
# in an error instead of skipping over files
|
||||||
pkg_depends(ML-IAP ML-SNAP)
|
pkg_depends(ML-IAP ML-SNAP)
|
||||||
@ -440,7 +435,7 @@ if(BUILD_OMP)
|
|||||||
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
|
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
|
if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
|
||||||
enable_language(C)
|
enable_language(C)
|
||||||
if (NOT USE_INTERNAL_LINALG)
|
if (NOT USE_INTERNAL_LINALG)
|
||||||
find_package(LAPACK)
|
find_package(LAPACK)
|
||||||
@ -520,7 +515,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
|
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
|
||||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM MSCG COMPRESS ML-PACE LEPTON)
|
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON)
|
||||||
if(PKG_${PKG_WITH_INCL})
|
if(PKG_${PKG_WITH_INCL})
|
||||||
include(Packages/${PKG_WITH_INCL})
|
include(Packages/${PKG_WITH_INCL})
|
||||||
endif()
|
endif()
|
||||||
@ -795,9 +790,11 @@ include(Tools)
|
|||||||
include(Documentation)
|
include(Documentation)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Install potential and force field files in data directory
|
# Install bench, potential and force field files in data directory
|
||||||
###############################################################################
|
###############################################################################
|
||||||
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps)
|
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}/lammps)
|
||||||
|
|
||||||
|
install(DIRECTORY ${LAMMPS_DIR}/bench DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||||
install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||||
if(BUILD_TOOLS)
|
if(BUILD_TOOLS)
|
||||||
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||||
@ -1025,6 +1022,14 @@ endif()
|
|||||||
if(BUILD_LAMMPS_SHELL)
|
if(BUILD_LAMMPS_SHELL)
|
||||||
message(STATUS "<<< Building LAMMPS Shell >>>")
|
message(STATUS "<<< Building LAMMPS Shell >>>")
|
||||||
endif()
|
endif()
|
||||||
|
if(BUILD_LAMMPS_GUI)
|
||||||
|
message(STATUS "<<< Building LAMMPS GUI >>>")
|
||||||
|
if(LAMMPS_GUI_USE_PLUGIN)
|
||||||
|
message(STATUS "Loading LAMMPS library as plugin at run time")
|
||||||
|
else()
|
||||||
|
message(STATUS "Linking LAMMPS library at compile time")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
if(ENABLE_TESTING)
|
if(ENABLE_TESTING)
|
||||||
message(STATUS "<<< Building Unit Tests >>>")
|
message(STATUS "<<< Building Unit Tests >>>")
|
||||||
if(ENABLE_COVERAGE)
|
if(ENABLE_COVERAGE)
|
||||||
|
|||||||
@ -63,6 +63,11 @@
|
|||||||
"name": "ENABLE_TESTING",
|
"name": "ENABLE_TESTING",
|
||||||
"value": "True",
|
"value": "True",
|
||||||
"type": "BOOL"
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_LAMMPS_GUI",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -303,6 +308,54 @@
|
|||||||
"type": "STRING"
|
"type": "STRING"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-GUI-MSVC",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "Release",
|
||||||
|
"buildRoot": "${workspaceRoot}\\build\\${name}",
|
||||||
|
"installRoot": "${workspaceRoot}\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows.cmake -D QT_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5 -D Qt5_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "-V",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "BUILD_SHARED_LIBS",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_TOOLS",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LAMMPS_EXCEPTIONS",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ENABLE_TESTING",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_MPI",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WITH_PNG",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_LAMMPS_GUI",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -28,10 +28,8 @@ if(MSVC)
|
|||||||
add_compile_options(/Zc:__cplusplus)
|
add_compile_options(/Zc:__cplusplus)
|
||||||
add_compile_options(/wd4244)
|
add_compile_options(/wd4244)
|
||||||
add_compile_options(/wd4267)
|
add_compile_options(/wd4267)
|
||||||
if(LAMMPS_EXCEPTIONS)
|
|
||||||
add_compile_options(/EHsc)
|
add_compile_options(/EHsc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -64,6 +64,8 @@ if(GPU_API STREQUAL "CUDA")
|
|||||||
endif()
|
endif()
|
||||||
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
|
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
|
||||||
endif()
|
endif()
|
||||||
|
option(CUDA_BUILD_MULTIARCH "Enable building CUDA kernels for all supported GPU architectures" ON)
|
||||||
|
mark_as_advanced(GPU_BUILD_MULTIARCH)
|
||||||
|
|
||||||
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
|
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
|
||||||
|
|
||||||
@ -93,6 +95,7 @@ if(GPU_API STREQUAL "CUDA")
|
|||||||
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
|
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
|
||||||
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
|
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
|
||||||
|
|
||||||
|
if(CUDA_BUILD_MULTIARCH)
|
||||||
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
|
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
|
||||||
# only the Kepler achitecture and beyond is supported
|
# only the Kepler achitecture and beyond is supported
|
||||||
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
|
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
|
||||||
@ -145,6 +148,7 @@ if(GPU_API STREQUAL "CUDA")
|
|||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC}
|
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC}
|
||||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
|
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
########################################################################
|
########################################################################
|
||||||
# As of version 3.3.0 Kokkos requires C++14
|
# As of version 4.0.0 Kokkos requires C++17
|
||||||
if(CMAKE_CXX_STANDARD LESS 14)
|
if(CMAKE_CXX_STANDARD LESS 17)
|
||||||
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to be set to at least C++14")
|
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to
|
||||||
|
be set to at least C++17")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -49,8 +50,8 @@ if(DOWNLOAD_KOKKOS)
|
|||||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.7.02.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.1.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||||
set(KOKKOS_MD5 "34d7860d548c06a4040236d959c9f99a" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
set(KOKKOS_MD5 "a5f096bd8ad01b97fdc7a32583b17a33" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||||
mark_as_advanced(KOKKOS_URL)
|
mark_as_advanced(KOKKOS_URL)
|
||||||
mark_as_advanced(KOKKOS_MD5)
|
mark_as_advanced(KOKKOS_MD5)
|
||||||
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
||||||
@ -75,7 +76,7 @@ if(DOWNLOAD_KOKKOS)
|
|||||||
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
||||||
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
||||||
elseif(EXTERNAL_KOKKOS)
|
elseif(EXTERNAL_KOKKOS)
|
||||||
find_package(Kokkos 3.7.02 REQUIRED CONFIG)
|
find_package(Kokkos 4.1.00 REQUIRED CONFIG)
|
||||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||||
else()
|
else()
|
||||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
find_package(GSL REQUIRED)
|
|
||||||
find_package(MSCG QUIET)
|
|
||||||
if(MSGC_FOUND)
|
|
||||||
set(DOWNLOAD_MSCG_DEFAULT OFF)
|
|
||||||
else()
|
|
||||||
set(DOWNLOAD_MSCG_DEFAULT ON)
|
|
||||||
endif()
|
|
||||||
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
|
|
||||||
if(DOWNLOAD_MSCG)
|
|
||||||
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball")
|
|
||||||
set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball")
|
|
||||||
mark_as_advanced(MSCG_URL)
|
|
||||||
mark_as_advanced(MSCG_MD5)
|
|
||||||
|
|
||||||
include(ExternalCMakeProject)
|
|
||||||
ExternalCMakeProject(mscg ${MSCG_URL} ${MSCG_MD5} MSCG-release src/CMake "")
|
|
||||||
|
|
||||||
# set include and link library
|
|
||||||
target_include_directories(lammps PRIVATE "${CMAKE_BINARY_DIR}/_deps/mscg-src/src")
|
|
||||||
target_link_libraries(lammps PRIVATE mscg)
|
|
||||||
else()
|
|
||||||
find_package(MSCG)
|
|
||||||
if(NOT MSCG_FOUND)
|
|
||||||
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIR, or set DOWNLOAD_MSCG=ON to download it")
|
|
||||||
endif()
|
|
||||||
target_link_libraries(lammps PRIVATE MSCG::MSCG)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(lammps PRIVATE GSL::gsl ${LAPACK_LIBRARIES})
|
|
||||||
@ -37,12 +37,13 @@ if(BUILD_TOOLS)
|
|||||||
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
|
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
if(BUILD_LAMMPS_SHELL)
|
if(BUILD_LAMMPS_SHELL)
|
||||||
|
if(NOT PkgConfig_FOUND)
|
||||||
|
message(FATAL_ERROR "Must have pkg-config installed for building LAMMPS shell")
|
||||||
|
endif()
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline)
|
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline)
|
||||||
if(NOT LAMMPS_EXCEPTIONS)
|
|
||||||
message(WARNING "The LAMMPS shell needs LAMMPS_EXCEPTIONS enabled for full functionality")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include resource compiler to embed icons into the executable on Windows
|
# include resource compiler to embed icons into the executable on Windows
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
@ -67,4 +68,8 @@ if(BUILD_LAMMPS_SHELL)
|
|||||||
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
|
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_LAMMPS_GUI)
|
||||||
|
get_filename_component(LAMMPS_GUI_DIR ${LAMMPS_SOURCE_DIR}/../tools/lammps-gui ABSOLUTE)
|
||||||
|
get_filename_component(LAMMPS_GUI_BIN ${CMAKE_BINARY_DIR}/lammps-gui-build ABSOLUTE)
|
||||||
|
add_subdirectory(${LAMMPS_GUI_DIR} ${LAMMPS_GUI_BIN})
|
||||||
|
endif()
|
||||||
|
|||||||
BIN
cmake/packaging/LAMMPS_DMG_Background.png
Normal file
BIN
cmake/packaging/LAMMPS_DMG_Background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
34
cmake/packaging/MacOSXBundleInfo.plist.in
Normal file
34
cmake/packaging/MacOSXBundleInfo.plist.in
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en-US</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>The LAMMPS Molecular Dynamics Software</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>lammps</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.lammps.gui</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleLongVersionString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>LAMMPS</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
69
cmake/packaging/README.macos
Normal file
69
cmake/packaging/README.macos
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
LAMMPS and LAMMPS GUI universal binaries for macOS (arm64/x86_64)
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
This package provides universal binaries of LAMMPS and LAMMPS GUI that should
|
||||||
|
run on macOS systems running running macOS version 11 (Big Sur) or newer. Note
|
||||||
|
the binaries are compiled without MPI support and contain a compatible subset
|
||||||
|
of the available packages.
|
||||||
|
|
||||||
|
The following individual commands are included:
|
||||||
|
binary2txt lammps-gui lmp msi2lmp phana stl_bin2txt
|
||||||
|
|
||||||
|
After copying the lammps-gui folder into your Applications folder, please follow
|
||||||
|
these steps:
|
||||||
|
|
||||||
|
1. Open the Terminal app
|
||||||
|
|
||||||
|
2. Type the following command and press ENTER:
|
||||||
|
|
||||||
|
open ~/.zprofile
|
||||||
|
|
||||||
|
This will open a text editor for modifying the .zprofile file in your home
|
||||||
|
directory.
|
||||||
|
|
||||||
|
3. Add the following lines to the end of the file, save it, and close the editor
|
||||||
|
|
||||||
|
LAMMPS_INSTALL_DIR=/Applications/LAMMPS.app/Contents
|
||||||
|
LAMMPS_POTENTIALS=${LAMMPS_INSTALL_DIR}/share/lammps/potentials
|
||||||
|
LAMMPS_BENCH_DIR=${LAMMPS_INSTALL_DIR}/share/lammps/bench
|
||||||
|
MSI2LMP_LIBRARY=${LAMMPS_INSTALL_DIR}/share/lammps/frc_files
|
||||||
|
PATH=${LAMMPS_INSTALL_DIR}/bin:$PATH
|
||||||
|
export LAMMPS_POTENTIALS LAMMPS_BENCH_DIR PATH
|
||||||
|
|
||||||
|
4. In your existing terminal, type the following command make the settings active
|
||||||
|
|
||||||
|
source ~/.zprofile
|
||||||
|
|
||||||
|
Note, you don't have to type this in new terminals, since they will apply
|
||||||
|
the changes from .zprofile automatically.
|
||||||
|
|
||||||
|
Note: the above assumes you use the default shell (zsh) that comes with
|
||||||
|
MacOS. If you customized MacOS to use a different shell, you'll need to modify
|
||||||
|
that shell's init file (.cshrc, .bashrc, etc.) instead with appropiate commands
|
||||||
|
to modify the same environment variables.
|
||||||
|
|
||||||
|
5. Try running LAMMPS (which might fail, see step 7)
|
||||||
|
|
||||||
|
lmp -in ${LAMMPS_BENCH_DIR}/in.lj
|
||||||
|
|
||||||
|
6. Try running the LAMMPS GUI
|
||||||
|
|
||||||
|
lammps-gui ${LAMMPS_BENCH_DIR}/in.rhodo
|
||||||
|
|
||||||
|
Depending on the size and resolution of your screen, the fonts may
|
||||||
|
be too small to read. This can be adjusted by setting the environment
|
||||||
|
variable QT_FONT_DPI. The default value would be 72, so to increase
|
||||||
|
the fonts by a third one can add to the .zprofile file the line
|
||||||
|
|
||||||
|
export QT_FONT_DPI=96
|
||||||
|
|
||||||
|
and reload as shown above.
|
||||||
|
|
||||||
|
7. Give permission to execute the commands (lmp, lammps-gui, msi2lmp, binary2txt, phana, stl_bin2txt)
|
||||||
|
|
||||||
|
MacOS will likely block the initial run of the executables, since they
|
||||||
|
were downloaded from the internet and are missing a known signature from an
|
||||||
|
identified developer. Go to "Settings" and search for "Security settings". It
|
||||||
|
should display a message that an executable like "lmp" was blocked. Press
|
||||||
|
"Open anyway", which might prompt you for your admin credentials. Afterwards
|
||||||
|
"lmp" and the other executables should work as expected.
|
||||||
77
cmake/packaging/build_linux_tgz.sh
Executable file
77
cmake/packaging/build_linux_tgz.sh
Executable file
@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP_NAME=lammps-gui
|
||||||
|
DESTDIR=${PWD}/../LAMMPS_GUI
|
||||||
|
|
||||||
|
echo "Delete old files, if they exist"
|
||||||
|
rm -rf ${DESTDIR} ../LAMMPS-Linux-amd64.tar.gz
|
||||||
|
|
||||||
|
echo "Create staging area for deployment and populate"
|
||||||
|
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||||
|
|
||||||
|
echo "Remove debug info"
|
||||||
|
for s in ${DESTDIR}/bin/* ${DESTDIR}/lib/liblammps*
|
||||||
|
do \
|
||||||
|
test -f $s && strip --strip-debug $s
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Remove libc, gcc, and X11 related shared libs"
|
||||||
|
rm -f ${DESTDIR}/lib/ld*.so ${DESTDIR}/lib/ld*.so.[0-9]
|
||||||
|
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}.so.?
|
||||||
|
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}-[0-9].[0-9]*.so
|
||||||
|
rm -f ${DESTDIR}/lib/libX* ${DESTDIR}/lib/libxcb*
|
||||||
|
rm -f ${DESTDIR}/lib/libgcc_s*
|
||||||
|
rm -f ${DESTDIR}/lib/libstdc++*
|
||||||
|
|
||||||
|
# get qt dir
|
||||||
|
QTDIR=$(ldd ${DESTDIR}/bin/lammps-gui | grep libQt5Core | sed -e 's/^.*=> *//' -e 's/libQt5Core.so.*$/qt5/')
|
||||||
|
cat > ${DESTDIR}/bin/qt.conf <<EOF
|
||||||
|
[Paths]
|
||||||
|
Plugins = ../qt5plugins
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# platform plugin
|
||||||
|
mkdir -p ${DESTDIR}/qt5plugins/platforms
|
||||||
|
cp ${QTDIR}/plugins/platforms/libqxcb.so ${DESTDIR}/qt5plugins/platforms
|
||||||
|
|
||||||
|
# get platform plugin dependencies
|
||||||
|
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd ${QTDIR}/plugins/platforms/libqxcb.so | grep -v ${DESTDIR} | grep libQt5 | sed -e 's/^.*=> *//' -e 's/\(libQt5.*.so.*\) .*$/\1/')
|
||||||
|
for dep in ${QTDEPS}
|
||||||
|
do \
|
||||||
|
cp ${dep} ${DESTDIR}/lib
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Add additional plugins for Qt"
|
||||||
|
for dir in styles imageformats
|
||||||
|
do \
|
||||||
|
cp -r ${QTDIR}/plugins/${dir} ${DESTDIR}/qt5plugins/
|
||||||
|
done
|
||||||
|
|
||||||
|
# get imageplugin dependencies
|
||||||
|
for s in ${DESTDIR}/qt5plugins/imageformats/*.so
|
||||||
|
do \
|
||||||
|
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd $s | grep -v ${DESTDIR} | grep -E '(libQt5|jpeg)' | sed -e 's/^.*=> *//' -e 's/\(lib.*.so.*\) .*$/\1/')
|
||||||
|
for dep in ${QTDEPS}
|
||||||
|
do \
|
||||||
|
cp ${dep} ${DESTDIR}/lib
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Set up wrapper script"
|
||||||
|
MYDIR=$(dirname "$0")
|
||||||
|
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
|
||||||
|
for s in ${DESTDIR}/bin/*
|
||||||
|
do \
|
||||||
|
EXE=$(basename $s)
|
||||||
|
test ${EXE} = linux_wrapper.sh && continue
|
||||||
|
test ${EXE} = qt.conf && continue
|
||||||
|
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
|
||||||
|
done
|
||||||
|
|
||||||
|
pushd ..
|
||||||
|
tar -czvvf LAMMPS-Linux-amd64.tar.gz LAMMPS_GUI
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo "Cleanup dir"
|
||||||
|
rm -r ${DESTDIR}
|
||||||
|
exit 0
|
||||||
111
cmake/packaging/build_macos_dmg.sh
Executable file
111
cmake/packaging/build_macos_dmg.sh
Executable file
@ -0,0 +1,111 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP_NAME=lammps-gui
|
||||||
|
|
||||||
|
echo "Delete old files, if they exist"
|
||||||
|
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS-macOS-multiarch.dmg
|
||||||
|
|
||||||
|
echo "Create initial dmg file with macdeployqt"
|
||||||
|
macdeployqt lammps-gui.app -dmg
|
||||||
|
echo "Create writable dmg file"
|
||||||
|
hdiutil convert ${APP_NAME}.dmg -format UDRW -o ${APP_NAME}-rw.dmg
|
||||||
|
|
||||||
|
echo "Mount writeable DMG file in read-write mode. Keep track of device and volume names"
|
||||||
|
DEVICE=$(hdiutil attach -readwrite -noverify ${APP_NAME}-rw.dmg | grep '^/dev/' | sed 1q | awk '{print $1}')
|
||||||
|
VOLUME=$(df | grep ${DEVICE} | sed -e 's/^.*\(\/Volumes\/\)/\1/')
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
echo "Create link to Application folder and move README and background image files"
|
||||||
|
|
||||||
|
pushd "${VOLUME}"
|
||||||
|
ln -s /Applications .
|
||||||
|
mv ${APP_NAME}.app/Contents/Resources/README.txt .
|
||||||
|
mkdir .background
|
||||||
|
mv ${APP_NAME}.app/Contents/Resources/LAMMPS_DMG_Background.png .background/background.png
|
||||||
|
mv ${APP_NAME}.app LAMMPS.app
|
||||||
|
cd LAMMPS.app/Contents
|
||||||
|
|
||||||
|
echo "Attach icons to LAMMPS console and GUI executables"
|
||||||
|
echo "read 'icns' (-16455) \"Resources/lammps.icns\";" > icon.rsrc
|
||||||
|
Rez -a icon.rsrc -o bin/lmp
|
||||||
|
SetFile -a C bin/lmp
|
||||||
|
Rez -a icon.rsrc -o MacOS/lammps-gui
|
||||||
|
SetFile -a C MacOS/lammps-gui
|
||||||
|
rm icon.rsrc
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo 'Tell the Finder to resize the window, set the background,'
|
||||||
|
echo 'change the icon size, place the icons in the right position, etc.'
|
||||||
|
echo '
|
||||||
|
tell application "Finder"
|
||||||
|
tell disk "'${APP_NAME}'"
|
||||||
|
|
||||||
|
-- wait for the image to finish mounting
|
||||||
|
set open_attempts to 0
|
||||||
|
repeat while open_attempts < 4
|
||||||
|
try
|
||||||
|
open
|
||||||
|
delay 1
|
||||||
|
set open_attempts to 5
|
||||||
|
close
|
||||||
|
on error errStr number errorNumber
|
||||||
|
set open_attempts to open_attempts + 1
|
||||||
|
delay 10
|
||||||
|
end try
|
||||||
|
end repeat
|
||||||
|
delay 5
|
||||||
|
|
||||||
|
-- open the image the first time and save a .DS_Store
|
||||||
|
-- just the background and icon setup
|
||||||
|
open
|
||||||
|
set current view of container window to icon view
|
||||||
|
set theViewOptions to the icon view options of container window
|
||||||
|
set background picture of theViewOptions to file ".background:background.png"
|
||||||
|
set arrangement of theViewOptions to not arranged
|
||||||
|
set icon size of theViewOptions to 64
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
|
||||||
|
-- next set up the position of the app and Applications symlink
|
||||||
|
-- plus hide all window decorations
|
||||||
|
open
|
||||||
|
update without registering applications
|
||||||
|
tell container window
|
||||||
|
set sidebar width to 0
|
||||||
|
set statusbar visible to false
|
||||||
|
set toolbar visible to false
|
||||||
|
set the bounds to { 100, 40, 868, 640 }
|
||||||
|
set position of item "'LAMMPS'.app" to { 190, 216 }
|
||||||
|
set position of item "Applications" to { 576, 216 }
|
||||||
|
set position of item "README.txt" to { 190, 400 }
|
||||||
|
end tell
|
||||||
|
update without registering applications
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
|
||||||
|
-- one last open and close to check the results
|
||||||
|
open
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
end tell
|
||||||
|
delay 1
|
||||||
|
end tell
|
||||||
|
' | osascript
|
||||||
|
|
||||||
|
sync
|
||||||
|
|
||||||
|
echo "Unmount modified disk image and convert to compressed read-only image"
|
||||||
|
hdiutil detach "${DEVICE}"
|
||||||
|
hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS-macOS-multiarch.dmg"
|
||||||
|
|
||||||
|
echo "Attach icon to .dmg file"
|
||||||
|
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
|
||||||
|
Rez -a icon.rsrc -o LAMMPS-macOS-multiarch.dmg
|
||||||
|
SetFile -a C LAMMPS-macOS-multiarch.dmg
|
||||||
|
rm icon.rsrc
|
||||||
|
|
||||||
|
echo "Delete temporary disk images"
|
||||||
|
rm -f "${APP_NAME}-rw.dmg"
|
||||||
|
rm -f "${APP_NAME}.dmg"
|
||||||
|
|
||||||
|
exit 0
|
||||||
64
cmake/packaging/build_windows_cross_zip.sh
Executable file
64
cmake/packaging/build_windows_cross_zip.sh
Executable file
@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP_NAME=lammps-gui
|
||||||
|
DESTDIR=${PWD}/LAMMPS_GUI
|
||||||
|
SYSROOT="$1"
|
||||||
|
|
||||||
|
echo "Delete old files, if they exist"
|
||||||
|
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip
|
||||||
|
|
||||||
|
echo "Create staging area for deployment and populate"
|
||||||
|
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||||
|
|
||||||
|
# no static libs needed
|
||||||
|
rm -rvf ${DESTDIR}/lib
|
||||||
|
# but the LAMMPS lib
|
||||||
|
|
||||||
|
echo "Copying required DLL files"
|
||||||
|
for dll in $(objdump -p *.exe *.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||||
|
do \
|
||||||
|
doskip=0
|
||||||
|
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||||
|
do \
|
||||||
|
test ${dll} = ${skip}.dll && doskip=1
|
||||||
|
done
|
||||||
|
test ${doskip} -eq 1 && continue
|
||||||
|
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Copy required Qt plugins"
|
||||||
|
mkdir -p ${DESTDIR}/qt5plugins
|
||||||
|
for plugin in imageformats platforms styles
|
||||||
|
do \
|
||||||
|
cp -r ${SYSROOT}/lib/qt5/plugins/${plugin} ${DESTDIR}/qt5plugins/
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Check dependencies of DLL files"
|
||||||
|
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||||
|
do \
|
||||||
|
doskip=0
|
||||||
|
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||||
|
do \
|
||||||
|
test ${dll} = ${skip}.dll && doskip=1
|
||||||
|
done
|
||||||
|
test ${doskip} -eq 1 && continue
|
||||||
|
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||||
|
do \
|
||||||
|
doskip=0
|
||||||
|
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||||
|
do \
|
||||||
|
test ${dll} = ${skip}.dll && doskip=1
|
||||||
|
done
|
||||||
|
test ${doskip} -eq 1 && continue
|
||||||
|
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
cat > ${DESTDIR}/bin/qt.conf <<EOF
|
||||||
|
[Paths]
|
||||||
|
Plugins = ../qt5plugins
|
||||||
|
EOF
|
||||||
|
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI
|
||||||
|
|
||||||
28
cmake/packaging/build_windows_vs.cmake
Normal file
28
cmake/packaging/build_windows_vs.cmake
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# CMake script to be run post installation to build zipped package
|
||||||
|
|
||||||
|
# clean up old zipfile and deployment tree
|
||||||
|
file(REMOVE LAMMPS-Win10-amd64.zip)
|
||||||
|
file(REMOVE_RECURSE LAMMPS_GUI)
|
||||||
|
file(RENAME ${INSTNAME} LAMMPS_GUI)
|
||||||
|
|
||||||
|
# move all executables and dlls to main folder and delete bin folder
|
||||||
|
file(GLOB BINFILES LIST_DIRECTORIES FALSE LAMMPS_GUI/bin/*.exe LAMMPS_GUI/bin/*.dll)
|
||||||
|
foreach(bin ${BINFILES})
|
||||||
|
get_filename_component(exe ${bin} NAME)
|
||||||
|
file(RENAME ${bin} LAMMPS_GUI/${exe})
|
||||||
|
endforeach()
|
||||||
|
file(REMOVE_RECURSE LAMMPS_GUI/bin)
|
||||||
|
|
||||||
|
# create qt.conf so Qt will find its plugins
|
||||||
|
file(WRITE LAMMPS_GUI/qt.conf "[Paths]\r\nPlugins = qt5plugins\r\n")
|
||||||
|
|
||||||
|
# initialize environment and then run windeployqt to populate folder with missing dependencies and Qt plugins
|
||||||
|
file(WRITE qtdeploy.bat "@ECHO OFF\r\nset VSCMD_DEBUG=0\r\nCALL ${VC_INIT} x64\r\nset PATH=${QT5_BIN_DIR};%PATH%\r\nwindeployqt --plugindir LAMMPS_GUI/qt5plugins --release LAMMPS_GUI/lammps-gui.exe --no-quick-import --no-webkit2 --no-translations --no-system-d3d-compiler --no-angle --no-opengl-sw\r\n")
|
||||||
|
execute_process(COMMAND cmd.exe /c qtdeploy.bat COMMAND_ECHO STDERR)
|
||||||
|
file(REMOVE qtdeploy.bat)
|
||||||
|
|
||||||
|
# create zip archive
|
||||||
|
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS-Win10-amd64.zip")
|
||||||
|
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File makearchive.ps1)
|
||||||
|
file(REMOVE makearchive.ps1)
|
||||||
|
file(REMOVE_RECURSE LAMMPS_GUI)
|
||||||
BIN
cmake/packaging/lammps-icon-1024x1024.png
Normal file
BIN
cmake/packaging/lammps-icon-1024x1024.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 598 KiB |
BIN
cmake/packaging/lammps.icns
Normal file
BIN
cmake/packaging/lammps.icns
Normal file
Binary file not shown.
15
cmake/packaging/linux_wrapper.sh
Executable file
15
cmake/packaging/linux_wrapper.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# wrapper for bundled executables
|
||||||
|
|
||||||
|
BASEDIR=$(dirname "$0")
|
||||||
|
EXENAME=$(basename "$0")
|
||||||
|
|
||||||
|
# append to LD_LIBRARY_PATH to prefer local (newer) libs
|
||||||
|
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BASEDIR}/lib
|
||||||
|
|
||||||
|
# set some environment variables for LAMMPS etc.
|
||||||
|
LAMMPS_POTENTIALS=${BASEDIR}/share/lammps/potentials
|
||||||
|
MSI2LMP_LIBRARY=${BASEDIR}/share/lammps/frc_files
|
||||||
|
export LD_LIBRARY_PATH LAMMPS_POTENTIALS MSI2LMP_LIBRARY
|
||||||
|
|
||||||
|
exec "${BASEDIR}/bin/${EXENAME}" "$@"
|
||||||
30
cmake/packaging/png2iconset.sh
Executable file
30
cmake/packaging/png2iconset.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $# != 2 ]
|
||||||
|
then
|
||||||
|
echo "usage: $0 <pngfile> <iconset name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
png="$1"
|
||||||
|
ico="$2"
|
||||||
|
|
||||||
|
if [ ! -f ${png} ]
|
||||||
|
then
|
||||||
|
echo "PNG Image $1 not found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ${ico}.iconset
|
||||||
|
mkdir ${ico}.iconset
|
||||||
|
sips -z 16 16 ${png} --out ${ico}.iconset/icon_16x16.png
|
||||||
|
sips -z 32 32 ${png} --out ${ico}.iconset/icon_16x16@2x.png
|
||||||
|
sips -z 32 32 ${png} --out ${ico}.iconset/icon_32x32.png
|
||||||
|
sips -z 64 64 ${png} --out ${ico}.iconset/icon_32x32@2x.png
|
||||||
|
sips -z 128 128 ${png} --out ${ico}.iconset/icon_128x128.png
|
||||||
|
sips -z 256 256 ${png} --out ${ico}.iconset/icon_128x128@2x.png
|
||||||
|
sips -z 256 256 ${png} --out ${ico}.iconset/icon_256x256.png
|
||||||
|
sips -z 512 512 ${png} --out ${ico}.iconset/icon_256x256@2x.png
|
||||||
|
sips -z 512 512 ${png} --out ${ico}.iconset/icon_512x512.png
|
||||||
|
sips -z 1024 1024 ${png} --out ${ico}.iconset/icon_512x512@2x.png
|
||||||
|
iconutil -c icns ${ico}.iconset
|
||||||
|
rm -rf ${ico}.iconset
|
||||||
@ -64,7 +64,6 @@ set(ALL_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
OPENMP
|
OPENMP
|
||||||
OPT
|
OPT
|
||||||
|
|||||||
@ -66,7 +66,6 @@ set(ALL_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
OPENMP
|
OPENMP
|
||||||
OPT
|
OPT
|
||||||
|
|||||||
@ -9,7 +9,6 @@ endforeach()
|
|||||||
|
|
||||||
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
|
|
||||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
|
||||||
|
|||||||
14
cmake/presets/macos-multiarch.cmake
Normal file
14
cmake/presets/macos-multiarch.cmake
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# preset that will build portable multi-arch binaries on macOS without MPI
|
||||||
|
|
||||||
|
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0 CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(BUILD_MPI FALSE CACHE BOOL "" FORCE)
|
||||||
|
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE)
|
||||||
|
set(LAMMPS_EXCEPTIONS TRUE CACHE BOOL "" FORCE)
|
||||||
@ -24,8 +24,8 @@ set(ALL_PACKAGES
|
|||||||
DPD-REACT
|
DPD-REACT
|
||||||
DPD-SMOOTH
|
DPD-SMOOTH
|
||||||
DRUDE
|
DRUDE
|
||||||
ELECTRODE
|
|
||||||
EFF
|
EFF
|
||||||
|
ELECTRODE
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
|
|||||||
@ -20,7 +20,6 @@ set(PACKAGES_WITH_LIB
|
|||||||
ML-QUIP
|
ML-QUIP
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
PLUMED
|
PLUMED
|
||||||
PYTHON
|
PYTHON
|
||||||
|
|||||||
@ -32,6 +32,7 @@ set(WIN_PACKAGES
|
|||||||
INTERLAYER
|
INTERLAYER
|
||||||
KSPACE
|
KSPACE
|
||||||
LEPTON
|
LEPTON
|
||||||
|
MACHDYN
|
||||||
MANIFOLD
|
MANIFOLD
|
||||||
MANYBODY
|
MANYBODY
|
||||||
MC
|
MC
|
||||||
@ -45,6 +46,7 @@ set(WIN_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
OPENMP
|
OPENMP
|
||||||
|
OPT
|
||||||
ORIENT
|
ORIENT
|
||||||
PERI
|
PERI
|
||||||
PHONON
|
PHONON
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.TH LAMMPS "1" "15 June 2023" "2023-06-15"
|
.TH LAMMPS "1" "2 August 2023" "2023-08-2"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.B LAMMPS
|
.B LAMMPS
|
||||||
\- Molecular Dynamics Simulator. Version 15 June 2023
|
\- Molecular Dynamics Simulator. Version 2 August 2023
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B lmp
|
.B lmp
|
||||||
|
|||||||
@ -52,7 +52,6 @@ This is the list of packages that may require additional steps.
|
|||||||
* :ref:`ML-POD <ml-pod>`
|
* :ref:`ML-POD <ml-pod>`
|
||||||
* :ref:`ML-QUIP <ml-quip>`
|
* :ref:`ML-QUIP <ml-quip>`
|
||||||
* :ref:`MOLFILE <molfile>`
|
* :ref:`MOLFILE <molfile>`
|
||||||
* :ref:`MSCG <mscg>`
|
|
||||||
* :ref:`NETCDF <netcdf>`
|
* :ref:`NETCDF <netcdf>`
|
||||||
* :ref:`OPENMP <openmp>`
|
* :ref:`OPENMP <openmp>`
|
||||||
* :ref:`OPT <opt>`
|
* :ref:`OPT <opt>`
|
||||||
@ -140,6 +139,8 @@ CMake build
|
|||||||
# value = yes or no (default)
|
# value = yes or no (default)
|
||||||
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
|
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
|
||||||
# value = yes or no (default)
|
# value = yes or no (default)
|
||||||
|
-D CUDA_BUILD_MULTIARCH=value # enables building CUDA kernels for all supported GPU architectures
|
||||||
|
# value = yes (default) or no
|
||||||
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
|
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
|
||||||
# value = yes (default) or no
|
# value = yes (default) or no
|
||||||
|
|
||||||
@ -158,41 +159,49 @@ CMake build
|
|||||||
A more detailed list can be found, for example,
|
A more detailed list can be found, for example,
|
||||||
at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_
|
at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_
|
||||||
|
|
||||||
CMake can detect which version of the CUDA toolkit is used and thus will try
|
CMake can detect which version of the CUDA toolkit is used and thus will
|
||||||
to include support for **all** major GPU architectures supported by this toolkit.
|
try to include support for **all** major GPU architectures supported by
|
||||||
Thus the GPU_ARCH setting is merely an optimization, to have code for
|
this toolkit. Thus the GPU_ARCH setting is merely an optimization, to
|
||||||
the preferred GPU architecture directly included rather than having to wait
|
have code for the preferred GPU architecture directly included rather
|
||||||
for the JIT compiler of the CUDA driver to translate it.
|
than having to wait for the JIT compiler of the CUDA driver to translate
|
||||||
|
it. This behavior can be turned off (e.g. to speed up compilation) by
|
||||||
|
setting :code:`CUDA_ENABLE_MULTIARCH` to :code:`no`.
|
||||||
|
|
||||||
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the CUDA toolkit
|
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the
|
||||||
is required and a GPU architecture of Kepler or later, which must *also* be
|
CUDA toolkit is required and a GPU architecture of Kepler or later,
|
||||||
supported by the CUDA toolkit in use **and** the CUDA driver in use.
|
which must *also* be supported by the CUDA toolkit in use **and** the
|
||||||
When compiling for OpenCL, OpenCL version 1.2 or later is required and the
|
CUDA driver in use. When compiling for OpenCL, OpenCL version 1.2 or
|
||||||
GPU must be supported by the GPU driver and OpenCL runtime bundled with the driver.
|
later is required and the GPU must be supported by the GPU driver and
|
||||||
|
OpenCL runtime bundled with the driver.
|
||||||
|
|
||||||
When building with CMake, you **must NOT** build the GPU library in ``lib/gpu``
|
When building with CMake, you **must NOT** build the GPU library in
|
||||||
using the traditional build procedure. CMake will detect files generated by that
|
``lib/gpu`` using the traditional build procedure. CMake will detect
|
||||||
process and will terminate with an error and a suggestion for how to remove them.
|
files generated by that process and will terminate with an error and a
|
||||||
|
suggestion for how to remove them.
|
||||||
|
|
||||||
If you are compiling for OpenCL, the default setting is to download, build, and
|
If you are compiling for OpenCL, the default setting is to download,
|
||||||
link with a static OpenCL ICD loader library and standard OpenCL headers. This
|
build, and link with a static OpenCL ICD loader library and standard
|
||||||
way no local OpenCL development headers or library needs to be present and only
|
OpenCL headers. This way no local OpenCL development headers or library
|
||||||
OpenCL compatible drivers need to be installed to use OpenCL. If this is not
|
needs to be present and only OpenCL compatible drivers need to be
|
||||||
desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
|
installed to use OpenCL. If this is not desired, you can set
|
||||||
|
:code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
|
||||||
|
|
||||||
The GPU library has some multi-thread support using OpenMP. If LAMMPS is built
|
The GPU library has some multi-thread support using OpenMP. If LAMMPS
|
||||||
with ``-D BUILD_OMP=on`` this will also be enabled.
|
is built with ``-D BUILD_OMP=on`` this will also be enabled.
|
||||||
|
|
||||||
If you are compiling with HIP, note that before running CMake you will have to
|
If you are compiling with HIP, note that before running CMake you will
|
||||||
set appropriate environment variables. Some variables such as
|
have to set appropriate environment variables. Some variables such as
|
||||||
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are necessary for :code:`hipcc`
|
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are
|
||||||
and the linker to work correctly.
|
necessary for :code:`hipcc` and the linker to work correctly.
|
||||||
|
|
||||||
Using CHIP-SPV implementation of HIP is now supported. It allows one to run HIP
|
.. versionadded:: 3Aug2022
|
||||||
code on Intel GPUs via the OpenCL or Level Zero backends. To use CHIP-SPV, you must
|
|
||||||
set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake command line as CHIP-SPV does not
|
Using the CHIP-SPV implementation of HIP is supported. It allows one to
|
||||||
yet support hipCUB. The use of HIP for Intel GPUs is still experimental so you
|
run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use
|
||||||
should only use this option in preparations to run on Aurora system at ANL.
|
CHIP-SPV, you must set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake
|
||||||
|
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
|
||||||
|
the use of HIP for Intel GPUs is experimental. You should only use this
|
||||||
|
option in preparations to run on Aurora system at Argonne.
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
@ -629,6 +638,12 @@ They must be specified in uppercase.
|
|||||||
* - VEGA90A
|
* - VEGA90A
|
||||||
- GPU
|
- GPU
|
||||||
- AMD GPU MI200 GFX90A
|
- AMD GPU MI200 GFX90A
|
||||||
|
* - NAVI1030
|
||||||
|
- GPU
|
||||||
|
- AMD GPU V620/W6800
|
||||||
|
* - NAVI1100
|
||||||
|
- GPU
|
||||||
|
- AMD GPU RX7900XTX
|
||||||
* - INTEL_GEN
|
* - INTEL_GEN
|
||||||
- GPU
|
- GPU
|
||||||
- SPIR64-based devices, e.g. Intel GPUs, using JIT
|
- SPIR64-based devices, e.g. Intel GPUs, using JIT
|
||||||
@ -651,7 +666,7 @@ They must be specified in uppercase.
|
|||||||
- GPU
|
- GPU
|
||||||
- Intel GPU Ponte Vecchio
|
- Intel GPU Ponte Vecchio
|
||||||
|
|
||||||
This list was last updated for version 3.7.1 of the Kokkos library.
|
This list was last updated for version 4.0.1 of the Kokkos library.
|
||||||
|
|
||||||
.. tabs::
|
.. tabs::
|
||||||
|
|
||||||
@ -921,59 +936,6 @@ Python version 3.6 or later.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. _mscg:
|
|
||||||
|
|
||||||
MSCG package
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
To build with this package, you must download and build the MS-CG
|
|
||||||
library. Building the MS-CG library requires that the GSL
|
|
||||||
(GNU Scientific Library) headers and libraries are installed on your
|
|
||||||
machine. See the ``lib/mscg/README`` and ``MSCG/Install`` files for
|
|
||||||
more details.
|
|
||||||
|
|
||||||
.. tabs::
|
|
||||||
|
|
||||||
.. tab:: CMake build
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
-D DOWNLOAD_MSCG=value # download MSCG for build, value = no (default) or yes
|
|
||||||
-D MSCG_LIBRARY=path # MSCG library file (only needed if a custom location)
|
|
||||||
-D MSCG_INCLUDE_DIR=path # MSCG include directory (only needed if a custom location)
|
|
||||||
|
|
||||||
If ``DOWNLOAD_MSCG`` is set, the MSCG library will be downloaded
|
|
||||||
and built inside the CMake build directory. If the MSCG library
|
|
||||||
is already on your system (in a location CMake cannot find it),
|
|
||||||
``MSCG_LIBRARY`` is the filename (plus path) of the MSCG library
|
|
||||||
file, not the directory the library file is in.
|
|
||||||
``MSCG_INCLUDE_DIR`` is the directory the MSCG include file is in.
|
|
||||||
|
|
||||||
.. tab:: Traditional make
|
|
||||||
|
|
||||||
You can download and build the MS-CG library manually if you
|
|
||||||
prefer; follow the instructions in ``lib/mscg/README``\ . You can
|
|
||||||
also do it in one step from the ``lammps/src`` dir, using a
|
|
||||||
command like these, which simply invokes the
|
|
||||||
``lib/mscg/Install.py`` script with the specified args:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
make lib-mscg # print help message
|
|
||||||
make lib-mscg args="-b -m serial" # download and build in lib/mscg/MSCG-release-master
|
|
||||||
# with the settings compatible with "make serial"
|
|
||||||
make lib-mscg args="-b -m mpi" # download and build in lib/mscg/MSCG-release-master
|
|
||||||
# with the settings compatible with "make mpi"
|
|
||||||
make lib-mscg args="-p /usr/local/mscg-release" # use the existing MS-CG installation in /usr/local/mscg-release
|
|
||||||
|
|
||||||
Note that 2 symbolic (soft) links, ``includelink`` and ``liblink``,
|
|
||||||
will be created in ``lib/mscg`` to point to the MS-CG
|
|
||||||
``src/installation`` dir. When LAMMPS is built in src it will use
|
|
||||||
these links. You should not need to edit the
|
|
||||||
``lib/mscg/Makefile.lammps`` file.
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. _opt:
|
.. _opt:
|
||||||
|
|
||||||
OPT package
|
OPT package
|
||||||
|
|||||||
@ -55,7 +55,6 @@ packages:
|
|||||||
* :ref:`ML-POD <ml-pod>`
|
* :ref:`ML-POD <ml-pod>`
|
||||||
* :ref:`ML-QUIP <ml-quip>`
|
* :ref:`ML-QUIP <ml-quip>`
|
||||||
* :ref:`MOLFILE <molfile>`
|
* :ref:`MOLFILE <molfile>`
|
||||||
* :ref:`MSCG <mscg>`
|
|
||||||
* :ref:`NETCDF <netcdf>`
|
* :ref:`NETCDF <netcdf>`
|
||||||
* :ref:`OPENMP <openmp>`
|
* :ref:`OPENMP <openmp>`
|
||||||
* :ref:`OPT <opt>`
|
* :ref:`OPT <opt>`
|
||||||
|
|||||||
@ -459,27 +459,13 @@ those systems:
|
|||||||
.. _exceptions:
|
.. _exceptions:
|
||||||
|
|
||||||
Exception handling when using LAMMPS as a library
|
Exception handling when using LAMMPS as a library
|
||||||
------------------------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
This setting is useful when external codes drive LAMMPS as a library.
|
LAMMPS errors do not kill the calling code, but throw an exception. In
|
||||||
With this option enabled, LAMMPS errors do not kill the calling code.
|
the C-library interface, the call stack is unwound and control returns
|
||||||
Instead, the call stack is unwound and control returns to the caller,
|
to the caller, e.g. to Python or a code that is coupled to LAMMPS and
|
||||||
e.g. to Python. Of course, the calling code has to be set up to
|
the error status can be queried. When using C++ directly, the calling
|
||||||
*catch* exceptions thrown from within LAMMPS.
|
code has to be set up to *catch* exceptions thrown from within LAMMPS.
|
||||||
|
|
||||||
.. tabs::
|
|
||||||
|
|
||||||
.. tab:: CMake build
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
-D LAMMPS_EXCEPTIONS=value # yes or no (default)
|
|
||||||
|
|
||||||
.. tab:: Traditional make
|
|
||||||
|
|
||||||
.. code-block:: make
|
|
||||||
|
|
||||||
LMP_INC = -DLAMMPS_EXCEPTIONS <other LMP_INC settings>
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,6 @@ OPT.
|
|||||||
* :doc:`momentum (k) <fix_momentum>`
|
* :doc:`momentum (k) <fix_momentum>`
|
||||||
* :doc:`momentum/chunk <fix_momentum>`
|
* :doc:`momentum/chunk <fix_momentum>`
|
||||||
* :doc:`move <fix_move>`
|
* :doc:`move <fix_move>`
|
||||||
* :doc:`mscg <fix_mscg>`
|
|
||||||
* :doc:`msst <fix_msst>`
|
* :doc:`msst <fix_msst>`
|
||||||
* :doc:`mvv/dpd <fix_mvv_dpd>`
|
* :doc:`mvv/dpd <fix_mvv_dpd>`
|
||||||
* :doc:`mvv/edpd <fix_mvv_dpd>`
|
* :doc:`mvv/edpd <fix_mvv_dpd>`
|
||||||
|
|||||||
@ -85,6 +85,16 @@ The same functionality is available through
|
|||||||
:doc:`bond style mesocnt <bond_mesocnt>` and
|
:doc:`bond style mesocnt <bond_mesocnt>` and
|
||||||
:doc:`angle style mesocnt <angle_mesocnt>`.
|
:doc:`angle style mesocnt <angle_mesocnt>`.
|
||||||
|
|
||||||
|
MSCG package
|
||||||
|
------------
|
||||||
|
|
||||||
|
.. deprecated:: TBD
|
||||||
|
|
||||||
|
The MSCG package has been removed from LAMMPS since it was unmaintained
|
||||||
|
for many years and instead superseded by the `OpenMSCG software
|
||||||
|
<https://software.rcc.uchicago.edu/mscg/>`_ of the Voth group at the
|
||||||
|
University of Chicago, which can be used independent from LAMMPS.
|
||||||
|
|
||||||
REAX package
|
REAX package
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|||||||
@ -92,8 +92,8 @@ Arguments for these methods can be values returned by the
|
|||||||
*setup_grid()* method (described below), which define the extent of
|
*setup_grid()* method (described below), which define the extent of
|
||||||
the grid cells (owned+ghost) the processor owns. These 4 methods
|
the grid cells (owned+ghost) the processor owns. These 4 methods
|
||||||
allocate memory for 2d (first two) and 3d (second two) grid data. The
|
allocate memory for 2d (first two) and 3d (second two) grid data. The
|
||||||
two methods that end in "_one" allocate an array which stores a single
|
two methods that end in "_offset" allocate an array which stores a single
|
||||||
value per grid cell. The two that end in "_multi" allocate an array
|
value per grid cell. The two that end in "_last" allocate an array
|
||||||
which stores *Nvalues* per grid cell.
|
which stores *Nvalues* per grid cell.
|
||||||
|
|
||||||
.. code-block:: c++
|
.. code-block:: c++
|
||||||
|
|||||||
@ -104,8 +104,6 @@ Lowercase directories
|
|||||||
+-------------+------------------------------------------------------------------+
|
+-------------+------------------------------------------------------------------+
|
||||||
| min | energy minimization of 2d LJ melt |
|
| min | energy minimization of 2d LJ melt |
|
||||||
+-------------+------------------------------------------------------------------+
|
+-------------+------------------------------------------------------------------+
|
||||||
| mscg | parameterize a multi-scale coarse-graining (MSCG) model |
|
|
||||||
+-------------+------------------------------------------------------------------+
|
|
||||||
| msst | MSST shock dynamics |
|
| msst | MSST shock dynamics |
|
||||||
+-------------+------------------------------------------------------------------+
|
+-------------+------------------------------------------------------------------+
|
||||||
| multi | multi neighboring for systems with large interaction disparities |
|
| multi | multi neighboring for systems with large interaction disparities |
|
||||||
|
|||||||
@ -2278,19 +2278,13 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
|||||||
|
|
||||||
.. versionadded:: 3Nov2022
|
.. versionadded:: 3Nov2022
|
||||||
|
|
||||||
In case of an error, LAMMPS will either abort or throw a C++ exception.
|
When using the library interface, the library interface functions
|
||||||
The latter has to be :ref:`enabled at compile time <exceptions>`.
|
will "catch" exceptions, and then the error status can be checked by
|
||||||
This function checks if exceptions were enabled.
|
calling :f:func:`has_error`. The most recent error message can be
|
||||||
|
retrieved via :f:func:`get_last_error_message`. This allows to
|
||||||
When using the library interface with C++ exceptions enabled, the library
|
restart a calculation or delete and recreate the LAMMPS instance when
|
||||||
interface functions will "catch" them, and the error status can then be
|
a C++ exception occurs. One application of using exceptions this way
|
||||||
checked by calling :f:func:`has_error`. The most recent error message can be
|
is the :ref:`lammps_shell`.
|
||||||
retrieved via :f:func:`get_last_error_message`.
|
|
||||||
This can allow one to restart a calculation or delete and recreate
|
|
||||||
the LAMMPS instance when a C++ exception occurs. One application
|
|
||||||
of using exceptions this way is the :ref:`lammps_shell`. If C++
|
|
||||||
exceptions are disabled and an error happens during a call to
|
|
||||||
LAMMPS or the Fortran API, the application will terminate.
|
|
||||||
|
|
||||||
:to: :cpp:func:`lammps_config_has_exceptions`
|
:to: :cpp:func:`lammps_config_has_exceptions`
|
||||||
:r has_exceptions:
|
:r has_exceptions:
|
||||||
|
|||||||
@ -338,8 +338,6 @@ Some common LAMMPS specific variables
|
|||||||
- common compiler flags, for optimization or instrumentation (default:)
|
- common compiler flags, for optimization or instrumentation (default:)
|
||||||
* - ``LAMMPS_MACHINE``
|
* - ``LAMMPS_MACHINE``
|
||||||
- when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a``
|
- when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a``
|
||||||
* - ``LAMMPS_EXCEPTIONS``
|
|
||||||
- when set to ``on`` errors will throw a C++ exception instead of aborting (default: ``off``)
|
|
||||||
* - ``FFT``
|
* - ``FFT``
|
||||||
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
|
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
|
||||||
* - ``FFT_SINGLE``
|
* - ``FFT_SINGLE``
|
||||||
@ -412,9 +410,9 @@ interface (``ccmake`` or ``cmake-gui``).
|
|||||||
|
|
||||||
Using a preset to select a compiler package (``clang.cmake``,
|
Using a preset to select a compiler package (``clang.cmake``,
|
||||||
``gcc.cmake``, ``intel.cmake``, ``oneapi.cmake``, or ``pgi.cmake``)
|
``gcc.cmake``, ``intel.cmake``, ``oneapi.cmake``, or ``pgi.cmake``)
|
||||||
are an exception to the mechanism of updating the configuration incrementally,
|
are an exception to the mechanism of updating the configuration
|
||||||
as they will trigger a reset of cached internal CMake settings and thus
|
incrementally, as they will trigger a reset of cached internal CMake
|
||||||
reset settings to their default values.
|
settings and thus reset settings to their default values.
|
||||||
|
|
||||||
Compilation and build targets
|
Compilation and build targets
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|||||||
@ -53,10 +53,10 @@ System-wide Installation
|
|||||||
Step 1: Building LAMMPS as a shared library
|
Step 1: Building LAMMPS as a shared library
|
||||||
"""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
To use LAMMPS inside of Python it has to be compiled as shared library. This
|
To use LAMMPS inside of Python it has to be compiled as shared
|
||||||
library is then loaded by the Python interface. In this example we enable the
|
library. This library is then loaded by the Python interface. In this
|
||||||
MOLECULE package and compile LAMMPS with C++ exceptions, PNG, JPEG and FFMPEG
|
example we enable the MOLECULE package and compile LAMMPS with PNG, JPEG
|
||||||
output support enabled.
|
and FFMPEG output support enabled.
|
||||||
|
|
||||||
Step 1a: For the CMake based build system, the steps are:
|
Step 1a: For the CMake based build system, the steps are:
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ Step 1a: For the CMake based build system, the steps are:
|
|||||||
cd $LAMMPS_DIR/build-shared
|
cd $LAMMPS_DIR/build-shared
|
||||||
|
|
||||||
# MPI, PNG, Jpeg, FFMPEG are auto-detected
|
# MPI, PNG, Jpeg, FFMPEG are auto-detected
|
||||||
cmake ../cmake -DPKG_MOLECULE=yes -DLAMMPS_EXCEPTIONS=yes -DBUILD_LIB=yes -DBUILD_SHARED_LIBS=yes
|
cmake ../cmake -DPKG_MOLECULE=yes -DBUILD_LIB=yes -DBUILD_SHARED_LIBS=yes
|
||||||
make
|
make
|
||||||
|
|
||||||
Step 1b: For the legacy, make based build system, the steps are:
|
Step 1b: For the legacy, make based build system, the steps are:
|
||||||
@ -79,7 +79,7 @@ Step 1b: For the legacy, make based build system, the steps are:
|
|||||||
make yes-MOLECULE
|
make yes-MOLECULE
|
||||||
|
|
||||||
# compile shared library using Makefile
|
# compile shared library using Makefile
|
||||||
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG -DLAMMPS_EXCEPTIONS" JPG_LIB="-lpng -ljpeg"
|
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG" JPG_LIB="-lpng -ljpeg"
|
||||||
|
|
||||||
Step 2: Installing the LAMMPS Python package
|
Step 2: Installing the LAMMPS Python package
|
||||||
""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@ -356,18 +356,16 @@ Together with matplotlib plotting data out of LAMMPS becomes simple:
|
|||||||
Error handling with PyLammps
|
Error handling with PyLammps
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
Compiling the shared library with C++ exception support provides a better error
|
Using C++ exceptions in LAMMPS for errors allows capturing them on the
|
||||||
handling experience. Without exceptions the LAMMPS code will terminate the
|
C++ side and rethrowing them on the Python side. This way you can handle
|
||||||
current Python process with an error message. C++ exceptions allow capturing
|
LAMMPS errors through the Python exception handling mechanism.
|
||||||
them on the C++ side and rethrowing them on the Python side. This way you
|
|
||||||
can handle LAMMPS errors through the Python exception handling mechanism.
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Capturing a LAMMPS exception in Python can still mean that the
|
Capturing a LAMMPS exception in Python can still mean that the
|
||||||
current LAMMPS process is in an illegal state and must be terminated. It is
|
current LAMMPS process is in an illegal state and must be
|
||||||
advised to save your data and terminate the Python instance as quickly as
|
terminated. It is advised to save your data and terminate the Python
|
||||||
possible.
|
instance as quickly as possible.
|
||||||
|
|
||||||
Using PyLammps in IPython notebooks and Jupyter
|
Using PyLammps in IPython notebooks and Jupyter
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Programming language standards
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Most of the C++ code currently requires a compiler compatible with the
|
Most of the C++ code currently requires a compiler compatible with the
|
||||||
C++11 standard, the KOKKOS package currently requires C++14. Most of
|
C++11 standard, the KOKKOS package currently requires C++17. Most of
|
||||||
the Python code is written to be compatible with Python 3.5 or later or
|
the Python code is written to be compatible with Python 3.5 or later or
|
||||||
Python 2.7. Some Python scripts *require* Python 3 and a few others
|
Python 2.7. Some Python scripts *require* Python 3 and a few others
|
||||||
still need to be ported from Python 2 to Python 3.
|
still need to be ported from Python 2 to Python 3.
|
||||||
|
|||||||
@ -28,20 +28,34 @@ Include files (varied)
|
|||||||
packages and hard-to-find bugs have regularly manifested in the
|
packages and hard-to-find bugs have regularly manifested in the
|
||||||
past.
|
past.
|
||||||
|
|
||||||
- Header files, especially those defining a "style", should only use
|
- Header files, especially those defining a "style", should only use the
|
||||||
the absolute minimum number of include files and **must not**
|
absolute minimum number of include files and **must not** contain any
|
||||||
contain any ``using`` statements. Typically, that would only be the
|
``using`` statements. Typically, that would only be the header for the
|
||||||
header for the base class. Instead, any include statements should
|
base class. Instead, any include statements should be put in the
|
||||||
be put in the corresponding implementation files and forward
|
corresponding implementation files and forward declarations be used.
|
||||||
declarations be used. For implementation files, the "include what
|
For implementation files, the "include what you use" principle should
|
||||||
you use" principle should be employed. However, there is the
|
be employed. However, there is the notable exception that when the
|
||||||
notable exception that when the ``pointers.h`` header is included
|
``pointers.h`` header is included (or the header of one of the classes
|
||||||
(or one of the base classes derived from it) certain headers will
|
derived from it), certain headers will *always* be included and thus
|
||||||
always be included and thus do not need to be explicitly specified.
|
do not need to be explicitly specified. These are: `mpi.h`,
|
||||||
These are: `mpi.h`, `cstddef`, `cstdio`, `cstdlib`, `string`,
|
`cstddef`, `cstdio`, `cstdlib`, `string`, `utils.h`, `vector`,
|
||||||
`utils.h`, `vector`, `fmt/format.h`, `climits`, `cinttypes`. This
|
`fmt/format.h`, `climits`, `cinttypes`. This also means any such file
|
||||||
also means any such file can assume that `FILE`, `NULL`, and
|
can assume that `FILE`, `NULL`, and `INT_MAX` are defined.
|
||||||
`INT_MAX` are defined.
|
|
||||||
|
- Class members variables should not be initialized in the header file,
|
||||||
|
but instead should be initialized either in the initializer list of
|
||||||
|
the constructor or explicitly assigned in the body of the constructor.
|
||||||
|
If the member variable is relevant to the functionality of a class
|
||||||
|
(for example when it stores a value from a command line argument), the
|
||||||
|
member variable declaration is followed by a brief comment explaining
|
||||||
|
its purpose and what its values can be. Class members that are
|
||||||
|
pointers should always be initialized to ``nullptr`` in the
|
||||||
|
initializer list of the constructor. This reduces clutter in the
|
||||||
|
header and avoids accessing uninitialized pointers, which leads to
|
||||||
|
hard to debug issues, class members are often implicitly initialized
|
||||||
|
to ``NULL`` on the first use (but *not* after a :doc:`clear command
|
||||||
|
<clear>`). Please see the files ``reset_atoms_mol.h`` and
|
||||||
|
``reset_atoms_mol.cpp`` as an example.
|
||||||
|
|
||||||
- System headers or headers from installed libraries are included with
|
- System headers or headers from installed libraries are included with
|
||||||
angular brackets (example: ``#include <vector>``), while local
|
angular brackets (example: ``#include <vector>``), while local
|
||||||
|
|||||||
@ -88,7 +88,6 @@ page gives those details.
|
|||||||
* :ref:`MOLECULE <PKG-MOLECULE>`
|
* :ref:`MOLECULE <PKG-MOLECULE>`
|
||||||
* :ref:`MOLFILE <PKG-MOLFILE>`
|
* :ref:`MOLFILE <PKG-MOLFILE>`
|
||||||
* :ref:`MPIIO <PKG-MPIIO>`
|
* :ref:`MPIIO <PKG-MPIIO>`
|
||||||
* :ref:`MSCG <PKG-MSCG>`
|
|
||||||
* :ref:`NETCDF <PKG-NETCDF>`
|
* :ref:`NETCDF <PKG-NETCDF>`
|
||||||
* :ref:`OPENMP <PKG-OPENMP>`
|
* :ref:`OPENMP <PKG-OPENMP>`
|
||||||
* :ref:`OPT <PKG-OPT>`
|
* :ref:`OPT <PKG-OPT>`
|
||||||
@ -1257,7 +1256,7 @@ Also see the :ref:`GPU <PKG-GPU>`, :ref:`OPT <PKG-OPT>`, :ref:`INTEL
|
|||||||
<PKG-INTEL>`, and :ref:`OPENMP <PKG-OPENMP>` packages, which have styles
|
<PKG-INTEL>`, and :ref:`OPENMP <PKG-OPENMP>` packages, which have styles
|
||||||
optimized for CPUs, KNLs, and GPUs.
|
optimized for CPUs, KNLs, and GPUs.
|
||||||
|
|
||||||
You must have a C++14 compatible compiler to use this package.
|
You must have a C++17 compatible compiler to use this package.
|
||||||
KOKKOS makes extensive use of advanced C++ features, which can
|
KOKKOS makes extensive use of advanced C++ features, which can
|
||||||
expose compiler bugs, especially when compiling for maximum
|
expose compiler bugs, especially when compiling for maximum
|
||||||
performance at high optimization levels. Please see the file
|
performance at high optimization levels. Please see the file
|
||||||
@ -2066,38 +2065,6 @@ The MPIIO package requires that LAMMPS is build in :ref:`MPI parallel mode <seri
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. _PKG-MSCG:
|
|
||||||
|
|
||||||
MSCG package
|
|
||||||
------------
|
|
||||||
|
|
||||||
**Contents:**
|
|
||||||
|
|
||||||
A :doc:`fix mscg <fix_mscg>` command which can parameterize a
|
|
||||||
Multi-Scale Coarse-Graining (MSCG) model using the open-source `MS-CG library <mscg-home_>`_.
|
|
||||||
|
|
||||||
.. _mscg-home: https://github.com/uchicago-voth/MSCG-release
|
|
||||||
|
|
||||||
To use this package you must have the MS-CG library available on your
|
|
||||||
system.
|
|
||||||
|
|
||||||
**Authors:** The fix was written by Lauren Abbott (Sandia). The MS-CG
|
|
||||||
library was developed by Jacob Wagner in Greg Voth's group at the
|
|
||||||
University of Chicago.
|
|
||||||
|
|
||||||
**Install:**
|
|
||||||
|
|
||||||
This package has :ref:`specific installation instructions <mscg>` on the :doc:`Build extras <Build_extras>` page.
|
|
||||||
|
|
||||||
**Supporting info:**
|
|
||||||
|
|
||||||
* src/MSCG: filenames -> commands
|
|
||||||
* src/MSCG/README
|
|
||||||
* lib/mscg/README
|
|
||||||
* examples/mscg
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. _PKG-NETCDF:
|
.. _PKG-NETCDF:
|
||||||
|
|
||||||
NETCDF package
|
NETCDF package
|
||||||
|
|||||||
@ -338,11 +338,6 @@ whether an extra library is needed to build and use the package:
|
|||||||
- :doc:`dump <dump>`
|
- :doc:`dump <dump>`
|
||||||
- n/a
|
- n/a
|
||||||
- no
|
- no
|
||||||
* - :ref:`MSCG <PKG-MSCG>`
|
|
||||||
- multi-scale coarse-graining wrapper
|
|
||||||
- :doc:`fix mscg <fix_mscg>`
|
|
||||||
- mscg
|
|
||||||
- ext
|
|
||||||
* - :ref:`NETCDF <PKG-NETCDF>`
|
* - :ref:`NETCDF <PKG-NETCDF>`
|
||||||
- dump output via NetCDF
|
- dump output via NetCDF
|
||||||
- :doc:`dump netcdf <dump_netcdf>`
|
- :doc:`dump netcdf <dump_netcdf>`
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
Handling LAMMPS errors
|
Handling LAMMPS errors
|
||||||
*******************************
|
**********************
|
||||||
|
|
||||||
Compiling the shared library with :ref:`C++ exception support <exceptions>` provides a better error
|
The shared library is compiled with :ref:`C++ exception support
|
||||||
handling experience. Without exceptions the LAMMPS code will terminate the
|
<exceptions>` to provide a better error handling experience. C++
|
||||||
current Python process with an error message. C++ exceptions allow capturing
|
exceptions allow capturing errors on the C++ side and rethrowing them on
|
||||||
them on the C++ side and rethrowing them on the Python side. This way
|
the Python side. This way LAMMPS errors can be handled through the
|
||||||
LAMMPS errors can be handled through the Python exception handling mechanism.
|
Python exception handling mechanism.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@ -31,6 +31,6 @@ LAMMPS errors can be handled through the Python exception handling mechanism.
|
|||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Capturing a LAMMPS exception in Python can still mean that the
|
Capturing a LAMMPS exception in Python can still mean that the
|
||||||
current LAMMPS process is in an illegal state and must be terminated. It is
|
current LAMMPS process is in an illegal state and must be
|
||||||
advised to save your data and terminate the Python instance as quickly as
|
terminated. It is advised to save your data and terminate the Python
|
||||||
possible.
|
instance as quickly as possible when running in parallel with MPI.
|
||||||
|
|||||||
@ -26,23 +26,29 @@ task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
|
|||||||
GPUs) and HIP (for AMD GPUs). You choose the mode at build time to
|
GPUs) and HIP (for AMD GPUs). You choose the mode at build time to
|
||||||
produce an executable compatible with a specific hardware.
|
produce an executable compatible with a specific hardware.
|
||||||
|
|
||||||
.. admonition:: C++14 support
|
.. admonition:: C++17 support
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
Kokkos requires using a compiler that supports the c++14 standard. For
|
Kokkos requires using a compiler that supports the c++17 standard. For
|
||||||
some compilers, it may be necessary to add a flag to enable c++14 support.
|
some compilers, it may be necessary to add a flag to enable c++17 support.
|
||||||
For example, the GNU compiler uses the -std=c++14 flag. For a list of
|
For example, the GNU compiler uses the -std=c++17 flag. For a list of
|
||||||
compilers that have been tested with the Kokkos library, see the Kokkos
|
compilers that have been tested with the Kokkos library, see the Kokkos
|
||||||
`README <https://github.com/kokkos/kokkos/blob/master/README.md>`_.
|
`Wiki <https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_.
|
||||||
|
|
||||||
.. admonition:: NVIDIA CUDA support
|
.. admonition:: NVIDIA CUDA support
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
To build with Kokkos support for NVIDIA GPUs, the NVIDIA CUDA toolkit
|
To build with Kokkos support for NVIDIA GPUs, the NVIDIA CUDA toolkit
|
||||||
software version 9.0 or later must be installed on your system. See
|
software version 11.0 or later must be installed on your system. See
|
||||||
the discussion for the :doc:`GPU package <Speed_gpu>` for details of
|
the discussion for the :doc:`GPU package <Speed_gpu>` for details of
|
||||||
how to check and do this.
|
how to check and do this.
|
||||||
|
|
||||||
|
.. admonition:: AMD ROCm (HIP) support
|
||||||
|
:class: note
|
||||||
|
|
||||||
|
To build with Kokkos support for AMD GPUs, the AMD ROCm toolkit
|
||||||
|
software version 5.2.0 or later must be installed on your system.
|
||||||
|
|
||||||
.. admonition:: CUDA and MPI library compatibility
|
.. admonition:: CUDA and MPI library compatibility
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
|
|||||||
@ -93,6 +93,7 @@ Miscellaneous tools
|
|||||||
* :ref:`i-pi <ipi>`
|
* :ref:`i-pi <ipi>`
|
||||||
* :ref:`kate <kate>`
|
* :ref:`kate <kate>`
|
||||||
* :ref:`LAMMPS shell <lammps_shell>`
|
* :ref:`LAMMPS shell <lammps_shell>`
|
||||||
|
* :ref:`LAMMPS GUI <lammps_gui>`
|
||||||
* :ref:`LAMMPS magic patterns for file(1) <magic>`
|
* :ref:`LAMMPS magic patterns for file(1) <magic>`
|
||||||
* :ref:`Offline build tool <offline>`
|
* :ref:`Offline build tool <offline>`
|
||||||
* :ref:`singularity/apptainer <singularity_tool>`
|
* :ref:`singularity/apptainer <singularity_tool>`
|
||||||
@ -634,6 +635,229 @@ you first need to use the :doc:`clear` command.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
.. _lammps_gui:
|
||||||
|
|
||||||
|
LAMMPS GUI
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. versionadded:: 2Aug2023
|
||||||
|
|
||||||
|
Overview
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
LAMMPS GUI is essentially a small graphical text editor that is linked
|
||||||
|
to the :ref:`LAMMPS C-library interface <lammps_c_api>` and thus can run
|
||||||
|
LAMMPS directly using the contents of the editor's text buffer as input.
|
||||||
|
This is similar to what people usually would do using a text editor to
|
||||||
|
edit the input and then a command line terminal window to run the input
|
||||||
|
commands. The main benefit is that this integrates very well with
|
||||||
|
graphical desktop environments and that it is easier to use for
|
||||||
|
beginners in running computations and thus very suitable for tutorials
|
||||||
|
on LAMMPS. A small difference is that for the LAMMPS GUI it is not
|
||||||
|
require to first commit its buffer of the text editor to a file.
|
||||||
|
|
||||||
|
Features
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
The main window of the LAMMPS GUI is a generic text editor window with
|
||||||
|
line numbers and syntax highlighting set up for LAMMPS input files. It
|
||||||
|
can be used to edit any kind of text file, though. The output of a run
|
||||||
|
is captured and displayed in a separate dialog window and *not* sent to
|
||||||
|
the console or a log file (unless the :doc:`log command <log>` is used
|
||||||
|
in the input. The log window is regularly updated during the run and a
|
||||||
|
progress bar for the run command shown at the bottom of the main window.
|
||||||
|
Starting a new run will open another log windows. The state of LAMMPS
|
||||||
|
will be reset between two runs. After the simulation is finished, an
|
||||||
|
image of the simulated system can be created and shown in an image
|
||||||
|
viewer window. Ongoing runs can be stopped at the next iteration via
|
||||||
|
triggering a timeout.
|
||||||
|
|
||||||
|
When opening a file, the editor will determine the directory where the
|
||||||
|
file resides and switch its current working directory to the folder of
|
||||||
|
that file. Many LAMMPS inputs contain commands that read other files,
|
||||||
|
typically from the folder of the input file. The GUI will always show
|
||||||
|
the current working directory in the bottom. The editor window can also
|
||||||
|
receive (entire) files via drag-n-drop from a file manager GUI or a
|
||||||
|
desktop environment. When exiting the GUI with a modified buffer, a
|
||||||
|
dialog asking to either cancel, ignore the modifications, or save the
|
||||||
|
file with show up. Same when attempting to load a new file into a
|
||||||
|
modified buffer.
|
||||||
|
|
||||||
|
Hotkeys
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
Almost all functionality is accessible from the menu or via hotkeys.
|
||||||
|
The following hotkeys are available (On macOS use the Command key
|
||||||
|
instead of Ctrl (aka Control)).
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
:widths: auto
|
||||||
|
|
||||||
|
* - Hotkey
|
||||||
|
- Function
|
||||||
|
- Hotkey
|
||||||
|
- Function
|
||||||
|
- Hotkey
|
||||||
|
- Function
|
||||||
|
- Hotkey
|
||||||
|
- Function
|
||||||
|
* - Ctrl+N
|
||||||
|
- New File
|
||||||
|
- Ctrl+Z
|
||||||
|
- Undo edit
|
||||||
|
- Ctrl+V
|
||||||
|
- Paste text
|
||||||
|
- Ctrl+Q
|
||||||
|
- Quit (Main Window only)
|
||||||
|
* - Ctrl+O
|
||||||
|
- Open File
|
||||||
|
- Ctrl+Shift+Z
|
||||||
|
- Redo edit
|
||||||
|
- Ctrl+Enter
|
||||||
|
- Run LAMMPS
|
||||||
|
- Ctrl+W
|
||||||
|
- Close (Log and Image Window only)
|
||||||
|
* - CTRL+S
|
||||||
|
- Save File
|
||||||
|
- Ctrl+C
|
||||||
|
- Copy text
|
||||||
|
- Ctrl+/
|
||||||
|
- Stop Active Run
|
||||||
|
- Ctrl+P
|
||||||
|
- Preferences
|
||||||
|
* - Ctrl+Shift+S
|
||||||
|
- Save File As
|
||||||
|
- Ctrl+X
|
||||||
|
- Cut text
|
||||||
|
- Ctrl+I
|
||||||
|
- Create Snapshot Image
|
||||||
|
- Ctrl+Shift+/
|
||||||
|
- Quick Help
|
||||||
|
|
||||||
|
Further editing keybindings `are documented with the Qt documentation
|
||||||
|
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
|
||||||
|
case of conflicts the list above takes precedence.
|
||||||
|
|
||||||
|
Parallelization
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Due to its nature as a graphical application, it is not possible to use
|
||||||
|
the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading is
|
||||||
|
available and enabled by default.
|
||||||
|
|
||||||
|
Prerequisites and portability
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
LAMMPS GUI is programmed in C++ based on the C++11 standard and using
|
||||||
|
the `Qt GUI framework <https://www.qt.io/product/framework>`_.
|
||||||
|
Currently, Qt version 5.12 or later is required; Qt 5.15LTS is
|
||||||
|
recommended Qt 6.x not (yet) supported. Furthermore, CMake version 3.16
|
||||||
|
is required and LAMMPS must be configured with ``-D
|
||||||
|
LAMMPS_EXCETIONS=on`` and ``-D BUILD_MPI=off``. It has been successfully
|
||||||
|
compiled and tested on:
|
||||||
|
|
||||||
|
- Ubuntu Linux 20.04LTS x86_64 using GCC 9, Qt version 5.12
|
||||||
|
- Fedora Linux 38 x86\_64 using GCC 13 and Clang 16, Qt version 5.15LTS
|
||||||
|
- Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64, Qt version 5.15LTS
|
||||||
|
- Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36, Qt version 5.15LTS
|
||||||
|
|
||||||
|
Pre-compiled executables
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Pre-compiled LAMMPS executables including the GUI are currently
|
||||||
|
available from https://download.lammps.org/static. You can unpack the
|
||||||
|
archive (or mount the macOS disk image) and run the GUI directly in
|
||||||
|
place. The folder may also be moved around and added to the ``PATH``
|
||||||
|
environment variable so the executables will be found automatically. The
|
||||||
|
LAMMPS GUI executable is called ``lammps-gui`` and takes no arguments or
|
||||||
|
will interpret the first argument as filename to load.
|
||||||
|
|
||||||
|
Compilation
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
The source for the LAMMPS GUI is included with the LAMMPS source code
|
||||||
|
distribution in the folder `tools/lammps-gui` and thus it can be can be
|
||||||
|
built as part of a regular LAMMPS compilation.
|
||||||
|
:doc:`Using CMake <Howto_cmake>` is required.
|
||||||
|
To enable its compilation the CMake variable ``-D BUILD_LAMMPS_GUI=on``
|
||||||
|
must be set when creating the CMake configuration. All other settings
|
||||||
|
(compiler, flags, compile type) for LAMMPS GUI are then inherited from
|
||||||
|
the regular LAMMPS build. If the Qt library is packaged for Linux
|
||||||
|
distributions, then its location is typically auto-detected since the
|
||||||
|
required CMake configuration files are stored in a location where CMake
|
||||||
|
can find them without additional help. Otherwise, the location of the
|
||||||
|
Qt library installation must be indicated by setting
|
||||||
|
``-D Qt5_DIR=/path/to/qt5/lib/cmake/Qt5``, which is a path to a folder inside
|
||||||
|
the Qt installation that contains the file ``Qt5Config.cmake``.
|
||||||
|
|
||||||
|
It is also possible to build the LAMMPS GUI as a standalone executable
|
||||||
|
(e.g. when LAMMPS has been compiled with traditional make), then the
|
||||||
|
CMake configuration needs to be told where to find the LAMMPS headers
|
||||||
|
and the LAMMPS library, via `-D LAMMPS_SOURCE_DIR=/path/to/lammps/src`.
|
||||||
|
CMake will try to guess a build folder with the LAMMPS library from that
|
||||||
|
path, but it can also be set with `-D LAMMPS_LIB_DIR=/path/to/lammps/lib`.
|
||||||
|
|
||||||
|
Rather than linking to the LAMMPS library during compilation, it is also
|
||||||
|
possible to compile the GUI with a plugin loader library that will load
|
||||||
|
the LAMMPS library dynamically at runtime during the start of the GUI
|
||||||
|
from a shared library; e.g. `liblammps.so` or `liblammps.dylib` or
|
||||||
|
`liblammps.dll` (depending on the operating system). This has the
|
||||||
|
advantage that the LAMMPS library can be updated LAMMPS without having
|
||||||
|
to recompile the GUI. The ABI of the LAMMPS C-library interface is very
|
||||||
|
stable and generally backward compatible. This feature is enabled by
|
||||||
|
setting ``-D LAMMPS_GUI_USE_PLUGIN=on`` and then
|
||||||
|
``-D LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
|
||||||
|
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS distribution.
|
||||||
|
|
||||||
|
Platform notes
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
macOS
|
||||||
|
"""""
|
||||||
|
|
||||||
|
When building on macOS, the build procedure will try to manufacture a
|
||||||
|
drag-n-drop installer, LAMMPS-macOS-multiarch.dmg, when using the 'dmg'
|
||||||
|
target (i.e. `cmake --build <build dir> --target dmg` or `make dmg`.
|
||||||
|
|
||||||
|
To build multi-arch executables that will run on both, arm64 and x86_64
|
||||||
|
architectures natively, it is necessary to set the CMake variable ``-D
|
||||||
|
CMAKE_OSX_ARCHITECTURES=arm64;x86_64``. To achieve wide compatibility
|
||||||
|
with different macOS versions, you can also set ``-D
|
||||||
|
CMAKE_OSX_DEPLOYMENT_TARGET=11.0`` which will set compatibility to macOS
|
||||||
|
11 (Big Sur) and later, even if you are compiling on a more recent macOS
|
||||||
|
version.
|
||||||
|
|
||||||
|
Windows
|
||||||
|
"""""""
|
||||||
|
|
||||||
|
On Windows currently only compilation from within Visual Studio 2022 is
|
||||||
|
supported and tested. Using CMake and Ninja as build system is
|
||||||
|
required. Qt needs to be installed, tested was a package downloaded from
|
||||||
|
https://www.qt.io, into the ``C:\\Qt`` folder. There is a custom
|
||||||
|
`x64-GUI-MSVC` build configuration provided that will activate building
|
||||||
|
the `lammps-gui.exe` executable in addition to LAMMPS. When requesting
|
||||||
|
an installation from the `Build` menu, it will create a compressed zip
|
||||||
|
file with the executables and required dependent .dll files. This zip
|
||||||
|
file can be uncompressed and ``lammps-gui.exe`` run directly from there.
|
||||||
|
The uncompressed folder can be added to the ``PATH`` environment and
|
||||||
|
LAMMPS and LAMMPS GUI can be launched from anywhere from the command
|
||||||
|
line.
|
||||||
|
|
||||||
|
Linux
|
||||||
|
"""""
|
||||||
|
|
||||||
|
Version 5.12 or later of the Qt library and CMake version 3.16 are
|
||||||
|
required and those are provided by, e.g., Ubuntu 20.04LTS. Thus older
|
||||||
|
Linux distributions are not likely to be supported, while more recent
|
||||||
|
ones will work, even for pre-compiled executables (see above). After
|
||||||
|
compiling with ``cmake --build <build folder>``, use
|
||||||
|
``cmake --build <build folder> --target tgz`` or ``make tgz`` to build
|
||||||
|
a ``LAMMPS-Linux-amd64.tar.gz`` file with the executables and their
|
||||||
|
support libraries.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
.. _arc:
|
.. _arc:
|
||||||
|
|
||||||
lmp2arc tool
|
lmp2arc tool
|
||||||
|
|||||||
@ -268,7 +268,6 @@ accelerated styles exist.
|
|||||||
* :doc:`momentum <fix_momentum>` - zero the linear and/or angular momentum of a group of atoms
|
* :doc:`momentum <fix_momentum>` - zero the linear and/or angular momentum of a group of atoms
|
||||||
* :doc:`momentum/chunk <fix_momentum>` - zero the linear and/or angular momentum of a chunk of atoms
|
* :doc:`momentum/chunk <fix_momentum>` - zero the linear and/or angular momentum of a chunk of atoms
|
||||||
* :doc:`move <fix_move>` - move atoms in a prescribed fashion
|
* :doc:`move <fix_move>` - move atoms in a prescribed fashion
|
||||||
* :doc:`mscg <fix_mscg>` - apply MSCG method for force-matching to generate coarse grain models
|
|
||||||
* :doc:`msst <fix_msst>` - multi-scale shock technique (MSST) integration
|
* :doc:`msst <fix_msst>` - multi-scale shock technique (MSST) integration
|
||||||
* :doc:`mvv/dpd <fix_mvv_dpd>` - DPD using the modified velocity-Verlet integration algorithm
|
* :doc:`mvv/dpd <fix_mvv_dpd>` - DPD using the modified velocity-Verlet integration algorithm
|
||||||
* :doc:`mvv/edpd <fix_mvv_dpd>` - constant energy DPD using the modified velocity-Verlet algorithm
|
* :doc:`mvv/edpd <fix_mvv_dpd>` - constant energy DPD using the modified velocity-Verlet algorithm
|
||||||
|
|||||||
@ -1,141 +0,0 @@
|
|||||||
.. index:: fix mscg
|
|
||||||
|
|
||||||
fix mscg command
|
|
||||||
================
|
|
||||||
|
|
||||||
Syntax
|
|
||||||
""""""
|
|
||||||
|
|
||||||
.. code-block:: LAMMPS
|
|
||||||
|
|
||||||
fix ID group-ID mscg N keyword args ...
|
|
||||||
|
|
||||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
|
||||||
* mscg = style name of this fix command
|
|
||||||
* N = envoke this fix every this many timesteps
|
|
||||||
* zero or more keyword/value pairs may be appended
|
|
||||||
* keyword = *range* or *name* or *max*
|
|
||||||
|
|
||||||
.. parsed-literal::
|
|
||||||
|
|
||||||
*range* arg = *on* or *off*
|
|
||||||
*on* = range finding functionality is performed
|
|
||||||
*off* = force matching functionality is performed
|
|
||||||
*name* args = name1 ... nameN
|
|
||||||
name1,...,nameN = string names for each atom type (1-Ntype)
|
|
||||||
*max* args = maxb maxa maxd
|
|
||||||
maxb,maxa,maxd = maximum bonds/angles/dihedrals per atom
|
|
||||||
|
|
||||||
Examples
|
|
||||||
""""""""
|
|
||||||
|
|
||||||
.. code-block:: LAMMPS
|
|
||||||
|
|
||||||
fix 1 all mscg 1
|
|
||||||
fix 1 all mscg 1 range name A B
|
|
||||||
fix 1 all mscg 1 max 4 8 20
|
|
||||||
|
|
||||||
Description
|
|
||||||
"""""""""""
|
|
||||||
|
|
||||||
This fix applies the Multi-Scale Coarse-Graining (MSCG) method to
|
|
||||||
snapshots from a dump file to generate potentials for coarse-grained
|
|
||||||
simulations from all-atom simulations, using a force-matching technique
|
|
||||||
(:ref:`Izvekov <Izvekov>`, :ref:`Noid <Noid>`).
|
|
||||||
|
|
||||||
It makes use of the MS-CG library, written and maintained by Greg Voth's
|
|
||||||
group at the University of Chicago, which is freely available on their
|
|
||||||
`MS-CG GitHub site <https://github.com/uchicago-voth/MSCG-release>`_.
|
|
||||||
See instructions on obtaining and installing the MS-CG library in the
|
|
||||||
src/MSCG/README file, which must be done before you build LAMMPS with
|
|
||||||
this fix command and use the command in a LAMMPS input script.
|
|
||||||
|
|
||||||
An example script using this fix is provided the examples/mscg
|
|
||||||
directory.
|
|
||||||
|
|
||||||
The general workflow for using LAMMPS in conjunction with the MS-CG
|
|
||||||
library to create a coarse-grained model and run coarse-grained
|
|
||||||
simulations is as follows:
|
|
||||||
|
|
||||||
1. Perform all-atom simulations on the system to be coarse grained.
|
|
||||||
2. Generate a trajectory mapped to the coarse-grained model.
|
|
||||||
3. Create input files for the MS-CG library.
|
|
||||||
4. Run the range finder functionality of the MS-CG library.
|
|
||||||
5. Run the force matching functionality of the MS-CG library.
|
|
||||||
6. Check the results of the force matching.
|
|
||||||
7. Run coarse-grained simulations using the new coarse-grained potentials.
|
|
||||||
|
|
||||||
This fix can perform the range finding and force matching steps 4 and 5
|
|
||||||
of the above workflow when used in conjunction with the :doc:`rerun
|
|
||||||
<rerun>` command. It does not perform steps 1-3 and 6-7.
|
|
||||||
|
|
||||||
Step 2 can be performed using a Python script (cgmap), which defines the
|
|
||||||
coarse-grained model and converts a standard LAMMPS dump file for an
|
|
||||||
all-atom simulation (step 1) into a LAMMPS dump file which has the
|
|
||||||
positions of and forces on the coarse-grained beads. To use cgmap the
|
|
||||||
following repositories need to be downloaded and installed.
|
|
||||||
|
|
||||||
#. The custom lammpsdata branch of mdtraj from https://github.com/hockyg/mdtraj/tree/lammpsdata
|
|
||||||
#. The master branch of cgmap from https://github.com/uchicago-voth/cgmap
|
|
||||||
|
|
||||||
In step 3, an input file named "control.in" is needed by the MS-CG
|
|
||||||
library which sets parameters for the range finding and force matching
|
|
||||||
functionalities. See the examples/mscg/control.in file as an example.
|
|
||||||
And see the documentation provided with the MS-CG library for more
|
|
||||||
info on this file.
|
|
||||||
|
|
||||||
When this fix is used to perform steps 4 and 5, the MS-CG library also
|
|
||||||
produces additional output files. The range finder functionality
|
|
||||||
(step 4) outputs files defining pair and bonded interaction ranges. The
|
|
||||||
force matching functionality (step 5) outputs tabulated force files for
|
|
||||||
every interaction in the system. Other diagnostic files can also be
|
|
||||||
output depending on the parameters in the MS-CG library input script.
|
|
||||||
Again, see the documentation provided with the MS-CG library for more
|
|
||||||
info.
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
The *range* keyword specifies which MS-CG library functionality should
|
|
||||||
be invoked. If *on*, the step 4 range finder functionality is invoked.
|
|
||||||
*off*, the step 5 force matching functionality is invoked.
|
|
||||||
|
|
||||||
If the *name* keyword is used, string names are defined to associate
|
|
||||||
with the integer atom types in LAMMPS. *Ntype* names must be provided,
|
|
||||||
one for each atom type (1-Ntype).
|
|
||||||
|
|
||||||
The *max* keyword specifies the maximum number of bonds, angles, and
|
|
||||||
dihedrals a bead can have in the coarse-grained model.
|
|
||||||
|
|
||||||
Restrictions
|
|
||||||
""""""""""""
|
|
||||||
|
|
||||||
This fix is part of the MSCG package. It is only enabled if LAMMPS was
|
|
||||||
built with that package. Building the MSCG package also requires
|
|
||||||
external libraries. See the :doc:`Build_package` and :doc:`Build_extras`
|
|
||||||
pages for more info.
|
|
||||||
|
|
||||||
Currently, the MS-CG library is not set up to run in parallel with MPI,
|
|
||||||
so this fix can only be used in a serial LAMMPS build and run on a
|
|
||||||
single processor.
|
|
||||||
|
|
||||||
Related commands
|
|
||||||
""""""""""""""""
|
|
||||||
|
|
||||||
none
|
|
||||||
|
|
||||||
|
|
||||||
Default
|
|
||||||
"""""""
|
|
||||||
|
|
||||||
The default keyword settings are range off, max 4 12 36.
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. _Izvekov:
|
|
||||||
|
|
||||||
**(Izvekov)** Izvekov, Voth, J Chem Phys 123, 134105 (2005).
|
|
||||||
|
|
||||||
.. _Noid:
|
|
||||||
|
|
||||||
**(Noid)** Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J
|
|
||||||
Chem Phys 128, 134105 (2008).
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
Sphinx >= 5.3.0, <7.1.0
|
Sphinx >= 5.3.0, <7.2.0
|
||||||
sphinxcontrib-spelling
|
sphinxcontrib-spelling
|
||||||
sphinxcontrib-jquery
|
sphinxcontrib-jquery
|
||||||
git+https://github.com/akohlmey/sphinx-fortran@parallel-read
|
git+https://github.com/akohlmey/sphinx-fortran@parallel-read
|
||||||
|
|||||||
@ -1528,6 +1528,7 @@ inhomogeneous
|
|||||||
init
|
init
|
||||||
initialdelay
|
initialdelay
|
||||||
initialisms
|
initialisms
|
||||||
|
initializer
|
||||||
initializations
|
initializations
|
||||||
InitiatorIDs
|
InitiatorIDs
|
||||||
initio
|
initio
|
||||||
@ -3488,6 +3489,7 @@ supercell
|
|||||||
superset
|
superset
|
||||||
supersphere
|
supersphere
|
||||||
Supinski
|
Supinski
|
||||||
|
Sur
|
||||||
Surblys
|
Surblys
|
||||||
surfactant
|
surfactant
|
||||||
surfactants
|
surfactants
|
||||||
@ -3834,6 +3836,7 @@ vectorized
|
|||||||
Vegt
|
Vegt
|
||||||
vel
|
vel
|
||||||
Velázquez
|
Velázquez
|
||||||
|
Ventura
|
||||||
venv
|
venv
|
||||||
Verlag
|
Verlag
|
||||||
verlet
|
verlet
|
||||||
|
|||||||
@ -23,10 +23,8 @@ endif()
|
|||||||
# and prints lots of pointless warnings about "unsafe" functions
|
# and prints lots of pointless warnings about "unsafe" functions
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||||
if(LAMMPS_EXCEPTIONS)
|
|
||||||
add_compile_options(/EHsc)
|
add_compile_options(/EHsc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -239,7 +239,7 @@ struct _liblammpsplugin {
|
|||||||
|
|
||||||
void (*free)(void *);
|
void (*free)(void *);
|
||||||
|
|
||||||
void (*is_running)(void *);
|
int (*is_running)(void *);
|
||||||
void (*force_timeout)(void *);
|
void (*force_timeout)(void *);
|
||||||
|
|
||||||
int (*has_error)(void *);
|
int (*has_error)(void *);
|
||||||
|
|||||||
@ -18,10 +18,8 @@ endif()
|
|||||||
# and prints lots of pointless warnings about "unsafe" functions
|
# and prints lots of pointless warnings about "unsafe" functions
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||||
if(LAMMPS_EXCEPTIONS)
|
|
||||||
add_compile_options(/EHsc)
|
add_compile_options(/EHsc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,6 @@ mesh: create_atoms mesh command
|
|||||||
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
||||||
min: energy minimization of 2d LJ melt
|
min: energy minimization of 2d LJ melt
|
||||||
mliap: examples for using several bundled MLIAP potentials
|
mliap: examples for using several bundled MLIAP potentials
|
||||||
mscg: parameterize a multi-scale coarse-graining (MSCG) model
|
|
||||||
msst: MSST shock dynamics
|
msst: MSST shock dynamics
|
||||||
nb3b: use of nonbonded 3-body harmonic pair style
|
nb3b: use of nonbonded 3-body harmonic pair style
|
||||||
neb: nudged elastic band (NEB) calculation for barrier finding
|
neb: nudged elastic band (NEB) calculation for barrier finding
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
Running this example requires that LAMMPS be built with the MSCG
|
|
||||||
package and its fix mscg command. The fix uses the Multi-Scale
|
|
||||||
Coarse-Graining (MS-CG) library, freely available at
|
|
||||||
https://github.com/uchicago-voth/MSCG-release, to compute optimized
|
|
||||||
coarse-grained force field parameters. The MS-CG library was
|
|
||||||
developed by Jacob Wagner in Greg Voth's group at the University of
|
|
||||||
Chicago.
|
|
||||||
|
|
||||||
See the lib/mscg/README file for instructions on how to download and
|
|
||||||
install the MS-CG library for use with LAMMPS.
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
block_size 1
|
|
||||||
start_frame 1
|
|
||||||
n_frames 19
|
|
||||||
nonbonded_cutoff 10.0
|
|
||||||
basis_type 0
|
|
||||||
primary_output_style 0
|
|
||||||
output_solution_flag 1
|
|
||||||
output_spline_coeffs_flag 1
|
|
||||||
pair_nonbonded_bspline_basis_order 6
|
|
||||||
pair_nonbonded_basis_set_resolution 0.7
|
|
||||||
pair_nonbonded_output_binwidth 0.1
|
|
||||||
matrix_type 0
|
|
||||||
File diff suppressed because it is too large
Load Diff
20180
examples/mscg/dump.meoh
20180
examples/mscg/dump.meoh
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
|||||||
units real
|
|
||||||
atom_style full
|
|
||||||
pair_style zero 10.0
|
|
||||||
|
|
||||||
read_data data.meoh
|
|
||||||
pair_coeff * *
|
|
||||||
|
|
||||||
thermo 1
|
|
||||||
thermo_style custom step
|
|
||||||
|
|
||||||
# Test 1a: range finder functionality
|
|
||||||
fix 1 all mscg 1 range on
|
|
||||||
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
|
|
||||||
print "TEST_1a mscg range finder"
|
|
||||||
unfix 1
|
|
||||||
|
|
||||||
# Test 1b: force matching functionality
|
|
||||||
fix 1 all mscg 1
|
|
||||||
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
|
|
||||||
print "TEST_1b mscg force matching"
|
|
||||||
|
|
||||||
print TEST_DONE
|
|
||||||
@ -1,105 +0,0 @@
|
|||||||
LAMMPS (8 Feb 2023)
|
|
||||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
|
|
||||||
using 1 OpenMP thread(s) per MPI task
|
|
||||||
units real
|
|
||||||
atom_style full
|
|
||||||
pair_style zero 10.0
|
|
||||||
|
|
||||||
read_data data.meoh
|
|
||||||
Reading data file ...
|
|
||||||
orthogonal box = (-20.6917 -20.6917 -20.6917) to (20.6917 20.6917 20.6917)
|
|
||||||
1 by 1 by 1 MPI processor grid
|
|
||||||
reading atoms ...
|
|
||||||
1000 atoms
|
|
||||||
Finding 1-2 1-3 1-4 neighbors ...
|
|
||||||
special bond factors lj: 0 0 0
|
|
||||||
special bond factors coul: 0 0 0
|
|
||||||
0 = max # of 1-2 neighbors
|
|
||||||
0 = max # of 1-3 neighbors
|
|
||||||
0 = max # of 1-4 neighbors
|
|
||||||
1 = max # of special neighbors
|
|
||||||
special bonds CPU = 0.000 seconds
|
|
||||||
read_data CPU = 0.007 seconds
|
|
||||||
pair_coeff * *
|
|
||||||
|
|
||||||
thermo 1
|
|
||||||
thermo_style custom step
|
|
||||||
|
|
||||||
# Test 1a: range finder functionality
|
|
||||||
fix 1 all mscg 1 range on
|
|
||||||
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
|
|
||||||
WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60)
|
|
||||||
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
|
||||||
Neighbor list info ...
|
|
||||||
update: every = 1 steps, delay = 0 steps, check = yes
|
|
||||||
max neighbors/atom: 2000, page size: 100000
|
|
||||||
master list distance cutoff = 12
|
|
||||||
ghost atom cutoff = 12
|
|
||||||
binsize = 6, bins = 7 7 7
|
|
||||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
|
||||||
(1) pair zero, perpetual
|
|
||||||
attributes: half, newton on
|
|
||||||
pair build: half/bin/newton
|
|
||||||
stencil: half/bin/3d
|
|
||||||
bin: standard
|
|
||||||
Per MPI rank memory allocation (min/avg/max) = 6.045 | 6.045 | 6.045 Mbytes
|
|
||||||
Step
|
|
||||||
0
|
|
||||||
250
|
|
||||||
500
|
|
||||||
750
|
|
||||||
1000
|
|
||||||
1250
|
|
||||||
1500
|
|
||||||
1750
|
|
||||||
2000
|
|
||||||
2250
|
|
||||||
2500
|
|
||||||
2750
|
|
||||||
3000
|
|
||||||
3250
|
|
||||||
3500
|
|
||||||
3750
|
|
||||||
4000
|
|
||||||
4250
|
|
||||||
4500
|
|
||||||
Loop time of 0.245891 on 1 procs for 19 steps with 1000 atoms
|
|
||||||
|
|
||||||
print "TEST_1a mscg range finder"
|
|
||||||
TEST_1a mscg range finder
|
|
||||||
unfix 1
|
|
||||||
|
|
||||||
# Test 1b: force matching functionality
|
|
||||||
fix 1 all mscg 1
|
|
||||||
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
|
|
||||||
WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60)
|
|
||||||
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
|
||||||
Per MPI rank memory allocation (min/avg/max) = 6.045 | 6.045 | 6.045 Mbytes
|
|
||||||
Step
|
|
||||||
0
|
|
||||||
250
|
|
||||||
500
|
|
||||||
750
|
|
||||||
1000
|
|
||||||
1250
|
|
||||||
1500
|
|
||||||
1750
|
|
||||||
2000
|
|
||||||
2250
|
|
||||||
2500
|
|
||||||
2750
|
|
||||||
3000
|
|
||||||
3250
|
|
||||||
3500
|
|
||||||
3750
|
|
||||||
4000
|
|
||||||
4250
|
|
||||||
4500
|
|
||||||
Loop time of 0.433986 on 1 procs for 19 steps with 1000 atoms
|
|
||||||
|
|
||||||
print "TEST_1b mscg force matching"
|
|
||||||
TEST_1b mscg force matching
|
|
||||||
|
|
||||||
print TEST_DONE
|
|
||||||
TEST_DONE
|
|
||||||
Total wall time: 0:00:00
|
|
||||||
@ -1,71 +0,0 @@
|
|||||||
3.000000 9.109433117503674e+00
|
|
||||||
3.100000 6.562933520937051e+00
|
|
||||||
3.200000 3.803570347770783e+00
|
|
||||||
3.300000 1.524835163098694e+00
|
|
||||||
3.400000 3.680752991750511e-02
|
|
||||||
3.500000 -6.369395346711866e-01
|
|
||||||
3.600000 -6.624341032589213e-01
|
|
||||||
3.700000 -2.983998819283989e-01
|
|
||||||
3.800000 1.996942072449469e-01
|
|
||||||
3.900000 6.507540486137935e-01
|
|
||||||
4.000000 9.561503221901252e-01
|
|
||||||
4.100000 1.082978861799261e+00
|
|
||||||
4.200000 1.046366050930359e+00
|
|
||||||
4.300000 8.917742185869113e-01
|
|
||||||
4.400000 6.773070351372578e-01
|
|
||||||
4.500000 4.561974686292022e-01
|
|
||||||
4.600000 2.640422255436971e-01
|
|
||||||
4.700000 1.180848207166380e-01
|
|
||||||
4.800000 2.124502216672507e-02
|
|
||||||
4.900000 -3.366915456585443e-02
|
|
||||||
5.000000 -5.974945208074427e-02
|
|
||||||
5.100000 -7.177537677873873e-02
|
|
||||||
5.200000 -8.204929079011507e-02
|
|
||||||
5.300000 -9.745573177789707e-02
|
|
||||||
5.400000 -1.196283642109915e-01
|
|
||||||
5.500000 -1.463411396781238e-01
|
|
||||||
5.600000 -1.729465415853768e-01
|
|
||||||
5.700000 -1.938138298537278e-01
|
|
||||||
5.800000 -2.037672856165882e-01
|
|
||||||
5.900000 -1.995060297815394e-01
|
|
||||||
6.000000 -1.805447650094144e-01
|
|
||||||
6.100000 -1.489384048916932e-01
|
|
||||||
6.200000 -1.085276302304308e-01
|
|
||||||
6.300000 -6.416601955090541e-02
|
|
||||||
6.400000 -2.094717961426480e-02
|
|
||||||
6.500000 1.656812406982645e-02
|
|
||||||
6.600000 4.511482523443927e-02
|
|
||||||
6.700000 6.322611594801032e-02
|
|
||||||
6.800000 7.107524696431811e-02
|
|
||||||
6.900000 7.005702917383723e-02
|
|
||||||
7.000000 6.235932355899154e-02
|
|
||||||
7.100000 5.053453114940768e-02
|
|
||||||
7.200000 3.707108297716843e-02
|
|
||||||
7.300000 2.397003518601587e-02
|
|
||||||
7.400000 1.245439896007831e-02
|
|
||||||
7.500000 3.015413982707119e-03
|
|
||||||
7.600000 -4.408442264121739e-03
|
|
||||||
7.700000 -1.024733994435217e-02
|
|
||||||
7.800000 -1.511598231239246e-02
|
|
||||||
7.900000 -1.962949115765983e-02
|
|
||||||
8.000000 -2.422153184874873e-02
|
|
||||||
8.100000 -2.902066868449916e-02
|
|
||||||
8.200000 -3.387453677654857e-02
|
|
||||||
8.300000 -3.843224513464188e-02
|
|
||||||
8.400000 -4.222901944115068e-02
|
|
||||||
8.500000 -4.477084482559266e-02
|
|
||||||
8.600000 -4.561910863915099e-02
|
|
||||||
8.700000 -4.447439067652353e-02
|
|
||||||
8.800000 -4.123808661911404e-02
|
|
||||||
8.900000 -3.601776131390161e-02
|
|
||||||
9.000000 -2.911033476210515e-02
|
|
||||||
9.100000 -2.098441550402311e-02
|
|
||||||
9.200000 -1.226263400387303e-02
|
|
||||||
9.300000 -3.703976034631109e-03
|
|
||||||
9.400000 3.815231963949414e-03
|
|
||||||
9.500000 9.355387087425532e-03
|
|
||||||
9.600000 1.205664749783030e-02
|
|
||||||
9.700000 1.131702059340882e-02
|
|
||||||
9.800000 6.971799313021964e-03
|
|
||||||
9.900000 -5.270015594498346e-04
|
|
||||||
10.000000 -9.931209090702869e-03
|
|
||||||
@ -1,104 +0,0 @@
|
|||||||
# Header information on force file
|
|
||||||
|
|
||||||
1_1
|
|
||||||
N 99 R 0.200000 10.000000
|
|
||||||
|
|
||||||
1 0.200000 127.263594 80.411422
|
|
||||||
2 0.300000 119.349776 77.864922
|
|
||||||
3 0.400000 111.690609 75.318423
|
|
||||||
4 0.500000 104.286092 72.771923
|
|
||||||
5 0.600000 97.136225 70.225423
|
|
||||||
6 0.700000 90.241007 67.678924
|
|
||||||
7 0.800000 83.600440 65.132424
|
|
||||||
8 0.900000 77.214522 62.585925
|
|
||||||
9 1.000000 71.083255 60.039425
|
|
||||||
10 1.100000 65.206637 57.492925
|
|
||||||
11 1.200000 59.584670 54.946426
|
|
||||||
12 1.300000 54.217352 52.399926
|
|
||||||
13 1.400000 49.104684 49.853427
|
|
||||||
14 1.500000 44.246667 47.306927
|
|
||||||
15 1.600000 39.643299 44.760427
|
|
||||||
16 1.700000 35.294581 42.213928
|
|
||||||
17 1.800000 31.200513 39.667428
|
|
||||||
18 1.900000 27.361096 37.120929
|
|
||||||
19 2.000000 23.776328 34.574429
|
|
||||||
20 2.100000 20.446210 32.027929
|
|
||||||
21 2.200000 17.370742 29.481430
|
|
||||||
22 2.300000 14.549924 26.934930
|
|
||||||
23 2.400000 11.983756 24.388431
|
|
||||||
24 2.500000 9.672238 21.841931
|
|
||||||
25 2.600000 7.615370 19.295432
|
|
||||||
26 2.700000 5.813151 16.748932
|
|
||||||
27 2.800000 4.265583 14.202432
|
|
||||||
28 2.900000 2.972665 11.655933
|
|
||||||
29 3.000000 1.934397 9.109433
|
|
||||||
30 3.100000 1.150778 6.562934
|
|
||||||
31 3.200000 0.632453 3.803570
|
|
||||||
32 3.300000 0.366033 1.524835
|
|
||||||
33 3.400000 0.287951 0.036808
|
|
||||||
34 3.500000 0.317957 -0.636940
|
|
||||||
35 3.600000 0.382926 -0.662434
|
|
||||||
36 3.700000 0.430968 -0.298400
|
|
||||||
37 3.800000 0.435903 0.199694
|
|
||||||
38 3.900000 0.393381 0.650754
|
|
||||||
39 4.000000 0.313035 0.956150
|
|
||||||
40 4.100000 0.211079 1.082979
|
|
||||||
41 4.200000 0.104612 1.046366
|
|
||||||
42 4.300000 0.007705 0.891774
|
|
||||||
43 4.400000 -0.070749 0.677307
|
|
||||||
44 4.500000 -0.127425 0.456197
|
|
||||||
45 4.600000 -0.163437 0.264042
|
|
||||||
46 4.700000 -0.182543 0.118085
|
|
||||||
47 4.800000 -0.189509 0.021245
|
|
||||||
48 4.900000 -0.188888 -0.033669
|
|
||||||
49 5.000000 -0.184217 -0.059749
|
|
||||||
50 5.100000 -0.177641 -0.071775
|
|
||||||
51 5.200000 -0.169950 -0.082049
|
|
||||||
52 5.300000 -0.160975 -0.097456
|
|
||||||
53 5.400000 -0.150120 -0.119628
|
|
||||||
54 5.500000 -0.136822 -0.146341
|
|
||||||
55 5.600000 -0.120858 -0.172947
|
|
||||||
56 5.700000 -0.102520 -0.193814
|
|
||||||
57 5.800000 -0.082640 -0.203767
|
|
||||||
58 5.900000 -0.062477 -0.199506
|
|
||||||
59 6.000000 -0.043474 -0.180545
|
|
||||||
60 6.100000 -0.027000 -0.148938
|
|
||||||
61 6.200000 -0.014127 -0.108528
|
|
||||||
62 6.300000 -0.005492 -0.064166
|
|
||||||
63 6.400000 -0.001236 -0.020947
|
|
||||||
64 6.500000 -0.001018 0.016568
|
|
||||||
65 6.600000 -0.004102 0.045115
|
|
||||||
66 6.700000 -0.009519 0.063226
|
|
||||||
67 6.800000 -0.016234 0.071075
|
|
||||||
68 6.900000 -0.023290 0.070057
|
|
||||||
69 7.000000 -0.029911 0.062359
|
|
||||||
70 7.100000 -0.035556 0.050535
|
|
||||||
71 7.200000 -0.039936 0.037071
|
|
||||||
72 7.300000 -0.042988 0.023970
|
|
||||||
73 7.400000 -0.044809 0.012454
|
|
||||||
74 7.500000 -0.045583 0.003015
|
|
||||||
75 7.600000 -0.045513 -0.004408
|
|
||||||
76 7.700000 -0.044781 -0.010247
|
|
||||||
77 7.800000 -0.043512 -0.015116
|
|
||||||
78 7.900000 -0.041775 -0.019629
|
|
||||||
79 8.000000 -0.039583 -0.024222
|
|
||||||
80 8.100000 -0.036920 -0.029021
|
|
||||||
81 8.200000 -0.033776 -0.033875
|
|
||||||
82 8.300000 -0.030160 -0.038432
|
|
||||||
83 8.400000 -0.026127 -0.042229
|
|
||||||
84 8.500000 -0.021777 -0.044771
|
|
||||||
85 8.600000 -0.017258 -0.045619
|
|
||||||
86 8.700000 -0.012753 -0.044474
|
|
||||||
87 8.800000 -0.008467 -0.041238
|
|
||||||
88 8.900000 -0.004605 -0.036018
|
|
||||||
89 9.000000 -0.001348 -0.029110
|
|
||||||
90 9.100000 0.001156 -0.020984
|
|
||||||
91 9.200000 0.002819 -0.012263
|
|
||||||
92 9.300000 0.003617 -0.003704
|
|
||||||
93 9.400000 0.003612 0.003815
|
|
||||||
94 9.500000 0.002953 0.009355
|
|
||||||
95 9.600000 0.001882 0.012057
|
|
||||||
96 9.700000 0.000714 0.011317
|
|
||||||
97 9.800000 -0.000201 0.006972
|
|
||||||
98 9.900000 -0.000523 -0.000527
|
|
||||||
99 10.000000 0.000000 -0.009931
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
n: 1 1 6 11 3.000000000000000e+00 1.000000000000000e+01
|
|
||||||
9.109454054135307e+00 6.178334150703818e+00 -6.242976259059743e+00 4.778144787445235e+00 -1.082885612852992e+00 4.521835893850554e-01 -6.477047196208028e-01 2.947887062333265e-01 -4.195609079009661e-02 1.111775827831465e-02 -8.823466147380592e-02 -1.696076806027540e-02 3.192205281984208e-02 3.656991607866288e-03 -9.931306149957592e-03
|
|
||||||
@ -1 +0,0 @@
|
|||||||
1 1 2.852369 10.000000 fm
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
fm_matrix_rows:3000; fm_matrix_columns:15;
|
|
||||||
Singular vector:
|
|
||||||
2.307693e+00
|
|
||||||
1.998418e+00
|
|
||||||
1.400114e+00
|
|
||||||
1.183608e+00
|
|
||||||
9.718949e-01
|
|
||||||
7.471241e-01
|
|
||||||
5.277965e-01
|
|
||||||
5.084369e-01
|
|
||||||
3.510398e-01
|
|
||||||
2.997000e-01
|
|
||||||
2.142454e-01
|
|
||||||
1.201800e-01
|
|
||||||
7.143923e-02
|
|
||||||
3.077326e-02
|
|
||||||
1.835581e-02
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
<EFBFBD>ٝ\
|
|
||||||
8"@<40>!D:<3A><>@<40>v<EFBFBD><76><EFBFBD><EFBFBD><18>H<EFBFBD><48><EFBFBD><EFBFBD>@H3H<33>S<7F><53>Ԗp<><70><EFBFBD>??<3F><>俀% s<><73><EFBFBD>?:y<><79>D{<7B><><EFBFBD>z<EFBFBD>A<EFBFBD>Ć?#Tg<54><67><EFBFBD><EFBFBD><EFBFBD>l#<23><>)^<5E><><EFBFBD><EFBFBD><EFBFBD>YX<>?K<>pkD<6B>m?<3F>
|
|
||||||
@ -36,10 +36,8 @@ else()
|
|||||||
add_compile_options(/Zc:__cplusplus)
|
add_compile_options(/Zc:__cplusplus)
|
||||||
add_compile_options(/wd4244)
|
add_compile_options(/wd4244)
|
||||||
add_compile_options(/wd4267)
|
add_compile_options(/wd4267)
|
||||||
if(LAMMPS_EXCEPTIONS)
|
|
||||||
add_compile_options(/EHsc)
|
add_compile_options(/EHsc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -41,8 +41,6 @@ mdi hooks to the MDI library, used by MDI package
|
|||||||
from Taylor Barnes (MolSSI at Virginia Tech)
|
from Taylor Barnes (MolSSI at Virginia Tech)
|
||||||
molfile hooks to VMD molfile plugins, used by the MOLFILE package
|
molfile hooks to VMD molfile plugins, used by the MOLFILE package
|
||||||
from Axel Kohlmeyer (Temple U) and the VMD development team
|
from Axel Kohlmeyer (Temple U) and the VMD development team
|
||||||
mscg hooks to the MSCG library, used by fix_mscg command
|
|
||||||
from Jacob Wagner and Greg Voth group (U Chicago)
|
|
||||||
netcdf hooks to a NetCDF library installed on your system
|
netcdf hooks to a NetCDF library installed on your system
|
||||||
from Lars Pastewka (Karlsruhe Institute of Technology)
|
from Lars Pastewka (Karlsruhe Institute of Technology)
|
||||||
plugin settings to load styles into LAMMPS from plugins
|
plugin settings to load styles into LAMMPS from plugins
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class WavePacket;
|
|||||||
|
|
||||||
///\en Template for v=der operation in \ref Wavepacket::int2phys_der()
|
///\en Template for v=der operation in \ref Wavepacket::int2phys_der()
|
||||||
template<class Type>
|
template<class Type>
|
||||||
struct eq_second : public binary_function <Type, Type, Type> {
|
struct eq_second {
|
||||||
Type operator()(const Type& /* _Left */, const Type& _Right) const{
|
Type operator()(const Type& /* _Left */, const Type& _Right) const{
|
||||||
return _Right;
|
return _Right;
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ struct eq_second : public binary_function <Type, Type, Type> {
|
|||||||
|
|
||||||
///\en Template for v=-der operation in \ref Wavepacket::int2phys_der()
|
///\en Template for v=-der operation in \ref Wavepacket::int2phys_der()
|
||||||
template<class Type>
|
template<class Type>
|
||||||
struct eq_minus_second : public binary_function <Type, Type, Type> {
|
struct eq_minus_second {
|
||||||
Type operator()(const Type& /* _Left */, const Type& _Right) const{
|
Type operator()(const Type& /* _Left */, const Type& _Right) const{
|
||||||
return -_Right;
|
return -_Right;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
const char *ocl_prefetch_test =
|
const char *ocl_prefetch_test =
|
||||||
" #if (NBOR_PREFETCH == 1) \n"\
|
" #if (NBOR_PREFETCH == 1) \n"\
|
||||||
" inline void ucl_prefetch(const __global int *p) { prefetch(p, 1); } \n"\
|
" inline void ucl_prefetch(const __global int *p) { prefetch(p, 1); } \n"\
|
||||||
" #else \n"\
|
" #elif (NBOR_PREFETCH == 2) \n"\
|
||||||
" enum LSC_LDCC {LSC_LDCC_DEFAULT, LSC_LDCC_L1UC_L3UC, LSC_LDCC_L1UC_L3C, \n"\
|
" enum LSC_LDCC {LSC_LDCC_DEFAULT, LSC_LDCC_L1UC_L3UC, LSC_LDCC_L1UC_L3C, \n"\
|
||||||
" LSC_LDCC_L1C_L3UC, LSC_LDCC_L1C_L3C, LSC_LDCC_L1S_L3UC, \n"\
|
" LSC_LDCC_L1C_L3UC, LSC_LDCC_L1C_L3C, LSC_LDCC_L1S_L3UC, \n"\
|
||||||
" LSC_LDCC_L1S_L3C, LSC_LDCC_L1IAR_L3C, }; \n"\
|
" LSC_LDCC_L1S_L3C, LSC_LDCC_L1IAR_L3C, }; \n"\
|
||||||
@ -745,7 +745,14 @@ void DeviceT::estimate_gpu_overhead(const int kernel_calls,
|
|||||||
gpu_overhead=0.0;
|
gpu_overhead=0.0;
|
||||||
gpu_driver_overhead=0.0;
|
gpu_driver_overhead=0.0;
|
||||||
|
|
||||||
for (int z=0; z<11; z++) {
|
// TODO: XXX
|
||||||
|
// The following estimation currently fails on Intel GPUs
|
||||||
|
// that do not support double precision with OpenCL error code -5.
|
||||||
|
// Until we have a better solution, we just skip this test in this case.
|
||||||
|
int zloops = 11;
|
||||||
|
if (!gpu->double_precision()) zloops = 0;
|
||||||
|
|
||||||
|
for (int z=0; z < zloops; z++) {
|
||||||
gpu->sync();
|
gpu->sync();
|
||||||
gpu_barrier();
|
gpu_barrier();
|
||||||
over_timer.start();
|
over_timer.start();
|
||||||
|
|||||||
@ -43,7 +43,7 @@ const char * ocl_config_strings[] =
|
|||||||
"NVIDIA_GPU,203,32,32,1,1,4,8,2,256,256,128,64,128,8,128,11,128,8,0",
|
"NVIDIA_GPU,203,32,32,1,1,4,8,2,256,256,128,64,128,8,128,11,128,8,0",
|
||||||
"AMD_GPU,403,64,64,0,1,4,8,2,256,256,128,64,128,8,128,11,128,8,0",
|
"AMD_GPU,403,64,64,0,1,4,8,2,256,256,128,64,128,8,128,11,128,8,0",
|
||||||
#ifdef _SINGLE_SINGLE
|
#ifdef _SINGLE_SINGLE
|
||||||
"INTEL_GPU,500,8,32,1,1,4,8,2,128,128,128,128,64,8,128,8,128,8,2",
|
"INTEL_GPU,500,8,32,1,1,4,8,2,128,128,128,128,64,8,128,8,128,8,0",
|
||||||
"APPLE_GPU,600,16,16,0,1,4,8,1,64,64,64,64,64,8,128,8,128,8,0",
|
"APPLE_GPU,600,16,16,0,1,4,8,1,64,64,64,64,64,8,128,8,128,8,0",
|
||||||
#else
|
#else
|
||||||
"INTEL_GPU,500,8,32,1,1,2,8,2,128,128,128,128,64,8,128,8,128,8,2",
|
"INTEL_GPU,500,8,32,1,1,2,8,2,128,128,128,128,64,8,128,8,128,8,2",
|
||||||
|
|||||||
@ -333,12 +333,12 @@ inline void ucl_prefetch(const __global int *p) {
|
|||||||
struct _lgpu_float3 {
|
struct _lgpu_float3 {
|
||||||
float x; float y; float z;
|
float x; float y; float z;
|
||||||
};
|
};
|
||||||
struct _lgpu_double3 {
|
|
||||||
double x; double y; double z;
|
|
||||||
};
|
|
||||||
#ifdef _SINGLE_SINGLE
|
#ifdef _SINGLE_SINGLE
|
||||||
#define acctyp3 struct _lgpu_float3
|
#define acctyp3 struct _lgpu_float3
|
||||||
#else
|
#else
|
||||||
|
struct _lgpu_double3 {
|
||||||
|
double x; double y; double z;
|
||||||
|
};
|
||||||
#define acctyp3 struct _lgpu_double3
|
#define acctyp3 struct _lgpu_double3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -52,6 +52,10 @@ There are numerous device backends, options, and architecture-specific optimizat
|
|||||||
````
|
````
|
||||||
which activates the OpenMP backend. All of the options controlling device backends, options, architectures, and third-party libraries (TPLs) are given below.
|
which activates the OpenMP backend. All of the options controlling device backends, options, architectures, and third-party libraries (TPLs) are given below.
|
||||||
|
|
||||||
|
Kokkos requires as a minimum C++17, however C++20 and C++23 are supported depending on the compiler.
|
||||||
|
|
||||||
|
The latest minimum compiler versions can be found in `cmake/kokkos_compiler_id.cmake`.
|
||||||
|
|
||||||
## Known Issues<a name="KnownIssues"></a>
|
## Known Issues<a name="KnownIssues"></a>
|
||||||
|
|
||||||
### Cray
|
### Cray
|
||||||
@ -107,249 +111,4 @@ For dev-build details, consult the kokkos-spack repository [README](https://gith
|
|||||||
|
|
||||||
# Kokkos Keyword Listing
|
# Kokkos Keyword Listing
|
||||||
|
|
||||||
## Device Backends
|
Please refer to our [wiki](https://kokkos.github.io/kokkos-core-wiki/keywords.html#cmake-keywords).
|
||||||
Device backends can be enabled by specifying `-DKokkos_ENABLE_X`.
|
|
||||||
|
|
||||||
* Kokkos_ENABLE_CUDA
|
|
||||||
* Whether to build CUDA backend
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_HPX
|
|
||||||
* Whether to build HPX backend (experimental)
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_OPENMP
|
|
||||||
* Whether to build OpenMP backend
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_THREADS
|
|
||||||
* Whether to build C++ thread backend
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_SERIAL
|
|
||||||
* Whether to build serial backend
|
|
||||||
* BOOL Default: ON
|
|
||||||
* Kokkos_ENABLE_HIP (Experimental)
|
|
||||||
* Whether to build HIP backend
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_OPENMPTARGET (Experimental)
|
|
||||||
* Whether to build the OpenMP target backend
|
|
||||||
* BOOL Default: OFF
|
|
||||||
|
|
||||||
## Enable Options
|
|
||||||
Options can be enabled by specifying `-DKokkos_ENABLE_X`.
|
|
||||||
|
|
||||||
* Kokkos_ENABLE_AGGRESSIVE_VECTORIZATION
|
|
||||||
* Whether to aggressively vectorize loops
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_COMPILER_WARNINGS
|
|
||||||
* Whether to print all compiler warnings
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_CUDA_CONSTEXPR
|
|
||||||
* Whether to activate experimental relaxed constexpr functions
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_CUDA_LAMBDA
|
|
||||||
* Whether to activate experimental lambda features
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_CUDA_LDG_INTRINSIC
|
|
||||||
* Whether to use CUDA LDG intrinsics
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE
|
|
||||||
* Whether to enable relocatable device code (RDC) for CUDA
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_CUDA_UVM
|
|
||||||
* Whether to use unified memory (UM) by default for CUDA
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_DEBUG
|
|
||||||
* Whether to activate extra debug features - may increase compile times
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_DEBUG_BOUNDS_CHECK
|
|
||||||
* Whether to use bounds checking - will increase runtime
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK
|
|
||||||
* Debug check on dual views
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_EXAMPLES
|
|
||||||
* Whether to enable building examples
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_HPX_ASYNC_DISPATCH
|
|
||||||
* Whether HPX supports asynchronous dispatch
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC
|
|
||||||
* Whether to enable CudaMallocAsync (requires CUDA Toolkit 11.2). This is an experimental performance feature and currently has issue when using with UCX. See https://github.com/kokkos/kokkos/issues/4228 for more details.
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_LARGE_MEM_TESTS
|
|
||||||
* Whether to perform extra large memory tests
|
|
||||||
* BOOL_Default: OFF
|
|
||||||
* Kokkos_ENABLE_PROFILING_LOAD_PRINT
|
|
||||||
* Whether to print information about which profiling tools gotloaded
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_TESTS
|
|
||||||
* Whether to enable test suite
|
|
||||||
* BOOL Default: OFF
|
|
||||||
|
|
||||||
## Other Options
|
|
||||||
* Kokkos_CXX_STANDARD
|
|
||||||
* The C++ standard for Kokkos to use: c++14, c++17, or c++20. This should be given in CMake style as 14, 17, or 20.
|
|
||||||
* STRING Default: 14
|
|
||||||
|
|
||||||
## Third-party Libraries (TPLs)
|
|
||||||
The following options control enabling TPLs:
|
|
||||||
* Kokkos_ENABLE_HPX
|
|
||||||
* Whether to enable the HPX library
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ENABLE_HWLOC
|
|
||||||
* Whether to enable the HWLOC library
|
|
||||||
* BOOL Default: Off
|
|
||||||
* Kokkos_ENABLE_LIBNUMA
|
|
||||||
* Whether to enable the LIBNUMA library
|
|
||||||
* BOOL Default: Off
|
|
||||||
* Kokkos_ENABLE_MEMKIND
|
|
||||||
* Whether to enable the MEMKIND library
|
|
||||||
* BOOL Default: Off
|
|
||||||
* Kokkos_ENABLE_LIBDL
|
|
||||||
* Whether to enable the LIBDL library
|
|
||||||
* BOOL Default: On
|
|
||||||
* Kokkos_ENABLE_LIBRT
|
|
||||||
* Whether to enable the LIBRT library
|
|
||||||
* BOOL Default: Off
|
|
||||||
|
|
||||||
The following options control finding and configuring non-CMake TPLs:
|
|
||||||
* Kokkos_CUDA_DIR or CUDA_ROOT
|
|
||||||
* Location of CUDA install prefix for libraries
|
|
||||||
* PATH Default:
|
|
||||||
* Kokkos_HWLOC_DIR or HWLOC_ROOT
|
|
||||||
* Location of HWLOC install prefix
|
|
||||||
* PATH Default:
|
|
||||||
* Kokkos_LIBNUMA_DIR or LIBNUMA_ROOT
|
|
||||||
* Location of LIBNUMA install prefix
|
|
||||||
* PATH Default:
|
|
||||||
* Kokkos_MEMKIND_DIR or MEMKIND_ROOT
|
|
||||||
* Location of MEMKIND install prefix
|
|
||||||
* PATH Default:
|
|
||||||
* Kokkos_LIBDL_DIR or LIBDL_ROOT
|
|
||||||
* Location of LIBDL install prefix
|
|
||||||
* PATH Default:
|
|
||||||
* Kokkos_LIBRT_DIR or LIBRT_ROOT
|
|
||||||
* Location of LIBRT install prefix
|
|
||||||
* PATH Default:
|
|
||||||
|
|
||||||
The following options control `find_package` paths for CMake-based TPLs:
|
|
||||||
* HPX_DIR or HPX_ROOT
|
|
||||||
* Location of HPX prefix (ROOT) or CMake config file (DIR)
|
|
||||||
* PATH Default:
|
|
||||||
|
|
||||||
## Architecture Keywords
|
|
||||||
Architecture-specific optimizations can be enabled by specifying `-DKokkos_ARCH_X`.
|
|
||||||
|
|
||||||
* Kokkos_ARCH_NATIVE
|
|
||||||
* Whether to optimize for the the local CPU architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_AMDAVX
|
|
||||||
* Whether to optimize for the AMDAVX architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ARMV80
|
|
||||||
* Whether to optimize for the ARMV80 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ARMV81
|
|
||||||
* Whether to optimize for the ARMV81 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ARMV8_THUNDERX
|
|
||||||
* Whether to optimize for the ARMV8_THUNDERX architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ARMV8_TX2
|
|
||||||
* Whether to optimize for the ARMV8_TX2 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_BDW
|
|
||||||
* Whether to optimize for the BDW architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_BGQ
|
|
||||||
* Whether to optimize for the BGQ architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ZEN
|
|
||||||
* Whether to optimize for the Zen architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ZEN2
|
|
||||||
* Whether to optimize for the Zen2 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ZEN3
|
|
||||||
* Whether to optimize for the Zen3 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_HSW
|
|
||||||
* Whether to optimize for the HSW architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_KEPLER30
|
|
||||||
* Whether to optimize for the KEPLER30 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_KEPLER32
|
|
||||||
* Whether to optimize for the KEPLER32 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_KEPLER35
|
|
||||||
* Whether to optimize for the KEPLER35 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_KEPLER37
|
|
||||||
* Whether to optimize for the KEPLER37 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_KNC
|
|
||||||
* Whether to optimize for the KNC architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_KNL
|
|
||||||
* Whether to optimize for the KNL architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_MAXWELL50
|
|
||||||
* Whether to optimize for the MAXWELL50 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_MAXWELL52
|
|
||||||
* Whether to optimize for the MAXWELL52 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_MAXWELL53
|
|
||||||
* Whether to optimize for the MAXWELL53 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_PASCAL60
|
|
||||||
* Whether to optimize for the PASCAL60 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_PASCAL61
|
|
||||||
* Whether to optimize for the PASCAL61 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_POWER7
|
|
||||||
* Whether to optimize for the POWER7 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_POWER8
|
|
||||||
* Whether to optimize for the POWER8 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_POWER9
|
|
||||||
* Whether to optimize for the POWER9 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ICL
|
|
||||||
* Whether to optimize for the ICL architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_ICX
|
|
||||||
* Whether to optimize for the ICX architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_SKL
|
|
||||||
* Whether to optimize for the SKL architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_SKX
|
|
||||||
* Whether to optimize for the SKX architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_SNB
|
|
||||||
* Whether to optimize for the SNB architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_SPR
|
|
||||||
* Whether to optimize for the SPR architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_TURING75
|
|
||||||
* Whether to optimize for the TURING75 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_VOLTA70
|
|
||||||
* Whether to optimize for the VOLTA70 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_VOLTA72
|
|
||||||
* Whether to optimize for the VOLTA72 architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
* Kokkos_ARCH_WSM
|
|
||||||
* Whether to optimize for the WSM architecture
|
|
||||||
* BOOL Default: OFF
|
|
||||||
|
|
||||||
##### [LICENSE](https://github.com/kokkos/kokkos/blob/devel/LICENSE)
|
|
||||||
|
|
||||||
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
||||||
|
|
||||||
Under the terms of Contract DE-NA0003525 with NTESS,
|
|
||||||
the U.S. Government retains certain rights in this software.
|
|
||||||
|
|||||||
@ -1,5 +1,213 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## [4.1.00](https://github.com/kokkos/kokkos/tree/4.0.01) (2023-06-16)
|
||||||
|
[Full Changelog](https://github.com/kokkos/kokkos/compare/4.0.01...4.1.00)
|
||||||
|
|
||||||
|
### Features:
|
||||||
|
* Add `<Kokkos_BitManipulation.hpp>` header [\#4577](https://github.com/kokkos/kokkos/pull/4577) [\#5907](https://github.com/kokkos/kokkos/pull/5907) [\#5967](https://github.com/kokkos/kokkos/pull/5967) [\#6101](https://github.com/kokkos/kokkos/pull/6101)
|
||||||
|
* Add `UnorderedMapInsertOpTypes` [\#5877](https://github.com/kokkos/kokkos/pull/5877) and documentation [\#350](https://github.com/kokkos/kokkos-core-wiki/pull/350)
|
||||||
|
* Add multiple reducers support for team-level parallel reduce [\#5727](https://github.com/kokkos/kokkos/pull/5727)
|
||||||
|
|
||||||
|
### Backend and Architecture Enhancements:
|
||||||
|
|
||||||
|
#### CUDA:
|
||||||
|
|
||||||
|
* Allow NVCC 12 to compile using C++20 flag [\#5977](https://github.com/kokkos/kokkos/pull/5977)
|
||||||
|
* Remove ability to disable CMake option `Kokkos_ENABLE_CUDA_LAMBDA` and unconditionally enable CUDA extended lambda support. [\#5964](https://github.com/kokkos/kokkos/pull/5964)
|
||||||
|
* Drop unnecessary fences around the memory allocation when using `CudaUVMSpace` in views [\#6008](https://github.com/kokkos/kokkos/pull/6008)
|
||||||
|
|
||||||
|
#### HIP:
|
||||||
|
* Improve performance for `parallel_reduce`. Use different parameters for `LightWeight` kernels [\#6029](https://github.com/kokkos/kokkos/pull/6029) and [\#6160](https://github.com/kokkos/kokkos/pull/6160)
|
||||||
|
|
||||||
|
#### SYCL:
|
||||||
|
* Only pass one wrapper object in SYCL reductions [\#6047](https://github.com/kokkos/kokkos/pull/6047)
|
||||||
|
* Improve and simplify parallel_scan implementation [\#6064](https://github.com/kokkos/kokkos/pull/6064)
|
||||||
|
* Remove workaround for submit_barrier not being enqueued properly [\#5504](https://github.com/kokkos/kokkos/pull/5504)
|
||||||
|
* Fix guards for using scratch space with SYCL [\#6003](https://github.com/kokkos/kokkos/pull/6003)
|
||||||
|
* Fix compiling SYCL with KOKKOS_IMPL_DO_NOT_USE_PRINTF_USAGE [\#6219](https://github.com/kokkos/kokkos/pull/6219)
|
||||||
|
|
||||||
|
#### OpenMPTarget:
|
||||||
|
* Improve hierarchical parallelism for Intel architectures [\#6043](https://github.com/kokkos/kokkos/pull/6043)
|
||||||
|
* Enable Cray compiler for the OpenMPTarget backend. [\#5889](https://github.com/kokkos/kokkos/pull/5889)
|
||||||
|
|
||||||
|
#### HPX:
|
||||||
|
* Update HPX backend to use HPX's sender/receiver functionality [\#5628](https://github.com/kokkos/kokkos/pull/5628)
|
||||||
|
* Increase minimum required HPX version to 1.8.0 [\#6132](https://github.com/kokkos/kokkos/pull/6132)
|
||||||
|
* Implement HPX::in_parallel [\#6143](https://github.com/kokkos/kokkos/pull/6143)
|
||||||
|
|
||||||
|
### General Enhancements
|
||||||
|
* Export CMake `Kokkos_{CUDA,HIP}_ARCHITECTURES` variables [\#5919](https://github.com/kokkos/kokkos/pull/5919) [\#5925](https://github.com/kokkos/kokkos/pull/5925)
|
||||||
|
* Add `Kokkos::Profiling::ScopedRegion` [\#5959](https://github.com/kokkos/kokkos/pull/5959) [\#5972](https://github.com/kokkos/kokkos/pull/5972)
|
||||||
|
* Add support for `View::rank[_dynamic]()`[\#5870](https://github.com/kokkos/kokkos/pull/5870)
|
||||||
|
* Detect incompatible relocatable device code mode to prevent ODR violations [\#5991](https://github.com/kokkos/kokkos/pull/5991)
|
||||||
|
* Add (experimental) support for 32-bit Darwin and PPC [\#5916](https://github.com/kokkos/kokkos/pull/5916)
|
||||||
|
* Add missing half and bhalf specialization of the infinity numeric trait [\#6055](https://github.com/kokkos/kokkos/pull/6055)
|
||||||
|
* Add `is_dual_view` trait and align further with regular view [\#6120](https://github.com/kokkos/kokkos/pull/6120)
|
||||||
|
* Allow templated functors in parallel_for, parallel_reduce and parallel_scan [\#5976](https://github.com/kokkos/kokkos/pull/5976)
|
||||||
|
* Define KOKKOS_COMPILER_INTEL_LLVM and only define at most one KOKKOS_COMPILER* macro [\#5906](https://github.com/kokkos/kokkos/pull/5906)
|
||||||
|
* Allow linking against build tree [\#6078](https://github.com/kokkos/kokkos/pull/6078)
|
||||||
|
* Allow passing a temporary std::vector to partition_space [\#6167](https://github.com/kokkos/kokkos/pull/6167)
|
||||||
|
* `Kokkos` can be used as an external dependency in `Trilinos` [\#6142](https://github.com/kokkos/kokkos/pull/6142), [\#6157](https://github.com/kokkos/kokkos/pull/6157) [\#6163](https://github.com/kokkos/kokkos/pull/6163)
|
||||||
|
* Left align demangled stacktrace output [\#6191](https://github.com/kokkos/kokkos/pull/6191)
|
||||||
|
* Improve OpenMP affinity warning to include MPI concerns [\#6185](https://github.com/kokkos/kokkos/pull/6185)
|
||||||
|
|
||||||
|
### Build System Changes
|
||||||
|
* Drop `Kokkos_ENABLE_LAUNCH_COMPILER` option which had no effect [\#6148](https://github.com/kokkos/kokkos/pull/6148)
|
||||||
|
* Export variables for relevant Kokkos options with cmake[\#6142](https://github.com/kokkos/kokkos/pull/6142)
|
||||||
|
|
||||||
|
### Incompatibilities (i.e. breaking changes)
|
||||||
|
* Desul atomics always enabled [\#5801](https://github.com/kokkos/kokkos/pull/5801)
|
||||||
|
* Drop `KOKKOS_ENABLE_CUDA_ASM*` and `KOKKOS_ENABLE_*_ATOMICS` macros [\#5940](https://github.com/kokkos/kokkos/pull/5940)
|
||||||
|
* Drop `KOKKOS_ENABLE_RFO_PREFETCH` macro [\#5944](https://github.com/kokkos/kokkos/pull/5944)
|
||||||
|
* Deprecate `Kokkos_ENABLE_CUDA_LAMBDA` configuration option and force it to `ON` [\#5964](https://github.com/kokkos/kokkos/pull/5964)
|
||||||
|
* Remove TriBITS Kokkos subpackages [\#6104](https://github.com/kokkos/kokkos/pull/6104)
|
||||||
|
* Cuda: Remove unused attach_texture_object [\#6129](https://github.com/kokkos/kokkos/pull/6129)
|
||||||
|
* Drop Kokkos_ENABLE_PROFILING_LOAD_PRINT configuration option [\#6150](https://github.com/kokkos/kokkos/pull/6150)
|
||||||
|
* Drop pointless Kokkos{Algorithms,Containers}_config.h files [\#6108](https://github.com/kokkos/kokkos/pull/6108)
|
||||||
|
|
||||||
|
### Deprecations
|
||||||
|
* Deprecate `BinSort`, `BinOp1D`, and `BinOp3D` default constructors [\#6131](https://github.com/kokkos/kokkos/pull/6131)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
* Fix `SYCLTeamMember` to take arguments for scratch sizes as `std::size_t` [\#5981](https://github.com/kokkos/kokkos/pull/5981)
|
||||||
|
* Fix Kokkos_SIMD with AVX2 on 64-bit architectures [\#6075](https://github.com/kokkos/kokkos/pull/6075)
|
||||||
|
* Fix an incorrectly returning size for SIMD uint64_t in AVX2 [\#6004](https://github.com/kokkos/kokkos/pull/6004)
|
||||||
|
* Fix missing avx512 header file with gcc versions before 10 [\#6183](https://github.com/kokkos/kokkos/pull/6183)
|
||||||
|
* Fix incorrect results of `parallel_reduce` of types smaller than `int` on CUDA and HIP: [\#5745](https://github.com/kokkos/kokkos/pull/5745)
|
||||||
|
* CMake: update package compatibility mode when building within Trilinos [\#6012](https://github.com/kokkos/kokkos/pull/6012)
|
||||||
|
* Fix warnings generated from internal uses of `ALL_t` rather than `Kokkos::ALL_t` [\#6028](https://github.com/kokkos/kokkos/pull/6028)
|
||||||
|
* Fix bug in `hpcbind` script: check for correct Slurm variable [\#6116](https://github.com/kokkos/kokkos/pull/6116)
|
||||||
|
* KokkosTools: Don't call callbacks before backends are initialized [\#6114](https://github.com/kokkos/kokkos/pull/6114)
|
||||||
|
* Fix global fence in Kokkos::resize(DynRankView) [\#6184](https://github.com/kokkos/kokkos/pull/6184)
|
||||||
|
* Fix `BinSort` support for strided views [\#6081](https://github.com/kokkos/kokkos/pull/6184)
|
||||||
|
* Fix missing `is_*_view` traits in containers [\#6195](https://github.com/kokkos/kokkos/pull/6195)
|
||||||
|
* Fix broken OpenMP target on NVHPC [\#6171](https://github.com/kokkos/kokkos/pull/6171)
|
||||||
|
* Sorting an empty view should exit early and not fail [\#6130](https://github.com/kokkos/kokkos/pull/6130)
|
||||||
|
|
||||||
|
## [4.0.01](https://github.com/kokkos/kokkos/tree/4.0.01) (2023-04-14)
|
||||||
|
[Full Changelog](https://github.com/kokkos/kokkos/compare/4.0.00...4.0.01)
|
||||||
|
|
||||||
|
### Backend and Architecture Enhancements:
|
||||||
|
|
||||||
|
#### CUDA:
|
||||||
|
|
||||||
|
- Allow NVCC 12 to compile using C++20 flag [\#6020](https://github.com/kokkos/kokkos/pull/6020)
|
||||||
|
- Add CUDA Ada architecture support [\#6022](https://github.com/kokkos/kokkos/pull/6022)
|
||||||
|
|
||||||
|
#### HIP:
|
||||||
|
|
||||||
|
- Add support for AMDGPU target NAVI31 / RX 7900 XT(X): gfx1100 [\#6021](https://github.com/kokkos/kokkos/pull/6021)
|
||||||
|
- HIP: Fix warning from `std::memcpy` [\#6019](https://github.com/kokkos/kokkos/pull/6019)
|
||||||
|
|
||||||
|
#### SYCL:
|
||||||
|
- Fix `SYCLTeamMember` to take arguments for scratch sizes as `std::size_t` [\#5986](https://github.com/kokkos/kokkos/pull/5986)
|
||||||
|
|
||||||
|
### General Enhancements
|
||||||
|
- Fixup 4.0 change log [\#6023](https://github.com/kokkos/kokkos/pull/6023)
|
||||||
|
|
||||||
|
### Build System Changes
|
||||||
|
- Cherry-pick TriBITS update from Trilinos [\#6037](https://github.com/kokkos/kokkos/pull/6037)
|
||||||
|
- CMake: update package compatibility mode when building within Trilinos [\#6013](https://github.com/kokkos/kokkos/pull/6013)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
- Fix an incorrectly returning size for SIMD uint64_t in AVX2 [\#6011](https://github.com/kokkos/kokkos/pull/6011)
|
||||||
|
- Desul atomics: wrong value for `desul::Impl::numeric_limits_max<uint64_t>` [\#6018](https://github.com/kokkos/kokkos/pull/6018)
|
||||||
|
- Fix warning in some user code when using std::memcpy [\#6000](https://github.com/kokkos/kokkos/pull/6000)
|
||||||
|
- Fix excessive build times using Makefile.kokkos [\#6068](https://github.com/kokkos/kokkos/pull/6068)
|
||||||
|
|
||||||
|
## [4.0.0](https://github.com/kokkos/kokkos/tree/4.0.00) (2023-02-21)
|
||||||
|
[Full Changelog](https://github.com/kokkos/kokkos/compare/3.7.01...4.0.00)
|
||||||
|
|
||||||
|
### Features:
|
||||||
|
- Allow value types without default constructor in `Kokkos::View` with `Kokkos::WithoutInitializing` [\#5307](https://github.com/kokkos/kokkos/pull/5307)
|
||||||
|
- `parallel_scan` with `View` as result type. [\#5146](https://github.com/kokkos/kokkos/pull/5146)
|
||||||
|
- Introduced `SharedSpace`, an alias for a `MemorySpace` that is accessible by every `ExecutionSpace`. The memory is moved and then accessed locally. [\#5289](https://github.com/kokkos/kokkos/pull/5289)
|
||||||
|
- Introduced `SharedHostPinnedSpace`, an alias for a `MemorySpace` that is accessible by every `ExecutionSpace`. The memory is pinned to the host and accessed via zero-copy access. [\#5405](https://github.com/kokkos/kokkos/pull/5405)
|
||||||
|
- Add team- and thread-level `sort`, `sort_by_key` algorithms. [\#5317](https://github.com/kokkos/kokkos/pull/5317)
|
||||||
|
- Groundwork for `MDSpan` integration. [\#4973](https://github.com/kokkos/kokkos/pull/4973) and [\#5304](https://github.com/kokkos/kokkos/pull/5304)
|
||||||
|
- Introduced MD version of hierarchical parallelism: `TeamThreadMDRange`, `ThreadVectorMDRange` and `TeamVectorMDRange`. [\#5238](https://github.com/kokkos/kokkos/pull/5238)
|
||||||
|
|
||||||
|
### Backend and Architecture Enhancements:
|
||||||
|
|
||||||
|
#### CUDA:
|
||||||
|
- Allow CUDA PTX forward compatibility [\#3612](https://github.com/kokkos/kokkos/pull/3612) [\#5536](https://github.com/kokkos/kokkos/pull/5536) [\#5527](https://github.com/kokkos/kokkos/pull/5527)
|
||||||
|
- Add support for NVIDIA Hopper GPU architecture [\#5538](https://github.com/kokkos/kokkos/pull/5538)
|
||||||
|
- Don't rely on synchronization behavior of default stream in CUDA and HIP [\#5391](https://github.com/kokkos/kokkos/pull/5391)
|
||||||
|
- Improve CUDA cache config settings [\#5706](https://github.com/kokkos/kokkos/pull/5706)
|
||||||
|
|
||||||
|
#### HIP:
|
||||||
|
- Move `HIP`, `HIPSpace`, `HIPHostPinnedSpace`, and `HIPManagedSpace` out of the `Experimental` namespace [\#5383](https://github.com/kokkos/kokkos/pull/5383)
|
||||||
|
- Don't rely on synchronization behavior of default stream in CUDA and HIP [\#5391](https://github.com/kokkos/kokkos/pull/5391)
|
||||||
|
- Export AMD architecture flag when using Trilinos [\#5528](https://github.com/kokkos/kokkos/pull/5528)
|
||||||
|
- Fix linking error (see [OLCF issue](https://docs.olcf.ornl.gov/systems/crusher_quick_start_guide.html#olcfdev-1167-kokkos-build-failures-with-prgenv-amd)) when using `amdclang`: [\#5539](https://github.com/kokkos/kokkos/pull/5539)
|
||||||
|
- Remove support for MI25 and added support for Navi 1030 [\#5522](https://github.com/kokkos/kokkos/pull/5522)
|
||||||
|
- Fix race condition when using `HSA_XNACK=1` [\#5755](https://github.com/kokkos/kokkos/pull/5755)
|
||||||
|
- Add parameter to force using GlobalMemory launch mechanism. This can be used when encountering compiler bugs with ROCm 5.3 and 5.4 [\#5796](https://github.com/kokkos/kokkos/pull/5796)
|
||||||
|
|
||||||
|
#### SYCL:
|
||||||
|
- Delegate choice of workgroup size for `parallel_reduce` with `RangePolicy` to the compiler. [\#5227](https://github.com/kokkos/kokkos/pull/5227)
|
||||||
|
- SYCL `RangePolicy`: manually specify workgroup size through chunk size [\#4875](https://github.com/kokkos/kokkos/pull/4875)
|
||||||
|
|
||||||
|
#### OpenMPTarget:
|
||||||
|
- Select the right device [\#5492](https://github.com/kokkos/kokkos/pull/5492)
|
||||||
|
|
||||||
|
#### OpenMP:
|
||||||
|
- Add `partition_space` [\#5105](https://github.com/kokkos/kokkos/pull/5105)
|
||||||
|
|
||||||
|
### General Enhancements
|
||||||
|
- Implement `OffsetView` constructor taking `pair`s and `ViewCtorProp` [\#5303](https://github.com/kokkos/kokkos/pull/5303)
|
||||||
|
- Promote math constants to `Kokkos::numbers` namespace [\#5434](https://github.com/kokkos/kokkos/pull/5434)
|
||||||
|
- Add overloads of `hypot` math function that take 3 arguments [\#5341](https://github.com/kokkos/kokkos/pull/5341)
|
||||||
|
- Add `fma` fused multiply-add math function [\#5428](https://github.com/kokkos/kokkos/pull/5428)
|
||||||
|
- Views using `MemoryTraits::Atomic` don't need `volatile` overloads for the value type anymore. [\#5455](https://github.com/kokkos/kokkos/pull/5455)
|
||||||
|
- Added `is_team_handle` trait [\#5375](https://github.com/kokkos/kokkos/pull/5375)
|
||||||
|
- Refactor desul atomics to support compiling CUDA with NVC++ [\#5431](https://github.com/kokkos/kokkos/pull/5431) [\#5497](https://github.com/kokkos/kokkos/pull/5497) [\#5498](https://github.com/kokkos/kokkos/pull/5498)
|
||||||
|
- Support finding `libquadmath` with native compiler support [\#5286](https://github.com/kokkos/kokkos/pull/5286)
|
||||||
|
- Add architecture flags for MSVC [\#5673](https://github.com/kokkos/kokkos/pull/5673)
|
||||||
|
- SIMD backend for ARM NEON [\#5829](https://github.com/kokkos/kokkos/pull/5829)
|
||||||
|
|
||||||
|
### Build System Changes
|
||||||
|
- Let CMake determine OpenMP flags. [\#4105](https://github.com/kokkos/kokkos/pull/4105)
|
||||||
|
- Update minimum compiler versions. [\#5323](https://github.com/kokkos/kokkos/pull/5323)
|
||||||
|
- Makefile and CMake support for C++23 [\#5283](https://github.com/kokkos/kokkos/pull/5283)
|
||||||
|
- Do not add `-cuda` to the link line with NVHPC compiler when the CUDA backend is not actually enabled [\#5485](https://github.com/kokkos/kokkos/pull/5485)
|
||||||
|
- Only add `-latomic` in generated GNU makefiles when OpenMPTarget backend is enabled [\#5501](https://github.com/kokkos/kokkos/pull/5501) [\#5537](https://github.com/kokkos/kokkos/pull/5537) (3.7 patch release candidate)
|
||||||
|
- `Kokkos_ENABLE_CUDA_LAMBDA` now `ON` by default with NVCC [\#5580](https://github.com/kokkos/kokkos/pull/5580)
|
||||||
|
- Fix enabling of relocatable device code when using CUDA as CMake language [\#5564](https://github.com/kokkos/kokkos/pull/5564)
|
||||||
|
- Fix cmake configuration with CUDA 12 [\#5691](https://github.com/kokkos/kokkos/pull/5691)
|
||||||
|
|
||||||
|
### Incompatibilities (i.e. breaking changes)
|
||||||
|
- ***Require C++17*** [\#5277](https://github.com/kokkos/kokkos/pull/5277)
|
||||||
|
- Turn setting `Kokkos_CXX_STANDARD` into an error [\#5293](https://github.com/kokkos/kokkos/pull/5293)
|
||||||
|
- Remove all deprecations in Kokkos 3 [\#5297](https://github.com/kokkos/kokkos/pull/5297)
|
||||||
|
- Remove `KOKKOS_COMPILER_CUDA_VERSION` [\#5430](https://github.com/kokkos/kokkos/pull/5430)
|
||||||
|
- Drop `reciprocal_overflow_threshold` numeric trait [\#5326](https://github.com/kokkos/kokkos/pull/5326)
|
||||||
|
- Move `reduction_identity` out of `<Kokkos_NumericTraits.hpp>` into a new `<Kokkos_ReductionIdentity.hpp>` header [\#5450](https://github.com/kokkos/kokkos/pull/5450)
|
||||||
|
- Reduction and scan routines will report an error if the `join()` operator they would use takes `volatile`-qualified parameters [\#5409](https://github.com/kokkos/kokkos/pull/5409)
|
||||||
|
- `ENABLE_CUDA_UVM` is dropped in favor of using `SharedSpace` as `MemorySpace` explicitly [\#5608](https://github.com/kokkos/kokkos/pull/5608)
|
||||||
|
- Remove Kokkos_ENABLE_CUDA_LDG_INTRINSIC option [\#5623](https://github.com/kokkos/kokkos/pull/5623)
|
||||||
|
- Don't rely on synchronization behavior of default stream in CUDA and HIP - this potentially will break unintended implicit synchronization with other libraries such as MPI [\#5391](https://github.com/kokkos/kokkos/pull/5391)
|
||||||
|
- Make ExecutionSpace::concurrency() a non-static member function [\#5655](https://github.com/kokkos/kokkos/pull/5655) and related PRs
|
||||||
|
- Remove code guarded by `KOKKOS_ENABLE_DEPRECATED_CODE_3`
|
||||||
|
|
||||||
|
### Deprecations
|
||||||
|
- Deprecate `CudaUVMSpace::available()` which always returned `true` [\#5614](https://github.com/kokkos/kokkos/pull/5614)
|
||||||
|
- Deprecate `volatile`-qualified members from `Kokkos::pair` and `Kokkos::complex` [\#5412](https://github.com/kokkos/kokkos/pull/5412)
|
||||||
|
- Deprecate `KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_*` macros [\#5824](https://github.com/kokkos/kokkos/pull/5824) (oversight in 3.6)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
- Avoid allocating memory for `UniqueToken` [\#5300](https://github.com/kokkos/kokkos/pull/5300)
|
||||||
|
- Fix `pragma ivdep` in `Kokkos_OpenMP_Parallel.hpp` [\#5356](https://github.com/kokkos/kokkos/pull/5356)
|
||||||
|
- Fix configuring with Threads support when rerunning CMake [\#5486](https://github.com/kokkos/kokkos/pull/5486)
|
||||||
|
- Fix View assignment between `LayoutLeft` and `LayoutRight` with static extents [\#5535](https://github.com/kokkos/kokkos/pull/5535) (3.7 patch release candidate)
|
||||||
|
- Add `fence()` calls to sorting routine overloads that don't take an execution space parameter [\#5389](https://github.com/kokkos/kokkos/pull/5389)
|
||||||
|
- `ClockTic` changed to 64 bit to fix overflow on Power [\#5577](https://github.com/kokkos/kokkos/pull/5577) (incl. in 3.7.01 patch release)
|
||||||
|
- Fix incorrect offset in CUDA and HIP `parallel_scan` for < 4 byte types [\#5555](https://github.com/kokkos/kokkos/pull/5555) (3.7 patch release candidate)
|
||||||
|
- Fix incorrect alignment behavior of scratch allocations in some corner cases (e.g. very small allocations) [\#5687](https://github.com/kokkos/kokkos/pull/5687) (3.7 patch release candidate)
|
||||||
|
- Add missing `ReductionIdentity<char>` specialization [\#5798](https://github.com/kokkos/kokkos/pull/5798)
|
||||||
|
- Don't install standard algorithms headers multiple times [\#5670](https://github.com/kokkos/kokkos/pull/5670)
|
||||||
|
- Fix max scratch size calculation for level 0 scratch in CUDA and HIP [\#5718](https://github.com/kokkos/kokkos/pull/5718)
|
||||||
|
|
||||||
## [3.7.02](https://github.com/kokkos/kokkos/tree/3.7.02) (2023-05-17)
|
## [3.7.02](https://github.com/kokkos/kokkos/tree/3.7.02) (2023-05-17)
|
||||||
[Full Changelog](https://github.com/kokkos/kokkos/compare/3.7.01...3.7.02)
|
[Full Changelog](https://github.com/kokkos/kokkos/compare/3.7.01...3.7.02)
|
||||||
|
|
||||||
|
|||||||
@ -5,13 +5,16 @@ if( "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}" )
|
|||||||
message( FATAL_ERROR "FATAL: In-source builds are not allowed. You should create a separate directory for build files and delete CMakeCache.txt." )
|
message( FATAL_ERROR "FATAL: In-source builds are not allowed. You should create a separate directory for build files and delete CMakeCache.txt." )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (COMMAND TRIBITS_PACKAGE)
|
||||||
|
TRIBITS_PACKAGE(Kokkos)
|
||||||
|
endif()
|
||||||
|
|
||||||
# We want to determine if options are given with the wrong case
|
# We want to determine if options are given with the wrong case
|
||||||
# In order to detect which arguments are given to compare against
|
# In order to detect which arguments are given to compare against
|
||||||
# the list of valid arguments, at the beginning here we need to
|
# the list of valid arguments, at the beginning here we need to
|
||||||
# form a list of all the given variables. If it begins with any
|
# form a list of all the given variables. If it begins with any
|
||||||
# case of KoKkOS, we add it to the list.
|
# case of KoKkOS, we add it to the list.
|
||||||
|
|
||||||
|
|
||||||
GET_CMAKE_PROPERTY(_variableNames VARIABLES)
|
GET_CMAKE_PROPERTY(_variableNames VARIABLES)
|
||||||
SET(KOKKOS_GIVEN_VARIABLES)
|
SET(KOKKOS_GIVEN_VARIABLES)
|
||||||
FOREACH (var ${_variableNames})
|
FOREACH (var ${_variableNames})
|
||||||
@ -34,6 +37,8 @@ IF(COMMAND TRIBITS_PACKAGE_DECL)
|
|||||||
SET(KOKKOS_HAS_TRILINOS ON)
|
SET(KOKKOS_HAS_TRILINOS ON)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(KOKKOS_HAS_TRILINOS OFF)
|
SET(KOKKOS_HAS_TRILINOS OFF)
|
||||||
|
SET(PACKAGE_NAME Kokkos)
|
||||||
|
SET(PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
# Is this build a subdirectory of another project
|
# Is this build a subdirectory of another project
|
||||||
GET_DIRECTORY_PROPERTY(HAS_PARENT PARENT_DIRECTORY)
|
GET_DIRECTORY_PROPERTY(HAS_PARENT PARENT_DIRECTORY)
|
||||||
@ -87,6 +92,16 @@ IF(NOT KOKKOS_HAS_TRILINOS)
|
|||||||
|
|
||||||
SET(KOKKOS_COMPILE_LANGUAGE CUDA)
|
SET(KOKKOS_COMPILE_LANGUAGE CUDA)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
# use lower case here since we haven't parsed options yet
|
||||||
|
IF (Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE AND Kokkos_ENABLE_HIP)
|
||||||
|
|
||||||
|
# Without this as a language for the package we would get a C++ compiler enabled.
|
||||||
|
# but we still need a C++ compiler even if we build all our cpp files as HIP only
|
||||||
|
# because otherwise the C++ features don't work etc.
|
||||||
|
SET(KOKKOS_INTERNAL_EXTRA_COMPILE_LANGUAGE CXX)
|
||||||
|
|
||||||
|
SET(KOKKOS_COMPILE_LANGUAGE HIP)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF (Spack_WORKAROUND)
|
IF (Spack_WORKAROUND)
|
||||||
IF (Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE)
|
IF (Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE)
|
||||||
@ -113,6 +128,8 @@ IF(NOT KOKKOS_HAS_TRILINOS)
|
|||||||
FORCE)
|
FORCE)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
ELSE()
|
||||||
|
SET(KOKKOS_COMPILE_LANGUAGE CXX)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (NOT CMAKE_SIZEOF_VOID_P)
|
IF (NOT CMAKE_SIZEOF_VOID_P)
|
||||||
@ -123,15 +140,27 @@ IF (NOT CMAKE_SIZEOF_VOID_P)
|
|||||||
MESSAGE(FATAL_ERROR "Kokkos did not configure correctly and failed to validate compiler. The most likely cause is linkage errors during CMake compiler validation. Please consult the CMake error log shown below for the exact error during compiler validation")
|
MESSAGE(FATAL_ERROR "Kokkos did not configure correctly and failed to validate compiler. The most likely cause is linkage errors during CMake compiler validation. Please consult the CMake error log shown below for the exact error during compiler validation")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSEIF (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
ELSEIF (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
MESSAGE(FATAL_ERROR "Kokkos assumes a 64-bit build; i.e., 8-byte pointers, but found ${CMAKE_SIZEOF_VOID_P}-byte pointers instead")
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
|
MESSAGE(WARNING "32-bit builds are experimental and not officially supported.")
|
||||||
|
SET(KOKKOS_IMPL_32BIT ON)
|
||||||
|
ELSE()
|
||||||
|
MESSAGE(FATAL_ERROR "Kokkos assumes a 64-bit build, i.e., 8-byte pointers, but found ${CMAKE_SIZEOF_VOID_P}-byte pointers instead;")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
set(Kokkos_VERSION_MAJOR 3)
|
set(Kokkos_VERSION_MAJOR 4)
|
||||||
set(Kokkos_VERSION_MINOR 7)
|
set(Kokkos_VERSION_MINOR 1)
|
||||||
set(Kokkos_VERSION_PATCH 02)
|
set(Kokkos_VERSION_PATCH 00)
|
||||||
set(Kokkos_VERSION "${Kokkos_VERSION_MAJOR}.${Kokkos_VERSION_MINOR}.${Kokkos_VERSION_PATCH}")
|
set(Kokkos_VERSION "${Kokkos_VERSION_MAJOR}.${Kokkos_VERSION_MINOR}.${Kokkos_VERSION_PATCH}")
|
||||||
|
message(STATUS "Kokkos version: ${Kokkos_VERSION}")
|
||||||
math(EXPR KOKKOS_VERSION "${Kokkos_VERSION_MAJOR} * 10000 + ${Kokkos_VERSION_MINOR} * 100 + ${Kokkos_VERSION_PATCH}")
|
math(EXPR KOKKOS_VERSION "${Kokkos_VERSION_MAJOR} * 10000 + ${Kokkos_VERSION_MINOR} * 100 + ${Kokkos_VERSION_PATCH}")
|
||||||
|
# mathematical expressions below are not stricly necessary but they eliminate
|
||||||
|
# the rather aggravating leading 0 in the releases patch version number, and,
|
||||||
|
# in some way, are a sanity check for our arithmetic
|
||||||
|
math(EXPR KOKKOS_VERSION_MAJOR "${KOKKOS_VERSION} / 10000")
|
||||||
|
math(EXPR KOKKOS_VERSION_MINOR "${KOKKOS_VERSION} / 100 % 100")
|
||||||
|
math(EXPR KOKKOS_VERSION_PATCH "${KOKKOS_VERSION} % 100")
|
||||||
|
|
||||||
# Load either the real TriBITS or a TriBITS wrapper
|
# Load either the real TriBITS or a TriBITS wrapper
|
||||||
# for certain utility functions that are universal (like GLOBAL_SET)
|
# for certain utility functions that are universal (like GLOBAL_SET)
|
||||||
@ -167,7 +196,7 @@ IF(NOT MSVC)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(Kokkos_ENABLE_TESTS AND NOT KOKKOS_HAS_TRILINOS)
|
IF(Kokkos_ENABLE_TESTS AND NOT KOKKOS_HAS_TRILINOS)
|
||||||
find_package(GTest)
|
find_package(GTest QUIET)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Include a set of Kokkos-specific wrapper functions that
|
# Include a set of Kokkos-specific wrapper functions that
|
||||||
@ -180,6 +209,14 @@ INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_tribits.cmake)
|
|||||||
# to allow platform-specific checks
|
# to allow platform-specific checks
|
||||||
INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_check_env.cmake)
|
INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_check_env.cmake)
|
||||||
|
|
||||||
|
IF(NOT KOKKOS_HAS_TRILINOS)
|
||||||
|
# This does not work in Trilinos and we simply don't care
|
||||||
|
# to fix it for Trilinos
|
||||||
|
# Gather information about the runtime environment
|
||||||
|
INCLUDE(${KOKKOS_SRC_PATH}/cmake/build_env_info.cmake)
|
||||||
|
check_git_setup()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# The build environment setup goes in the following steps
|
# The build environment setup goes in the following steps
|
||||||
# 1) Check all the enable options. This includes checking Kokkos_DEVICES
|
# 1) Check all the enable options. This includes checking Kokkos_DEVICES
|
||||||
# 2) Check the compiler ID (type and version)
|
# 2) Check the compiler ID (type and version)
|
||||||
@ -194,14 +231,8 @@ KOKKOS_SETUP_BUILD_ENVIRONMENT()
|
|||||||
|
|
||||||
OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||||
|
|
||||||
SET(KOKKOS_EXT_LIBRARIES Kokkos::kokkos Kokkos::kokkoscore Kokkos::kokkoscontainers Kokkos::kokkosalgorithms)
|
SET(KOKKOS_COMPONENT_LIBRARIES kokkoscore kokkoscontainers kokkosalgorithms kokkossimd)
|
||||||
SET(KOKKOS_SUB_LIBRARIES kokkoscore kokkoscontainers kokkosalgorithms)
|
SET_PROPERTY(GLOBAL PROPERTY KOKKOS_INT_LIBRARIES kokkos ${KOKKOS_COMPONENT_LIBRARIES})
|
||||||
IF (KOKKOS_CXX_STANDARD GREATER_EQUAL 17)
|
|
||||||
LIST(APPEND KOKKOS_EXT_LIBRARIES Kokkos::kokkossimd)
|
|
||||||
LIST(APPEND KOKKOS_SUB_LIBRARIES kokkossimd)
|
|
||||||
ENDIF()
|
|
||||||
SET(KOKKOS_INT_LIBRARIES kokkos ${KOKKOS_SUB_LIBRARIES})
|
|
||||||
SET_PROPERTY(GLOBAL PROPERTY KOKKOS_INT_LIBRARIES ${KOKKOS_INT_LIBRARIES})
|
|
||||||
|
|
||||||
IF (KOKKOS_HAS_TRILINOS)
|
IF (KOKKOS_HAS_TRILINOS)
|
||||||
SET(TRILINOS_INCDIR ${${PROJECT_NAME}_INSTALL_INCLUDE_DIR})
|
SET(TRILINOS_INCDIR ${${PROJECT_NAME}_INSTALL_INCLUDE_DIR})
|
||||||
@ -270,8 +301,6 @@ IF (KOKKOS_HAS_TRILINOS)
|
|||||||
$<$<COMPILE_LANGUAGE:CXX>:${KOKKOS_ALL_COMPILE_OPTIONS}>)
|
$<$<COMPILE_LANGUAGE:CXX>:${KOKKOS_ALL_COMPILE_OPTIONS}>)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
KOKKOS_PACKAGE_DECL()
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -285,7 +314,6 @@ KOKKOS_PROCESS_SUBPACKAGES()
|
|||||||
# E) If Kokkos itself is enabled, process the Kokkos package
|
# E) If Kokkos itself is enabled, process the Kokkos package
|
||||||
#
|
#
|
||||||
|
|
||||||
KOKKOS_PACKAGE_DEF()
|
|
||||||
KOKKOS_EXCLUDE_AUTOTOOLS_FILES()
|
KOKKOS_EXCLUDE_AUTOTOOLS_FILES()
|
||||||
KOKKOS_PACKAGE_POSTPROCESS()
|
KOKKOS_PACKAGE_POSTPROCESS()
|
||||||
KOKKOS_CONFIGURE_CORE()
|
KOKKOS_CONFIGURE_CORE()
|
||||||
@ -295,7 +323,9 @@ IF (NOT KOKKOS_HAS_TRILINOS AND NOT Kokkos_INSTALL_TESTING)
|
|||||||
#Make sure in-tree projects can reference this as Kokkos::
|
#Make sure in-tree projects can reference this as Kokkos::
|
||||||
#to match the installed target names
|
#to match the installed target names
|
||||||
ADD_LIBRARY(Kokkos::kokkos ALIAS kokkos)
|
ADD_LIBRARY(Kokkos::kokkos ALIAS kokkos)
|
||||||
TARGET_LINK_LIBRARIES(kokkos INTERFACE ${KOKKOS_SUB_LIBRARIES})
|
# all_libs target is required for TriBITS-compliance
|
||||||
|
ADD_LIBRARY(Kokkos::all_libs ALIAS kokkos)
|
||||||
|
TARGET_LINK_LIBRARIES(kokkos INTERFACE ${KOKKOS_COMPONENT_LIBRARIES})
|
||||||
KOKKOS_INTERNAL_ADD_LIBRARY_INSTALL(kokkos)
|
KOKKOS_INTERNAL_ADD_LIBRARY_INSTALL(kokkos)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_install.cmake)
|
INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_install.cmake)
|
||||||
|
|||||||
@ -1,43 +1,238 @@
|
|||||||
//@HEADER
|
************************************************************************
|
||||||
// ************************************************************************
|
|
||||||
//
|
Kokkos v. 4.0
|
||||||
// Kokkos v. 3.0
|
Copyright (2022) National Technology & Engineering
|
||||||
// Copyright (2020) National Technology & Engineering
|
Solutions of Sandia, LLC (NTESS).
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
|
||||||
//
|
Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
the U.S. Government retains certain rights in this software.
|
||||||
// the U.S. Government retains certain rights in this software.
|
|
||||||
//
|
|
||||||
// Kokkos is licensed under 3-clause BSD terms of use:
|
==============================================================================
|
||||||
//
|
Kokkos is under the Apache License v2.0 with LLVM Exceptions:
|
||||||
// Redistribution and use in source and binary forms, with or without
|
==============================================================================
|
||||||
// modification, are permitted provided that the following conditions are
|
|
||||||
// met:
|
Apache License
|
||||||
//
|
Version 2.0, January 2004
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
http://www.apache.org/licenses/
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
1. Definitions.
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
//
|
the copyright owner that is granting the License.
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
other entities that control, are controlled by, or are under common
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
control with that entity. For the purposes of this definition,
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
direction or management of such entity, whether by contract or
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
exercising permissions granted by this License.
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
//
|
including but not limited to software source code, documentation
|
||||||
// ************************************************************************
|
source, and configuration files.
|
||||||
//@HEADER
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS Apache 2.0
|
||||||
|
|
||||||
|
---- LLVM Exceptions to the Apache 2.0 License ----
|
||||||
|
|
||||||
|
As an exception, if, as a result of your compiling your source code, portions
|
||||||
|
of this Software are embedded into an Object form of such source code, you
|
||||||
|
may redistribute such embedded portions in such Object form without complying
|
||||||
|
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
|
||||||
|
|
||||||
|
In addition, if you combine or link compiled forms of this Software with
|
||||||
|
software that is licensed under the GPLv2 ("Combined Software") and if a
|
||||||
|
court of competent jurisdiction determines that the patent provision (Section
|
||||||
|
3), the indemnity provision (Section 9) or other Section of the License
|
||||||
|
conflicts with the conditions of the GPLv2, you may retroactively and
|
||||||
|
prospectively choose to deem waived or otherwise exclude such Section(s) of
|
||||||
|
the License, but only in their entirety and only with respect to the Combined
|
||||||
|
Software.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
Software from third parties included in Kokkos:
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
Kokkos contains third party software which is under different license
|
||||||
|
terms. All such code will be identified clearly using at least one of two
|
||||||
|
mechanisms:
|
||||||
|
1) It will be in a separate directory tree with its own `LICENSE.txt` or
|
||||||
|
`LICENSE` file at the top containing the specific license and restrictions
|
||||||
|
which apply to that software, or
|
||||||
|
2) It will contain specific license and restriction terms at the top of every
|
||||||
|
file.
|
||||||
|
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
||||||
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
Questions? Contact:
|
||||||
|
Christian R. Trott (crtrott@sandia.gov) and
|
||||||
|
Damien T. Lebrun-Grandie (lebrungrandt@ornl.gov)
|
||||||
|
|
||||||
|
************************************************************************
|
||||||
|
|||||||
15
lib/kokkos/LICENSE_FILE_HEADER
Normal file
15
lib/kokkos/LICENSE_FILE_HEADER
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
//@HEADER
|
||||||
|
// ************************************************************************
|
||||||
|
//
|
||||||
|
// Kokkos v. 4.0
|
||||||
|
// Copyright (2022) National Technology & Engineering
|
||||||
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
|
//
|
||||||
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
|
// the U.S. Government retains certain rights in this software.
|
||||||
|
//
|
||||||
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
|
//
|
||||||
|
//@HEADER
|
||||||
@ -10,9 +10,9 @@ ifeq ($(mode),shared)
|
|||||||
CXXFLAGS += $(SHFLAGS)
|
CXXFLAGS += $(SHFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
KOKKOS_VERSION_MAJOR = 3
|
KOKKOS_VERSION_MAJOR = 4
|
||||||
KOKKOS_VERSION_MINOR = 7
|
KOKKOS_VERSION_MINOR = 1
|
||||||
KOKKOS_VERSION_PATCH = 02
|
KOKKOS_VERSION_PATCH = 00
|
||||||
KOKKOS_VERSION = $(shell echo $(KOKKOS_VERSION_MAJOR)*10000+$(KOKKOS_VERSION_MINOR)*100+$(KOKKOS_VERSION_PATCH) | bc)
|
KOKKOS_VERSION = $(shell echo $(KOKKOS_VERSION_MAJOR)*10000+$(KOKKOS_VERSION_MINOR)*100+$(KOKKOS_VERSION_PATCH) | bc)
|
||||||
|
|
||||||
# Options: Cuda,HIP,SYCL,OpenMPTarget,OpenMP,Threads,Serial
|
# Options: Cuda,HIP,SYCL,OpenMPTarget,OpenMP,Threads,Serial
|
||||||
@ -23,7 +23,7 @@ KOKKOS_DEVICES ?= "OpenMP"
|
|||||||
# NVIDIA: Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,Pascal60,Pascal61,Volta70,Volta72,Turing75,Ampere80,Ampere86,Ada89,Hopper90
|
# NVIDIA: Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,Pascal60,Pascal61,Volta70,Volta72,Turing75,Ampere80,Ampere86,Ada89,Hopper90
|
||||||
# ARM: ARMv80,ARMv81,ARMv8-ThunderX,ARMv8-TX2,A64FX
|
# ARM: ARMv80,ARMv81,ARMv8-ThunderX,ARMv8-TX2,A64FX
|
||||||
# IBM: BGQ,Power7,Power8,Power9
|
# IBM: BGQ,Power7,Power8,Power9
|
||||||
# AMD-GPUS: Vega900,Vega906,Vega908,Vega90A
|
# AMD-GPUS: Vega906,Vega908,Vega90A,Navi1030
|
||||||
# AMD-CPUS: AMDAVX,Zen,Zen2,Zen3
|
# AMD-CPUS: AMDAVX,Zen,Zen2,Zen3
|
||||||
# Intel-GPUs: Gen9,Gen11,Gen12LP,DG1,XeHP,PVC
|
# Intel-GPUs: Gen9,Gen11,Gen12LP,DG1,XeHP,PVC
|
||||||
KOKKOS_ARCH ?= ""
|
KOKKOS_ARCH ?= ""
|
||||||
@ -31,9 +31,9 @@ KOKKOS_ARCH ?= ""
|
|||||||
KOKKOS_DEBUG ?= "no"
|
KOKKOS_DEBUG ?= "no"
|
||||||
# Options: hwloc,librt,experimental_memkind
|
# Options: hwloc,librt,experimental_memkind
|
||||||
KOKKOS_USE_TPLS ?= ""
|
KOKKOS_USE_TPLS ?= ""
|
||||||
# Options: c++14,c++1y,c++17,c++1z,c++2a
|
# Options: c++17,c++1z,c++20,c++2a,c++23,c++2b
|
||||||
KOKKOS_CXX_STANDARD ?= "c++14"
|
KOKKOS_CXX_STANDARD ?= "c++17"
|
||||||
# Options: aggressive_vectorization,disable_profiling,enable_large_mem_tests,disable_complex_align,disable_deprecated_code,enable_deprecation_warnings,disable_desul_atomics
|
# Options: aggressive_vectorization,disable_profiling,enable_large_mem_tests,disable_complex_align,disable_deprecated_code,enable_deprecation_warnings
|
||||||
KOKKOS_OPTIONS ?= ""
|
KOKKOS_OPTIONS ?= ""
|
||||||
KOKKOS_CMAKE ?= "no"
|
KOKKOS_CMAKE ?= "no"
|
||||||
KOKKOS_TRIBITS ?= "no"
|
KOKKOS_TRIBITS ?= "no"
|
||||||
@ -67,12 +67,12 @@ kokkos_path_exists=$(if $(wildcard $1),1,0)
|
|||||||
# Check for general settings
|
# Check for general settings
|
||||||
|
|
||||||
KOKKOS_INTERNAL_ENABLE_DEBUG := $(call kokkos_has_string,$(KOKKOS_DEBUG),yes)
|
KOKKOS_INTERNAL_ENABLE_DEBUG := $(call kokkos_has_string,$(KOKKOS_DEBUG),yes)
|
||||||
KOKKOS_INTERNAL_ENABLE_CXX14 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++14)
|
|
||||||
KOKKOS_INTERNAL_ENABLE_CXX1Y := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++1y)
|
|
||||||
KOKKOS_INTERNAL_ENABLE_CXX17 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++17)
|
KOKKOS_INTERNAL_ENABLE_CXX17 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++17)
|
||||||
KOKKOS_INTERNAL_ENABLE_CXX1Z := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++1z)
|
KOKKOS_INTERNAL_ENABLE_CXX1Z := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++1z)
|
||||||
KOKKOS_INTERNAL_ENABLE_CXX2A := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++2a)
|
|
||||||
KOKKOS_INTERNAL_ENABLE_CXX20 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++20)
|
KOKKOS_INTERNAL_ENABLE_CXX20 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++20)
|
||||||
|
KOKKOS_INTERNAL_ENABLE_CXX2A := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++2a)
|
||||||
|
KOKKOS_INTERNAL_ENABLE_CXX23 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++23)
|
||||||
|
KOKKOS_INTERNAL_ENABLE_CXX2B := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++2b)
|
||||||
|
|
||||||
# Check for external libraries.
|
# Check for external libraries.
|
||||||
KOKKOS_INTERNAL_USE_HWLOC := $(call kokkos_has_string,$(KOKKOS_USE_TPLS),hwloc)
|
KOKKOS_INTERNAL_USE_HWLOC := $(call kokkos_has_string,$(KOKKOS_USE_TPLS),hwloc)
|
||||||
@ -85,8 +85,8 @@ KOKKOS_INTERNAL_AGGRESSIVE_VECTORIZATION := $(call kokkos_has_string,$(KOKKOS_OP
|
|||||||
KOKKOS_INTERNAL_ENABLE_TUNING := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_tuning)
|
KOKKOS_INTERNAL_ENABLE_TUNING := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_tuning)
|
||||||
KOKKOS_INTERNAL_DISABLE_COMPLEX_ALIGN := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_complex_align)
|
KOKKOS_INTERNAL_DISABLE_COMPLEX_ALIGN := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_complex_align)
|
||||||
KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_dualview_modify_check)
|
KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_dualview_modify_check)
|
||||||
KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_profile_load_print)
|
|
||||||
KOKKOS_INTERNAL_ENABLE_LARGE_MEM_TESTS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_large_mem_tests)
|
KOKKOS_INTERNAL_ENABLE_LARGE_MEM_TESTS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_large_mem_tests)
|
||||||
|
# deprecated
|
||||||
KOKKOS_INTERNAL_CUDA_USE_LDG := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),use_ldg)
|
KOKKOS_INTERNAL_CUDA_USE_LDG := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),use_ldg)
|
||||||
KOKKOS_INTERNAL_CUDA_USE_UVM := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),force_uvm)
|
KOKKOS_INTERNAL_CUDA_USE_UVM := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),force_uvm)
|
||||||
KOKKOS_INTERNAL_CUDA_USE_RELOC := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),rdc)
|
KOKKOS_INTERNAL_CUDA_USE_RELOC := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),rdc)
|
||||||
@ -95,7 +95,9 @@ KOKKOS_INTERNAL_CUDA_USE_CONSTEXPR := $(call kokkos_has_string,$(KOKKOS_CUDA_OPT
|
|||||||
KOKKOS_INTERNAL_HPX_ENABLE_ASYNC_DISPATCH := $(call kokkos_has_string,$(KOKKOS_HPX_OPTIONS),enable_async_dispatch)
|
KOKKOS_INTERNAL_HPX_ENABLE_ASYNC_DISPATCH := $(call kokkos_has_string,$(KOKKOS_HPX_OPTIONS),enable_async_dispatch)
|
||||||
# deprecated
|
# deprecated
|
||||||
KOKKOS_INTERNAL_ENABLE_DESUL_ATOMICS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_desul_atomics)
|
KOKKOS_INTERNAL_ENABLE_DESUL_ATOMICS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_desul_atomics)
|
||||||
|
# deprecated
|
||||||
KOKKOS_INTERNAL_DISABLE_DESUL_ATOMICS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_desul_atomics)
|
KOKKOS_INTERNAL_DISABLE_DESUL_ATOMICS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_desul_atomics)
|
||||||
|
KOKKOS_INTERNAL_DISABLE_BUNDLED_MDSPAN := $(call kokkos_has_string,$(KOKKOS_OPTIONS),impl_disable_bundled_mdspan)
|
||||||
KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_deprecated_code)
|
KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_deprecated_code)
|
||||||
KOKKOS_INTERNAL_ENABLE_DEPRECATION_WARNINGS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_deprecation_warnings)
|
KOKKOS_INTERNAL_ENABLE_DEPRECATION_WARNINGS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_deprecation_warnings)
|
||||||
|
|
||||||
@ -104,14 +106,8 @@ KOKKOS_INTERNAL_HIP_USE_RELOC := $(call kokkos_has_string,$(KOKKOS_HIP_OPTIONS),
|
|||||||
# Check for Kokkos Host Execution Spaces one of which must be on.
|
# Check for Kokkos Host Execution Spaces one of which must be on.
|
||||||
KOKKOS_INTERNAL_USE_OPENMP := $(call kokkos_has_string,$(subst OpenMPTarget,,$(KOKKOS_DEVICES)),OpenMP)
|
KOKKOS_INTERNAL_USE_OPENMP := $(call kokkos_has_string,$(subst OpenMPTarget,,$(KOKKOS_DEVICES)),OpenMP)
|
||||||
KOKKOS_INTERNAL_USE_THREADS := $(call kokkos_has_string,$(KOKKOS_DEVICES),Threads)
|
KOKKOS_INTERNAL_USE_THREADS := $(call kokkos_has_string,$(KOKKOS_DEVICES),Threads)
|
||||||
# deprecated
|
|
||||||
KOKKOS_INTERNAL_USE_PTHREAD := $(call kokkos_has_string,$(KOKKOS_DEVICES),Pthread)
|
|
||||||
KOKKOS_INTERNAL_USE_HPX := $(call kokkos_has_string,$(KOKKOS_DEVICES),HPX)
|
KOKKOS_INTERNAL_USE_HPX := $(call kokkos_has_string,$(KOKKOS_DEVICES),HPX)
|
||||||
KOKKOS_INTERNAL_USE_SERIAL := $(call kokkos_has_string,$(KOKKOS_DEVICES),Serial)
|
KOKKOS_INTERNAL_USE_SERIAL := $(call kokkos_has_string,$(KOKKOS_DEVICES),Serial)
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_PTHREAD), 1)
|
|
||||||
KOKKOS_INTERNAL_USE_THREADS := 1
|
|
||||||
$(warning Warning: Pthread is deprecated. Use Threads instead! KOKKOS_DEVICES=$(KOKKOS_DEVICES))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 0)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 0)
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_THREADS), 0)
|
ifeq ($(KOKKOS_INTERNAL_USE_THREADS), 0)
|
||||||
@ -126,6 +122,7 @@ KOKKOS_INTERNAL_USE_CUDA := $(call kokkos_has_string,$(KOKKOS_DEVICES),Cuda)
|
|||||||
KOKKOS_INTERNAL_USE_HIP := $(call kokkos_has_string,$(KOKKOS_DEVICES),HIP)
|
KOKKOS_INTERNAL_USE_HIP := $(call kokkos_has_string,$(KOKKOS_DEVICES),HIP)
|
||||||
KOKKOS_INTERNAL_USE_SYCL := $(call kokkos_has_string,$(KOKKOS_DEVICES),SYCL)
|
KOKKOS_INTERNAL_USE_SYCL := $(call kokkos_has_string,$(KOKKOS_DEVICES),SYCL)
|
||||||
KOKKOS_INTERNAL_USE_OPENMPTARGET := $(call kokkos_has_string,$(KOKKOS_DEVICES),OpenMPTarget)
|
KOKKOS_INTERNAL_USE_OPENMPTARGET := $(call kokkos_has_string,$(KOKKOS_DEVICES),OpenMPTarget)
|
||||||
|
KOKKOS_INTERNAL_USE_OPENACC := $(call kokkos_has_string,$(KOKKOS_DEVICES),OpenACC)
|
||||||
|
|
||||||
KOKKOS_DEVICELIST =
|
KOKKOS_DEVICELIST =
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
||||||
@ -146,21 +143,14 @@ endif
|
|||||||
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
||||||
KOKKOS_DEVICELIST += HIP
|
KOKKOS_DEVICELIST += HIP
|
||||||
endif
|
endif
|
||||||
KOKKOS_INTERNAL_HAVE_CXX17_OR_NEWER := $(shell expr $(KOKKOS_INTERNAL_ENABLE_CXX17) \
|
|
||||||
+ $(KOKKOS_INTERNAL_ENABLE_CXX20) \
|
|
||||||
+ $(KOKKOS_INTERNAL_ENABLE_CXX2A))
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_SYCL), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_SYCL), 1)
|
||||||
KOKKOS_DEVICELIST += SYCL
|
KOKKOS_DEVICELIST += SYCL
|
||||||
ifneq ($(KOKKOS_INTERNAL_HAVE_CXX17_OR_NEWER), 1)
|
|
||||||
$(error SYCL backend requires C++17 or newer)
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
||||||
KOKKOS_DEVICELIST += OPENMPTARGET
|
KOKKOS_DEVICELIST += OPENMPTARGET
|
||||||
ifneq ($(KOKKOS_INTERNAL_HAVE_CXX17_OR_NEWER), 1)
|
endif
|
||||||
$(error OpenMPTarget backend requires C++17 or newer)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
||||||
endif
|
KOKKOS_DEVICELIST += OpenACC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||||
@ -183,10 +173,9 @@ KOKKOS_INTERNAL_OS_DARWIN := $(call kokkos_has_string,$(KOKKOS_OS),Darwin)
|
|||||||
# Check compiler.
|
# Check compiler.
|
||||||
KOKKOS_CXX_VERSION := $(strip $(shell $(CXX) --version 2>&1))
|
KOKKOS_CXX_VERSION := $(strip $(shell $(CXX) --version 2>&1))
|
||||||
KOKKOS_INTERNAL_COMPILER_INTEL := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),Intel Corporation)
|
KOKKOS_INTERNAL_COMPILER_INTEL := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),Intel Corporation)
|
||||||
KOKKOS_INTERNAL_COMPILER_PGI := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),PGI)
|
|
||||||
KOKKOS_INTERNAL_COMPILER_XL := $(strip $(shell $(CXX) -qversion 2>&1 | grep -c XL))
|
|
||||||
KOKKOS_INTERNAL_COMPILER_CRAY := $(strip $(shell $(CXX) -craype-verbose 2>&1 | grep -c "CC-"))
|
KOKKOS_INTERNAL_COMPILER_CRAY := $(strip $(shell $(CXX) -craype-verbose 2>&1 | grep -c "CC-"))
|
||||||
KOKKOS_INTERNAL_COMPILER_NVCC := $(strip $(shell echo "$(shell export OMPI_CXX=$(OMPI_CXX); export MPICH_CXX=$(MPICH_CXX); $(CXX) --version 2>&1 | grep -c nvcc)>0" | bc))
|
KOKKOS_INTERNAL_COMPILER_NVCC := $(strip $(shell echo "$(shell export OMPI_CXX=$(OMPI_CXX); export MPICH_CXX=$(MPICH_CXX); $(CXX) --version 2>&1 | grep -c nvcc)>0" | bc))
|
||||||
|
KOKKOS_INTERNAL_COMPILER_NVHPC := $(strip $(shell $(CXX) --version 2>&1 | grep -c "nvc++"))
|
||||||
KOKKOS_INTERNAL_COMPILER_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),clang)
|
KOKKOS_INTERNAL_COMPILER_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),clang)
|
||||||
KOKKOS_INTERNAL_COMPILER_CRAY_CLANG := $(strip $(shell $(CXX) -craype-verbose 2>&1 | grep -c "clang++"))
|
KOKKOS_INTERNAL_COMPILER_CRAY_CLANG := $(strip $(shell $(CXX) -craype-verbose 2>&1 | grep -c "clang++"))
|
||||||
KOKKOS_INTERNAL_COMPILER_INTEL_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),oneAPI)
|
KOKKOS_INTERNAL_COMPILER_INTEL_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),oneAPI)
|
||||||
@ -202,7 +191,6 @@ ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC_WRAPPER), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC_WRAPPER), 1)
|
||||||
|
|
||||||
KOKKOS_CXX_HOST_VERSION := $(strip $(shell $(CXX) $(CXXFLAGS) --host-version 2>&1))
|
KOKKOS_CXX_HOST_VERSION := $(strip $(shell $(CXX) $(CXXFLAGS) --host-version 2>&1))
|
||||||
KOKKOS_INTERNAL_COMPILER_PGI := $(call kokkos_has_string,$(KOKKOS_CXX_HOST_VERSION),PGI)
|
|
||||||
KOKKOS_INTERNAL_COMPILER_INTEL := $(call kokkos_has_string,$(KOKKOS_CXX_HOST_VERSION),Intel Corporation)
|
KOKKOS_INTERNAL_COMPILER_INTEL := $(call kokkos_has_string,$(KOKKOS_CXX_HOST_VERSION),Intel Corporation)
|
||||||
KOKKOS_INTERNAL_COMPILER_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_HOST_VERSION),clang)
|
KOKKOS_INTERNAL_COMPILER_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_HOST_VERSION),clang)
|
||||||
endif
|
endif
|
||||||
@ -211,9 +199,6 @@ endif
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 2)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 2)
|
||||||
KOKKOS_INTERNAL_COMPILER_CLANG = 1
|
KOKKOS_INTERNAL_COMPILER_CLANG = 1
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 2)
|
|
||||||
KOKKOS_INTERNAL_COMPILER_XL = 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Apple Clang passes both clang and apple clang tests, so turn off clang.
|
# Apple Clang passes both clang and apple clang tests, so turn off clang.
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1)
|
||||||
@ -253,113 +238,79 @@ endif
|
|||||||
|
|
||||||
# Set compiler warnings flags.
|
# Set compiler warnings flags.
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_COMPILER_WARNINGS), 1)
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_COMPILER_WARNINGS), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
# TODO check if PGI accepts GNU style warnings
|
|
||||||
KOKKOS_INTERNAL_COMPILER_WARNINGS =
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||||
KOKKOS_INTERNAL_COMPILER_WARNINGS = -Wall -Wunused-parameter -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized
|
KOKKOS_INTERNAL_COMPILER_WARNINGS = -Wall -Wunused-parameter -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1)
|
|
||||||
KOKKOS_INTERNAL_COMPILER_WARNINGS = -Wall -Wunused-parameter -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized
|
KOKKOS_INTERNAL_COMPILER_WARNINGS = -Wall -Wunused-parameter -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1)
|
|
||||||
KOKKOS_INTERNAL_COMPILER_WARNINGS = -Wall -Wunused-parameter -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
# TODO check if cray accepts GNU style warnings
|
# TODO check if cray accepts GNU style warnings
|
||||||
KOKKOS_INTERNAL_COMPILER_WARNINGS =
|
KOKKOS_INTERNAL_COMPILER_WARNINGS =
|
||||||
else
|
else
|
||||||
#gcc
|
#gcc
|
||||||
KOKKOS_INTERNAL_COMPILER_WARNINGS = -Wall -Wunused-parameter -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wignored-qualifiers -Wempty-body -Wclobbered -Wuninitialized
|
KOKKOS_INTERNAL_COMPILER_WARNINGS = -Wall -Wunused-parameter -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wignored-qualifiers -Wempty-body -Wclobbered -Wuninitialized
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
KOKKOS_INTERNAL_COMPILER_WARNINGS =
|
KOKKOS_INTERNAL_COMPILER_WARNINGS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set OpenMP flags.
|
# Set OpenMP flags.
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -mp
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY_CLANG), 1)
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
|
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_FUJITSU), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_FUJITSU), 1)
|
|
||||||
# fujitsu (clang mode) fails with `=libomp`
|
# fujitsu (clang mode) fails with `=libomp`
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
|
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
|
||||||
else
|
else
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp=libomp
|
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp=libomp
|
||||||
endif
|
endif
|
||||||
endif
|
else
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_APPLE_CLANG), 1)
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp=libomp
|
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp=libomp
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1)
|
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -qsmp=omp
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
# OpenMP is turned on by default in Cray compiler environment.
|
# OpenMP is turned on by default in Cray compiler environment.
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG :=
|
KOKKOS_INTERNAL_OPENMP_FLAG :=
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL_CLANG), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL_CLANG), 1)
|
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -fiopenmp
|
KOKKOS_INTERNAL_OPENMP_FLAG := -fiopenmp
|
||||||
else
|
else
|
||||||
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
|
KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1)
|
|
||||||
KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -DKOKKOS_IBM_XL_OMP45_WORKAROUND -qsmp=omp -qoffload -qnoeh
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
|
||||||
#KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -DKOKKOS_BUG_WORKAROUND_IBM_CLANG_OMP45_VIEW_INIT -fopenmp-implicit-declare-target -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp -fopenmp=libomp
|
|
||||||
KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -DKOKKOS_WORKAROUND_OPENMPTARGET_CLANG -fopenmp -fopenmp=libomp -Wno-openmp-mapping
|
|
||||||
KOKKOS_INTERNAL_OPENMPTARGET_LIB := -lomptarget
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL_CLANG), 1)
|
||||||
KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -fiopenmp -Wno-openmp-mapping
|
KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -fiopenmp -Wno-openmp-mapping
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_NVHPC), 1)
|
||||||
|
KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -mp=gpu
|
||||||
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 0)
|
||||||
#Assume GCC
|
#Assume GCC
|
||||||
KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -fopenmp -foffload=nvptx-none
|
KOKKOS_INTERNAL_OPENMPTARGET_FLAG := -fopenmp -foffload=nvptx-none
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
||||||
|
# Set OpenACC flags.
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVHPC), 1)
|
||||||
|
KOKKOS_INTERNAL_OPENACC_FLAG := -acc
|
||||||
|
else
|
||||||
|
$(error Makefile.kokkos: OpenACC is enabled but the compiler must be NVHPC (got version string $(KOKKOS_CXX_VERSION)))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set C++ version flags.
|
# Set C++ version flags.
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
KOKKOS_INTERNAL_CXX14_FLAG := --c++14
|
KOKKOS_INTERNAL_CXX17_FLAG := -hstd=c++17
|
||||||
KOKKOS_INTERNAL_CXX17_FLAG := --c++17
|
KOKKOS_INTERNAL_CXX1Z_FLAG := -hstd=c++1z
|
||||||
|
KOKKOS_INTERNAL_CXX20_FLAG := -hstd=c++20
|
||||||
|
KOKKOS_INTERNAL_CXX2A_FLAG := -hstd=c++2a
|
||||||
|
KOKKOS_INTERNAL_CXX23_FLAG := -hstd=c++23
|
||||||
|
KOKKOS_INTERNAL_CXX2A_FLAG := -hstd=c++2b
|
||||||
else
|
else
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1)
|
|
||||||
KOKKOS_INTERNAL_CXX14_FLAG := -std=c++14
|
|
||||||
KOKKOS_INTERNAL_CXX1Y_FLAG := -std=c++1y
|
|
||||||
#KOKKOS_INTERNAL_CXX17_FLAG := -std=c++17
|
|
||||||
#KOKKOS_INTERNAL_CXX1Z_FLAG := -std=c++1Z
|
|
||||||
#KOKKOS_INTERNAL_CXX2A_FLAG := -std=c++2a
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
KOKKOS_INTERNAL_CXX14_FLAG := -hstd=c++14
|
|
||||||
#KOKKOS_INTERNAL_CXX1Y_FLAG := -hstd=c++1y
|
|
||||||
#KOKKOS_INTERNAL_CXX17_FLAG := -hstd=c++17
|
|
||||||
#KOKKOS_INTERNAL_CXX1Z_FLAG := -hstd=c++1z
|
|
||||||
#KOKKOS_INTERNAL_CXX2A_FLAG := -hstd=c++2a
|
|
||||||
else
|
|
||||||
KOKKOS_INTERNAL_CXX14_FLAG := -std=c++14
|
|
||||||
KOKKOS_INTERNAL_CXX1Y_FLAG := -std=c++1y
|
|
||||||
KOKKOS_INTERNAL_CXX17_FLAG := -std=c++17
|
KOKKOS_INTERNAL_CXX17_FLAG := -std=c++17
|
||||||
KOKKOS_INTERNAL_CXX1Z_FLAG := -std=c++1z
|
KOKKOS_INTERNAL_CXX1Z_FLAG := -std=c++1z
|
||||||
|
KOKKOS_INTERNAL_CXX20_FLAG := -std=c++20
|
||||||
KOKKOS_INTERNAL_CXX2A_FLAG := -std=c++2a
|
KOKKOS_INTERNAL_CXX2A_FLAG := -std=c++2a
|
||||||
endif
|
KOKKOS_INTERNAL_CXX23_FLAG := -std=c++23
|
||||||
endif
|
KOKKOS_INTERNAL_CXX2B_FLAG := -std=c++2b
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Check for Kokkos Architecture settings.
|
# Check for Kokkos Architecture settings.
|
||||||
@ -461,10 +412,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ZEN3), 0)
|
|||||||
KOKKOS_INTERNAL_USE_ARCH_ZEN := $(call kokkos_has_string,$(KOKKOS_ARCH),Zen)
|
KOKKOS_INTERNAL_USE_ARCH_ZEN := $(call kokkos_has_string,$(KOKKOS_ARCH),Zen)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
KOKKOS_INTERNAL_USE_ARCH_VEGA900 := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega900)
|
|
||||||
KOKKOS_INTERNAL_USE_ARCH_VEGA906 := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega906)
|
KOKKOS_INTERNAL_USE_ARCH_VEGA906 := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega906)
|
||||||
KOKKOS_INTERNAL_USE_ARCH_VEGA908 := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega908)
|
KOKKOS_INTERNAL_USE_ARCH_VEGA908 := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega908)
|
||||||
KOKKOS_INTERNAL_USE_ARCH_VEGA90A := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega90A)
|
KOKKOS_INTERNAL_USE_ARCH_VEGA90A := $(call kokkos_has_string,$(KOKKOS_ARCH),Vega90A)
|
||||||
|
KOKKOS_INTERNAL_USE_ARCH_NAVI1030 := $(call kokkos_has_string,$(KOKKOS_ARCH),Navi1030)
|
||||||
|
|
||||||
# Any AVX?
|
# Any AVX?
|
||||||
KOKKOS_INTERNAL_USE_ARCH_SSE42 := $(shell expr $(KOKKOS_INTERNAL_USE_ARCH_WSM))
|
KOKKOS_INTERNAL_USE_ARCH_SSE42 := $(shell expr $(KOKKOS_INTERNAL_USE_ARCH_WSM))
|
||||||
@ -532,13 +483,15 @@ tmp := $(call kokkos_append_header,'$H''endif')
|
|||||||
|
|
||||||
tmp := $(call kokkos_append_header,"")
|
tmp := $(call kokkos_append_header,"")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_VERSION $(KOKKOS_VERSION)")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_VERSION $(KOKKOS_VERSION)")
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_VERSION_MAJOR $(KOKKOS_VERSION_MAJOR)")
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_VERSION_MINOR $(KOKKOS_VERSION_MINOR)")
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_VERSION_PATCH $(KOKKOS_VERSION_PATCH)")
|
||||||
tmp := $(call kokkos_append_header,"")
|
tmp := $(call kokkos_append_header,"")
|
||||||
|
|
||||||
tmp := $(call kokkos_append_header,"/* Execution Spaces */")
|
tmp := $(call kokkos_append_header,"/* Execution Spaces */")
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_COMPILER_CUDA_VERSION $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION)")
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
||||||
@ -557,6 +510,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_OPENACC")
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
||||||
tmp := $(call kokkos_append_header,'$H''define KOKKOS_ENABLE_OPENMP')
|
tmp := $(call kokkos_append_header,'$H''define KOKKOS_ENABLE_OPENMP')
|
||||||
endif
|
endif
|
||||||
@ -576,22 +533,11 @@ endif
|
|||||||
#only add the c++ standard flags if this is not CMake
|
#only add the c++ standard flags if this is not CMake
|
||||||
tmp := $(call kokkos_append_header,"/* General Settings */")
|
tmp := $(call kokkos_append_header,"/* General Settings */")
|
||||||
ifneq ($(KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE), 1)
|
ifneq ($(KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_DEPRECATED_CODE_3")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_DEPRECATED_CODE_4")
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_DEPRECATION_WARNINGS), 1)
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_DEPRECATION_WARNINGS), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_DEPRECATION_WARNINGS")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_DEPRECATION_WARNINGS")
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX14), 1)
|
|
||||||
ifneq ($(KOKKOS_STANDALONE_CMAKE), yes)
|
|
||||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX14_FLAG)
|
|
||||||
endif
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX14")
|
|
||||||
endif
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX1Y), 1)
|
|
||||||
#I cannot make CMake add this in a good way - so add it here
|
|
||||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Y_FLAG)
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX14")
|
|
||||||
endif
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX17), 1)
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX17), 1)
|
||||||
ifneq ($(KOKKOS_STANDALONE_CMAKE), yes)
|
ifneq ($(KOKKOS_STANDALONE_CMAKE), yes)
|
||||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX17_FLAG)
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX17_FLAG)
|
||||||
@ -603,15 +549,25 @@ ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX1Z), 1)
|
|||||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Z_FLAG)
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Z_FLAG)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX17")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX17")
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX20), 1)
|
||||||
|
#I cannot make CMake add this in a good way - so add it here
|
||||||
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX20_FLAG)
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX20")
|
||||||
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX2A), 1)
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX2A), 1)
|
||||||
#I cannot make CMake add this in a good way - so add it here
|
#I cannot make CMake add this in a good way - so add it here
|
||||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX2A_FLAG)
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX2A_FLAG)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX20")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX20")
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX20), 1)
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX23), 1)
|
||||||
#I cannot make CMake add this in a good way - so add it here
|
#I cannot make CMake add this in a good way - so add it here
|
||||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX20_FLAG)
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX23_FLAG)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX20")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX23")
|
||||||
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX2B), 1)
|
||||||
|
#I cannot make CMake add this in a good way - so add it here
|
||||||
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX2B_FLAG)
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CXX23")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1)
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1)
|
||||||
@ -631,10 +587,6 @@ ifeq ($(KOKKOS_INTERNAL_DISABLE_COMPLEX_ALIGN), 0)
|
|||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_COMPLEX_ALIGN")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_COMPLEX_ALIGN")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT), 1)
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_PROFILING_LOAD_PRINT")
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_TUNING), 1)
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_TUNING), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_TUNING")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_TUNING")
|
||||||
endif
|
endif
|
||||||
@ -692,15 +644,15 @@ endif
|
|||||||
tmp := $(call kokkos_append_header,"/* Cuda Settings */")
|
tmp := $(call kokkos_append_header,"/* Cuda Settings */")
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||||
|
#deprecated
|
||||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LDG), 1)
|
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LDG), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC")
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC")
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1)
|
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1)
|
||||||
|
# deprecated
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_UVM")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_UVM")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -723,29 +675,19 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LAMBDA), 1)
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
||||||
ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -gt 70; echo $$?),0)
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LAMBDA")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LAMBDA")
|
||||||
KOKKOS_CXXFLAGS += -expt-extended-lambda
|
KOKKOS_CXXFLAGS += -extended-lambda
|
||||||
else
|
|
||||||
$(warning Warning: Cuda Lambda support was requested but NVCC version is too low. This requires NVCC for Cuda version 7.5 or higher. Disabling Lambda support now.)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LAMBDA")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_LAMBDA")
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_CONSTEXPR), 1)
|
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_CONSTEXPR), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
||||||
ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -ge 80; echo $$?),0)
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_CONSTEXPR")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_CUDA_CONSTEXPR")
|
||||||
KOKKOS_CXXFLAGS += -expt-relaxed-constexpr
|
KOKKOS_CXXFLAGS += -expt-relaxed-constexpr
|
||||||
else
|
|
||||||
$(warning Warning: Cuda relaxed constexpr support was requested but NVCC version is too low. This requires NVCC for Cuda version 8.0 or higher. Disabling relaxed constexpr support now.)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||||
@ -760,7 +702,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_HPX_ENABLE_ASYNC_DISPATCH), 1)
|
ifeq ($(KOKKOS_INTERNAL_HPX_ENABLE_ASYNC_DISPATCH), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_HPX_ASYNC_DISPATCH")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_IMPL_HPX_ASYNC_DISPATCH")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -772,15 +714,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV80), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
KOKKOS_CXXFLAGS +=
|
KOKKOS_CXXFLAGS +=
|
||||||
KOKKOS_LDFLAGS +=
|
KOKKOS_LDFLAGS +=
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS +=
|
|
||||||
KOKKOS_LDFLAGS +=
|
|
||||||
else
|
else
|
||||||
KOKKOS_CXXFLAGS += -march=armv8-a
|
KOKKOS_CXXFLAGS += -march=armv8-a
|
||||||
KOKKOS_LDFLAGS += -march=armv8-a
|
KOKKOS_LDFLAGS += -march=armv8-a
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV81), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV81), 1)
|
||||||
@ -789,15 +726,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV81), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
KOKKOS_CXXFLAGS +=
|
KOKKOS_CXXFLAGS +=
|
||||||
KOKKOS_LDFLAGS +=
|
KOKKOS_LDFLAGS +=
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS +=
|
|
||||||
KOKKOS_LDFLAGS +=
|
|
||||||
else
|
else
|
||||||
KOKKOS_CXXFLAGS += -march=armv8.1-a
|
KOKKOS_CXXFLAGS += -march=armv8.1-a
|
||||||
KOKKOS_LDFLAGS += -march=armv8.1-a
|
KOKKOS_LDFLAGS += -march=armv8.1-a
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_A64FX), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_A64FX), 1)
|
||||||
@ -861,15 +793,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
KOKKOS_CXXFLAGS +=
|
KOKKOS_CXXFLAGS +=
|
||||||
KOKKOS_LDFLAGS +=
|
KOKKOS_LDFLAGS +=
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS +=
|
|
||||||
KOKKOS_LDFLAGS +=
|
|
||||||
else
|
else
|
||||||
KOKKOS_CXXFLAGS += -march=armv8-a -mtune=thunderx
|
KOKKOS_CXXFLAGS += -march=armv8-a -mtune=thunderx
|
||||||
KOKKOS_LDFLAGS += -march=armv8-a -mtune=thunderx
|
KOKKOS_LDFLAGS += -march=armv8-a -mtune=thunderx
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX2), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX2), 1)
|
||||||
@ -879,15 +806,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV8_THUNDERX2), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
KOKKOS_CXXFLAGS +=
|
KOKKOS_CXXFLAGS +=
|
||||||
KOKKOS_LDFLAGS +=
|
KOKKOS_LDFLAGS +=
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS +=
|
|
||||||
KOKKOS_LDFLAGS +=
|
|
||||||
else
|
else
|
||||||
KOKKOS_CXXFLAGS += -mtune=thunderx2t99 -mcpu=thunderx2t99
|
KOKKOS_CXXFLAGS += -mtune=thunderx2t99 -mcpu=thunderx2t99
|
||||||
KOKKOS_LDFLAGS += -mtune=thunderx2t99 -mcpu=thunderx2t99
|
KOKKOS_LDFLAGS += -mtune=thunderx2t99 -mcpu=thunderx2t99
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SSE42), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SSE42), 1)
|
||||||
@ -896,20 +818,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SSE42), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
||||||
KOKKOS_CXXFLAGS += -xSSE4.2
|
KOKKOS_CXXFLAGS += -xSSE4.2
|
||||||
KOKKOS_LDFLAGS += -xSSE4.2
|
KOKKOS_LDFLAGS += -xSSE4.2
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS += -tp=nehalem
|
|
||||||
KOKKOS_LDFLAGS += -tp=nehalem
|
|
||||||
else
|
else
|
||||||
# Assume that this is a really a GNU compiler.
|
# Assume that this is a really a GNU compiler.
|
||||||
KOKKOS_CXXFLAGS += -msse4.2
|
KOKKOS_CXXFLAGS += -msse4.2
|
||||||
KOKKOS_LDFLAGS += -msse4.2
|
KOKKOS_LDFLAGS += -msse4.2
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX), 1)
|
||||||
@ -918,54 +832,34 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
||||||
KOKKOS_CXXFLAGS += -mavx
|
KOKKOS_CXXFLAGS += -mavx
|
||||||
KOKKOS_LDFLAGS += -mavx
|
KOKKOS_LDFLAGS += -mavx
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS += -tp=sandybridge
|
|
||||||
KOKKOS_LDFLAGS += -tp=sandybridge
|
|
||||||
else
|
else
|
||||||
# Assume that this is a really a GNU compiler.
|
# Assume that this is a really a GNU compiler.
|
||||||
KOKKOS_CXXFLAGS += -mavx
|
KOKKOS_CXXFLAGS += -mavx
|
||||||
KOKKOS_LDFLAGS += -mavx
|
KOKKOS_LDFLAGS += -mavx
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER7), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER7), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_POWER7")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_POWER7")
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
# Assume that this is a really a GNU compiler.
|
||||||
|
|
||||||
else
|
|
||||||
# Assume that this is a really a GNU compiler or it could be XL on P8.
|
|
||||||
KOKKOS_CXXFLAGS += -mcpu=power7 -mtune=power7
|
KOKKOS_CXXFLAGS += -mcpu=power7 -mtune=power7
|
||||||
KOKKOS_LDFLAGS += -mcpu=power7 -mtune=power7
|
KOKKOS_LDFLAGS += -mcpu=power7 -mtune=power7
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER8), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER8), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_POWER8")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_POWER8")
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
KOKKOS_CXXFLAGS += -mcpu=power8 -mtune=power8
|
KOKKOS_CXXFLAGS += -mcpu=power8 -mtune=power8
|
||||||
KOKKOS_LDFLAGS += -mcpu=power8 -mtune=power8
|
KOKKOS_LDFLAGS += -mcpu=power8 -mtune=power8
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER9), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER9), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_POWER9")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_POWER9")
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
KOKKOS_CXXFLAGS += -mcpu=power9 -mtune=power9
|
KOKKOS_CXXFLAGS += -mcpu=power9 -mtune=power9
|
||||||
KOKKOS_LDFLAGS += -mcpu=power9 -mtune=power9
|
KOKKOS_LDFLAGS += -mcpu=power9 -mtune=power9
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_HSW), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_HSW), 1)
|
||||||
@ -974,20 +868,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_HSW), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
||||||
KOKKOS_CXXFLAGS += -xCORE-AVX2
|
KOKKOS_CXXFLAGS += -xCORE-AVX2
|
||||||
KOKKOS_LDFLAGS += -xCORE-AVX2
|
KOKKOS_LDFLAGS += -xCORE-AVX2
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS += -tp=haswell
|
|
||||||
KOKKOS_LDFLAGS += -tp=haswell
|
|
||||||
else
|
else
|
||||||
# Assume that this is a really a GNU compiler.
|
# Assume that this is a really a GNU compiler.
|
||||||
KOKKOS_CXXFLAGS += -march=core-avx2 -mtune=core-avx2
|
KOKKOS_CXXFLAGS += -march=core-avx2 -mtune=core-avx2
|
||||||
KOKKOS_LDFLAGS += -march=core-avx2 -mtune=core-avx2
|
KOKKOS_LDFLAGS += -march=core-avx2 -mtune=core-avx2
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_BDW), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_BDW), 1)
|
||||||
@ -996,20 +882,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_BDW), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
||||||
KOKKOS_CXXFLAGS += -xCORE-AVX2
|
KOKKOS_CXXFLAGS += -xCORE-AVX2
|
||||||
KOKKOS_LDFLAGS += -xCORE-AVX2
|
KOKKOS_LDFLAGS += -xCORE-AVX2
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
KOKKOS_CXXFLAGS += -tp=haswell
|
|
||||||
KOKKOS_LDFLAGS += -tp=haswell
|
|
||||||
else
|
else
|
||||||
# Assume that this is a really a GNU compiler.
|
# Assume that this is a really a GNU compiler.
|
||||||
KOKKOS_CXXFLAGS += -march=core-avx2 -mtune=core-avx2 -mrtm
|
KOKKOS_CXXFLAGS += -march=core-avx2 -mtune=core-avx2 -mrtm
|
||||||
KOKKOS_LDFLAGS += -march=core-avx2 -mtune=core-avx2 -mrtm
|
KOKKOS_LDFLAGS += -march=core-avx2 -mtune=core-avx2 -mrtm
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512MIC), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512MIC), 1)
|
||||||
@ -1018,19 +896,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX512MIC), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
||||||
KOKKOS_CXXFLAGS += -xMIC-AVX512
|
KOKKOS_CXXFLAGS += -xMIC-AVX512
|
||||||
KOKKOS_LDFLAGS += -xMIC-AVX512
|
KOKKOS_LDFLAGS += -xMIC-AVX512
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
# Asssume that this is really a GNU compiler.
|
# Asssume that this is really a GNU compiler.
|
||||||
KOKKOS_CXXFLAGS += -march=knl -mtune=knl
|
KOKKOS_CXXFLAGS += -march=knl -mtune=knl
|
||||||
KOKKOS_LDFLAGS += -march=knl -mtune=knl
|
KOKKOS_LDFLAGS += -march=knl -mtune=knl
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SKL), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SKL), 1)
|
||||||
@ -1039,19 +910,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SKL), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
||||||
KOKKOS_CXXFLAGS += -xSKYLAKE
|
KOKKOS_CXXFLAGS += -xSKYLAKE
|
||||||
KOKKOS_LDFLAGS += -xSKYLAKE
|
KOKKOS_LDFLAGS += -xSKYLAKE
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
# Nothing here yet.
|
# Nothing here yet.
|
||||||
KOKKOS_CXXFLAGS += -march=skylake
|
KOKKOS_CXXFLAGS += -march=skylake
|
||||||
KOKKOS_LDFLAGS += -march=skylake
|
KOKKOS_LDFLAGS += -march=skylake
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SKX), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SKX), 1)
|
||||||
@ -1060,19 +924,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_SKX), 1)
|
|||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_INTEL), 1)
|
||||||
KOKKOS_CXXFLAGS += -xCORE-AVX512
|
KOKKOS_CXXFLAGS += -xCORE-AVX512
|
||||||
KOKKOS_LDFLAGS += -xCORE-AVX512
|
KOKKOS_LDFLAGS += -xCORE-AVX512
|
||||||
else
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
|
|
||||||
|
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
# Nothing here yet.
|
# Nothing here yet.
|
||||||
KOKKOS_CXXFLAGS += -march=skylake-avx512 -mtune=skylake-avx512
|
KOKKOS_CXXFLAGS += -march=skylake-avx512 -mtune=skylake-avx512
|
||||||
KOKKOS_LDFLAGS += -march=skylake-avx512 -mtune=skylake-avx512
|
KOKKOS_LDFLAGS += -march=skylake-avx512 -mtune=skylake-avx512
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ICL), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ICL), 1)
|
||||||
@ -1121,13 +978,17 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA_ARCH), 1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY_CLANG), 1)
|
||||||
KOKKOS_INTERNAL_CUDA_ARCH_FLAG=-fopenmp-targets=nvptx64 -Xopenmp-target -march
|
KOKKOS_INTERNAL_CUDA_ARCH_FLAG=-fopenmp
|
||||||
|
else ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||||
|
KOKKOS_INTERNAL_CUDA_ARCH_FLAG=-fopenmp --offload-arch
|
||||||
endif
|
endif
|
||||||
KOKKOS_INTERNAL_USE_CUDA_ARCH = 1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA_ARCH), 1)
|
# Do not add this flag if its the cray compiler or the nvhpc compiler.
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY_CLANG), 0)
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVHPC), 0)
|
||||||
|
# Lets start with adding architecture defines
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER30), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER30), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_KEPLER")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_KEPLER")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_KEPLER30")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_KEPLER30")
|
||||||
@ -1184,7 +1045,6 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA_ARCH), 1)
|
|||||||
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_72
|
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_72
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_TURING75), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_TURING75), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_TURING")
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_TURING75")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_TURING75")
|
||||||
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_75
|
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_75
|
||||||
endif
|
endif
|
||||||
@ -1199,7 +1059,6 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA_ARCH), 1)
|
|||||||
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_86
|
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_86
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ADA89), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ADA89), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMPERE")
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_ADA89")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_ADA89")
|
||||||
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_89
|
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_89
|
||||||
endif
|
endif
|
||||||
@ -1208,8 +1067,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA_ARCH), 1)
|
|||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_HOPPER90")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_HOPPER90")
|
||||||
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_90
|
KOKKOS_INTERNAL_CUDA_ARCH_FLAG := $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)=sm_90
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 0)
|
ifneq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 0)
|
||||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
||||||
@ -1220,43 +1081,41 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA_ARCH), 1)
|
|||||||
KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)
|
KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_CUDA_ARCH_FLAG)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
|
||||||
KOKKOS_CXXFLAGS += --expt-extended-lambda
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Figure out the architecture flag for ROCm.
|
# Figure out the architecture flag for ROCm.
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_VEGA906), 1)
|
||||||
# Lets start with adding architecture defines
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_VEGA900), 1)
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA900")
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA")
|
|
||||||
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx900
|
|
||||||
endif
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_VEGA906), 1)
|
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA906")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA906")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA")
|
||||||
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx906
|
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx906
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_VEGA908), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_VEGA908), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA908")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA908")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA")
|
||||||
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx908
|
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx908
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_VEGA90A), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_VEGA90A), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA90A")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA90A")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_VEGA")
|
||||||
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx90a
|
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx90a
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NAVI1030), 1)
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_NAVI1030")
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_NAVI")
|
||||||
|
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx1030
|
||||||
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NAVI1100), 1)
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_NAVI1100")
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_NAVI")
|
||||||
|
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx1100
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
||||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/HIP/*.cpp)
|
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/HIP/*.cpp)
|
||||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/HIP/*.hpp)
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_DISABLE_DESUL_ATOMICS), 0)
|
|
||||||
KOKKOS_SRC += $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_HIP.cpp
|
KOKKOS_SRC += $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_HIP.cpp
|
||||||
endif
|
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/HIP/*.hpp)
|
||||||
|
|
||||||
KOKKOS_CXXFLAGS+=$(KOKKOS_INTERNAL_HIP_ARCH_FLAG)
|
KOKKOS_CXXFLAGS+=$(KOKKOS_INTERNAL_HIP_ARCH_FLAG)
|
||||||
KOKKOS_LDFLAGS+=$(KOKKOS_INTERNAL_HIP_ARCH_FLAG)
|
KOKKOS_LDFLAGS+=$(KOKKOS_INTERNAL_HIP_ARCH_FLAG)
|
||||||
@ -1306,12 +1165,12 @@ endif
|
|||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_INTEL_XEHP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_INTEL_XEHP), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_GPU")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_GPU")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_XEHP")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_XEHP")
|
||||||
KOKKOS_INTERNAL_INTEL_ARCH_FLAG := -f${KOKKOS_INTERNAL_LC_BACKEND}-targets=spir64_gen -X${KOKKOS_INTERNAL_LC_BACKEND}-target-backend "-device xehp"
|
KOKKOS_INTERNAL_INTEL_ARCH_FLAG := -f${KOKKOS_INTERNAL_LC_BACKEND}-targets=spir64_gen -X${KOKKOS_INTERNAL_LC_BACKEND}-target-backend "-device 12.50.4"
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_INTEL_PVC), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_INTEL_PVC), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_GPU")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_GPU")
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_PVC")
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_INTEL_PVC")
|
||||||
KOKKOS_INTERNAL_INTEL_ARCH_FLAG := -f${KOKKOS_INTERNAL_LC_BACKEND}-targets=spir64_gen -X${KOKKOS_INTERNAL_LC_BACKEND}-target-backend "-device 12.4.0"
|
KOKKOS_INTERNAL_INTEL_ARCH_FLAG := -f${KOKKOS_INTERNAL_LC_BACKEND}-targets=spir64_gen -X${KOKKOS_INTERNAL_LC_BACKEND}-target-backend "-device 12.60.7"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_SYCL), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_SYCL), 1)
|
||||||
@ -1329,14 +1188,19 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
|||||||
KOKKOS_LDFLAGS+=$(KOKKOS_INTERNAL_INTEL_ARCH_FLAG)
|
KOKKOS_LDFLAGS+=$(KOKKOS_INTERNAL_INTEL_ARCH_FLAG)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_DISABLE_DESUL_ATOMICS), 0)
|
ifeq ($(KOKKOS_INTERNAL_DISABLE_DESUL_ATOMICS), 1)
|
||||||
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_IMPL_DESUL_ATOMICS")
|
$(warning disable_desul_atomics option has been removed. Desul atomics cannot be disabled.)
|
||||||
KOKKOS_CPPFLAGS+=-I$(KOKKOS_PATH)/tpls/desul/include
|
KOKKOS_INTERNAL_DISABLE_DESUL_ATOMICS := 0
|
||||||
else
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_DESUL_ATOMICS), 1)
|
|
||||||
$(error Contradictory Desul atomics options: KOKKOS_OPTIONS=$(KOKKOS_OPTIONS) )
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_ENABLE_DESUL_ATOMICS), 1)
|
||||||
|
$(warning enable_desul_atomics option has been removed. Desul atomics are always enabled.)
|
||||||
|
endif
|
||||||
|
KOKKOS_CPPFLAGS+=-I$(KOKKOS_PATH)/tpls/desul/include
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_DISABLE_BUNDLED_MDSPAN), 0)
|
||||||
|
KOKKOS_CPPFLAGS+=-I$(KOKKOS_PATH)/tpls/mdspan/include
|
||||||
|
endif
|
||||||
|
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ENABLE_IMPL_MDSPAN")
|
||||||
|
|
||||||
KOKKOS_INTERNAL_LS_CONFIG := $(shell ls KokkosCore_config.h 2>&1)
|
KOKKOS_INTERNAL_LS_CONFIG := $(shell ls KokkosCore_config.h 2>&1)
|
||||||
|
|
||||||
@ -1365,9 +1229,6 @@ ifneq ($(KOKKOS_INTERNAL_NEW_CONFIG), 0)
|
|||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_CUDA.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_CUDA.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_CUDA.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_CUDA.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <setup/Kokkos_Setup_Cuda.hpp>","KokkosCore_Config_SetupBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <setup/Kokkos_Setup_Cuda.hpp>","KokkosCore_Config_SetupBackend.hpp")
|
||||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1)
|
|
||||||
else
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENMPTARGET.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENMPTARGET.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
@ -1387,6 +1248,10 @@ ifneq ($(KOKKOS_INTERNAL_NEW_CONFIG), 0)
|
|||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENMP.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENMP.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_OPENMP.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_OPENMP.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENACC.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_OPENACC.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_THREADS), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_THREADS), 1)
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_THREADS.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_THREADS.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_THREADS.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_THREADS.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
@ -1416,9 +1281,7 @@ KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/containers/src/impl/*.cpp)
|
|||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.cpp)
|
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.cpp)
|
||||||
ifeq ($(KOKKOS_INTERNAL_DISABLE_DESUL_ATOMICS), 0)
|
|
||||||
KOKKOS_SRC += $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_CUDA.cpp
|
KOKKOS_SRC += $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_CUDA.cpp
|
||||||
endif
|
|
||||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp)
|
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp)
|
||||||
ifneq ($(CUDA_PATH),)
|
ifneq ($(CUDA_PATH),)
|
||||||
KOKKOS_CPPLAGS += -I$(CUDA_PATH)/include
|
KOKKOS_CPPLAGS += -I$(CUDA_PATH)/include
|
||||||
@ -1454,6 +1317,14 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
|||||||
KOKKOS_LIBS += $(KOKKOS_INTERNAL_OPENMPTARGET_LIB)
|
KOKKOS_LIBS += $(KOKKOS_INTERNAL_OPENMPTARGET_LIB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
||||||
|
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/OpenACC/*.cpp)
|
||||||
|
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenACC/*.hpp)
|
||||||
|
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_OPENACC_FLAG)
|
||||||
|
KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_OPENACC_FLAG)
|
||||||
|
KOKKOS_LIBS += $(KOKKOS_INTERNAL_OPENACC_LIB)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
||||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.cpp)
|
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.cpp)
|
||||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp)
|
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp)
|
||||||
@ -1524,11 +1395,70 @@ endif
|
|||||||
KOKKOS_EXTRA_LIBS := ${KOKKOS_LIBS}
|
KOKKOS_EXTRA_LIBS := ${KOKKOS_LIBS}
|
||||||
KOKKOS_LIBS := -lkokkos ${KOKKOS_LIBS}
|
KOKKOS_LIBS := -lkokkos ${KOKKOS_LIBS}
|
||||||
|
|
||||||
|
# Generating the <desul/atomics/Config.hpp> header
|
||||||
|
DESUL_INTERNAL_CONFIG_TMP=Desul_Config.tmp
|
||||||
|
DESUL_CONFIG_HEADER=desul/atomics/Config.hpp
|
||||||
|
desul_append_header = $(shell echo $1 >> $(DESUL_INTERNAL_CONFIG_TMP))
|
||||||
|
tmp := $(call desul_append_header, "// generated by on-demand build system by crtrott" > $(DESUL_INTERNAL_CONFIG_TMP))
|
||||||
|
tmp := $(call desul_append_header, "$H""ifndef DESUL_ATOMICS_CONFIG_HPP_")
|
||||||
|
tmp := $(call desul_append_header, "$H""define DESUL_ATOMICS_CONFIG_HPP_")
|
||||||
|
tmp := $(call desul_append_header, "")
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||||
|
tmp := $(call desul_append_header,"$H""define DESUL_ATOMICS_ENABLE_CUDA")
|
||||||
|
else
|
||||||
|
tmp := $(call desul_append_header,"/* $H""undef DESUL_ATOMICS_ENABLE_CUDA */")
|
||||||
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_RELOC), 1)
|
||||||
|
tmp := $(call desul_append_header,"$H""define DESUL_ATOMICS_ENABLE_CUDA_SEPARABLE_COMPILATION")
|
||||||
|
else
|
||||||
|
tmp := $(call desul_append_header,"/* $H""undef DESUL_ATOMICS_ENABLE_CUDA_SEPARABLE_COMPILATION */")
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
||||||
|
tmp := $(call desul_append_header,"$H""define DESUL_ATOMICS_ENABLE_HIP")
|
||||||
|
else
|
||||||
|
tmp := $(call desul_append_header,"/* $H""undef DESUL_ATOMICS_ENABLE_HIP */")
|
||||||
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_HIP_USE_RELOC), 1)
|
||||||
|
tmp := $(call desul_append_header,"$H""define DESUL_ATOMICS_ENABLE_HIP_SEPARABLE_COMPILATION")
|
||||||
|
else
|
||||||
|
tmp := $(call desul_append_header,"/* $H""undef DESUL_ATOMICS_ENABLE_HIP_SEPARABLE_COMPILATION */")
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_SYCL), 1)
|
||||||
|
tmp := $(call desul_append_header,"$H""define DESUL_ATOMICS_ENABLE_SYCL")
|
||||||
|
else
|
||||||
|
tmp := $(call desul_append_header,"/* $H""undef DESUL_ATOMICS_ENABLE_SYCL */")
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
||||||
|
tmp := $(call desul_append_header,"$H""define DESUL_ATOMICS_ENABLE_OPENMP")
|
||||||
|
else
|
||||||
|
tmp := $(call desul_append_header,"/* $H""undef DESUL_ATOMICS_ENABLE_OPENMP */")
|
||||||
|
endif
|
||||||
|
tmp := $(call desul_append_header, "")
|
||||||
|
tmp := $(call desul_append_header, "$H""endif")
|
||||||
|
|
||||||
|
DESUL_INTERNAL_LS_CONFIG := $(shell ls $(DESUL_CONFIG_HEADER) 2>&1)
|
||||||
|
|
||||||
|
ifeq ($(DESUL_INTERNAL_LS_CONFIG), $(DESUL_CONFIG_HEADER))
|
||||||
|
DESUL_INTERNAL_NEW_CONFIG := $(strip $(shell diff $(DESUL_CONFIG_HEADER) $(DESUL_INTERNAL_CONFIG_TMP) | grep -c define))
|
||||||
|
else
|
||||||
|
DESUL_INTERNAL_NEW_CONFIG := 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(DESUL_INTERNAL_NEW_CONFIG), 0)
|
||||||
|
tmp := $(shell mkdir -p desul/atomics)
|
||||||
|
tmp := $(shell cp $(DESUL_INTERNAL_CONFIG_TMP) $(DESUL_CONFIG_HEADER))
|
||||||
|
endif
|
||||||
|
|
||||||
# Setting up dependencies.
|
# Setting up dependencies.
|
||||||
|
|
||||||
KokkosCore_config.h:
|
KokkosCore_config.h:
|
||||||
|
|
||||||
KOKKOS_CPP_DEPENDS := KokkosCore_config.h $(KOKKOS_HEADERS)
|
$(DESUL_CONFIG_HEADER):
|
||||||
|
|
||||||
|
KOKKOS_CPP_DEPENDS := $(DESUL_CONFIG_HEADER) KokkosCore_config.h $(KOKKOS_HEADERS)
|
||||||
|
|
||||||
KOKKOS_OBJ = $(KOKKOS_SRC:.cpp=.o)
|
KOKKOS_OBJ = $(KOKKOS_SRC:.cpp=.o)
|
||||||
KOKKOS_OBJ_LINK = $(notdir $(KOKKOS_OBJ))
|
KOKKOS_OBJ_LINK = $(notdir $(KOKKOS_OBJ))
|
||||||
@ -1536,7 +1466,7 @@ KOKKOS_OBJ_LINK = $(notdir $(KOKKOS_OBJ))
|
|||||||
include $(KOKKOS_PATH)/Makefile.targets
|
include $(KOKKOS_PATH)/Makefile.targets
|
||||||
|
|
||||||
kokkos-clean:
|
kokkos-clean:
|
||||||
rm -f $(KOKKOS_OBJ_LINK) KokkosCore_config.h KokkosCore_config.tmp libkokkos.a KokkosCore_Config_SetupBackend.hpp \
|
rm -f $(KOKKOS_OBJ_LINK) $(DESUL_CONFIG_HEADER) $(DESUL_INTERNAL_CONFIG_TMP) KokkosCore_config.h KokkosCore_config.tmp libkokkos.a KokkosCore_Config_SetupBackend.hpp \
|
||||||
KokkosCore_Config_FwdBackend.hpp KokkosCore_Config_DeclareBackend.hpp KokkosCore_Config_DeclareBackend.tmp \
|
KokkosCore_Config_FwdBackend.hpp KokkosCore_Config_DeclareBackend.hpp KokkosCore_Config_DeclareBackend.tmp \
|
||||||
KokkosCore_Config_FwdBackend.tmp KokkosCore_Config_PostInclude.hpp KokkosCore_Config_PostInclude.tmp KokkosCore_Config_SetupBackend.tmp
|
KokkosCore_Config_FwdBackend.tmp KokkosCore_Config_PostInclude.hpp KokkosCore_Config_PostInclude.tmp KokkosCore_Config_SetupBackend.tmp
|
||||||
|
|
||||||
|
|||||||
@ -51,8 +51,6 @@ Kokkos_CudaSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cu
|
|||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_CudaSpace.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_CudaSpace.cpp
|
||||||
Kokkos_Cuda_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Task.cpp
|
Kokkos_Cuda_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Task.cpp
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Task.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Task.cpp
|
||||||
Kokkos_Cuda_Locks.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Locks.cpp
|
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Locks.cpp
|
|
||||||
Lock_Array_CUDA.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_CUDA.cpp
|
Lock_Array_CUDA.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_CUDA.cpp
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_CUDA.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_CUDA.cpp
|
||||||
endif
|
endif
|
||||||
@ -67,12 +65,16 @@ Kokkos_SYCL_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/SYCL/Kokko
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
||||||
|
Kokkos_HIP.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP.cpp
|
||||||
|
Kokkos_HIP_SharedAllocationRecord.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_SharedAllocationRecord.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_SharedAllocationRecord.cpp
|
||||||
|
Kokkos_HIP_DeepCopy.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_DeepCopy.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_DeepCopy.cpp
|
||||||
Kokkos_HIP_Space.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Space.cpp
|
Kokkos_HIP_Space.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Space.cpp
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Space.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Space.cpp
|
||||||
Kokkos_HIP_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Instance.cpp
|
Kokkos_HIP_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Instance.cpp
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Instance.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Instance.cpp
|
||||||
Kokkos_HIP_Locks.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Locks.cpp
|
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Locks.cpp
|
|
||||||
Lock_Array_HIP.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_HIP.cpp
|
Lock_Array_HIP.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_HIP.cpp
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_HIP.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/tpls/desul/src/Lock_Array_HIP.cpp
|
||||||
endif
|
endif
|
||||||
@ -83,6 +85,8 @@ Kokkos_ThreadsExec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Threads/Kokk
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
||||||
|
Kokkos_OpenMP.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP.cpp
|
||||||
Kokkos_OpenMP_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Instance.cpp
|
Kokkos_OpenMP_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Instance.cpp
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Instance.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Instance.cpp
|
||||||
Kokkos_OpenMP_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Task.cpp
|
Kokkos_OpenMP_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Task.cpp
|
||||||
@ -107,5 +111,16 @@ Kokkos_OpenMPTarget_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP
|
|||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Task.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Task.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
||||||
|
Kokkos_OpenACC.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACC.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACC.cpp
|
||||||
|
Kokkos_OpenACCSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACCSpace.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACCSpace.cpp
|
||||||
|
Kokkos_OpenACC_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACC_Instance.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACC_Instance.cpp
|
||||||
|
Kokkos_OpenACC_SharedAllocationRecord.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACC_SharedAllocationRecord.cpp
|
||||||
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenACC/Kokkos_OpenACC_SharedAllocationRecord.cpp
|
||||||
|
endif
|
||||||
|
|
||||||
Kokkos_HBWSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp
|
Kokkos_HBWSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp
|
||||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp
|
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_HBWSpace.cpp
|
||||||
|
|||||||
@ -1,14 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
KOKKOS_SUBPACKAGE(Algorithms)
|
|
||||||
|
|
||||||
IF (NOT Kokkos_INSTALL_TESTING)
|
IF (NOT Kokkos_INSTALL_TESTING)
|
||||||
ADD_SUBDIRECTORY(src)
|
ADD_SUBDIRECTORY(src)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(NOT (KOKKOS_ENABLE_OPENMPTARGET AND KOKKOS_CXX_COMPILER_ID STREQUAL NVHPC))
|
# FIXME_OPENACC: temporarily disabled due to unimplemented features
|
||||||
|
IF(NOT ((KOKKOS_ENABLE_OPENMPTARGET OR KOKKOS_ENABLE_OPENACC) AND KOKKOS_CXX_COMPILER_ID STREQUAL NVHPC))
|
||||||
KOKKOS_ADD_TEST_DIRECTORIES(unit_tests)
|
KOKKOS_ADD_TEST_DIRECTORIES(unit_tests)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
KOKKOS_SUBPACKAGE_POSTPROCESS()
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
|
|
||||||
LIB_REQUIRED_PACKAGES KokkosCore KokkosContainers
|
|
||||||
LIB_OPTIONAL_TPLS Pthread CUDA HWLOC
|
|
||||||
TEST_OPTIONAL_TPLS CUSPARSE
|
|
||||||
)
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
#ifndef KOKKOS_ALGORITHMS_CONFIG_H
|
|
||||||
#define KOKKOS_ALGORITHMS_CONFIG_H
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
KOKKOS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h)
|
|
||||||
|
|
||||||
#I have to leave these here for tribits
|
#I have to leave these here for tribits
|
||||||
KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
@ -9,7 +6,6 @@ KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
|||||||
|
|
||||||
FILE(GLOB ALGO_HEADERS *.hpp)
|
FILE(GLOB ALGO_HEADERS *.hpp)
|
||||||
FILE(GLOB ALGO_SOURCES *.cpp)
|
FILE(GLOB ALGO_SOURCES *.cpp)
|
||||||
LIST(APPEND ALGO_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}_config.h)
|
|
||||||
APPEND_GLOB(ALGO_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/std_algorithms/*.hpp)
|
APPEND_GLOB(ALGO_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/std_algorithms/*.hpp)
|
||||||
APPEND_GLOB(ALGO_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/std_algorithms/impl/*.hpp)
|
APPEND_GLOB(ALGO_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/std_algorithms/impl/*.hpp)
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,17 @@
|
|||||||
|
//@HEADER
|
||||||
|
// ************************************************************************
|
||||||
|
//
|
||||||
|
// Kokkos v. 4.0
|
||||||
|
// Copyright (2022) National Technology & Engineering
|
||||||
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
|
//
|
||||||
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
|
// the U.S. Government retains certain rights in this software.
|
||||||
|
//
|
||||||
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
|
//
|
||||||
|
//@HEADER
|
||||||
|
|
||||||
void KOKKOS_ALGORITHMS_SRC_DUMMY_PREVENT_LINK_ERROR() {}
|
void KOKKOS_ALGORITHMS_SRC_DUMMY_PREVENT_LINK_ERROR() {}
|
||||||
|
|||||||
188
lib/kokkos/algorithms/src/Kokkos_NestedSort.hpp
Normal file
188
lib/kokkos/algorithms/src/Kokkos_NestedSort.hpp
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
//@HEADER
|
||||||
|
// ************************************************************************
|
||||||
|
//
|
||||||
|
// Kokkos v. 4.0
|
||||||
|
// Copyright (2022) National Technology & Engineering
|
||||||
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
|
//
|
||||||
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
|
// the U.S. Government retains certain rights in this software.
|
||||||
|
//
|
||||||
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
|
//
|
||||||
|
//@HEADER
|
||||||
|
|
||||||
|
#ifndef KOKKOS_NESTEDSORT_HPP_
|
||||||
|
#define KOKKOS_NESTEDSORT_HPP_
|
||||||
|
|
||||||
|
#include <Kokkos_Core.hpp>
|
||||||
|
#include <std_algorithms/impl/Kokkos_HelperPredicates.hpp>
|
||||||
|
#include <std_algorithms/Kokkos_Swap.hpp>
|
||||||
|
|
||||||
|
namespace Kokkos {
|
||||||
|
namespace Experimental {
|
||||||
|
namespace Impl {
|
||||||
|
|
||||||
|
// true for TeamVectorRange, false for ThreadVectorRange
|
||||||
|
template <bool teamLevel>
|
||||||
|
struct NestedRange {};
|
||||||
|
|
||||||
|
// Specialization for team-level
|
||||||
|
template <>
|
||||||
|
struct NestedRange<true> {
|
||||||
|
template <typename TeamMember, typename SizeType>
|
||||||
|
KOKKOS_FUNCTION static auto create(const TeamMember& t, SizeType len) {
|
||||||
|
return Kokkos::TeamVectorRange(t, len);
|
||||||
|
}
|
||||||
|
template <typename TeamMember>
|
||||||
|
KOKKOS_FUNCTION static void barrier(const TeamMember& t) {
|
||||||
|
t.team_barrier();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Specialization for thread-level
|
||||||
|
template <>
|
||||||
|
struct NestedRange<false> {
|
||||||
|
template <typename TeamMember, typename SizeType>
|
||||||
|
KOKKOS_FUNCTION static auto create(const TeamMember& t, SizeType len) {
|
||||||
|
return Kokkos::ThreadVectorRange(t, len);
|
||||||
|
}
|
||||||
|
// Barrier is no-op, as vector lanes of a thread are implicitly synchronized
|
||||||
|
// after parallel region
|
||||||
|
template <typename TeamMember>
|
||||||
|
KOKKOS_FUNCTION static void barrier(const TeamMember&) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
// When just doing sort (not sort_by_key), use nullptr_t for ValueViewType.
|
||||||
|
// This only takes the NestedRange instance for template arg deduction.
|
||||||
|
template <class TeamMember, class KeyViewType, class ValueViewType,
|
||||||
|
class Comparator, bool useTeamLevel>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_nested_impl(
|
||||||
|
const TeamMember& t, const KeyViewType& keyView,
|
||||||
|
[[maybe_unused]] const ValueViewType& valueView, const Comparator& comp,
|
||||||
|
const NestedRange<useTeamLevel>) {
|
||||||
|
using SizeType = typename KeyViewType::size_type;
|
||||||
|
using KeyType = typename KeyViewType::non_const_value_type;
|
||||||
|
using Range = NestedRange<useTeamLevel>;
|
||||||
|
SizeType n = keyView.extent(0);
|
||||||
|
SizeType npot = 1;
|
||||||
|
SizeType levels = 0;
|
||||||
|
// FIXME: ceiling power-of-two is a common thing to need - make it a utility
|
||||||
|
while (npot < n) {
|
||||||
|
levels++;
|
||||||
|
npot <<= 1;
|
||||||
|
}
|
||||||
|
for (SizeType i = 0; i < levels; i++) {
|
||||||
|
for (SizeType j = 0; j <= i; j++) {
|
||||||
|
// n/2 pairs of items are compared in parallel
|
||||||
|
Kokkos::parallel_for(Range::create(t, npot / 2), [=](const SizeType k) {
|
||||||
|
// How big are the brown/pink boxes?
|
||||||
|
// (Terminology comes from Wikipedia diagram)
|
||||||
|
// https://commons.wikimedia.org/wiki/File:BitonicSort.svg#/media/File:BitonicSort.svg
|
||||||
|
SizeType boxSize = SizeType(2) << (i - j);
|
||||||
|
// Which box contains this thread?
|
||||||
|
SizeType boxID = k >> (i - j); // k * 2 / boxSize;
|
||||||
|
SizeType boxStart = boxID << (1 + i - j); // boxID * boxSize
|
||||||
|
SizeType boxOffset = k - (boxStart >> 1); // k - boxID * boxSize / 2;
|
||||||
|
SizeType elem1 = boxStart + boxOffset;
|
||||||
|
// In first phase (j == 0, brown box): within a box, compare with the
|
||||||
|
// opposite value in the box.
|
||||||
|
// In later phases (j > 0, pink box): within a box, compare with fixed
|
||||||
|
// distance (boxSize / 2) apart.
|
||||||
|
SizeType elem2 = (j == 0) ? (boxStart + boxSize - 1 - boxOffset)
|
||||||
|
: (elem1 + boxSize / 2);
|
||||||
|
if (elem2 < n) {
|
||||||
|
KeyType key1 = keyView(elem1);
|
||||||
|
KeyType key2 = keyView(elem2);
|
||||||
|
if (comp(key2, key1)) {
|
||||||
|
keyView(elem1) = key2;
|
||||||
|
keyView(elem2) = key1;
|
||||||
|
if constexpr (!std::is_same_v<ValueViewType, std::nullptr_t>) {
|
||||||
|
Kokkos::Experimental::swap(valueView(elem1), valueView(elem2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Range::barrier(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Impl
|
||||||
|
|
||||||
|
template <class TeamMember, class ViewType>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_team(const TeamMember& t,
|
||||||
|
const ViewType& view) {
|
||||||
|
Impl::sort_nested_impl(t, view, nullptr,
|
||||||
|
Experimental::Impl::StdAlgoLessThanBinaryPredicate<
|
||||||
|
typename ViewType::non_const_value_type>(),
|
||||||
|
Impl::NestedRange<true>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class TeamMember, class ViewType, class Comparator>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_team(const TeamMember& t, const ViewType& view,
|
||||||
|
const Comparator& comp) {
|
||||||
|
Impl::sort_nested_impl(t, view, nullptr, comp, Impl::NestedRange<true>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class TeamMember, class KeyViewType, class ValueViewType>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_by_key_team(const TeamMember& t,
|
||||||
|
const KeyViewType& keyView,
|
||||||
|
const ValueViewType& valueView) {
|
||||||
|
Impl::sort_nested_impl(t, keyView, valueView,
|
||||||
|
Experimental::Impl::StdAlgoLessThanBinaryPredicate<
|
||||||
|
typename KeyViewType::non_const_value_type>(),
|
||||||
|
Impl::NestedRange<true>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class TeamMember, class KeyViewType, class ValueViewType,
|
||||||
|
class Comparator>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_by_key_team(const TeamMember& t,
|
||||||
|
const KeyViewType& keyView,
|
||||||
|
const ValueViewType& valueView,
|
||||||
|
const Comparator& comp) {
|
||||||
|
Impl::sort_nested_impl(t, keyView, valueView, comp,
|
||||||
|
Impl::NestedRange<true>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class TeamMember, class ViewType>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_thread(const TeamMember& t,
|
||||||
|
const ViewType& view) {
|
||||||
|
Impl::sort_nested_impl(t, view, nullptr,
|
||||||
|
Experimental::Impl::StdAlgoLessThanBinaryPredicate<
|
||||||
|
typename ViewType::non_const_value_type>(),
|
||||||
|
Impl::NestedRange<false>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class TeamMember, class ViewType, class Comparator>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_thread(const TeamMember& t,
|
||||||
|
const ViewType& view,
|
||||||
|
const Comparator& comp) {
|
||||||
|
Impl::sort_nested_impl(t, view, nullptr, comp, Impl::NestedRange<false>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class TeamMember, class KeyViewType, class ValueViewType>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_by_key_thread(const TeamMember& t,
|
||||||
|
const KeyViewType& keyView,
|
||||||
|
const ValueViewType& valueView) {
|
||||||
|
Impl::sort_nested_impl(t, keyView, valueView,
|
||||||
|
Experimental::Impl::StdAlgoLessThanBinaryPredicate<
|
||||||
|
typename KeyViewType::non_const_value_type>(),
|
||||||
|
Impl::NestedRange<false>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class TeamMember, class KeyViewType, class ValueViewType,
|
||||||
|
class Comparator>
|
||||||
|
KOKKOS_INLINE_FUNCTION void sort_by_key_thread(const TeamMember& t,
|
||||||
|
const KeyViewType& keyView,
|
||||||
|
const ValueViewType& valueView,
|
||||||
|
const Comparator& comp) {
|
||||||
|
Impl::sort_nested_impl(t, keyView, valueView, comp,
|
||||||
|
Impl::NestedRange<false>());
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Experimental
|
||||||
|
} // namespace Kokkos
|
||||||
|
#endif
|
||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_RANDOM_HPP
|
#ifndef KOKKOS_RANDOM_HPP
|
||||||
#define KOKKOS_RANDOM_HPP
|
#define KOKKOS_RANDOM_HPP
|
||||||
@ -631,8 +603,7 @@ struct Random_XorShift1024_UseCArrayState<Kokkos::Cuda> : std::false_type {};
|
|||||||
#endif
|
#endif
|
||||||
#ifdef KOKKOS_ENABLE_HIP
|
#ifdef KOKKOS_ENABLE_HIP
|
||||||
template <>
|
template <>
|
||||||
struct Random_XorShift1024_UseCArrayState<Kokkos::Experimental::HIP>
|
struct Random_XorShift1024_UseCArrayState<Kokkos::HIP> : std::false_type {};
|
||||||
: std::false_type {};
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef KOKKOS_ENABLE_OPENMPTARGET
|
#ifdef KOKKOS_ENABLE_OPENMPTARGET
|
||||||
template <>
|
template <>
|
||||||
@ -657,7 +628,7 @@ struct Random_UniqueIndex {
|
|||||||
#if defined(KOKKOS_ENABLE_CUDA)
|
#if defined(KOKKOS_ENABLE_CUDA)
|
||||||
#define KOKKOS_IMPL_EXECUTION_SPACE_CUDA_OR_HIP Kokkos::Cuda
|
#define KOKKOS_IMPL_EXECUTION_SPACE_CUDA_OR_HIP Kokkos::Cuda
|
||||||
#elif defined(KOKKOS_ENABLE_HIP)
|
#elif defined(KOKKOS_ENABLE_HIP)
|
||||||
#define KOKKOS_IMPL_EXECUTION_SPACE_CUDA_OR_HIP Kokkos::Experimental::HIP
|
#define KOKKOS_IMPL_EXECUTION_SPACE_CUDA_OR_HIP Kokkos::HIP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <class MemorySpace>
|
template <class MemorySpace>
|
||||||
@ -907,38 +878,32 @@ class Random_XorShift64_Pool {
|
|||||||
using execution_space = typename device_type::execution_space;
|
using execution_space = typename device_type::execution_space;
|
||||||
using locks_type = View<int**, device_type>;
|
using locks_type = View<int**, device_type>;
|
||||||
using state_data_type = View<uint64_t**, device_type>;
|
using state_data_type = View<uint64_t**, device_type>;
|
||||||
locks_type locks_;
|
|
||||||
state_data_type state_;
|
locks_type locks_ = {};
|
||||||
int num_states_;
|
state_data_type state_ = {};
|
||||||
int padding_;
|
int num_states_ = {};
|
||||||
|
int padding_ = {};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using generator_type = Random_XorShift64<DeviceType>;
|
using generator_type = Random_XorShift64<DeviceType>;
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
|
||||||
Random_XorShift64_Pool() {
|
KOKKOS_DEFAULTED_FUNCTION Random_XorShift64_Pool() = default;
|
||||||
num_states_ = 0;
|
|
||||||
padding_ = 0;
|
KOKKOS_DEFAULTED_FUNCTION Random_XorShift64_Pool(
|
||||||
}
|
Random_XorShift64_Pool const&) = default;
|
||||||
|
|
||||||
|
KOKKOS_DEFAULTED_FUNCTION Random_XorShift64_Pool& operator=(
|
||||||
|
Random_XorShift64_Pool const&) = default;
|
||||||
|
#else
|
||||||
|
Random_XorShift64_Pool() = default;
|
||||||
|
#endif
|
||||||
Random_XorShift64_Pool(uint64_t seed) {
|
Random_XorShift64_Pool(uint64_t seed) {
|
||||||
num_states_ = 0;
|
num_states_ = 0;
|
||||||
|
|
||||||
init(seed, execution_space().concurrency());
|
init(seed, execution_space().concurrency());
|
||||||
}
|
}
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
|
||||||
Random_XorShift64_Pool(const Random_XorShift64_Pool& src)
|
|
||||||
: locks_(src.locks_), state_(src.state_), num_states_(src.num_states_) {}
|
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
|
||||||
Random_XorShift64_Pool operator=(const Random_XorShift64_Pool& src) {
|
|
||||||
locks_ = src.locks_;
|
|
||||||
state_ = src.state_;
|
|
||||||
num_states_ = src.num_states_;
|
|
||||||
padding_ = src.padding_;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void init(uint64_t seed, int num_states) {
|
void init(uint64_t seed, int num_states) {
|
||||||
if (seed == 0) seed = uint64_t(1318319);
|
if (seed == 0) seed = uint64_t(1318319);
|
||||||
// I only want to pad on CPU like archs (less than 1000 threads). 64 is a
|
// I only want to pad on CPU like archs (less than 1000 threads). 64 is a
|
||||||
@ -976,8 +941,8 @@ class Random_XorShift64_Pool {
|
|||||||
deep_copy(locks_, h_lock);
|
deep_copy(locks_, h_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
KOKKOS_INLINE_FUNCTION Random_XorShift64<DeviceType> get_state() const {
|
||||||
Random_XorShift64<DeviceType> get_state() const {
|
KOKKOS_EXPECTS(num_states_ > 0);
|
||||||
const int i = Impl::Random_UniqueIndex<device_type>::get_state_idx(locks_);
|
const int i = Impl::Random_UniqueIndex<device_type>::get_state_idx(locks_);
|
||||||
return Random_XorShift64<DeviceType>(state_(i, 0), i);
|
return Random_XorShift64<DeviceType>(state_(i, 0), i);
|
||||||
}
|
}
|
||||||
@ -1158,43 +1123,35 @@ class Random_XorShift1024_Pool {
|
|||||||
using int_view_type = View<int**, device_type>;
|
using int_view_type = View<int**, device_type>;
|
||||||
using state_data_type = View<uint64_t * [16], device_type>;
|
using state_data_type = View<uint64_t * [16], device_type>;
|
||||||
|
|
||||||
locks_type locks_;
|
locks_type locks_ = {};
|
||||||
state_data_type state_;
|
state_data_type state_ = {};
|
||||||
int_view_type p_;
|
int_view_type p_ = {};
|
||||||
int num_states_;
|
int num_states_ = {};
|
||||||
int padding_;
|
int padding_ = {};
|
||||||
friend class Random_XorShift1024<DeviceType>;
|
friend class Random_XorShift1024<DeviceType>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using generator_type = Random_XorShift1024<DeviceType>;
|
using generator_type = Random_XorShift1024<DeviceType>;
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
|
||||||
Random_XorShift1024_Pool() { num_states_ = 0; }
|
KOKKOS_DEFAULTED_FUNCTION Random_XorShift1024_Pool() = default;
|
||||||
|
|
||||||
inline Random_XorShift1024_Pool(uint64_t seed) {
|
KOKKOS_DEFAULTED_FUNCTION Random_XorShift1024_Pool(
|
||||||
|
Random_XorShift1024_Pool const&) = default;
|
||||||
|
|
||||||
|
KOKKOS_DEFAULTED_FUNCTION Random_XorShift1024_Pool& operator=(
|
||||||
|
Random_XorShift1024_Pool const&) = default;
|
||||||
|
#else
|
||||||
|
Random_XorShift1024_Pool() = default;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Random_XorShift1024_Pool(uint64_t seed) {
|
||||||
num_states_ = 0;
|
num_states_ = 0;
|
||||||
|
|
||||||
init(seed, execution_space().concurrency());
|
init(seed, execution_space().concurrency());
|
||||||
}
|
}
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
void init(uint64_t seed, int num_states) {
|
||||||
Random_XorShift1024_Pool(const Random_XorShift1024_Pool& src)
|
|
||||||
: locks_(src.locks_),
|
|
||||||
state_(src.state_),
|
|
||||||
p_(src.p_),
|
|
||||||
num_states_(src.num_states_) {}
|
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
|
||||||
Random_XorShift1024_Pool operator=(const Random_XorShift1024_Pool& src) {
|
|
||||||
locks_ = src.locks_;
|
|
||||||
state_ = src.state_;
|
|
||||||
p_ = src.p_;
|
|
||||||
num_states_ = src.num_states_;
|
|
||||||
padding_ = src.padding_;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void init(uint64_t seed, int num_states) {
|
|
||||||
if (seed == 0) seed = uint64_t(1318319);
|
if (seed == 0) seed = uint64_t(1318319);
|
||||||
// I only want to pad on CPU like archs (less than 1000 threads). 64 is a
|
// I only want to pad on CPU like archs (less than 1000 threads). 64 is a
|
||||||
// magic number, or random number I just wanted something not too large and
|
// magic number, or random number I just wanted something not too large and
|
||||||
@ -1237,6 +1194,7 @@ class Random_XorShift1024_Pool {
|
|||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
KOKKOS_INLINE_FUNCTION
|
||||||
Random_XorShift1024<DeviceType> get_state() const {
|
Random_XorShift1024<DeviceType> get_state() const {
|
||||||
|
KOKKOS_EXPECTS(num_states_ > 0);
|
||||||
const int i = Impl::Random_UniqueIndex<device_type>::get_state_idx(locks_);
|
const int i = Impl::Random_UniqueIndex<device_type>::get_state_idx(locks_);
|
||||||
return Random_XorShift1024<DeviceType>(state_, p_(i, 0), i);
|
return Random_XorShift1024<DeviceType>(state_, p_(i, 0), i);
|
||||||
};
|
};
|
||||||
@ -1556,7 +1514,7 @@ void fill_random(const ExecutionSpace& exec, ViewType a, RandomPool g,
|
|||||||
"Kokkos::fill_random",
|
"Kokkos::fill_random",
|
||||||
Kokkos::RangePolicy<ExecutionSpace>(exec, 0, (LDA + 127) / 128),
|
Kokkos::RangePolicy<ExecutionSpace>(exec, 0, (LDA + 127) / 128),
|
||||||
Impl::fill_random_functor_begin_end<ViewType, RandomPool, 128,
|
Impl::fill_random_functor_begin_end<ViewType, RandomPool, 128,
|
||||||
ViewType::Rank, IndexType>(
|
ViewType::rank, IndexType>(
|
||||||
a, g, begin, end));
|
a, g, begin, end));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_SORT_HPP_
|
#ifndef KOKKOS_SORT_HPP_
|
||||||
#define KOKKOS_SORT_HPP_
|
#define KOKKOS_SORT_HPP_
|
||||||
@ -50,14 +22,60 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Kokkos_Core.hpp>
|
#include <Kokkos_Core.hpp>
|
||||||
|
#include <Kokkos_NestedSort.hpp>
|
||||||
|
#include <std_algorithms/Kokkos_BeginEnd.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#if defined(KOKKOS_ENABLE_CUDA)
|
||||||
|
|
||||||
|
// Workaround for `Instruction 'shfl' without '.sync' is not supported on
|
||||||
|
// .target sm_70 and higher from PTX ISA version 6.4`.
|
||||||
|
// Also see https://github.com/NVIDIA/cub/pull/170.
|
||||||
|
#if !defined(CUB_USE_COOPERATIVE_GROUPS)
|
||||||
|
#define CUB_USE_COOPERATIVE_GROUPS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wshadow"
|
||||||
|
|
||||||
|
#if defined(KOKKOS_COMPILER_CLANG)
|
||||||
|
// Some versions of Clang fail to compile Thrust, failing with errors like
|
||||||
|
// this:
|
||||||
|
// <snip>/thrust/system/cuda/detail/core/agent_launcher.h:557:11:
|
||||||
|
// error: use of undeclared identifier 'va_printf'
|
||||||
|
// The exact combination of versions for Clang and Thrust (or CUDA) for this
|
||||||
|
// failure was not investigated, however even very recent version combination
|
||||||
|
// (Clang 10.0.0 and Cuda 10.0) demonstrated failure.
|
||||||
|
//
|
||||||
|
// Defining _CubLog here locally allows us to avoid that code path, however
|
||||||
|
// disabling some debugging diagnostics
|
||||||
|
#pragma push_macro("_CubLog")
|
||||||
|
#ifdef _CubLog
|
||||||
|
#undef _CubLog
|
||||||
|
#endif
|
||||||
|
#define _CubLog
|
||||||
|
#include <thrust/device_ptr.h>
|
||||||
|
#include <thrust/sort.h>
|
||||||
|
#pragma pop_macro("_CubLog")
|
||||||
|
#else
|
||||||
|
#include <thrust/device_ptr.h>
|
||||||
|
#include <thrust/sort.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(KOKKOS_ENABLE_ONEDPL)
|
||||||
|
#include <oneapi/dpl/execution>
|
||||||
|
#include <oneapi/dpl/algorithm>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Kokkos {
|
namespace Kokkos {
|
||||||
|
|
||||||
namespace Impl {
|
namespace Impl {
|
||||||
|
|
||||||
template <class DstViewType, class SrcViewType, int Rank = DstViewType::Rank>
|
template <class DstViewType, class SrcViewType, int Rank = DstViewType::rank>
|
||||||
struct CopyOp;
|
struct CopyOp;
|
||||||
|
|
||||||
template <class DstViewType, class SrcViewType>
|
template <class DstViewType, class SrcViewType>
|
||||||
@ -128,8 +146,12 @@ class BinSort {
|
|||||||
Kokkos::is_view<SrcViewType>::value,
|
Kokkos::is_view<SrcViewType>::value,
|
||||||
Kokkos::View<typename SrcViewType::const_data_type,
|
Kokkos::View<typename SrcViewType::const_data_type,
|
||||||
typename SrcViewType::array_layout,
|
typename SrcViewType::array_layout,
|
||||||
typename SrcViewType::device_type,
|
typename SrcViewType::device_type
|
||||||
Kokkos::MemoryTraits<Kokkos::RandomAccess> >,
|
#if !defined(KOKKOS_COMPILER_NVHPC) // FIXME_NVHPC
|
||||||
|
,
|
||||||
|
Kokkos::MemoryTraits<Kokkos::RandomAccess>
|
||||||
|
#endif
|
||||||
|
>,
|
||||||
typename SrcViewType::const_type>;
|
typename SrcViewType::const_type>;
|
||||||
|
|
||||||
using perm_view_type = typename PermuteViewType::const_type;
|
using perm_view_type = typename PermuteViewType::const_type;
|
||||||
@ -208,7 +230,11 @@ class BinSort {
|
|||||||
bool sort_within_bins;
|
bool sort_within_bins;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BinSort() = default;
|
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
|
||||||
|
KOKKOS_DEPRECATED BinSort() = default;
|
||||||
|
#else
|
||||||
|
BinSort() = delete;
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
// Constructor: takes the keys, the binning_operator and optionally whether to
|
// Constructor: takes the keys, the binning_operator and optionally whether to
|
||||||
@ -311,6 +337,10 @@ class BinSort {
|
|||||||
template <class ExecutionSpace, class ValuesViewType>
|
template <class ExecutionSpace, class ValuesViewType>
|
||||||
void sort(const ExecutionSpace& exec, ValuesViewType const& values,
|
void sort(const ExecutionSpace& exec, ValuesViewType const& values,
|
||||||
int values_range_begin, int values_range_end) const {
|
int values_range_begin, int values_range_end) const {
|
||||||
|
if (values.extent(0) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static_assert(
|
static_assert(
|
||||||
Kokkos::SpaceAccessibility<ExecutionSpace,
|
Kokkos::SpaceAccessibility<ExecutionSpace,
|
||||||
typename Space::memory_space>::accessible,
|
typename Space::memory_space>::accessible,
|
||||||
@ -322,11 +352,6 @@ class BinSort {
|
|||||||
"The provided execution space must be able to access the memory space "
|
"The provided execution space must be able to access the memory space "
|
||||||
"of the View argument!");
|
"of the View argument!");
|
||||||
|
|
||||||
using scratch_view_type =
|
|
||||||
Kokkos::View<typename ValuesViewType::data_type,
|
|
||||||
typename ValuesViewType::array_layout,
|
|
||||||
typename ValuesViewType::device_type>;
|
|
||||||
|
|
||||||
const size_t len = range_end - range_begin;
|
const size_t len = range_end - range_begin;
|
||||||
const size_t values_len = values_range_end - values_range_begin;
|
const size_t values_len = values_range_end - values_range_begin;
|
||||||
if (len != values_len) {
|
if (len != values_len) {
|
||||||
@ -334,6 +359,9 @@ class BinSort {
|
|||||||
"BinSort::sort: values range length != permutation vector length");
|
"BinSort::sort: values range length != permutation vector length");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using scratch_view_type =
|
||||||
|
Kokkos::View<typename ValuesViewType::data_type,
|
||||||
|
typename ValuesViewType::device_type>;
|
||||||
scratch_view_type sorted_values(
|
scratch_view_type sorted_values(
|
||||||
view_alloc(exec, WithoutInitializing,
|
view_alloc(exec, WithoutInitializing,
|
||||||
"Kokkos::SortImpl::BinSortFunctor::sorted_values"),
|
"Kokkos::SortImpl::BinSortFunctor::sorted_values"),
|
||||||
@ -438,24 +466,29 @@ class BinSort {
|
|||||||
void operator()(const bin_sort_bins_tag& /*tag*/, const int i) const {
|
void operator()(const bin_sort_bins_tag& /*tag*/, const int i) const {
|
||||||
auto bin_size = bin_count_const(i);
|
auto bin_size = bin_count_const(i);
|
||||||
if (bin_size <= 1) return;
|
if (bin_size <= 1) return;
|
||||||
int upper_bound = bin_offsets(i) + bin_size;
|
constexpr bool use_std_sort =
|
||||||
bool sorted = false;
|
std::is_same_v<typename exec_space::memory_space, HostSpace>;
|
||||||
while (!sorted) {
|
int lower_bound = bin_offsets(i);
|
||||||
sorted = true;
|
int upper_bound = lower_bound + bin_size;
|
||||||
int old_idx = sort_order(bin_offsets(i));
|
// Switching to std::sort for more than 10 elements has been found
|
||||||
int new_idx = 0;
|
// reasonable experimentally.
|
||||||
for (int k = bin_offsets(i) + 1; k < upper_bound; k++) {
|
if (use_std_sort && bin_size > 10) {
|
||||||
new_idx = sort_order(k);
|
if constexpr (use_std_sort) {
|
||||||
|
std::sort(&sort_order(lower_bound), &sort_order(upper_bound),
|
||||||
if (!bin_op(keys_rnd, old_idx, new_idx)) {
|
[this](int p, int q) { return bin_op(keys_rnd, p, q); });
|
||||||
sort_order(k - 1) = new_idx;
|
}
|
||||||
sort_order(k) = old_idx;
|
|
||||||
sorted = false;
|
|
||||||
} else {
|
} else {
|
||||||
old_idx = new_idx;
|
for (int k = lower_bound + 1; k < upper_bound; ++k) {
|
||||||
|
int old_idx = sort_order(k);
|
||||||
|
int j = k - 1;
|
||||||
|
while (j >= lower_bound) {
|
||||||
|
int new_idx = sort_order(j);
|
||||||
|
if (!bin_op(keys_rnd, old_idx, new_idx)) break;
|
||||||
|
sort_order(j + 1) = new_idx;
|
||||||
|
--j;
|
||||||
}
|
}
|
||||||
|
sort_order(j + 1) = old_idx;
|
||||||
}
|
}
|
||||||
upper_bound--;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -468,7 +501,11 @@ struct BinOp1D {
|
|||||||
double mul_ = {};
|
double mul_ = {};
|
||||||
double min_ = {};
|
double min_ = {};
|
||||||
|
|
||||||
BinOp1D() = default;
|
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
|
||||||
|
KOKKOS_DEPRECATED BinOp1D() = default;
|
||||||
|
#else
|
||||||
|
BinOp1D() = delete;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Construct BinOp with number of bins, minimum value and maximum value
|
// Construct BinOp with number of bins, minimum value and maximum value
|
||||||
BinOp1D(int max_bins__, typename KeyViewType::const_value_type min,
|
BinOp1D(int max_bins__, typename KeyViewType::const_value_type min,
|
||||||
@ -512,7 +549,11 @@ struct BinOp3D {
|
|||||||
double mul_[3] = {};
|
double mul_[3] = {};
|
||||||
double min_[3] = {};
|
double min_[3] = {};
|
||||||
|
|
||||||
BinOp3D() = default;
|
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
|
||||||
|
KOKKOS_DEPRECATED BinOp3D() = default;
|
||||||
|
#else
|
||||||
|
BinOp3D() = delete;
|
||||||
|
#endif
|
||||||
|
|
||||||
BinOp3D(int max_bins__[], typename KeyViewType::const_value_type min[],
|
BinOp3D(int max_bins__[], typename KeyViewType::const_value_type min[],
|
||||||
typename KeyViewType::const_value_type max[]) {
|
typename KeyViewType::const_value_type max[]) {
|
||||||
@ -559,24 +600,6 @@ struct BinOp3D {
|
|||||||
|
|
||||||
namespace Impl {
|
namespace Impl {
|
||||||
|
|
||||||
template <class ViewType, class ExecutionSpace>
|
|
||||||
bool try_std_sort(ViewType view, const ExecutionSpace& exec) {
|
|
||||||
bool possible = true;
|
|
||||||
size_t stride[8] = {view.stride_0(), view.stride_1(), view.stride_2(),
|
|
||||||
view.stride_3(), view.stride_4(), view.stride_5(),
|
|
||||||
view.stride_6(), view.stride_7()};
|
|
||||||
possible = possible &&
|
|
||||||
SpaceAccessibility<HostSpace,
|
|
||||||
typename ViewType::memory_space>::accessible;
|
|
||||||
possible = possible && (ViewType::Rank == 1);
|
|
||||||
possible = possible && (stride[0] == 1);
|
|
||||||
if (possible) {
|
|
||||||
exec.fence("Kokkos::sort: Fence before sorting on the host");
|
|
||||||
std::sort(view.data(), view.data() + view.extent(0));
|
|
||||||
}
|
|
||||||
return possible;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class ViewType>
|
template <class ViewType>
|
||||||
struct min_max_functor {
|
struct min_max_functor {
|
||||||
using minmax_scalar =
|
using minmax_scalar =
|
||||||
@ -594,9 +617,18 @@ struct min_max_functor {
|
|||||||
|
|
||||||
} // namespace Impl
|
} // namespace Impl
|
||||||
|
|
||||||
template <class ExecutionSpace, class ViewType>
|
template <class ExecutionSpace, class DataType, class... Properties>
|
||||||
std::enable_if_t<Kokkos::is_execution_space<ExecutionSpace>::value> sort(
|
std::enable_if_t<(Kokkos::is_execution_space<ExecutionSpace>::value) &&
|
||||||
const ExecutionSpace& exec, ViewType const& view) {
|
(!SpaceAccessibility<
|
||||||
|
HostSpace, typename Kokkos::View<DataType, Properties...>::
|
||||||
|
memory_space>::accessible)>
|
||||||
|
sort(const ExecutionSpace& exec,
|
||||||
|
const Kokkos::View<DataType, Properties...>& view) {
|
||||||
|
if (view.extent(0) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
using ViewType = Kokkos::View<DataType, Properties...>;
|
||||||
using CompType = BinOp1D<ViewType>;
|
using CompType = BinOp1D<ViewType>;
|
||||||
|
|
||||||
Kokkos::MinMaxScalar<typename ViewType::non_const_value_type> result;
|
Kokkos::MinMaxScalar<typename ViewType::non_const_value_type> result;
|
||||||
@ -634,44 +666,84 @@ std::enable_if_t<Kokkos::is_execution_space<ExecutionSpace>::value> sort(
|
|||||||
bin_sort.sort(exec, view);
|
bin_sort.sort(exec, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_3
|
#if defined(KOKKOS_ENABLE_ONEDPL)
|
||||||
template <class ExecutionSpace, class ViewType>
|
template <class DataType, class... Properties>
|
||||||
KOKKOS_DEPRECATED_WITH_COMMENT(
|
void sort(const Experimental::SYCL& space,
|
||||||
"Use the overload not taking bool always_use_kokkos_sort")
|
const Kokkos::View<DataType, Properties...>& view) {
|
||||||
std::enable_if_t<Kokkos::is_execution_space<ExecutionSpace>::value> sort(
|
if (view.extent(0) == 0) {
|
||||||
const ExecutionSpace& exec, ViewType const& view,
|
|
||||||
bool const always_use_kokkos_sort) {
|
|
||||||
if (!always_use_kokkos_sort && Impl::try_std_sort(view, exec)) {
|
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
sort(exec, view);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using ViewType = Kokkos::View<DataType, Properties...>;
|
||||||
|
static_assert(SpaceAccessibility<Experimental::SYCL,
|
||||||
|
typename ViewType::memory_space>::accessible,
|
||||||
|
"SYCL execution space is not able to access the memory space "
|
||||||
|
"of the View argument!");
|
||||||
|
|
||||||
|
auto queue = space.sycl_queue();
|
||||||
|
auto policy = oneapi::dpl::execution::make_device_policy(queue);
|
||||||
|
|
||||||
|
// Can't use Experimental::begin/end here since the oneDPL then assumes that
|
||||||
|
// the data is on the host.
|
||||||
|
static_assert(
|
||||||
|
ViewType::rank == 1 &&
|
||||||
|
(std::is_same<typename ViewType::array_layout, LayoutRight>::value ||
|
||||||
|
std::is_same<typename ViewType::array_layout, LayoutLeft>::value),
|
||||||
|
"SYCL sort only supports contiguous 1D Views.");
|
||||||
|
const int n = view.extent(0);
|
||||||
|
oneapi::dpl::sort(policy, view.data(), view.data() + n);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template <class ExecutionSpace, class DataType, class... Properties>
|
||||||
|
std::enable_if_t<(Kokkos::is_execution_space<ExecutionSpace>::value) &&
|
||||||
|
(SpaceAccessibility<
|
||||||
|
HostSpace, typename Kokkos::View<DataType, Properties...>::
|
||||||
|
memory_space>::accessible)>
|
||||||
|
sort(const ExecutionSpace&, const Kokkos::View<DataType, Properties...>& view) {
|
||||||
|
if (view.extent(0) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto first = Experimental::begin(view);
|
||||||
|
auto last = Experimental::end(view);
|
||||||
|
std::sort(first, last);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(KOKKOS_ENABLE_CUDA)
|
||||||
|
template <class DataType, class... Properties>
|
||||||
|
void sort(const Cuda& space,
|
||||||
|
const Kokkos::View<DataType, Properties...>& view) {
|
||||||
|
if (view.extent(0) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const auto exec = thrust::cuda::par.on(space.cuda_stream());
|
||||||
|
auto first = Experimental::begin(view);
|
||||||
|
auto last = Experimental::end(view);
|
||||||
|
thrust::sort(exec, first, last);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <class ViewType>
|
template <class ViewType>
|
||||||
void sort(ViewType const& view) {
|
void sort(ViewType const& view) {
|
||||||
Kokkos::fence("Kokkos::sort: before");
|
Kokkos::fence("Kokkos::sort: before");
|
||||||
|
|
||||||
|
if (view.extent(0) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
typename ViewType::execution_space exec;
|
typename ViewType::execution_space exec;
|
||||||
sort(exec, view);
|
sort(exec, view);
|
||||||
exec.fence("Kokkos::sort: fence after sorting");
|
exec.fence("Kokkos::sort: fence after sorting");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_3
|
|
||||||
template <class ViewType>
|
|
||||||
KOKKOS_DEPRECATED_WITH_COMMENT(
|
|
||||||
"Use the overload not taking bool always_use_kokkos_sort")
|
|
||||||
void sort(ViewType const& view, bool const always_use_kokkos_sort) {
|
|
||||||
typename ViewType::execution_space exec;
|
|
||||||
sort(exec, view, always_use_kokkos_sort);
|
|
||||||
exec.fence("Kokkos::Sort: fence after sorting");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <class ExecutionSpace, class ViewType>
|
template <class ExecutionSpace, class ViewType>
|
||||||
std::enable_if_t<Kokkos::is_execution_space<ExecutionSpace>::value> sort(
|
std::enable_if_t<Kokkos::is_execution_space<ExecutionSpace>::value> sort(
|
||||||
const ExecutionSpace& exec, ViewType view, size_t const begin,
|
const ExecutionSpace& exec, ViewType view, size_t const begin,
|
||||||
size_t const end) {
|
size_t const end) {
|
||||||
|
if (view.extent(0) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
using range_policy = Kokkos::RangePolicy<typename ViewType::execution_space>;
|
using range_policy = Kokkos::RangePolicy<typename ViewType::execution_space>;
|
||||||
using CompType = BinOp1D<ViewType>;
|
using CompType = BinOp1D<ViewType>;
|
||||||
|
|
||||||
@ -694,6 +766,11 @@ std::enable_if_t<Kokkos::is_execution_space<ExecutionSpace>::value> sort(
|
|||||||
template <class ViewType>
|
template <class ViewType>
|
||||||
void sort(ViewType view, size_t const begin, size_t const end) {
|
void sort(ViewType view, size_t const begin, size_t const end) {
|
||||||
Kokkos::fence("Kokkos::sort: before");
|
Kokkos::fence("Kokkos::sort: before");
|
||||||
|
|
||||||
|
if (view.extent(0) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
typename ViewType::execution_space exec;
|
typename ViewType::execution_space exec;
|
||||||
sort(exec, view, begin, end);
|
sort(exec, view, begin, end);
|
||||||
exec.fence("Kokkos::Sort: fence after sorting");
|
exec.fence("Kokkos::Sort: fence after sorting");
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_HPP
|
#define KOKKOS_STD_ALGORITHMS_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_ADJACENT_DIFFERENCE_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_ADJACENT_DIFFERENCE_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_ADJACENT_DIFFERENCE_HPP
|
#define KOKKOS_STD_ALGORITHMS_ADJACENT_DIFFERENCE_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_ADJACENT_FIND_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_ADJACENT_FIND_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_ADJACENT_FIND_HPP
|
#define KOKKOS_STD_ALGORITHMS_ADJACENT_FIND_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_ALL_OF_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_ALL_OF_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_ALL_OF_HPP
|
#define KOKKOS_STD_ALGORITHMS_ALL_OF_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_ANY_OF_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_ANY_OF_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_ANY_OF_HPP
|
#define KOKKOS_STD_ALGORITHMS_ANY_OF_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_BEGIN_END_HPP
|
#ifndef KOKKOS_BEGIN_END_HPP
|
||||||
#define KOKKOS_BEGIN_END_HPP
|
#define KOKKOS_BEGIN_END_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_COPY_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_COPY_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_COPY_HPP
|
#define KOKKOS_STD_ALGORITHMS_COPY_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_COPY_BACKWARD_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_COPY_BACKWARD_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_COPY_BACKWARD_HPP
|
#define KOKKOS_STD_ALGORITHMS_COPY_BACKWARD_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_COPY_IF_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_COPY_IF_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_COPY_IF_HPP
|
#define KOKKOS_STD_ALGORITHMS_COPY_IF_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_COPY_N_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_COPY_N_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_COPY_N_HPP
|
#define KOKKOS_STD_ALGORITHMS_COPY_N_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_COUNT_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_COUNT_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_COUNT_HPP
|
#define KOKKOS_STD_ALGORITHMS_COUNT_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_COUNT_IF_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_COUNT_IF_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_COUNT_IF_HPP
|
#define KOKKOS_STD_ALGORITHMS_COUNT_IF_HPP
|
||||||
|
|||||||
@ -1,46 +1,18 @@
|
|||||||
/*
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
// Kokkos v. 3.0
|
// Kokkos v. 4.0
|
||||||
// Copyright (2020) National Technology & Engineering
|
// Copyright (2022) National Technology & Engineering
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
// Solutions of Sandia, LLC (NTESS).
|
||||||
//
|
//
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// the U.S. Government retains certain rights in this software.
|
// the U.S. Government retains certain rights in this software.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
// modification, are permitted provided that the following conditions are
|
// See https://kokkos.org/LICENSE for license information.
|
||||||
// met:
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
//@HEADER
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KOKKOS_STD_ALGORITHMS_DISTANCE_HPP
|
#ifndef KOKKOS_STD_ALGORITHMS_DISTANCE_HPP
|
||||||
#define KOKKOS_STD_ALGORITHMS_DISTANCE_HPP
|
#define KOKKOS_STD_ALGORITHMS_DISTANCE_HPP
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user