Merge branch 'develop' of github.com:lammps/lammps into alphataubio-kokkos-fixes
This commit is contained in:
@ -141,7 +141,7 @@ endif()
|
||||
|
||||
# silence nvcc warnings
|
||||
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
||||
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma -Xcudafe --diag_suppress=128")
|
||||
endif()
|
||||
|
||||
# we require C++11 without extensions. Kokkos requires at least C++17 (currently)
|
||||
|
||||
@ -3,7 +3,7 @@ enable_language(C)
|
||||
# we don't use the parallel i/o interface.
|
||||
set(HDF5_PREFER_PARALLEL FALSE)
|
||||
|
||||
find_package(HDF5 REQUIRED)
|
||||
find_package(HDF5 COMPONENTS C REQUIRED)
|
||||
|
||||
# parallel HDF5 will import incompatible MPI headers with a serial build
|
||||
if((NOT BUILD_MPI) AND HDF5_IS_PARALLEL)
|
||||
|
||||
@ -88,6 +88,10 @@ too frequently.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
|
||||
@ -125,10 +125,6 @@ where thermo_temp is the ID of a similarly defined compute of style
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
|
||||
@ -128,6 +128,12 @@ See the :doc:`Howto thermostat <Howto_thermostat>` page for a
|
||||
discussion of different ways to compute temperature and perform
|
||||
thermostatting.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
|
||||
@ -82,12 +82,6 @@ See the :doc:`Howto thermostat <Howto_thermostat>` page for a
|
||||
discussion of different ways to compute temperature and perform
|
||||
thermostatting.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
|
||||
@ -115,10 +115,6 @@ correctly, the minimization will not converge properly.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -71,10 +71,6 @@ to it.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -79,8 +79,6 @@ It also means that changing attributes of *thermo_temp* or
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -103,8 +103,6 @@ remaining thermal degrees of freedom, and the bias is added back in.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -85,8 +85,6 @@ remaining thermal degrees of freedom, and the bias is added back in.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -123,6 +123,12 @@ also be potentially mitigated by using more multiple walls.
|
||||
conservative as possible (every timestep if needed). Those are the
|
||||
default settings.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
min_style cg command
|
||||
====================
|
||||
|
||||
Accelerator Variant: *cg/kk*
|
||||
|
||||
min_style hftn command
|
||||
======================
|
||||
|
||||
|
||||
@ -71,6 +71,10 @@ The global cutoff (:math:`r_c`) specified in the pair_style command is used.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -77,6 +77,10 @@ The global decay length of the charge (:math:`\lambda`) specified in the pair_st
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -741,10 +741,6 @@ atom types.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -287,6 +287,10 @@ concentration profiles of the two chemical species as
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -62,6 +62,10 @@ cutoff specified in the pair_style command is used.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -39,6 +39,10 @@ above.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -43,6 +43,10 @@ above.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -52,6 +52,10 @@ above.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -61,16 +61,50 @@ region = {}
|
||||
total = 0
|
||||
|
||||
index_pattern = re.compile(r"^.. index:: (compute|fix|pair_style|angle_style|bond_style|dihedral_style|improper_style|kspace_style|dump)\s+([a-zA-Z0-9/_]+)$")
|
||||
accel_pattern = re.compile(r"^.. include::\s+accel_styles.rst$")
|
||||
style_pattern = re.compile(r"(.+)Style\((.+),(.+)\)")
|
||||
cmd_pattern = re.compile(r"^.. index:: ([a-zA-Z0-9/_]+)$")
|
||||
upper = re.compile("[A-Z]+")
|
||||
gpu = re.compile("(.+)/gpu$")
|
||||
intel = re.compile("(.+)/intel$")
|
||||
kokkos = re.compile("(.+)/kk$")
|
||||
kokkos_skip = re.compile("(.+)/kk/(host|device)$")
|
||||
omp = re.compile("(.+)/omp$")
|
||||
opt = re.compile("(.+)/opt$")
|
||||
gpu = re.compile("(.+)/gpu\\s*$")
|
||||
intel = re.compile("(.+)/intel\\s*$")
|
||||
kokkos = re.compile("(.+)/kk$\\s*")
|
||||
kokkos_skip = re.compile("(.+)/kk/(host|device)\\s*$")
|
||||
omp = re.compile("(.+)/omp\\s*$")
|
||||
opt = re.compile("(.+)/opt\\s*$")
|
||||
removed = re.compile("(.*)Deprecated$")
|
||||
|
||||
accel_pattern = re.compile(r"^.. include::\s+accel_styles.rst$")
|
||||
|
||||
def require_accel_include(path):
|
||||
found = False
|
||||
needs = False
|
||||
# handle exceptions
|
||||
if path == "src/min_style.rst" : needs = True
|
||||
if path == "src/atom_style.rst" : needs = True
|
||||
# check file
|
||||
with open(path, 'r') as reader:
|
||||
for line in reader:
|
||||
m = accel_pattern.match(line)
|
||||
if m: found = True
|
||||
m = index_pattern.match(line)
|
||||
if m:
|
||||
if gpu.match(line): needs = True
|
||||
if omp.match(line): needs = True
|
||||
if kokkos.match(line): needs = True
|
||||
if intel.match(line): needs = True
|
||||
if opt.match(line): needs = True
|
||||
m = cmd_pattern.match(line)
|
||||
if m:
|
||||
if gpu.match(line): needs = True
|
||||
if omp.match(line): needs = True
|
||||
if kokkos.match(line): needs = True
|
||||
if intel.match(line): needs = True
|
||||
if opt.match(line): needs = True
|
||||
if needs and not found:
|
||||
print("Missing '.. include:: accel_style.rst' in file ", path)
|
||||
if not needs and found:
|
||||
print("Have '.. include:: accel_style.rst' without accelerated styles in file ", path)
|
||||
|
||||
def load_index_entries_in_file(path):
|
||||
entries = []
|
||||
with open(path, 'r') as reader:
|
||||
@ -82,6 +116,11 @@ def load_index_entries_in_file(path):
|
||||
entries.append((command_type, style))
|
||||
return entries
|
||||
|
||||
def check_accel_includes():
|
||||
rst_files = glob(os.path.join(doc_dir, '*.rst'))
|
||||
for f in rst_files:
|
||||
require_accel_include(f)
|
||||
|
||||
def load_index_entries():
|
||||
index = {'compute': set(), 'fix': set(), 'pair_style': set(), 'angle_style': set(),
|
||||
'bond_style': set(), 'dihedral_style': set(), 'improper_style': set(),
|
||||
@ -249,6 +288,8 @@ Total number of styles (including suffixes): %d""" \
|
||||
len(fix), len(improper), len(integrate), len(kspace), \
|
||||
len(minimize), len(pair), len(reader), len(region), total))
|
||||
|
||||
check_accel_includes()
|
||||
|
||||
index = load_index_entries()
|
||||
|
||||
total_index = 0
|
||||
|
||||
@ -4,7 +4,8 @@ CC=h5cc
|
||||
|
||||
# -DH5_NO_DEPRECATED_SYMBOLS is required here to ensure we are using
|
||||
# the v1.8 API when HDF5 is configured to default to using the v1.6 API.
|
||||
CFLAGS=-D_DEFAULT_SOURCE -O2 -DH5_NO_DEPRECATED_SYMBOLS -Wall -fPIC
|
||||
#CFLAGS=-D_DEFAULT_SOURCE -O2 -DH5_NO_DEPRECATED_SYMBOLS -Wall -fPIC
|
||||
CFLAGS=-D_DEFAULT_SOURCE -O2 -Wall -fPIC
|
||||
HDF5_PATH=/usr
|
||||
INC=-I include
|
||||
AR=ar
|
||||
|
||||
@ -9,7 +9,7 @@ SHELL = /bin/sh
|
||||
KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
|
||||
|
||||
CC = $(KOKKOS_ABSOLUTE_PATH)/bin/nvcc_wrapper
|
||||
CCFLAGS = -g -O3 -DNDEBUG -Xcudafe --diag_suppress=unrecognized_pragma
|
||||
CCFLAGS = -g -O3 -DNDEBUG -Xcudafe --diag_suppress=unrecognized_pragma -Xcudafe --diag_suppress=128
|
||||
SHFLAGS = -fPIC
|
||||
DEPFLAGS = -M
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ SHELL = /bin/sh
|
||||
KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
|
||||
|
||||
CC = $(KOKKOS_ABSOLUTE_PATH)/bin/nvcc_wrapper
|
||||
CCFLAGS = -g -O3 -DNDEBUG -Xcudafe --diag_suppress=unrecognized_pragma
|
||||
CCFLAGS = -g -O3 -DNDEBUG -Xcudafe --diag_suppress=unrecognized_pragma -Xcudafe --diag_suppress=128
|
||||
SHFLAGS = -fPIC
|
||||
DEPFLAGS = -M
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
|
||||
export MPICH_CXX = $(KOKKOS_ABSOLUTE_PATH)/bin/nvcc_wrapper
|
||||
export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/bin/nvcc_wrapper
|
||||
CC = mpicxx
|
||||
CCFLAGS = -g -O3 -DNDEBUG -Xcudafe --diag_suppress=unrecognized_pragma
|
||||
CCFLAGS = -g -O3 -DNDEBUG -Xcudafe --diag_suppress=unrecognized_pragma -Xcudafe --diag_suppress=128
|
||||
SHFLAGS = -fPIC
|
||||
# uncomment when compiling with Intel 21.5 or older
|
||||
FMTFLAGS = # -std=c++11
|
||||
|
||||
Reference in New Issue
Block a user