forked from lammps/lammps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lammps:develop' into develop
- Loading branch information
Showing
256 changed files
with
68,467 additions
and
7,768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# GitHub action to build LAMMPS-GUI as a flatpak bundle | ||
name: "Build LAMMPS-GUI as flatpak bundle" | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{github.event_name == 'pull_request'}} | ||
|
||
jobs: | ||
build: | ||
name: LAMMPS-GUI flatpak build | ||
if: ${{ github.repository == 'lammps/lammps' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Install extra packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ccache \ | ||
libeigen3-dev \ | ||
libcurl4-openssl-dev \ | ||
mold \ | ||
ninja-build \ | ||
python3-dev \ | ||
flatpak \ | ||
flatpak-builder | ||
- name: Set up access to flatpak repo | ||
run: flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | ||
|
||
- name: Build flatpak | ||
run: | | ||
mkdir flatpack-state | ||
sed -i -e 's/branch:.*/branch: develop/' tools/lammps-gui/org.lammps.lammps-gui.yml | ||
flatpak-builder --force-clean --verbose --repo=flatpak-repo \ | ||
--install-deps-from=flathub --state-dir=flatpak-state \ | ||
--user --ccache --default-branch=${{ github.ref_name }} \ | ||
flatpak-build tools/lammps-gui/org.lammps.lammps-gui.yml | ||
flatpak build-bundle --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo \ | ||
--verbose flatpak-repo LAMMPS-Linux-x86_64-GUI.flatpak \ | ||
org.lammps.lammps-gui ${{ github.ref_name }} | ||
flatpak install -y -v --user LAMMPS-Linux-x86_64-GUI.flatpak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# GitHub action to build LAMMPS on Linux with ARM64 and run standard unit tests | ||
name: "Unittest for Linux on ARM64" | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{github.event_name == 'pull_request'}} | ||
|
||
jobs: | ||
build: | ||
name: Linux ARM64 Unit Test | ||
if: ${{ github.repository == 'lammps/lammps' }} | ||
runs-on: ubuntu-22.04-arm | ||
env: | ||
CCACHE_DIR: ${{ github.workspace }}/.ccache | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Install extra packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ccache \ | ||
libeigen3-dev \ | ||
libcurl4-openssl-dev \ | ||
mold \ | ||
ninja-build \ | ||
python3-dev | ||
- name: Create Build Environment | ||
run: mkdir build | ||
|
||
- name: Set up ccache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.CCACHE_DIR }} | ||
key: linux-unit-ccache-${{ github.sha }} | ||
restore-keys: linux-unit-ccache- | ||
|
||
- name: Building LAMMPS via CMake | ||
shell: bash | ||
run: | | ||
ccache -z | ||
python3 -m venv linuxenv | ||
source linuxenv/bin/activate | ||
python3 -m pip install numpy | ||
python3 -m pip install pyyaml | ||
cmake -S cmake -B build \ | ||
-C cmake/presets/gcc.cmake \ | ||
-C cmake/presets/most.cmake \ | ||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-D BUILD_SHARED_LIBS=on \ | ||
-D DOWNLOAD_POTENTIALS=off \ | ||
-D ENABLE_TESTING=on \ | ||
-D MLIAP_ENABLE_ACE=on \ | ||
-D MLIAP_ENABLE_PYTHON=off \ | ||
-D PKG_MANIFOLD=on \ | ||
-D PKG_ML-PACE=on \ | ||
-D PKG_ML-RANN=on \ | ||
-D PKG_RHEO=on \ | ||
-D PKG_PTM=on \ | ||
-D PKG_PYTHON=on \ | ||
-D PKG_QTB=on \ | ||
-D PKG_SMTBQ=on \ | ||
-G Ninja | ||
cmake --build build | ||
ccache -s | ||
- name: Run Tests | ||
working-directory: build | ||
shell: bash | ||
run: ctest -V -LE unstable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
# CMake build system | ||
# This file is part of LAMMPS | ||
cmake_minimum_required(VERSION 3.16) | ||
if(CMAKE_VERSION VERSION_LESS 3.20) | ||
message(WARNING "LAMMPS is planning to require at least CMake version 3.20 by Summer 2025. Please upgrade!") | ||
endif() | ||
######################################## | ||
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it | ||
if(POLICY CMP0074) | ||
|
@@ -95,24 +98,21 @@ check_for_autogen_files(${LAMMPS_SOURCE_DIR}) | |
##################################################################### | ||
include(CheckIncludeFileCXX) | ||
|
||
# set required compiler flags and compiler/CPU arch specific optimizations | ||
# set required compiler flags, apply checks, and compiler/CPU arch specific optimizations | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") | ||
# Intel classic compilers version 19 are broken and fail to compile the embedded fmtlib | ||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20.0) | ||
message(ERROR "Intel classic compiler version ${CMAKE_CXX_COMPILER_VERSION} is too old") | ||
endif() | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows") | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qrestrict") | ||
endif() | ||
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4) | ||
set(CMAKE_TUNE_DEFAULT "/QxCOMMON-AVX512") | ||
else() | ||
set(CMAKE_TUNE_DEFAULT "/QxHost") | ||
endif() | ||
set(CMAKE_TUNE_DEFAULT "/QxHost") | ||
else() | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict") | ||
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4) | ||
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512") | ||
else() | ||
set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=11074 -diag-disable=11076 -diag-disable=2196") | ||
endif() | ||
set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=11074 -diag-disable=11076 -diag-disable=2196") | ||
endif() | ||
endif() | ||
|
||
|
@@ -144,16 +144,28 @@ 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,--diag_suppress=128") | ||
endif() | ||
|
||
# we require C++11 without extensions. Kokkos requires at least C++17 (currently) | ||
# we *require* C++11 without extensions but prefer C++17. | ||
# Kokkos requires at least C++17 (currently) | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 11) | ||
if(cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES) | ||
set(CMAKE_CXX_STANDARD 17) | ||
else() | ||
set(CMAKE_CXX_STANDARD 11) | ||
endif() | ||
endif() | ||
if(CMAKE_CXX_STANDARD LESS 11) | ||
message(FATAL_ERROR "C++ standard must be set to at least 11") | ||
endif() | ||
if(CMAKE_CXX_STANDARD LESS 17) | ||
message(WARNING "Selecting C++17 standard is preferred over C++${CMAKE_CXX_STANDARD}") | ||
endif() | ||
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17)) | ||
set(CMAKE_CXX_STANDARD 17) | ||
endif() | ||
# turn off C++17 check in lmptype.h | ||
if(LAMMPS_CXX11) | ||
add_compile_definitions(LAMMPS_CXX11) | ||
endif() | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions") | ||
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro | ||
|
@@ -347,6 +359,17 @@ foreach(PKG ${STANDARD_PACKAGES} ${SUFFIX_PACKAGES}) | |
option(PKG_${PKG} "Build ${PKG} Package" OFF) | ||
endforeach() | ||
|
||
set(DEPRECATED_PACKAGES AWPMD ATC POEMS) | ||
foreach(PKG ${DEPRECATED_PACKAGES}) | ||
if(PKG_${PKG}) | ||
message(WARNING | ||
"The ${PKG} package will be removed from LAMMPS in Summer 2025 due to lack of " | ||
"maintenance and use of code constructs that conflict with modern C++ compilers " | ||
"and standards. Please contact [email protected] if you have any concerns " | ||
"about this step.") | ||
endif() | ||
endforeach() | ||
|
||
###################################################### | ||
# packages with special compiler needs or external libs | ||
###################################################### | ||
|
@@ -579,6 +602,16 @@ foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE | |
endif() | ||
endforeach() | ||
|
||
# settings for misc packages and styles | ||
if(PKG_MISC) | ||
option(LAMMPS_ASYNC_IMD "Asynchronous IMD processing" OFF) | ||
mark_as_advanced(LAMMPS_ASYNC_IMD) | ||
if(LAMMPS_ASYNC_IMD) | ||
target_compile_definitions(lammps PRIVATE -DLAMMPS_ASYNC_IMD) | ||
message(STATUS "Using IMD in asynchronous mode") | ||
endif() | ||
endif() | ||
|
||
# optionally enable building script wrappers using swig | ||
option(WITH_SWIG "Build scripting language wrappers with SWIG" OFF) | ||
if(WITH_SWIG) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,10 @@ if(INTEL_ARCH STREQUAL "KNL") | |
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel") | ||
message(FATAL_ERROR "Must use Intel compiler with INTEL for KNL architecture") | ||
endif() | ||
message(WARNING, "Support for Intel Xeon Phi accelerators and Knight's Landing CPUs " | ||
"will be removed from LAMMPS in Summer 2025 due to lack of available machines " | ||
"in labs and HPC centers and removed support in recent compilers " | ||
"Please contact [email protected] if you have any concerns about this step.") | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -xHost -qopenmp -qoffload") | ||
set(MIC_OPTIONS "-qoffload-option,mic,compiler,\"-fp-model fast=2 -mGLOB_default_function_attrs=\\\"gather_scatter_loop_unroll=4\\\"\"") | ||
target_compile_options(lammps PRIVATE -xMIC-AVX512 -qoffload -fno-alias -ansi-alias -restrict -qoverride-limits ${MIC_OPTIONS}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.