Merge pull request #3881 from akohlmey/collected-small-changes
Collected small changes and fixes
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
# Find clang-format
|
||||
find_program(ClangFormat_EXECUTABLE NAMES clang-format
|
||||
clang-format-17.0
|
||||
clang-format-16.0
|
||||
clang-format-15.0
|
||||
clang-format-14.0
|
||||
clang-format-13.0
|
||||
@ -19,7 +21,7 @@ if(ClangFormat_EXECUTABLE)
|
||||
OUTPUT_VARIABLE clang_format_version
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(clang_format_version MATCHES "^(Ubuntu |)clang-format version .*")
|
||||
if(clang_format_version MATCHES "^(Ubuntu |Debian |)clang-format version .*")
|
||||
# Arch Linux output:
|
||||
# clang-format version 10.0.0
|
||||
#
|
||||
@ -32,9 +34,15 @@ if(ClangFormat_EXECUTABLE)
|
||||
# Ubuntu 22.04 LTS output:
|
||||
# Ubuntu clang-format version 14.0.0-1ubuntu1
|
||||
#
|
||||
# Debian 11 output:
|
||||
# Debian clang-format version 11.0.1-2
|
||||
#
|
||||
# Debian 12 output:
|
||||
# Debian clang-format version 14.0.6
|
||||
#
|
||||
# Fedora 36 output:
|
||||
# clang-format version 14.0.5 (Fedora 14.0.5-1.fc36)
|
||||
string(REGEX REPLACE "^(Ubuntu |)clang-format version ([0-9.]+).*"
|
||||
string(REGEX REPLACE "^(Ubuntu |Debian |)clang-format version ([0-9.]+).*"
|
||||
"\\2"
|
||||
ClangFormat_VERSION
|
||||
"${clang_format_version}")
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Using CMake with LAMMPS tutorial
|
||||
================================
|
||||
Using CMake with LAMMPS
|
||||
=======================
|
||||
|
||||
The support for building LAMMPS with CMake is a recent addition to
|
||||
LAMMPS thanks to the efforts of Christoph Junghans (LANL) and Richard
|
||||
Berger (LANL). One of the key strengths of CMake is that it is not
|
||||
tied to a specific platform or build system and thus it generates the
|
||||
tied to a specific platform or build system. Instead it generates the
|
||||
files necessary to build and develop for different build systems and on
|
||||
different platforms. Note, that this applies to the build system itself
|
||||
not the LAMMPS code. In other words, without additional porting effort,
|
||||
@ -32,7 +32,8 @@ program ``cmake`` (or ``cmake3``), a text mode interactive user
|
||||
interface (TUI) program ``ccmake`` (or ``ccmake3``), or a graphical user
|
||||
interface (GUI) program ``cmake-gui``. All of them are portable
|
||||
software available on all supported platforms and can be used
|
||||
interchangeably. The minimum required CMake version is 3.16.
|
||||
interchangeably. As of LAMMPS version 2 August 2023, the minimum
|
||||
required CMake version is 3.16.
|
||||
|
||||
All details about features and settings for CMake are in the `CMake
|
||||
online documentation <https://cmake.org/documentation/>`_. We focus
|
||||
|
||||
@ -18,7 +18,7 @@ package was developed primarily by Christian Trott (Sandia) and Stan
|
||||
Moore (Sandia) with contributions of various styles by others,
|
||||
including Sikandar Mashayak (UIUC), Ray Shan (Sandia), and Dan Ibanez
|
||||
(Sandia). For more information on developing using Kokkos abstractions
|
||||
see the Kokkos `Wiki <https://github.com/kokkos/kokkos/wiki>`_.
|
||||
see the `Kokkos Wiki <https://github.com/kokkos/kokkos/wiki>`_.
|
||||
|
||||
Kokkos currently provides support for 4 modes of execution (per MPI
|
||||
task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
|
||||
@ -32,8 +32,9 @@ produce an executable compatible with a specific hardware.
|
||||
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++17 support.
|
||||
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
|
||||
`Wiki <https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_.
|
||||
compilers that have been tested with the Kokkos library, see the
|
||||
`requirements document of the Kokkos Wiki
|
||||
<https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_.
|
||||
|
||||
.. admonition:: NVIDIA CUDA support
|
||||
:class: note
|
||||
|
||||
@ -301,9 +301,10 @@ __kernel void k_dpd_fast(const __global numtyp4 *restrict x_,
|
||||
__local numtyp4 coeff[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp sp_lj[4];
|
||||
__local numtyp sp_sqrt[4];
|
||||
if (tid<4)
|
||||
if (tid<4) {
|
||||
sp_lj[tid]=sp_lj_in[tid];
|
||||
sp_sqrt[tid]=sp_sqrt_in[tid];
|
||||
}
|
||||
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
|
||||
coeff[tid]=coeff_in[tid];
|
||||
}
|
||||
|
||||
@ -438,8 +438,8 @@ void ComputeGlobalAtom::compute_peratom()
|
||||
}
|
||||
}
|
||||
}
|
||||
++m;
|
||||
}
|
||||
++m;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -1384,7 +1384,7 @@ double *Image::color2rgb(const char *color, int index)
|
||||
{0/255.0, 0/255.0, 139/255.0},
|
||||
{0/255.0, 139/255.0, 139/255.0},
|
||||
{184/255.0, 134/255.0, 11/255.0},
|
||||
{169/255.0, 169/255.0, 169/255.0},
|
||||
{69/255.0, 69/255.0, 69/255.0},
|
||||
{0/255.0, 100/255.0, 0/255.0},
|
||||
{189/255.0, 183/255.0, 107/255.0},
|
||||
{139/255.0, 0/255.0, 139/255.0},
|
||||
|
||||
@ -41,8 +41,6 @@ set_tests_properties(TextFileReader PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${
|
||||
add_executable(test_file_operations test_file_operations.cpp)
|
||||
target_link_libraries(test_file_operations PRIVATE lammps GTest::GMock)
|
||||
add_test(NAME FileOperations COMMAND test_file_operations)
|
||||
# try to mitigate possible OpenMPI bug
|
||||
set_tests_properties(TextFileReader PROPERTIES ENVIRONMENT "OMPI_MCA_sharedfp=\"^sm\"")
|
||||
|
||||
add_executable(test_dump_atom test_dump_atom.cpp)
|
||||
target_link_libraries(test_dump_atom PRIVATE lammps GTest::GMock)
|
||||
|
||||
Reference in New Issue
Block a user