Skip to content

Commit

Permalink
Merge pull request lammps#4343 from akohlmey/collected-small-changes
Browse files Browse the repository at this point in the history
Collected small changes and fixes
  • Loading branch information
akohlmey authored Oct 4, 2024
2 parents 1263a23 + 01468e2 commit 2ae4062
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 30 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/check-cpp23.yml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 13 additions & 12 deletions doc/src/pair_coul.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

----------

Expand Down
2 changes: 2 additions & 0 deletions doc/utils/sphinx-config/false_positives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ cstyle
csvr
ctest
ctilde
ctip
ctrl
ctrn
ctypes
Expand Down Expand Up @@ -3664,6 +3665,7 @@ Tanmoy
Tartakovsky
taskset
taubi
Tavenner
taylor
tb
tchain
Expand Down
4 changes: 2 additions & 2 deletions examples/meam/msmeam/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
28 changes: 14 additions & 14 deletions examples/meam/msmeam/dump.msmeam.bu
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions src/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ae4062

Please sign in to comment.