Skip to content

Commit

Permalink
Merge branch 'lammps:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
abkein authored Jan 11, 2025
2 parents e108405 + 38c3477 commit 9d8efe6
Show file tree
Hide file tree
Showing 747 changed files with 25,190 additions and 19,717 deletions.
21 changes: 4 additions & 17 deletions cmake/Modules/Packages/KOKKOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,13 @@ endif()

########################################################################
# consistency checks and Kokkos options/settings required by LAMMPS
if(Kokkos_ENABLE_CUDA)
option(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC "CUDA asynchronous malloc support" OFF)
mark_as_advanced(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC)
if(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC)
message(STATUS "KOKKOS: CUDA malloc async support enabled")
else()
message(STATUS "KOKKOS: CUDA malloc async support disabled")
endif()
endif()
if(Kokkos_ENABLE_HIP)
option(Kokkos_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS "Enable multiple kernel instantiations with HIP" ON)
mark_as_advanced(Kokkos_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS)
option(Kokkos_ENABLE_ROCTHRUST "Use RoCThrust library" ON)
mark_as_advanced(Kokkos_ENABLE_ROCTHRUST)

if(Kokkos_ARCH_AMD_GFX942 OR Kokkos_ARCH_AMD_GFX940)
option(Kokkos_ENABLE_IMPL_HIP_UNIFIED_MEMORY "Enable unified memory with HIP" ON)
mark_as_advanced(Kokkos_ENABLE_IMPL_HIP_UNIFIED_MEMORY)
endif()
endif()

# Adding OpenMP compiler flags without the checks done for
# BUILD_OMP can result in compile failures. Enforce consistency.
if(Kokkos_ENABLE_OPENMP)
Expand Down Expand Up @@ -70,8 +57,8 @@ if(DOWNLOAD_KOKKOS)
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
include(ExternalProject)
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.4.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "de6ee80d00b6212b02bfb7f1e71a8392" CACHE STRING "MD5 checksum of KOKKOS tarball")
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.5.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "4d832aa0284169d9e3fbae3165286bc6" CACHE STRING "MD5 checksum of KOKKOS tarball")
mark_as_advanced(KOKKOS_URL)
mark_as_advanced(KOKKOS_MD5)
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
Expand All @@ -96,7 +83,7 @@ if(DOWNLOAD_KOKKOS)
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
elseif(EXTERNAL_KOKKOS)
find_package(Kokkos 4.4.01 REQUIRED CONFIG)
find_package(Kokkos 4.5.01 REQUIRED CONFIG)
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
else()
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
Expand Down
96 changes: 54 additions & 42 deletions cmake/Modules/Packages/ML-PACE.cmake
Original file line number Diff line number Diff line change
@@ -1,50 +1,62 @@
# PACE library support for ML-PACE package
find_package(pace QUIET)

# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
if(pace_FOUND)
find_package(pace)
target_link_libraries(lammps PRIVATE pace::pace)
else()
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()

set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "b45de9a633f42ed65422567e3ce56f9f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix2.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "a53bd87cfee8b07d9f44bc17aad69c3f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)

# LOCAL_ML-PACE points to top-level dir with local lammps-user-pace repo,
# to make it easier to check local build without going through the public github releases
if(LOCAL_ML-PACE)
set(lib-pace "${LOCAL_ML-PACE}")
else()
# download library sources to build folder
if(EXISTS ${CMAKE_BINARY_DIR}/libpace.tar.gz)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
endif()
if(NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}")
message(STATUS "Downloading ${PACELIB_URL}")
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz STATUS DL_STATUS SHOW_PROGRESS)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}"))
message(WARNING "Download from primary URL ${PACELIB_URL} failed\nTrying fallback URL ${PACELIB_FALLBACK}")
file(DOWNLOAD ${PACELIB_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5} SHOW_PROGRESS)
# LOCAL_ML-PACE points to top-level dir with local lammps-user-pace repo,
# to make it easier to check local build without going through the public github releases
if(LOCAL_ML-PACE)
set(lib-pace "${LOCAL_ML-PACE}")
else()
# download library sources to build folder
if(EXISTS ${CMAKE_BINARY_DIR}/libpace.tar.gz)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
endif()
if(NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}")
message(STATUS "Downloading ${PACELIB_URL}")
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz STATUS DL_STATUS SHOW_PROGRESS)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}"))
message(WARNING "Download from primary URL ${PACELIB_URL} failed\nTrying fallback URL ${PACELIB_FALLBACK}")
file(DOWNLOAD ${PACELIB_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5} SHOW_PROGRESS)
endif()
else()
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
endif()


