From 95bc42242405e80ff43bfbc404fb6b26ad4d93c4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 4 Aug 2023 16:38:18 -0400 Subject: [PATCH 01/14] fix duplicate implicit reference --- doc/src/Speed_kokkos.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/Speed_kokkos.rst b/doc/src/Speed_kokkos.rst index c5682773b32..1cae518f96b 100644 --- a/doc/src/Speed_kokkos.rst +++ b/doc/src/Speed_kokkos.rst @@ -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 `_. +see the `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 `_. + compilers that have been tested with the Kokkos library, see the + `requirements document of the Kokkos Wiki + `_. .. admonition:: NVIDIA CUDA support :class: note From 2f6dbfd239335d654fa4b04d3444869518734902 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 4 Aug 2023 22:24:48 -0400 Subject: [PATCH 02/14] possible workaround for unit test failure taken from: https://github.com/open-mpi/ompi/issues/9656 --- unittest/formats/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unittest/formats/CMakeLists.txt b/unittest/formats/CMakeLists.txt index 5b5dd056c9e..9934c87ab1c 100644 --- a/unittest/formats/CMakeLists.txt +++ b/unittest/formats/CMakeLists.txt @@ -40,6 +40,8 @@ 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) From a56ac771323d0aaff17e2fef18d9ad9394a5b231 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 4 Aug 2023 22:52:37 -0400 Subject: [PATCH 03/14] indexing bugfix for compute global/atom --- src/compute_global_atom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compute_global_atom.cpp b/src/compute_global_atom.cpp index c2880763a3f..f968d0c0143 100644 --- a/src/compute_global_atom.cpp +++ b/src/compute_global_atom.cpp @@ -438,8 +438,8 @@ void ComputeGlobalAtom::compute_peratom() } } } + ++m; } - ++m; } /* ---------------------------------------------------------------------- From 5d1c75e660f05779249769b8af6a08b536aff87b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 5 Aug 2023 18:33:03 -0400 Subject: [PATCH 04/14] disable MPI-IO based restart writing (for now) --- unittest/formats/test_file_operations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/formats/test_file_operations.cpp b/unittest/formats/test_file_operations.cpp index f1a6ce42f54..7fd36b623c3 100644 --- a/unittest/formats/test_file_operations.cpp +++ b/unittest/formats/test_file_operations.cpp @@ -324,7 +324,7 @@ TEST_F(FileOperationsTest, write_restart) command("write_restart multi-%.restart"); command("write_restart multi2-%.restart fileper 2"); command("write_restart multi3-%.restart nfile 1"); - if (Info::has_package("MPIIO")) command("write_restart test.restart.mpiio"); + // if (Info::has_package("MPIIO")) command("write_restart test.restart.mpiio"); END_HIDE_OUTPUT(); ASSERT_FILE_EXISTS("noinit.restart"); From bddb19fda138b2221c23fe8ba17d1d6bc24f5c49 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 5 Aug 2023 20:48:03 -0400 Subject: [PATCH 05/14] disable *all* MPI-IO related testing --- unittest/formats/test_file_operations.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/unittest/formats/test_file_operations.cpp b/unittest/formats/test_file_operations.cpp index 7fd36b623c3..c2d2652b533 100644 --- a/unittest/formats/test_file_operations.cpp +++ b/unittest/formats/test_file_operations.cpp @@ -336,18 +336,19 @@ TEST_F(FileOperationsTest, write_restart) ASSERT_FILE_EXISTS("multi2-0.restart"); ASSERT_FILE_EXISTS("multi3-base.restart"); ASSERT_FILE_EXISTS("multi3-0.restart"); +#if 0 if (Info::has_package("MPIIO")) { ASSERT_FILE_EXISTS("test.restart.mpiio"); } if (!Info::has_package("MPIIO")) { - TEST_FAILURE(".*ERROR: Writing to MPI-IO filename when MPIIO package is not inst.*", - command("write_restart test.restart.mpiio");); + TEST_FAILURE(".*ERROR: Writing to MPI-IO filename when MPIIO package is not inst.*", + command("write_restart test.restart.mpiio");); } else { - TEST_FAILURE(".*ERROR: Restart file MPI-IO output not allowed with % in filename.*", + TEST_FAILURE(".*ERROR: Restart file MPI-IO output not allowed with % in filename.*", command("write_restart test.restart-%.mpiio");); } - +#endif TEST_FAILURE(".*ERROR: Illegal write_restart command.*", command("write_restart");); TEST_FAILURE(".*ERROR: Unknown write_restart keyword: xxxx.*", command("write_restart test.restart xxxx");); @@ -401,7 +402,7 @@ TEST_F(FileOperationsTest, write_restart) delete_file("multi3-base.restart"); delete_file("multi3-0.restart"); delete_file("triclinic.restart"); - if (Info::has_package("MPIIO")) delete_file("test.restart.mpiio"); + //if (Info::has_package("MPIIO")) delete_file("test.restart.mpiio"); } TEST_F(FileOperationsTest, write_data) From 2f415c8b62f86e8aecc76a874e0ee02664cbd630 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 9 Aug 2023 09:42:01 -0400 Subject: [PATCH 06/14] bugfix for pair style dpd/gpu from Trung --- lib/gpu/lal_dpd.cu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gpu/lal_dpd.cu b/lib/gpu/lal_dpd.cu index e9d32793780..c6fd4f0e460 100644 --- a/lib/gpu/lal_dpd.cu +++ b/lib/gpu/lal_dpd.cu @@ -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 Date: Sat, 12 Aug 2023 11:52:22 -0400 Subject: [PATCH 07/14] update fmtlib to version 10.1 --- src/fmt/core.h | 8 +++++--- src/fmt/format.h | 5 +++-- src/fmt/std.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/src/fmt/core.h b/src/fmt/core.h index 70a4af11a36..23c9171fc8a 100644 --- a/src/fmt/core.h +++ b/src/fmt/core.h @@ -13,11 +13,12 @@ #include // std::strlen #include #include +#include // std::addressof #include #include // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 100001 +#define FMT_VERSION 100100 #if defined(__clang__) && !defined(__ibmxl__) # define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) @@ -1290,9 +1291,9 @@ template class value { FMT_INLINE value(const named_arg_info* args, size_t size) : named_args{args, size} {} - template FMT_CONSTEXPR FMT_INLINE value(T& val) { + template FMT_CONSTEXPR20 FMT_INLINE value(T& val) { using value_type = remove_const_t; - custom.value = const_cast(&val); + custom.value = const_cast(std::addressof(val)); // Get the formatter type through the context to allow different contexts // have different extension points, e.g. `formatter` for `format` and // `printf_formatter` for `printf`. @@ -1669,6 +1670,7 @@ template class basic_format_arg { ``vis(value)`` will be called with the value of type ``double``. \endrst */ +// DEPRECATED! FMT_EXPORT template FMT_CONSTEXPR FMT_INLINE auto visit_format_arg( diff --git a/src/fmt/format.h b/src/fmt/format.h index dfd5d78abce..e5bd8b110ef 100644 --- a/src/fmt/format.h +++ b/src/fmt/format.h @@ -920,7 +920,7 @@ class basic_memory_buffer final : public detail::buffer { private: T store_[SIZE]; - // Don't inherit from Allocator avoid generating type_info for it. + // Don't inherit from Allocator to avoid generating type_info for it. FMT_NO_UNIQUE_ADDRESS Allocator alloc_; // Deallocate memory allocated by the buffer. @@ -3178,7 +3178,8 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp value, } if (buf[0] == overflow) { buf[0] = '1'; - ++exp10; + if ((flags & dragon::fixed) != 0) buf.push_back('0'); + else ++exp10; } return; } diff --git a/src/fmt/std.h b/src/fmt/std.h index a71a59db9a0..b0e78e10ddf 100644 --- a/src/fmt/std.h +++ b/src/fmt/std.h @@ -8,6 +8,7 @@ #ifndef FMT_STD_H_ #define FMT_STD_H_ +#include #include #include #include @@ -15,6 +16,7 @@ #include #include #include +#include #include "format.h" #include "ostream.h" @@ -389,6 +391,50 @@ struct formatter< #endif } }; + +namespace detail { + +template +struct has_flip : std::false_type {}; + +template +struct has_flip().flip())>> + : std::true_type {}; + +template struct is_bit_reference_like { + static constexpr const bool value = + std::is_convertible::value && + std::is_nothrow_assignable::value && has_flip::value; +}; + +#ifdef _LIBCPP_VERSION + +// Workaround for libc++ incompatibility with C++ standard. +// According to the Standard, `bitset::operator[] const` returns bool. +template +struct is_bit_reference_like> { + static constexpr const bool value = true; +}; + +#endif + +} // namespace detail + +// We can't use std::vector::reference and +// std::bitset::reference because the compiler can't deduce Allocator and N +// in partial specialization. +FMT_EXPORT +template +struct formatter::value>> + : formatter { + template + FMT_CONSTEXPR auto format(const BitRef& v, FormatContext& ctx) const + -> decltype(ctx.out()) { + return formatter::format(v, ctx); + } +}; + FMT_END_NAMESPACE #endif // FMT_STD_H_ From dd18de164a8329b6cd73f0c823e0b3941538330d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Aug 2023 12:41:44 -0400 Subject: [PATCH 08/14] avoid legacy compilation failures on recent ubuntu machines that only have python3-config --- lib/python/Makefile.lammps | 13 ++++++++++--- tools/singularity/ubuntu20.04.def | 1 + tools/singularity/ubuntu20.04_amd_rocm.def | 1 + tools/singularity/ubuntu20.04_gpu.def | 1 + tools/singularity/ubuntu20.04_intel_opencl.def | 1 + tools/singularity/ubuntu20.04_nvidia.def | 1 + tools/singularity/ubuntu20.04_oneapi.def | 1 + tools/singularity/ubuntu22.04.def | 1 + 8 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/python/Makefile.lammps b/lib/python/Makefile.lammps index e4afa704567..bfde590a395 100644 --- a/lib/python/Makefile.lammps +++ b/lib/python/Makefile.lammps @@ -1,7 +1,14 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation +ifeq ($(shell type python3 >/dev/null 2>&1; echo $$?), 0) +PYTHON=python3 +PYTHONCONFIG = python3-config +else +PYTHONCONFIG = python-config +PYTHON=python +endif + -python_SYSINC = $(shell which python-config > /dev/null 2>&1 && python-config --includes || :) -python_SYSLIB = $(shell which python-config > /dev/null 2>&1 && python-config --ldflags --embed > /dev/null 2>&1 && python-config --ldflags --embed || (which python-config > /dev/null 2>&1 && python-config --ldflags || :) ) +python_SYSINC = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --includes || :) +python_SYSLIB = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed || (which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags || :) ) python_SYSPATH = -PYTHON=python diff --git a/tools/singularity/ubuntu20.04.def b/tools/singularity/ubuntu20.04.def index d62b4c9f86a..91efd1b5fd9 100644 --- a/tools/singularity/ubuntu20.04.def +++ b/tools/singularity/ubuntu20.04.def @@ -54,6 +54,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ texlive \ diff --git a/tools/singularity/ubuntu20.04_amd_rocm.def b/tools/singularity/ubuntu20.04_amd_rocm.def index 6792322af00..28f35ef4062 100644 --- a/tools/singularity/ubuntu20.04_amd_rocm.def +++ b/tools/singularity/ubuntu20.04_amd_rocm.def @@ -83,6 +83,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_gpu.def b/tools/singularity/ubuntu20.04_gpu.def index b746f920866..0044970b045 100644 --- a/tools/singularity/ubuntu20.04_gpu.def +++ b/tools/singularity/ubuntu20.04_gpu.def @@ -88,6 +88,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_intel_opencl.def b/tools/singularity/ubuntu20.04_intel_opencl.def index c8680a16c70..42cc1ab6fa4 100644 --- a/tools/singularity/ubuntu20.04_intel_opencl.def +++ b/tools/singularity/ubuntu20.04_intel_opencl.def @@ -53,6 +53,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_nvidia.def b/tools/singularity/ubuntu20.04_nvidia.def index 3affc30b8b9..aacaeec7b5a 100644 --- a/tools/singularity/ubuntu20.04_nvidia.def +++ b/tools/singularity/ubuntu20.04_nvidia.def @@ -56,6 +56,7 @@ From: nvidia/cuda:11.6.2-devel-ubuntu20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_oneapi.def b/tools/singularity/ubuntu20.04_oneapi.def index 70d69c7d80c..36677ec867a 100644 --- a/tools/singularity/ubuntu20.04_oneapi.def +++ b/tools/singularity/ubuntu20.04_oneapi.def @@ -52,6 +52,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ texlive \ diff --git a/tools/singularity/ubuntu22.04.def b/tools/singularity/ubuntu22.04.def index ef433479825..e14d448ce89 100644 --- a/tools/singularity/ubuntu22.04.def +++ b/tools/singularity/ubuntu22.04.def @@ -54,6 +54,7 @@ From: ubuntu:22.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ texlive \ From 5115df7a382c9d51efb8efb4b282236db9105a18 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Aug 2023 12:41:44 -0400 Subject: [PATCH 09/14] avoid legacy compilation failures on recent ubuntu machines that only have python3-config --- lib/python/Makefile.lammps | 13 ++++++++++--- tools/singularity/ubuntu20.04.def | 1 + tools/singularity/ubuntu20.04_amd_rocm.def | 1 + tools/singularity/ubuntu20.04_gpu.def | 1 + tools/singularity/ubuntu20.04_intel_opencl.def | 1 + tools/singularity/ubuntu20.04_nvidia.def | 1 + tools/singularity/ubuntu20.04_oneapi.def | 1 + tools/singularity/ubuntu22.04.def | 1 + 8 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/python/Makefile.lammps b/lib/python/Makefile.lammps index e4afa704567..bfde590a395 100644 --- a/lib/python/Makefile.lammps +++ b/lib/python/Makefile.lammps @@ -1,7 +1,14 @@ # Settings that the LAMMPS build will import when this package library is used # See the README file for more explanation +ifeq ($(shell type python3 >/dev/null 2>&1; echo $$?), 0) +PYTHON=python3 +PYTHONCONFIG = python3-config +else +PYTHONCONFIG = python-config +PYTHON=python +endif + -python_SYSINC = $(shell which python-config > /dev/null 2>&1 && python-config --includes || :) -python_SYSLIB = $(shell which python-config > /dev/null 2>&1 && python-config --ldflags --embed > /dev/null 2>&1 && python-config --ldflags --embed || (which python-config > /dev/null 2>&1 && python-config --ldflags || :) ) +python_SYSINC = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --includes || :) +python_SYSLIB = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed || (which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags || :) ) python_SYSPATH = -PYTHON=python diff --git a/tools/singularity/ubuntu20.04.def b/tools/singularity/ubuntu20.04.def index d62b4c9f86a..91efd1b5fd9 100644 --- a/tools/singularity/ubuntu20.04.def +++ b/tools/singularity/ubuntu20.04.def @@ -54,6 +54,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ texlive \ diff --git a/tools/singularity/ubuntu20.04_amd_rocm.def b/tools/singularity/ubuntu20.04_amd_rocm.def index 6792322af00..28f35ef4062 100644 --- a/tools/singularity/ubuntu20.04_amd_rocm.def +++ b/tools/singularity/ubuntu20.04_amd_rocm.def @@ -83,6 +83,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_gpu.def b/tools/singularity/ubuntu20.04_gpu.def index b746f920866..0044970b045 100644 --- a/tools/singularity/ubuntu20.04_gpu.def +++ b/tools/singularity/ubuntu20.04_gpu.def @@ -88,6 +88,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_intel_opencl.def b/tools/singularity/ubuntu20.04_intel_opencl.def index c8680a16c70..42cc1ab6fa4 100644 --- a/tools/singularity/ubuntu20.04_intel_opencl.def +++ b/tools/singularity/ubuntu20.04_intel_opencl.def @@ -53,6 +53,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_nvidia.def b/tools/singularity/ubuntu20.04_nvidia.def index 3affc30b8b9..aacaeec7b5a 100644 --- a/tools/singularity/ubuntu20.04_nvidia.def +++ b/tools/singularity/ubuntu20.04_nvidia.def @@ -56,6 +56,7 @@ From: nvidia/cuda:11.6.2-devel-ubuntu20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ vim-nox \ diff --git a/tools/singularity/ubuntu20.04_oneapi.def b/tools/singularity/ubuntu20.04_oneapi.def index 70d69c7d80c..36677ec867a 100644 --- a/tools/singularity/ubuntu20.04_oneapi.def +++ b/tools/singularity/ubuntu20.04_oneapi.def @@ -52,6 +52,7 @@ From: ubuntu:20.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ texlive \ diff --git a/tools/singularity/ubuntu22.04.def b/tools/singularity/ubuntu22.04.def index ef433479825..e14d448ce89 100644 --- a/tools/singularity/ubuntu22.04.def +++ b/tools/singularity/ubuntu22.04.def @@ -54,6 +54,7 @@ From: ubuntu:22.04 python3-setuptools \ python3-virtualenv \ python3-venv \ + python-is-python3 \ rsync \ ssh \ texlive \ From 929ca8f0f1f52daf9bb82458f763e31cd30b8b3c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 12 Aug 2023 21:07:35 -0400 Subject: [PATCH 10/14] small clarification --- doc/src/Howto_cmake.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/Howto_cmake.rst b/doc/src/Howto_cmake.rst index 8f9bcc0a38b..42324cf2f10 100644 --- a/doc/src/Howto_cmake.rst +++ b/doc/src/Howto_cmake.rst @@ -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 `_. We focus From b53c564190b95ae130cdc470feced7f54f15f042 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Aug 2023 15:13:43 -0400 Subject: [PATCH 11/14] update clang-format detection for compatibility with Debian --- cmake/Modules/FindClangFormat.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/FindClangFormat.cmake b/cmake/Modules/FindClangFormat.cmake index 80c3b0d0aed..f3ad6269aab 100644 --- a/cmake/Modules/FindClangFormat.cmake +++ b/cmake/Modules/FindClangFormat.cmake @@ -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,12 @@ if(ClangFormat_EXECUTABLE) # Ubuntu 22.04 LTS output: # Ubuntu clang-format version 14.0.0-1ubuntu1 # + # Debian 12 output: + # Debian clang-format version 14.0.0 + # # 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}") From 2728f6763e40ed0797aeb261ec3a3461ad1b55c4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Aug 2023 18:47:27 -0400 Subject: [PATCH 12/14] updated output and cross-check --- cmake/Modules/FindClangFormat.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/FindClangFormat.cmake b/cmake/Modules/FindClangFormat.cmake index f3ad6269aab..3f0257f34f8 100644 --- a/cmake/Modules/FindClangFormat.cmake +++ b/cmake/Modules/FindClangFormat.cmake @@ -34,8 +34,11 @@ 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.0 + # Debian clang-format version 14.0.6 # # Fedora 36 output: # clang-format version 14.0.5 (Fedora 14.0.5-1.fc36) From 4e604c2ccd60798a9d33971f1733af38d79d8f8a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 14 Aug 2023 22:05:32 -0400 Subject: [PATCH 13/14] remove OpenMPI hack. We have disabled MPIIO testing altogether. --- unittest/formats/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/unittest/formats/CMakeLists.txt b/unittest/formats/CMakeLists.txt index 58c797b6e63..93ea2f3b327 100644 --- a/unittest/formats/CMakeLists.txt +++ b/unittest/formats/CMakeLists.txt @@ -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) From cd9a5f8d8ca492f773b4666fa623c21b6df5bd26 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 15 Aug 2023 06:09:34 -0400 Subject: [PATCH 14/14] make darkgray *really* dark gray, i.e. darker than gray --- src/image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image.cpp b/src/image.cpp index 582394706ca..0f31ae99273 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -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},