Merge pull request #4343 from akohlmey/collected-small-changes
Collected small changes and fixes
This commit is contained in:
92
.github/workflows/check-cpp23.yml
vendored
Normal file
92
.github/workflows/check-cpp23.yml
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
# GitHub action to build LAMMPS on Linux with gcc and C++23
|
||||
name: "Check for C++23 Compatibility"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build with C++23 support enabled
|
||||
if: ${{ github.repository == 'lammps/lammps' }}
|
||||
runs-on: ubuntu-latest
|
||||
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 \
|
||||
mpi-default-bin \
|
||||
mpi-default-dev \
|
||||
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-cpp23-ccache-${{ github.sha }}
|
||||
restore-keys: linux-cpp23-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/most.cmake \
|
||||
-C cmake/presets/kokkos-openmp.cmake \
|
||||
-D CMAKE_CXX_STANDARD=23 \
|
||||
-D CMAKE_CXX_COMPILER=g++ \
|
||||
-D CMAKE_C_COMPILER=gcc \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_BUILD_TYPE=Debug \
|
||||
-D CMAKE_CXX_FLAGS_DEBUG="-Og -g" \
|
||||
-D DOWNLOAD_POTENTIALS=off \
|
||||
-D BUILD_MPI=on \
|
||||
-D BUILD_SHARED_LIBS=on \
|
||||
-D BUILD_TOOLS=off \
|
||||
-D ENABLE_TESTING=off \
|
||||
-D MLIAP_ENABLE_ACE=on \
|
||||
-D MLIAP_ENABLE_PYTHON=off \
|
||||
-D PKG_AWPMD=on \
|
||||
-D PKG_GPU=on \
|
||||
-D GPU_API=opencl \
|
||||
-D PKG_KOKKOS=on \
|
||||
-D PKG_LATBOLTZ=on \
|
||||
-D PKG_MDI=on \
|
||||
-D PKG_MANIFOLD=on \
|
||||
-D PKG_ML-PACE=on \
|
||||
-D PKG_ML-RANN=off \
|
||||
-D PKG_MOLFILE=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
|
||||
@ -182,16 +182,17 @@ coulomb styles in :doc:`hybrid pair styles <pair_hybrid>`.
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
Style *coul/ctip* computes the Coulomb interations as described in
|
||||
Style *coul/ctip* computes the Coulomb interactions as described in
|
||||
:ref:`Plummer <Plummer1>`. It uses the the damped shifted model as in
|
||||
style *coul/dsf* but is further extended to the second derivative of
|
||||
the potential and incorporates empirical charge shielding meant to
|
||||
approximate the more expensive Coulomb integrals used in style *coul/streitz*.
|
||||
More details can be found in the referenced paper. Like the style *coul/streitz*,
|
||||
style *coul/ctip* is a variable charge potential and must be hybridized
|
||||
with a short-range potential via the :doc:`pair_style hybrid/overlay <pair_hybrid>`
|
||||
command. Charge equilibration must be performed with the :doc:`fix qeq/ctip
|
||||
<fix_qeq>` command. For example:
|
||||
style *coul/dsf* but is further extended to the second derivative of the
|
||||
potential and incorporates empirical charge shielding meant to
|
||||
approximate the more expensive Coulomb integrals used in style
|
||||
*coul/streitz*. More details can be found in the referenced paper. Like
|
||||
the style *coul/streitz*, style *coul/ctip* is a variable charge
|
||||
potential and must be hybridized with a short-range potential via the
|
||||
:doc:`pair_style hybrid/overlay <pair_hybrid>` command. Charge
|
||||
equilibration must be performed with the :doc:`fix qeq/ctip <fix_qeq>`
|
||||
command. For example:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -200,9 +201,9 @@ command. Charge equilibration must be performed with the :doc:`fix qeq/ctip
|
||||
pair_coeff * * coul/ctip NiO.ctip Ni O
|
||||
fix 1 all qeq/ctip 1 12.0 1.0e-8 100 coul/ctip cdamp 0.30 maxrepeat 10
|
||||
|
||||
See the examples/ctip directory for an example input script using the CTIP
|
||||
potential. An Ni-O CTIP and EAM/FS parametrization are included for use with
|
||||
the example.
|
||||
See the examples/ctip directory for an example input script using the
|
||||
CTIP potential. An Ni-O CTIP and EAM/FS parameterization are included
|
||||
for use with the example.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -639,6 +639,7 @@ cstyle
|
||||
csvr
|
||||
ctest
|
||||
ctilde
|
||||
ctip
|
||||
ctrl
|
||||
ctrn
|
||||
ctypes
|
||||
@ -3664,6 +3665,7 @@ Tanmoy
|
||||
Tartakovsky
|
||||
taskset
|
||||
taubi
|
||||
Tavenner
|
||||
taylor
|
||||
tb
|
||||
tchain
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
To run Baske's test, do
|
||||
To run this test, do
|
||||
|
||||
lmp -in in.msmeam
|
||||
|
||||
Then
|
||||
Then:
|
||||
|
||||
diff dump.msmeam dump.msmeam.bu
|
||||
|
||||
|
||||
@ -3,22 +3,22 @@ ITEM: TIMESTEP
|
||||
ITEM: NUMBER OF ATOMS
|
||||
3
|
||||
ITEM: BOX BOUNDS pp pp pp
|
||||
-4 4
|
||||
-4 4
|
||||
-4 4
|
||||
ITEM: ATOMS id x y z fx fy fz c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6]
|
||||
1 0 0 0 -131.925 -88.3005 0 22.9153 -2.147e+08 -1.62661e+08 -0 -2.05301e+07 -0 -0
|
||||
2 2.2 0 0 120.809 -0.482171 0 14.7692 -2.12028e+08 -0 -0 403352 -0 -0
|
||||
3 0.3 2.3 0 11.1159 88.7827 0 8.61478 -2.67145e+06 -1.62661e+08 -0 -2.09335e+07 -0 -0
|
||||
-4.0000000000000000e+00 4.0000000000000000e+00
|
||||
-4.0000000000000000e+00 4.0000000000000000e+00
|
||||
-4.0000000000000000e+00 4.0000000000000000e+00
|
||||
ITEM: ATOMS id x y z fx fy fz c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6]
|
||||
1 0 0 0 -131.977 -88.3322 0 22.9236 -2.14786e+08 -1.62719e+08 -0 -2.05378e+07 -0 -0
|
||||
2 2.2 0 0 120.857 -0.482171 0 14.7745 -2.12113e+08 -0 -0 403352 -0 -0
|
||||
3 0.3 2.3 0 11.1201 88.8144 0 8.61773 -2.67245e+06 -1.62719e+08 -0 -2.09411e+07 -0 -0
|
||||
ITEM: TIMESTEP
|
||||
1
|
||||
ITEM: NUMBER OF ATOMS
|
||||
3
|
||||
ITEM: BOX BOUNDS pp pp pp
|
||||
-4 4
|
||||
-4 4
|
||||
-4 4
|
||||
ITEM: ATOMS id x y z fx fy fz c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6]
|
||||
1 0 0 0 -131.925 -88.3005 0 22.9153 -2.147e+08 -1.62661e+08 -0 -2.05301e+07 -0 -0
|
||||
2 2.2 0 0 120.809 -0.482171 0 14.7692 -2.12028e+08 -0 -0 403352 -0 -0
|
||||
3 0.3 2.3 0 11.1159 88.7827 0 8.61478 -2.67145e+06 -1.62661e+08 -0 -2.09335e+07 -0 -0
|
||||
-4.0000000000000000e+00 4.0000000000000000e+00
|
||||
-4.0000000000000000e+00 4.0000000000000000e+00
|
||||
-4.0000000000000000e+00 4.0000000000000000e+00
|
||||
ITEM: ATOMS id x y z fx fy fz c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6]
|
||||
1 0 0 0 -131.977 -88.3322 0 22.9236 -2.14786e+08 -1.62719e+08 -0 -2.05378e+07 -0 -0
|
||||
2 2.2 0 0 120.857 -0.482171 0 14.7745 -2.12113e+08 -0 -0 403352 -0 -0
|
||||
3 0.3 2.3 0 11.1201 88.8144 0 8.61773 -2.67245e+06 -1.62719e+08 -0 -2.09411e+07 -0 -0
|
||||
|
||||
@ -314,8 +314,10 @@ std::string platform::os_info()
|
||||
|
||||
std::string platform::cxx_standard()
|
||||
{
|
||||
#if __cplusplus > 202002L
|
||||
return "newer than C++20";
|
||||
#if __cplusplus > 202302L
|
||||
return "newer than C++23";
|
||||
#elif __cplusplus == 202302L
|
||||
return "C++23";
|
||||
#elif __cplusplus == 202002L
|
||||
return "C++20";
|
||||
#elif __cplusplus == 201703L
|
||||
|
||||
Reference in New Issue
Block a user