# uncompress downloaded sources
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace*
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace)
endif()
else()
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
endif()


# uncompress downloaded sources
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace*
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace)
endif()

add_subdirectory(${lib-pace} build-pace)
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
# some preinstalled yaml-cpp versions don't provide a namespaced target
find_package(yaml-cpp QUIET)
if(TARGET yaml-cpp AND NOT TARGET yaml-cpp::yaml-cpp)
add_library(yaml-cpp::yaml-cpp ALIAS yaml-cpp)
endif()

if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PRIVATE pace)
add_subdirectory(${lib-pace} build-pace)
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})

if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PRIVATE pace)
endif()
endif()
102 changes: 57 additions & 45 deletions doc/src/Build_extras.rst
Original file line number Diff line number Diff line change
Expand Up @@ -547,16 +547,7 @@ They must be specified in uppercase.
- Local machine
* - AMDAVX
- HOST
- AMD 64-bit x86 CPU (AVX 1)
* - ZEN
- HOST
- AMD Zen class CPU (AVX 2)
* - ZEN2
- HOST
- AMD Zen2 class CPU (AVX 2)
* - ZEN3
- HOST
- AMD Zen3 class CPU (AVX 2)
- AMD chip
* - ARMV80
- HOST
- ARMv8.0 Compatible CPU
Expand All @@ -572,105 +563,126 @@ They must be specified in uppercase.
* - A64FX
- HOST
- ARMv8.2 with SVE Support
* - ARMV9_GRACE
- HOST
- ARMv9 NVIDIA Grace CPU
* - SNB
- HOST
- Intel Sandy/Ivy Bridge CPU (AVX 1)
- Intel Sandy/Ivy Bridge CPUs
* - HSW
- HOST
- Intel Haswell CPU (AVX 2)
- Intel Haswell CPUs
* - BDW
- HOST
- Intel Broadwell Xeon E-class CPU (AVX 2 + transactional mem)
* - SKL
- HOST
- Intel Skylake Client CPU
* - SKX
- HOST
- Intel Skylake Xeon Server CPU (AVX512)
- Intel Broadwell Xeon E-class CPUs
* - ICL
- HOST
- Intel Ice Lake Client CPU (AVX512)
- Intel Ice Lake Client CPUs (AVX512)
* - ICX
- HOST
- Intel Ice Lake Xeon Server CPU (AVX512)
* - SPR
- Intel Ice Lake Xeon Server CPUs (AVX512)
* - SKL
- HOST
- Intel Sapphire Rapids Xeon Server CPU (AVX512)
- Intel Skylake Client CPUs
* - SKX
- HOST
- Intel Skylake Xeon Server CPUs (AVX512)
* - KNC
- HOST
- Intel Knights Corner Xeon Phi
* - KNL
- HOST
- Intel Knights Landing Xeon Phi
* - SPR
- HOST
- Intel Sapphire Rapids Xeon Server CPUs (AVX512)
* - POWER8
- HOST
- IBM POWER8 CPU
- IBM POWER8 CPUs
* - POWER9
- HOST
- IBM POWER9 CPU
- IBM POWER9 CPUs
* - ZEN
- HOST
- AMD Zen architecture
* - ZEN2
- HOST
- AMD Zen2 architecture
* - ZEN3
- HOST
- AMD Zen3 architecture
* - RISCV_SG2042
- HOST
- SG2042 (RISC-V) CPU
- SG2042 (RISC-V) CPUs
* - RISCV_RVA22V
- HOST
- RVA22V (RISC-V) CPUs
* - KEPLER30
- GPU
- NVIDIA Kepler generation CC 3.0 GPU
- NVIDIA Kepler generation CC 3.0
* - KEPLER32
- GPU
- NVIDIA Kepler generation CC 3.2 GPU
- NVIDIA Kepler generation CC 3.2
* - KEPLER35
- GPU
- NVIDIA Kepler generation CC 3.5 GPU
- NVIDIA Kepler generation CC 3.5
* - KEPLER37
- GPU
- NVIDIA Kepler generation CC 3.7 GPU
- NVIDIA Kepler generation CC 3.7
* - MAXWELL50
- GPU
- NVIDIA Maxwell generation CC 5.0 GPU
- NVIDIA Maxwell generation CC 5.0
* - MAXWELL52
- GPU
- NVIDIA Maxwell generation CC 5.2 GPU
- NVIDIA Maxwell generation CC 5.2
* - MAXWELL53
- GPU
- NVIDIA Maxwell generation CC 5.3 GPU
- NVIDIA Maxwell generation CC 5.3
* - PASCAL60
- GPU
- NVIDIA Pascal generation CC 6.0 GPU
- NVIDIA Pascal generation CC 6.0
* - PASCAL61
- GPU
- NVIDIA Pascal generation CC 6.1 GPU
- NVIDIA Pascal generation CC 6.1
* - VOLTA70
- GPU
- NVIDIA Volta generation CC 7.0 GPU
- NVIDIA Volta generation CC 7.0
* - VOLTA72
- GPU
- NVIDIA Volta generation CC 7.2 GPU
- NVIDIA Volta generation CC 7.2
* - TURING75
- GPU
- NVIDIA Turing generation CC 7.5 GPU
- NVIDIA Turing generation CC 7.5
* - AMPERE80
- GPU
- NVIDIA Ampere generation CC 8.0 GPU
- NVIDIA Ampere generation CC 8.0
* - AMPERE86
- GPU
- NVIDIA Ampere generation CC 8.6 GPU
- NVIDIA Ampere generation CC 8.6
* - ADA89
- GPU
- NVIDIA Ada Lovelace generation CC 8.9 GPU
- NVIDIA Ada generation CC 8.9
* - HOPPER90
- GPU
- NVIDIA Hopper generation CC 9.0 GPU
- NVIDIA Hopper generation CC 9.0
* - AMD_GFX906
- GPU
- AMD GPU MI50/MI60
- AMD GPU MI50/60
* - AMD_GFX908
- GPU
- AMD GPU MI100
* - AMD_GFX90A
- GPU
- AMD GPU MI200
* - AMD_GFX940
- GPU
- AMD GPU MI300
* - AMD_GFX942
- GPU
- AMD GPU MI300
* - AMD_GFX942_APU
- GPU
- AMD APU MI300A
* - AMD_GFX1030
- GPU
- AMD GPU V620/W6800
Expand All @@ -679,7 +691,7 @@ They must be specified in uppercase.
- AMD GPU RX7900XTX
* - AMD_GFX1103
- GPU
- AMD Phoenix APU with Radeon 740M/760M/780M/880M/890M
- AMD APU Phoenix
* - INTEL_GEN
- GPU
- SPIR64-based devices, e.g. Intel GPUs, using JIT
Expand All @@ -702,7 +714,7 @@ They must be specified in uppercase.
- GPU
- Intel GPU Ponte Vecchio

This list was last updated for version 4.3.0 of the Kokkos library.
This list was last updated for version 4.5.1 of the Kokkos library.

.. tabs::

Expand Down
Loading

0 comments on commit 9d8efe6

Please sign in to comment.