Unverified Commit 6e7e3659 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1888 from lammps/release-preparation

Documentation and Build script and Info updates for stable release
parents 669a49e9 3c277409
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h LAMMPS_VERSION)
include(PreventInSourceBuilds)

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
  #release comes with -O3 by default
  set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
@@ -420,7 +419,7 @@ endforeach()
##############################################
# add lib sources of (simple) enabled packages
############################################
foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-QMMM)
foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD)
  if(PKG_${SIMPLE_LIB})
    string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
    string(TOLOWER "${PKG_LIB}" PKG_LIB)
@@ -682,7 +681,7 @@ endforeach()

get_directory_property(CPPFLAGS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
include(FeatureSummary)
feature_summary(DESCRIPTION "The following packages have been found:" WHAT PACKAGES_FOUND)
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
message(STATUS "<<< Build configuration >>>
   Build type       ${CMAKE_BUILD_TYPE}
   Install path     ${CMAKE_INSTALL_PREFIX}
@@ -702,7 +701,7 @@ if (${_index} GREATER -1)
endif()
list (FIND LANGUAGES "C" _index)
if (${_index} GREATER -1)
  message(STATUS "C Compiler ${CMAKE_C_COMPILER}
  message(STATUS "C compiler ${CMAKE_C_COMPILER}
     Type     ${CMAKE_C_COMPILER_ID}
     Version  ${CMAKE_C_COMPILER_VERSION}
     C Flags  ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")
@@ -712,22 +711,22 @@ if(CMAKE_EXE_LINKER_FLAGS)
   Executable      ${CMAKE_EXE_LINKER_FLAGS}")
endif()
if(BUILD_SHARED_LIBS)
  message(STATUS "Shared libraries  ${CMAKE_SHARED_LINKER_FLAGS}")
  message(STATUS "Shared library flags:  ${CMAKE_SHARED_LINKER_FLAGS}")
else()
  message(STATUS "Static libraries  ${CMAKE_STATIC_LINKER_FLAGS}")
  message(STATUS "Static library flags:  ${CMAKE_STATIC_LINKER_FLAGS}")
endif()
message(STATUS "Link libraries: ${LAMMPS_LINK_LIBS}")
if(BUILD_MPI)
  message(STATUS "Using mpi with headers in ${MPI_CXX_INCLUDE_PATH} and ${MPI_CXX_LIBRARIES}")
  message(STATUS "Using MPI with headers in ${MPI_CXX_INCLUDE_PATH} and ${MPI_CXX_LIBRARIES}")
endif()
if(PKG_GPU)
  message(STATUS "GPU Api: ${GPU_API}")
  message(STATUS "GPU API: ${GPU_API}")
  if(GPU_API STREQUAL "CUDA")
    message(STATUS "GPU Arch: ${GPU_ARCH}")
    message(STATUS "GPU architecture: ${GPU_ARCH}")
  elseif(GPU_API STREQUAL "OPENCL")
    message(STATUS "OCL Tune: ${OCL_TUNE}")
    message(STATUS "OpenCL parameter tuning: ${OCL_TUNE}")
  endif()
  message(STATUS "GPU Precision: ${GPU_PREC}")
  message(STATUS "GPU precision: ${GPU_PREC}")
endif()
if(PKG_KOKKOS)
  message(STATUS "Kokkos Arch: ${KOKKOS_ARCH}")

cmake/Modules/FindQE.cmake

deleted100644 → 0
+0 −29
Original line number Diff line number Diff line
# - Find quantum-espresso
# Find the native QE headers and libraries.
#
#  QE_INCLUDE_DIRS - where to find quantum-espresso.h, etc.
#  QE_LIBRARIES    - List of libraries when using quantum-espresso.
#  QE_FOUND        - True if quantum-espresso found.
#

find_path(QE_INCLUDE_DIR libqecouple.h PATH_SUFFIXES COUPLE/include)

find_library(QECOUPLE_LIBRARY NAMES qecouple)
find_library(PW_LIBRARY NAMES pw)
find_library(QEMOD_LIBRARY NAMES qemod)
find_library(QEFFT_LIBRARY NAMES qefft)
find_library(QELA_LIBRARY NAMES qela)
find_library(CLIB_LIBRARY NAMES clib)
find_library(IOTK_LIBRARY NAMES iotk)


set(QE_LIBRARIES ${QECOUPLE_LIBRARY} ${PW_LIBRARY} ${QEMOD_LIBRARY} ${QEFFT_LIBRARY} ${QELA_LIBRARY} ${CLIB_LIBRARY} ${IOTK_LIBRARY})
set(QE_INCLUDE_DIRS ${QE_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set QE_FOUND to TRUE
# if all listed variables are TRUE

find_package_handle_standard_args(QE DEFAULT_MSG QECOUPLE_LIBRARY PW_LIBRARY QEMOD_LIBRARY QEFFT_LIBRARY QELA_LIBRARY CLIB_LIBRARY IOTK_LIBRARY QE_INCLUDE_DIR)

mark_as_advanced(QE_INCLUDE_DIR QECOUPLE_LIBRARY PW_LIBRARY QEMOD_LIBRARY QEFFT_LIBRARY QELA_LIBRARY CLIB_LIBRARY IOTK_LIBRARY)
+9 −5
Original line number Diff line number Diff line
if(PKG_USER-QMMM)
  enable_language(Fortran)
  enable_language(C)

  message(WARNING "Building QMMM with CMake is still experimental")
  find_package(QE REQUIRED)
  include_directories(${QE_INCLUDE_DIRS})
  list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES})
  if(NOT BUILD_LIB)
    message(FATAL_ERROR "Building a QM/MM executable with USER-QMMM requires BUILD_LIB=yes")
  endif()
  if(NOT BUILD_SHARED_LIBS)
    message(WARNING "It is recommended to use BUILD_SHARED_LIBS=yes with USER-QMMM")
  endif()
  add_library(qmmm STATIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm/libqmmm.c)
  list(APPEND LAMMPS_LINK_LIBS qmmm)
  target_include_directories(qmmm PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm)
endif()
+2 −0
Original line number Diff line number Diff line
/old
/html
/html-offline
/latex
/mathjax
/spelling
/LAMMPS.epub
/LAMMPS.mobi
+31 −19
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ SHELL = /bin/bash
BUILDDIR      = ${CURDIR}
RSTDIR        = $(BUILDDIR)/src
VENV          = $(BUILDDIR)/docenv
MATHJAX       = $(BUILDDIR)/mathjax
TXT2RST       = $(VENV)/bin/txt2rst
ANCHORCHECK   = $(VENV)/bin/rst_anchor_check

@@ -28,7 +29,7 @@ endif

SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocessing.cpu_count())')

.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check style_check
.PHONY: help clean-all clean clean-spelling epub mobi rst html pdf spelling anchor_check style_check

# ------------------------------------------

@@ -44,34 +45,32 @@ help:
	@echo "  clean-all     reset the entire build environment"
	@echo "  anchor_check  scan for duplicate anchor labels"
	@echo "  style_check   check for complete and consistent style lists"
	@echo "  package_check check for complete and consistent package lists"
	@echo "  spelling      spell-check the manual"

# ------------------------------------------

clean-all: clean
	rm -rf $(BUILDDIR)/docenv $(BUILDDIR)/doctrees
	rm -rf $(BUILDDIR)/docenv $(BUILDDIR)/doctrees $(BUILDDIR)/mathjax

clean:
clean: clean-spelling
	rm -rf html epub latex
	rm -rf spelling

clean-spelling:
	rm -rf spelling

rst: clean $(ANCHORCHECK)

html: $(ANCHORCHECK)
html: $(ANCHORCHECK) $(MATHJAX)
	@(\
		. $(VENV)/bin/activate ;\
		sphinx-build $(SPHINXEXTRA) -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
		echo "############################################" ;\
		rst_anchor_check src/*.rst ;\
		python utils/check-packages.py -s ../src -d src ;\
		env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
		python utils/check-styles.py -s ../src -d src ;\
		echo "############################################" ;\
		deactivate ;\
	)
	-rm html/searchindex.js
	@rm -rf html/_sources
	@rm -rf html/PDF
	@rm -rf html/USER
@@ -84,9 +83,11 @@ html: $(ANCHORCHECK)
	@rm -rf html/USER/.[sg]*
	@rm -rf html/USER/*/.[sg]*
	@rm -rf html/USER/*/*.[sg]*
	@mkdir -p html/_static/mathjax
	@cp -r $(MATHJAX)/es5 html/_static/mathjax/
	@echo "Build finished. The HTML pages are in doc/html."

spelling: utils/sphinx-config/false_positives.txt
spelling: $(VENV) utils/sphinx-config/false_positives.txt
	@(\
		. $(VENV)/bin/activate ;\
		pip install sphinxcontrib-spelling ;\
@@ -96,7 +97,7 @@ spelling: utils/sphinx-config/false_positives.txt
	)
	@echo "Spell check finished."

epub:
epub: $(VENV)
	@mkdir -p epub/JPG
	@rm -f LAMMPS.epub
	@cp src/JPG/lammps-logo.png epub/
@@ -128,6 +129,7 @@ pdf: $(ANCHORCHECK)
		sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
		echo "############################################" ;\
		rst_anchor_check src/*.rst ;\
		python utils/check-packages.py -s ../src -d src ;\
		env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
		python utils/check-styles.py -s ../src -d src ;\
		echo "############################################" ;\
@@ -171,13 +173,20 @@ anchor_check : $(ANCHORCHECK)
		deactivate ;\
	)

style_check :
style_check : $(VENV)
	@(\
		. $(VENV)/bin/activate ;\
		python utils/check-styles.py -s ../src -d src ;\
		deactivate ;\
	)

package_check : $(VENV)
	@(\
		. $(VENV)/bin/activate ;\
		python utils/check-packages.py -s ../src -d src ;\
		deactivate ;\
	)

# ------------------------------------------

$(VENV):
@@ -190,6 +199,9 @@ $(VENV):
		deactivate;\
	)

$(MATHJAX):
	@git clone --depth 1 https://github.com/mathjax/MathJax.git mathjax

$(TXT2RST) $(ANCHORCHECK): $(VENV)
	@( \
		. $(VENV)/bin/activate; \
Loading