From b692da3b01ee680300e24bf32647fd34d1cc20cb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 00:57:30 -0400 Subject: [PATCH 01/24] include building tools in "most" preset --- cmake/presets/most.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/presets/most.cmake b/cmake/presets/most.cmake index b2c53bd41d..2f5b517526 100644 --- a/cmake/presets/most.cmake +++ b/cmake/presets/most.cmake @@ -13,3 +13,5 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL foreach(PKG ${ALL_PACKAGES}) set(PKG_${PKG} ON CACHE BOOL "" FORCE) endforeach() + +set(BUILD_TOOLS ON CACHE BOOL "" FORCE) From 2c282b693e60db6c0d4e2e915f2007feffe529bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 12:33:23 -0400 Subject: [PATCH 02/24] flag two more subroutines can trigger the variable tracking message and slow down compilation --- src/KSPACE/pppm_disp.cpp | 2 +- src/MANYBODY/pair_bop.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 0bb81f125e..5cfacd644d 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -1659,7 +1659,7 @@ int PPPMDisp::check_convergence(double** A,double** Q,double** A0, allocate memory that depends on # of K-vectors and order ------------------------------------------------------------------------- */ -void PPPMDisp::allocate() +void _noopt PPPMDisp::allocate() { int (*procneigh)[2] = comm->procneigh; diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index 2763c561d6..10ab1d7080 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -5017,7 +5017,7 @@ double PairBOP::PiBo(int itmp, int jtmp) /* ---------------------------------------------------------------------- */ -void PairBOP::read_table(char *filename) +void _noopt PairBOP::read_table(char *filename) { int i,j,k,n,m; int buf1,pass; From 5779731da34c844e5f77298782e0db374898ca08 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 13:04:38 -0400 Subject: [PATCH 03/24] provide cmbuild wrapper script for cmake. document it and add some improvements to CMake build docs --- doc/src/Build_cmake.rst | 34 +++++++++------- doc/src/Tools.rst | 90 ++++++++++++++++++++++++++++++++--------- tools/README | 45 +++++++++++---------- tools/cmake/cmbuild | 69 +++++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+), 55 deletions(-) create mode 100755 tools/cmake/cmbuild diff --git a/doc/src/Build_cmake.rst b/doc/src/Build_cmake.rst index c41136c0a5..206fd05253 100644 --- a/doc/src/Build_cmake.rst +++ b/doc/src/Build_cmake.rst @@ -22,27 +22,31 @@ Makefile(s). Example: cd lammps # change to the LAMMPS distribution directory mkdir build; cd build # create a new directory (folder) for build cmake [options ...] ../cmake # configuration with (command-line) cmake - make # compilation + make # compilation (or use "cmbuild" from "tools/cmake") -The cmake command will detect available features, enable selected +The ``cmake`` command will detect available features, enable selected packages and options, and will generate the build environment. By default this build environment will be created for "Unix Makefiles" on most platforms and particularly on Linux. However, alternate build tools (e.g. Ninja) and project files for Integrated Development Environments (IDEs) like Eclipse, CodeBlocks, or Kate can be generated, too. This is -selected via the "-G" command line flag. For the rest of the documentation +selected via the ``-G`` command line flag. For the rest of the documentation we will assume that the build environment is generated for makefiles -and thus the make command will be used to compile and link LAMMPS as -indicated above, producing (by default) an executable called "lmp" and -a library called "liblammps.a" in the "build" folder. When generating +and thus the ``make`` command will be used to compile and link LAMMPS as +indicated above, producing (by default) an executable called ``lmp`` and +a library called ``liblammps.a`` in the ``build`` folder. When generating a build environment for the "Ninja" build tool, the build command would -be "ninja" instead of "make". +be ``ninja`` instead of ``make``. Or you may copy the ``cmbuild`` script +from the :ref:`tools/cmake folder ` somewhere in your path and use that, +as it will indirectly call CMake with the configured tool. This is +particularly, if you configured the build folder with a build tool +in a non-standard location or name using ``-D CMAKE_MAKE_PROGRAM=``. If your machine has multiple CPU cores (most do these days), using a -command like "make -jN" (with N being the number of available local +command like ``make -j N`` (with N being the number of available local CPU cores) can be much faster. If you plan to do development on LAMMPS or need to re-compile LAMMPS repeatedly, installation of the -ccache (= Compiler Cache) software may speed up repeated compilation +``ccache`` (= Compiler Cache) software may speed up repeated compilation even more. After compilation, you may optionally install the LAMMPS executable into @@ -60,9 +64,11 @@ to ${HOME}/.local ---------- +.. _cmake_build: + There are 3 variants of the CMake command itself: a command-line version -(*cmake* or *cmake3*), a text mode UI version (*ccmake* or *ccmake3*), -and a graphical GUI version (*cmake-gui*). You can use any of them +(``cmake`` or ``cmake3``), a text mode UI version (``ccmake`` or ``ccmake3``), +and a graphical GUI version (``cmake-gui``). You can use any of them interchangeably to configure and create the LAMMPS build environment. On Linux all the versions produce a Makefile as their output by default. See more details on each below. @@ -75,7 +81,7 @@ the :doc:`Build ` doc page. You must perform the CMake build system generation and compilation in a new directory you create. It can be anywhere on your local machine. In these Build pages we assume that you are building in a directory -called "lammps/build". You can perform separate builds independently +called ``lammps/build``. You can perform separate builds independently with different options, so long as you perform each of them in a separate directory you create. All the auxiliary files created by one build process (executable, object files, log files, etc) are stored in @@ -84,10 +90,10 @@ this directory or sub-directories within it that CMake creates. .. note:: To perform a CMake build, no packages can be installed or a build - been previously attempted in the LAMMPS src directory by using "make" + been previously attempted in the LAMMPS src directory by using ``make`` commands to :doc:`perform a conventional LAMMPS build `. CMake detects if this is the case and generates an error, telling you - to type "make no-all purge" in the src directory to un-install all + to type ``make no-all purge`` in the src directory to un-install all packages. The purge removes all the \*.h files auto-generated by make. diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 6137b1aa6f..080b87b310 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -40,33 +40,61 @@ own sub-directories with their own Makefiles and/or README files. Pre-processing tools ==================== -+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+ -| :ref:`amber2lmp ` | :ref:`ch2lmp ` | :ref:`chain ` | :ref:`createatoms ` | :ref:`drude ` | :ref:`eam database ` | -+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+ -| :ref:`eam generate ` | :ref:`eff ` | :ref:`ipp ` | :ref:`micelle2d ` | :ref:`moltemplate ` | :ref:`msi2lmp ` | -+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+ -| :ref:`polybond ` | | | | | | -+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+ +.. table_from_list:: + :columns: 6 + + * :ref:`amber2lmp ` + * :ref:`ch2lmp ` + * :ref:`chain ` + * :ref:`createatoms ` + * :ref:`drude ` + * :ref:`eam database ` + * :ref:`eam generate ` + * :ref:`eff ` + * :ref:`ipp ` + * :ref:`micelle2d ` + * :ref:`moltemplate ` + * :ref:`msi2lmp ` + * :ref:`polybond ` + Post-processing tools ===================== -+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+ -| :ref:`amber2lmp ` | :ref:`binary2txt ` | :ref:`ch2lmp ` | :ref:`colvars ` | :ref:`eff ` | :ref:`fep ` | -+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+ -| :ref:`lmp2arc ` | :ref:`lmp2cfg ` | :ref:`matlab ` | :ref:`phonon ` | :ref:`pymol_asphere ` | :ref:`python ` | -+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+ -| :ref:`reax ` | :ref:`replica ` | :ref:`smd ` | :ref:`spin ` | :ref:`xmgrace ` | | -+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+ +.. table_from_list:: + :columns: 6 + + * :ref:`amber2lmp ` + * :ref:`binary2txt ` + * :ref:`ch2lmp ` + * :ref:`colvars ` + * :ref:`eff ` + * :ref:`fep ` + * :ref:`lmp2arc ` + * :ref:`lmp2cfg ` + * :ref:`matlab ` + * :ref:`phonon ` + * :ref:`pymol_asphere ` + * :ref:`python ` + * :ref:`reax ` + * :ref:`replica ` + * :ref:`smd ` + * :ref:`spin ` + * :ref:`xmgrace ` Miscellaneous tools =================== -+--------------------------+----------------------+-------------------+--------------------+---------------------------------------+ -| :ref:`doxygen ` | :ref:`emacs ` | :ref:`i-pi ` | :ref:`kate ` | :ref:`singularity ` | -+--------------------------+----------------------+-------------------+--------------------+---------------------------------------+ -| :ref:`vim ` | | | | | -+--------------------------+----------------------+-------------------+--------------------+---------------------------------------+ +.. table_from_list:: + :columns: 6 + + * :ref:`CMake ` + * :ref:`doxygen ` + * :ref:`emacs ` + * :ref:`i-pi ` + * :ref:`kate ` + * :ref:`singularity ` + * :ref:`vim ` ---------- @@ -157,6 +185,30 @@ See the def.chain or def.chain.ab files in the tools directory for examples of definition files. This tool was used to create the system for the :doc:`chain benchmark `. +---------- + +.. _cmake: + +CMake tools +----------- + +The ``cmbuild`` script is a wrapper around using ``cmake --build +--target`` and allows compiling LAMMPS in a :ref:`CMake build folder +` with a make-like syntax regardless of the actual build +tool and the specific name of the program used (e.g. ``ninja-v1.10`` or +``gmake``) when using ``-D CMAKE_MAKE_PROGRAM=``. + +.. parsed-literal:: + + Usage: cmbuild [-v] [-h] [-C ] [-j ] [ [] ...] + + Options: + -h print this message + -j allow processing of NUM concurrent tasks + -C DIRECTORY execute build in folder DIRECTORY + -v produce verbose output + + ---------- .. _colvars: diff --git a/tools/README b/tools/README index b20e82c53e..2a6f28caf0 100644 --- a/tools/README +++ b/tools/README @@ -12,36 +12,37 @@ at. These are the included tools: -amber2lmp python scripts for using AMBER to setup LAMMPS input -binary2txt convert a LAMMPS dump file from binary to ASCII text -ch2lmp convert CHARMM files to LAMMPS input -chain create a data file of bead-spring chains -colvars post-process output of the fix colvars command -createatoms generate lattices of atoms within a geometry +amber2lmp python scripts for using AMBER to setup LAMMPS input +binary2txt convert a LAMMPS dump file from binary to ASCII text +ch2lmp convert CHARMM files to LAMMPS input +chain create a data file of bead-spring chains +cmake tools and scripts for use with CMake +colvars post-process output of the fix colvars command +createatoms generate lattices of atoms within a geometry drude create Drude core/electron atom pairs in a data file -eam_database one tool to generate EAM alloy potential files -eam_generate 2nd tool to generate EAM alloy potential files -eff scripts for working with the eFF (electron force field) -emacs add-ons to EMACS editor for editing LAMMPS input scripts -fep scripts for free-energy perturbation with USER-FEP pkg +eam_database one tool to generate EAM alloy potential files +eam_generate 2nd tool to generate EAM alloy potential files +eff scripts for working with the eFF (electron force field) +emacs add-ons to EMACS editor for editing LAMMPS input scripts +fep scripts for free-energy perturbation with USER-FEP pkg i-pi Python wrapper for performing path-integral MD (PIMD) -ipp input pre-processor Perl tool for creating input scripts +ipp input pre-processor Perl tool for creating input scripts kate add-ons to Kate editor for editing LAMMPS input scripts -lmp2arc convert LAMMPS output to Accelrys Insight format -lmp2cfg convert LAMMPS output to CFG files for AtomEye viz -matlab MatLab scripts for post-processing LAMMPS output -micelle2d create a data file of small lipid chains in solvent +lmp2arc convert LAMMPS output to Accelrys Insight format +lmp2cfg convert LAMMPS output to CFG files for AtomEye viz +matlab MatLab scripts for post-processing LAMMPS output +micelle2d create a data file of small lipid chains in solvent moltemplate Instructions for installing the Moltemplate builder program -msi2lmp use Accelrys Insight code to setup LAMMPS input +msi2lmp use Accelrys Insight code to setup LAMMPS input phonon post-process output of the fix phonon command polybond Python tool for programmable polymer bonding -pymol_asphere convert LAMMPS output of ellipsoids to PyMol format -python Python scripts for post-processing LAMMPS output -reax Tools for analyzing output of ReaxFF simulations -replica tool to reorder LAMMPS replica trajectories according to temperature +pymol_asphere convert LAMMPS output of ellipsoids to PyMol format +python Python scripts for post-processing LAMMPS output +reax Tools for analyzing output of ReaxFF simulations +replica tool to reorder LAMMPS replica trajectories according to temperature smd convert Smooth Mach Dynamics triangles to VTK spin perform a cubic polynomial interpolation of a GNEB MEP -vim add-ons to VIM editor for editing LAMMPS input scripts +vim add-ons to VIM editor for editing LAMMPS input scripts xmgrace a collection of scripts to generate xmgrace plots For tools that are single C, C++, or Fortran files, a Makefile for diff --git a/tools/cmake/cmbuild b/tools/cmake/cmbuild new file mode 100755 index 0000000000..f9c5223048 --- /dev/null +++ b/tools/cmake/cmbuild @@ -0,0 +1,69 @@ +#!/bin/bash +# make like wrapper around "cmake --build" +# (c) 2020 Axel Kohlmeyer +# This file is in the public domain + +WORKDIR="${PWD}" +PARAMS="" +MYARGS="" + +usage() +{ + echo "Usage: cmbuild [-v] [-h] [-C ] [-j ] [ [] ...]" >&2 +} + +help() +{ + usage + cat >&2 < allow processing of NUM concurrent tasks + -C DIRECTORY execute build in folder DIRECTORY + -v produce verbose output +EOF +} + +while (( "$#" )); do + case "$1" in + -C) + WORKDIR="$2" + shift 2 + ;; + -v) + MYARGS="${MYARGS} -v" + shift + ;; + -h) + help + exit 2 + ;; + -j) + MYARGS="${MYARGS} -j $2" + shift 2 + ;; + --) + shift + break + ;; + -*) + echo "Error: Unsupported flag $1" >&2 + echo + usage + exit 1 + ;; + *) + PARAMS="${PARAMS} $1" + shift + ;; + esac +done + +if [ ! -f "${WORKDIR}/CMakeCache.txt" ] ; then + echo "Must execute in a CMake build directory or use -C flag to select one" >&2 + exit 3 +fi + +eval set -- "${PARAMS} $@" +exec cmake --build "${WORKDIR}" ${MYARGS} --target "$@" From f893f4f8c7ebb27595d3309dedbf528799fdfce8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 14:48:20 -0400 Subject: [PATCH 04/24] set host specific optimizations in CMAKE_TUNE_FLAGS, so they can be conveniently overridden --- cmake/CMakeLists.txt | 32 +++++++++++-------------- cmake/Modules/Packages/USER-INTEL.cmake | 5 ---- doc/src/Build_basics.rst | 7 ++++++ 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 9b3992da84..18c6068a13 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -53,11 +53,18 @@ include(CheckIncludeFileCXX) if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict") + if (NOT CMAKE_TUNE_FLAGS) + if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4) + set(CMAKE_TUNE_FLAGS "-xCOMMON-AVX512") + else() + set(CMAKE_TUNE_FLAGS "-xHost") + endif() + endif() endif() if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - if(NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -ftree-vectorize -fexpensive-optimizations") + if(NOT CMAKE_TUNE_FLAGS) + set (CMAKE_TUNE_FLAGS "-ffast-math -march=native") endif() endif() @@ -70,22 +77,7 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") option(ENABLE_COVERAGE "Enable code coverage" OFF) mark_as_advanced(ENABLE_COVERAGE) if(ENABLE_COVERAGE) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") - endif() - option(ENABLE_SANITIZE_ADDRESS "Enable address sanitizer" OFF) - mark_as_advanced(ENABLE_SANITIZE_ADDRESS) - if(ENABLE_SANITIZE_ADDRESS) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") - endif() - option(ENABLE_SANITIZE_UNDEFINED "Enable undefined behavior sanitizer" OFF) - mark_as_advanced(ENABLE_SANITIZE_UNDEFINED) - if(ENABLE_SANITIZE_UNDEFINED) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") - endif() - option(ENABLE_SANITIZE_THREAD "Enable thread sanitizer" OFF) - mark_as_advanced(ENABLE_SANITIZE_THREAD) - if(ENABLE_SANITIZE_THREAD) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread") + set (CMAKE_TUNE_FLAGS "--coverage") endif() endif() @@ -347,6 +339,10 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") list(APPEND LAMMPS_LINK_LIBS -lwsock32 -lpsapi) endif() +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_TUNE_FLAGS}") +if(CMAKE_Fortran_FLAGS) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${CMAKE_TUNE_FLAGS}") +endif() ######################################################################## # Basic system tests (standard libraries, headers, functions, types) # ######################################################################## diff --git a/cmake/Modules/Packages/USER-INTEL.cmake b/cmake/Modules/Packages/USER-INTEL.cmake index 3c0cc7ba24..d0941a0a12 100644 --- a/cmake/Modules/Packages/USER-INTEL.cmake +++ b/cmake/Modules/Packages/USER-INTEL.cmake @@ -74,11 +74,6 @@ if(PKG_USER-INTEL) add_definitions(-DLMP_INTEL_OFFLOAD) else() if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost") - endif() include(CheckCXXCompilerFlag) foreach(_FLAG -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -qopt-zmm-usage=high -qno-offload -fno-alias -ansi-alias -restrict) check_cxx_compiler_flag("${__FLAG}" COMPILER_SUPPORTS${_FLAG}) diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index 51c3fd871d..7349b3a7ea 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -213,6 +213,13 @@ A few example command lines are: For compiling with the Clang/LLVM compilers a special CMake preset is included that can be loaded with `-C ../cmake/presets/clang.cmake`. +In addition you can set ``CMAKE_TUNE_FLAGS`` to specifically add compiler +flags to tune for optimal performance on given hosts. By default these are +initialized to some compiler specific flags, where known, to optimize the +LAMMPS executable with optimizations and instructions available on the host +where LAMMPS is compiled. For example, for Intel compilers this would be +``-xHost`` and for GNU compilers this would be ``-march=native``. + .. note:: When the cmake command completes, it prints a summary to the screen From 6f6855e831b92d27e9ecf4f64952516a676ec832 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 15:57:33 -0400 Subject: [PATCH 05/24] do not advertise multiple targets in cmbuild wrapper --- doc/src/Tools.rst | 2 +- tools/cmake/cmbuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 080b87b310..8feb2afefa 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -200,7 +200,7 @@ tool and the specific name of the program used (e.g. ``ninja-v1.10`` or .. parsed-literal:: - Usage: cmbuild [-v] [-h] [-C ] [-j ] [ [] ...] + Usage: cmbuild [-v] [-h] [-C ] [-j ] [] Options: -h print this message diff --git a/tools/cmake/cmbuild b/tools/cmake/cmbuild index f9c5223048..f9e0f87390 100755 --- a/tools/cmake/cmbuild +++ b/tools/cmake/cmbuild @@ -9,7 +9,7 @@ MYARGS="" usage() { - echo "Usage: cmbuild [-v] [-h] [-C ] [-j ] [ [] ...]" >&2 + echo "Usage: cmbuild [-v] [-h] [-C ] [-j ] []" >&2 } help() From a7d2847140835283503d3bd75fe56488dc16c8b3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 16:43:34 -0400 Subject: [PATCH 06/24] parse image flags only for valid numbers and requize imz == 0 for 2d-systems --- src/atom.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/atom.cpp b/src/atom.cpp index 1396eb596c..26fb6cc304 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -973,12 +973,19 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset, error->all(FLERR,"Incorrect atom format in data file"); } - if (imageflag) - imagedata = ((imageint) (atoi(values[iptr]) + IMGMAX) & IMGMASK) | - (((imageint) (atoi(values[iptr+1]) + IMGMAX) & IMGMASK) << IMGBITS) | - (((imageint) (atoi(values[iptr+2]) + IMGMAX) & IMGMASK) << IMG2BITS); - else imagedata = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; + int imx = 0; + int imy = 0; + int imz = 0; + if (imageflag) { + imx = utils::inumeric(FLERR,values[iptr],true,lmp); + imy = utils::inumeric(FLERR,values[iptr+1],true,lmp); + imz = utils::inumeric(FLERR,values[iptr+2],true,lmp); + if ((domain->dimension == 2) && (imz != 0)) + error->one(FLERR,"Z-direction image flag must be 0 for 2d-systems"); + } + imagedata = ((imageint) (imx + IMGMAX) & IMGMASK) | + (((imageint) (imy + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (imz + IMGMAX) & IMGMASK) << IMG2BITS); xdata[0] = atof(values[xptr]); xdata[1] = atof(values[xptr+1]); From dae2bce6b0e1a44bf6febf27258b09fac7bb1d99 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 16:53:22 -0400 Subject: [PATCH 07/24] we can use error->all() and also check the coordinate conversion for valid data --- src/atom.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/atom.cpp b/src/atom.cpp index 26fb6cc304..f2ee14291a 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -977,19 +977,19 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset, int imy = 0; int imz = 0; if (imageflag) { - imx = utils::inumeric(FLERR,values[iptr],true,lmp); - imy = utils::inumeric(FLERR,values[iptr+1],true,lmp); - imz = utils::inumeric(FLERR,values[iptr+2],true,lmp); + imx = utils::inumeric(FLERR,values[iptr],false,lmp); + imy = utils::inumeric(FLERR,values[iptr+1],false,lmp); + imz = utils::inumeric(FLERR,values[iptr+2],false,lmp); if ((domain->dimension == 2) && (imz != 0)) - error->one(FLERR,"Z-direction image flag must be 0 for 2d-systems"); + error->all(FLERR,"Z-direction image flag must be 0 for 2d-systems"); } imagedata = ((imageint) (imx + IMGMAX) & IMGMASK) | (((imageint) (imy + IMGMAX) & IMGMASK) << IMGBITS) | (((imageint) (imz + IMGMAX) & IMGMASK) << IMG2BITS); - xdata[0] = atof(values[xptr]); - xdata[1] = atof(values[xptr+1]); - xdata[2] = atof(values[xptr+2]); + xdata[0] = utils::numeric(FLERR,values[xptr],false,lmp); + xdata[1] = utils::numeric(FLERR,values[xptr+1],false,lmp); + xdata[2] = utils::numeric(FLERR,values[xptr+2],false,lmp); if (shiftflag) { xdata[0] += shift[0]; xdata[1] += shift[1]; From 66f730b8958cf9193ac956a340118e4ecf551c48 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 18:53:10 -0400 Subject: [PATCH 08/24] setting const on return value has no effect --- src/USER-MEAMC/meam.h | 2 +- src/USER-MEAMC/meam_setup_done.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 719e1af6f0..b4f8fd341b 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -214,7 +214,7 @@ protected: void alloyparams(); void compute_pair_meam(); double phi_meam(double, int, int); - const double phi_meam_series(const double scrn, const int Z1, const int Z2, const int a, const int b, const double r, const double arat); + double phi_meam_series(const double scrn, const int Z1, const int Z2, const int a, const int b, const double r, const double arat); void compute_reference_density(); void get_tavref(double*, double*, double*, double*, double*, double*, double, double, double, double, double, double, double, int, int, lattice_t); diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 8dfebe8ed5..acc1036c97 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -519,7 +519,7 @@ MEAM::phi_meam(double r, int a, int b) // To avoid nan values of phir due to rapid decrease of b2nn^n or/and // argument of phi_meam, i.e. r*arat^n, in some cases (3NN dia with low Cmin value) // -const double +double MEAM::phi_meam_series(const double scrn, const int Z1, const int Z2, const int a, const int b, const double r, const double arat) { double phi_sum = 0.0; From 1d8e9ca0141985bd1ec5ff507844e83d77f79de8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 18:53:28 -0400 Subject: [PATCH 09/24] include gcc sanitizer libraries --- tools/singularity/centos8.def | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/singularity/centos8.def b/tools/singularity/centos8.def index b48979cab1..e0a14c4156 100644 --- a/tools/singularity/centos8.def +++ b/tools/singularity/centos8.def @@ -2,12 +2,12 @@ BootStrap: docker From: centos:8 %post - dnf -y install epel-release dnf-utils + dnf -y install epel-release dnf-utils dnf config-manager --set-enabled PowerTools dnf -y update - dnf -y install vim-enhanced ccache gcc-c++ gcc-gfortran clang gdb make cmake patch which file git libpng-devel libjpeg-devel openmpi-devel mpich-devel fftw-devel voro++-devel gsl-devel enchant platform-python-devel python3-virtualenv valgrind openblas ninja-build eigen3-devel + dnf -y install vim-enhanced ccache gcc-c++ gcc-gfortran clang gdb make cmake patch which file git libpng-devel libjpeg-devel openmpi-devel mpich-devel fftw-devel voro++-devel gsl-devel enchant platform-python-devel python3-virtualenv valgrind openblas ninja-build eigen3-devel libubsan libasan libtsan #No match for argument: valgrind-openmpi %labels - Author akohlmey + Author akohlmey From c1268bd1ec6ab721510bb652cd333b0dd369096b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 18:55:05 -0400 Subject: [PATCH 10/24] remove dead code --- src/USER-MEAMC/meam_setup_done.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index acc1036c97..1cefc7e758 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -163,11 +163,10 @@ MEAM::alloyparams(void) void MEAM::compute_pair_meam(void) { - - double r, b2nn, phi_val; + double r; int j, a, b, nv2; double astar, frac, phizbl; - int n, Z1, Z2; + int Z1, Z2; double arat, rarat, scrn, scrn2; double phiaa, phibb /*unused:,phitmp*/; double C, s111, s112, s221, S11, S22; @@ -320,7 +319,7 @@ MEAM::phi_meam(double r, int a, int b) double Eu; double arat, scrn, scrn2; int Z12, errorflag; - int n, Z1nn, Z2nn; + int Z1nn, Z2nn; lattice_t latta /*unused:,lattb*/; double rho_bkgd1, rho_bkgd2; double b11s, b22s; From 4a5125f4501cd1880f9b5386b43da7102bc16c86 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 19:16:02 -0400 Subject: [PATCH 11/24] make behavior of CMAKE_TUNE_FLAGS more consistent and allow to turn it off --- cmake/CMakeLists.txt | 28 +++++++++++++++------------- doc/src/Build_basics.rst | 3 ++- doc/src/Build_development.rst | 35 ++++++++++++++++++++++++----------- 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 18c6068a13..62829c44b6 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -51,33 +51,34 @@ check_for_autogen_files(${LAMMPS_SOURCE_DIR}) include(CheckCCompilerFlag) include(CheckIncludeFileCXX) +# set required compiler flags and compiler/CPU arch specific optimizations if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict") - if (NOT CMAKE_TUNE_FLAGS) - if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4) - set(CMAKE_TUNE_FLAGS "-xCOMMON-AVX512") - else() - set(CMAKE_TUNE_FLAGS "-xHost") - endif() + 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") endif() endif() if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - if(NOT CMAKE_TUNE_FLAGS) - set (CMAKE_TUNE_FLAGS "-ffast-math -march=native") - endif() + set(CMAKE_TUNE_DEFAULT "-ffast-math -march=native") +endif() + +if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + set(CMAKE_TUNE_DEFAULT "-ffast-math -march=native") endif() # we require C++11 set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -# GNU compiler features +# GNU compiler specific features for testing if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - option(ENABLE_COVERAGE "Enable code coverage" OFF) + option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF) mark_as_advanced(ENABLE_COVERAGE) if(ENABLE_COVERAGE) - set (CMAKE_TUNE_FLAGS "--coverage") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") endif() endif() @@ -339,6 +340,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") list(APPEND LAMMPS_LINK_LIBS -lwsock32 -lpsapi) endif() +set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler specific optimization or instrumentation") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_TUNE_FLAGS}") if(CMAKE_Fortran_FLAGS) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${CMAKE_TUNE_FLAGS}") diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index 7349b3a7ea..8ad48b0810 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -218,7 +218,8 @@ flags to tune for optimal performance on given hosts. By default these are initialized to some compiler specific flags, where known, to optimize the LAMMPS executable with optimizations and instructions available on the host where LAMMPS is compiled. For example, for Intel compilers this would be -``-xHost`` and for GNU compilers this would be ``-march=native``. +``-xHost`` and for GNU compilers this would be ``-march=native``. To turn +these flags off, set ``-D CMAKE_TUNE_FLAGS=``. .. note:: diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index 722f436063..598153e3f0 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -2,7 +2,7 @@ Development build options (CMake only) ====================================== The CMake build of LAMMPS has a few extra options which are useful during -development, testing or debugging. +development, testing or debugging. ---------- @@ -25,6 +25,12 @@ Another way of doing this without reconfiguration is calling make with variable make VERBOSE=1 +Or when using the :ref:`"cmbuild" wrapper script `: + +.. code-block:: bash + + cmbuild -v + ---------- .. _sanitizer: @@ -32,20 +38,27 @@ Another way of doing this without reconfiguration is calling make with variable Address, Undefined Behavior, and Thread Sanitizer Support ------------------------------------------------------------------------- -Compilers such as GCC and Clang support generating binaries which use different -sanitizers to detect problems in code during run-time. They can detect `memory leaks `_, -code that runs into `undefined behavior `_ of the -language and `data races `_ in threaded code. +Compilers such as GCC and Clang support generating instrumented binaries +which use different sanitizer libraries to detect problems in code +during run-time. They can detect issues like: -The following settings allow you enable these features if your compiler supports -it. Please note that they come with a performance hit. However, they are -usually faster than using tools like Valgrind. + - `memory leaks `_ + - `undefined behavior `_ + - `data races `_ + +Please note that this kind of instrumentation usually comes with a small +performance hit (much less than using tools like `Valgrind `_). +The to enable these features additional compiler flags need to be added +to the compilation and linking stages. This is most easily done through +setting the ``CMAKE_TUNE_FLAGS`` variable during configuration. Examples: .. code-block:: bash - -D ENABLE_SANITIZE_ADDRESS=value # enable Address Sanitizer, value = no (default) or yes - -D ENABLE_SANITIZE_UNDEFINED=value # enable Undefined Behaviour Sanitizer, value = no (default) or yes - -D ENABLE_SANITIZE_THREAD=value # enable Thread Sanitizer, value = no (default) or yes + -D CMAKE_TUNE_FLAGS=-fsanitize=address # enable address sanitizer / memory leak checker + -D CMAKE_TUNE_FLAGS=-fsanitize=undefined # enable undefined behaviour sanitizer + -D CMAKE_TUNE_FLAGS=-fsanitize=thread # enable thread sanitizer + +.. _valgrind: https://valgrind.org ---------- From da0acd27902d4631529cf2b610beba9696433e19 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 19:28:30 -0400 Subject: [PATCH 12/24] update spelling false positives --- doc/utils/sphinx-config/false_positives.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 264c3fab50..31fa0a5edf 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -2553,8 +2553,7 @@ Salles sandia Sandia sandybrown -Sanitizer -sanitizers +sanitizer Sanyal sc scafacos From c28b9f100cac531fccaae435bc90c6d3ca67c583 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 18 Mar 2020 15:38:29 -0400 Subject: [PATCH 13/24] remove unused and broken function --- src/utils.cpp | 23 ----------------------- src/utils.h | 19 ------------------- 2 files changed, 42 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index f6556a3ac8..5e0db6afb9 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -84,29 +84,6 @@ bool utils::strmatch(std::string text, std::string pattern) return (pos >= 0); } -/* utility function to avoid code repetition when parsing args */ -int utils::cfvarg(std::string mode, const char *arg, char *&cfv_id) -{ - int rv = utils::NONE; - cfv_id = NULL; - - if (!arg) return rv; - - if (utils::strmatch(arg,std::string("^[") + mode + "]_")) { - if (*arg == 'c') rv = utils::COMPUTE; - else if (*arg == 'f') rv = utils::FIX; - else if (*arg == 'v') rv = utils::VARIABLE; - else return rv; // should not happen - - arg += 2; - int n = strlen(arg)+1; - cfv_id = new char[n]; - strcpy(cfv_id,arg); - } - - return rv; -} - /** \brief try to detect pathname from FILE pointer. Currently only supported on Linux, otherwise will report "(unknown)". * * \param buf storage buffer for pathname. output will be truncated if not large enough diff --git a/src/utils.h b/src/utils.h index e87aa4bb91..45fb95aaac 100644 --- a/src/utils.h +++ b/src/utils.h @@ -36,25 +36,6 @@ namespace LAMMPS_NS { */ bool strmatch(std::string text, std::string pattern); - /** Categories of special arguments for cfvarg() function - * - * Enum starts from 100 to avoid conflicts with other local define flags - */ - enum {NONE=100, /// does not match any category - COMPUTE, /// processed a compute - FIX, /// processed a fix - VARIABLE /// processed a variable - }; - - /** \brief Convenience function to process 'c_', 'f_', and 'v_' arguments - * - * \param mode types to search for. 1-3 char string from 'c', 'f', or 'v' - * \param arg argument string to test against the prefixes - * \param cfv_id name or ID of the compute, fix, or variable - * \return utils::COMPUTE, utils::FIX, utils::VARIABLE or utils::NONE - */ - int cfvarg(std::string mode, const char *arg, char *&cfv_id); - /** \brief safe wrapper around fgets() which aborts on errors * or EOF and prints a suitable error message to help debugging * From b903cc6dc7162961739dc51d7974ffdfa3247a13 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 18 Mar 2020 17:12:36 -0400 Subject: [PATCH 14/24] remove excessive details about how to compile with cmake. refer to cmake docs. --- doc/src/Build_cmake.rst | 34 ++++++++++++++++------------------ doc/src/Build_development.rst | 6 ------ 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/doc/src/Build_cmake.rst b/doc/src/Build_cmake.rst index 206fd05253..981fd1e42e 100644 --- a/doc/src/Build_cmake.rst +++ b/doc/src/Build_cmake.rst @@ -22,7 +22,7 @@ Makefile(s). Example: cd lammps # change to the LAMMPS distribution directory mkdir build; cd build # create a new directory (folder) for build cmake [options ...] ../cmake # configuration with (command-line) cmake - make # compilation (or use "cmbuild" from "tools/cmake") + cmake --build . # compilation (or type "make") The ``cmake`` command will detect available features, enable selected packages and options, and will generate the build environment. By default @@ -30,24 +30,22 @@ this build environment will be created for "Unix Makefiles" on most platforms and particularly on Linux. However, alternate build tools (e.g. Ninja) and project files for Integrated Development Environments (IDEs) like Eclipse, CodeBlocks, or Kate can be generated, too. This is -selected via the ``-G`` command line flag. For the rest of the documentation -we will assume that the build environment is generated for makefiles +selected via the ``-G`` command line flag. Further details about features +and settings for CMake are in the `CMake online documentation `_ + +.. _cmake_doc: https://cmake.org/documentation/ + +For the rest of the documentation +we will assume that the build environment is generated for "Unix Makefiles" and thus the ``make`` command will be used to compile and link LAMMPS as indicated above, producing (by default) an executable called ``lmp`` and -a library called ``liblammps.a`` in the ``build`` folder. When generating -a build environment for the "Ninja" build tool, the build command would -be ``ninja`` instead of ``make``. Or you may copy the ``cmbuild`` script -from the :ref:`tools/cmake folder ` somewhere in your path and use that, -as it will indirectly call CMake with the configured tool. This is -particularly, if you configured the build folder with a build tool -in a non-standard location or name using ``-D CMAKE_MAKE_PROGRAM=``. +a library called ``liblammps.a`` in the ``build`` folder. -If your machine has multiple CPU cores (most do these days), using a -command like ``make -j N`` (with N being the number of available local -CPU cores) can be much faster. If you plan to do development on -LAMMPS or need to re-compile LAMMPS repeatedly, installation of the -``ccache`` (= Compiler Cache) software may speed up repeated compilation -even more. +If your machine has multiple CPU cores (most do these days), you can +parallelize the compilation with a command like ``make -j N`` (with N +being the number of designated CPU cores). Also installation of +the ``ccache`` (= Compiler Cache) software may speed up repeated +compilation signficantly. After compilation, you may optionally install the LAMMPS executable into your system with: @@ -129,7 +127,7 @@ command-line options. Several useful ones are: -D CMAKE_INSTALL_PREFIX=path # where to install LAMMPS executable/lib if desired -D CMAKE_BUILD_TYPE=type # type = RelWithDebInfo (default), Release, MinSizeRel, or Debug -G output # style of output CMake generates (e.g. "Unix Makefiles" or "Ninja") - -D CMAKE_MAKE_PROGRAM=builder # name of the builder executable (e.g. set to "gmake" instead of "make") + -D CMAKE_MAKE_PROGRAM=builder # name of the builder executable (e.g. when using "gmake" instead of "make") -DVARIABLE=value # setting for a LAMMPS feature to enable -D VARIABLE=value # ditto, but cannot come after CMakeLists.txt dir -C path/to/preset/file # load some CMake settings before configuring @@ -143,7 +141,7 @@ these forms can be used: yes/no, on/off, 1/0. On Unix/Linux machines, CMake generates a Makefile by default to perform the LAMMPS build. Alternate forms of build info can be generated via the -G switch, e.g. Visual Studio on a Windows machine, -Xcode on MacOS, or KDevelop on Linux. Type "cmake --help" to see the +Xcode on MacOS, or KDevelop on Linux. Type ``cmake --help`` to see the "Generator" styles of output your system supports. .. note:: diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index 598153e3f0..53d97a73f4 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -25,12 +25,6 @@ Another way of doing this without reconfiguration is calling make with variable make VERBOSE=1 -Or when using the :ref:`"cmbuild" wrapper script `: - -.. code-block:: bash - - cmbuild -v - ---------- .. _sanitizer: From 2cefddb16c0617814dda4c921b1e33fd00dfb30f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 18 Mar 2020 17:16:47 -0400 Subject: [PATCH 15/24] avoid spelling errors --- doc/src/Build_cmake.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/Build_cmake.rst b/doc/src/Build_cmake.rst index 981fd1e42e..06e5a87594 100644 --- a/doc/src/Build_cmake.rst +++ b/doc/src/Build_cmake.rst @@ -42,10 +42,10 @@ indicated above, producing (by default) an executable called ``lmp`` and a library called ``liblammps.a`` in the ``build`` folder. If your machine has multiple CPU cores (most do these days), you can -parallelize the compilation with a command like ``make -j N`` (with N -being the number of designated CPU cores). Also installation of -the ``ccache`` (= Compiler Cache) software may speed up repeated -compilation signficantly. +compile sources in parallel with a command like ``make -j N`` (with N +being the maximum number of concurrently executed tasks). Also +installation of the ``ccache`` (= Compiler Cache) software may speed +up repeated compilation, e.g. during code development, significantly. After compilation, you may optionally install the LAMMPS executable into your system with: From 7824b3f4abe5413e62f45cb3f09d18b66041e0ab Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 18 Mar 2020 17:52:19 -0400 Subject: [PATCH 16/24] small html theme tweaks to unclutter top of page. move version string to navigation bar --- doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html | 3 +-- doc/utils/sphinx-config/_themes/lammps_theme/layout.html | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html b/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html index 1eb53c70a2..5a8ef8ab94 100644 --- a/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html +++ b/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html @@ -1,5 +1,4 @@
-
LAMMPS {{ version }}
  • Docs »
  • {% for doc in parents %} @@ -22,7 +21,7 @@ {% endif %}
-
+
{% if next or prev %}