forked from lijiext/lammps
Merge pull request #1986 from akohlmey/correct-kokkos-docs
Update docs and CMake scripts for Kokkos 3.0+
This commit is contained in:
commit
4abff7b4d3
|
@ -64,16 +64,17 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
|||
set(CMAKE_TUNE_DEFAULT "-ffast-math -march=native")
|
||||
endif()
|
||||
|
||||
# we require C++11
|
||||
# we require C++11 without extensions
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# GNU compiler specific features for testing
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
|
||||
mark_as_advanced(ENABLE_COVERAGE)
|
||||
if(ENABLE_COVERAGE)
|
||||
set (CMAK_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -239,16 +240,7 @@ if(OpenMP_FOUND)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# TODO: this is a temporary workaround until a better solution is found. AK 2019-05-30
|
||||
# GNU GCC 9.x uses settings incompatible with our use of 'default(none)' in OpenMP pragmas
|
||||
# where we assume older GCC semantics. For the time being, we disable OpenMP by default
|
||||
# for GCC 9.x and beyond. People may manually turn it on, but need to run the script
|
||||
# src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9.
|
||||
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9))
|
||||
option(BUILD_OMP "Build with OpenMP support" OFF)
|
||||
else()
|
||||
option(BUILD_OMP "Build with OpenMP support" ${BUILD_OMP_DEFAULT})
|
||||
endif()
|
||||
option(BUILD_OMP "Build with OpenMP support" ${BUILD_OMP_DEFAULT})
|
||||
|
||||
if(BUILD_OMP)
|
||||
find_package(OpenMP REQUIRED)
|
||||
|
@ -256,6 +248,17 @@ if(BUILD_OMP)
|
|||
if(NOT HAVE_OMP_H_INCLUDE)
|
||||
message(FATAL_ERROR "Cannot find the 'omp.h' header file required for full OpenMP support")
|
||||
endif()
|
||||
|
||||
if (((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.99.9)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 18.99.9))
|
||||
)
|
||||
# GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts.
|
||||
# Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe.
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=4)
|
||||
else()
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=3)
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
|
||||
|
@ -761,7 +764,7 @@ if(PKG_KSPACE)
|
|||
message(STATUS "Using non-threaded FFTs")
|
||||
endif()
|
||||
if(PKG_KOKKOS)
|
||||
if(KOKKOS_ENABLE_CUDA)
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if (${FFT} STREQUAL "KISS")
|
||||
message(STATUS "Kokkos FFT: KISS")
|
||||
else()
|
||||
|
|
|
@ -2,20 +2,22 @@ include(CMakeFindDependencyMacro)
|
|||
if(@BUILD_MPI@)
|
||||
find_dependency(MPI REQUIRED CXX)
|
||||
endif()
|
||||
if(@PKG_KSPACE@ AND @FFT@ STREQUAL "FFTW3")
|
||||
if(@FFTW@ STREQUAL "FFTW3" AND NOT TARGET FFTW3::FFTW3)
|
||||
add_library(FFTW3::FFTW3 UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3::FFTW3 PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3_INCLUDE_DIRS@")
|
||||
endif()
|
||||
if(@FFTW@ STREQUAL "FFTW3F" AND NOT TARGET FFTW3F::FFTW3F)
|
||||
add_library(FFTW3F::FFTW3F UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3F::FFTW3F PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3F_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3F_INCLUDE_DIRS@")
|
||||
if(@PKG_KSPACE@)
|
||||
if(@FFT@ STREQUAL "FFTW3")
|
||||
if(@FFTW@ STREQUAL "FFTW3" AND NOT TARGET FFTW3::FFTW3)
|
||||
add_library(FFTW3::FFTW3 UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3::FFTW3 PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3_INCLUDE_DIRS@")
|
||||
endif()
|
||||
if(@FFTW@ STREQUAL "FFTW3F" AND NOT TARGET FFTW3F::FFTW3F)
|
||||
add_library(FFTW3F::FFTW3F UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3F::FFTW3F PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3F_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3F_INCLUDE_DIRS@")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(NOT @BUILD_SHARED_LIBS@)
|
||||
|
@ -36,20 +38,22 @@ if(NOT @BUILD_SHARED_LIBS@)
|
|||
if(@PKG_USER-SMD@ AND NOT @DOWNLOAD_EIGEN3@)
|
||||
find_dependency(Eigen3 NO_MODULE REQUIRED)
|
||||
endif()
|
||||
if(@PKG_KSPACE@ AND @FFT@ STREQUAL "FFTW3" AND @FFT_FFTW_THREADS@)
|
||||
if(@FFTW@ STREQUAL "FFTW3" AND NOT TARGET FFTW3::FFTW3_OMP)
|
||||
add_library(FFTW3::FFTW3_OMP UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3::FFTW3_OMP PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3_OMP_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3_OMP_INCLUDE_DIRS@")
|
||||
endif()
|
||||
if(@FFTW@ STREQUAL "FFTW3F" AND NOT TARGET FFTW3F::FFTW3F_OMP)
|
||||
add_library(FFTW3F::FFTW3F_OMP UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3F::FFTW3F_OMP PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3F_OMP_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3F_OMP_INCLUDE_DIRS@")
|
||||
if(@PKG_KSPACE@)
|
||||
if(@FFT@ STREQUAL "FFTW3" AND @FFT_FFTW_THREADS@)
|
||||
if(@FFTW@ STREQUAL "FFTW3" AND NOT TARGET FFTW3::FFTW3_OMP)
|
||||
add_library(FFTW3::FFTW3_OMP UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3::FFTW3_OMP PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3_OMP_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3_OMP_INCLUDE_DIRS@")
|
||||
endif()
|
||||
if(@FFTW@ STREQUAL "FFTW3F" AND NOT TARGET FFTW3F::FFTW3F_OMP)
|
||||
add_library(FFTW3F::FFTW3F_OMP UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3F::FFTW3F_OMP PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@FFTW3F_OMP_LIBRARY@"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@FFTW3F_OMP_INCLUDE_DIRS@")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(@PKG_USER-SCAFACOS@ AND NOT @DOWNLOAD_SCAFACOS@)
|
||||
|
|
|
@ -51,6 +51,9 @@ if(DOWNLOAD_KIM)
|
|||
INTERFACE_INCLUDE_DIRECTORIES "${INSTALL_DIR}/include/kim-api")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::KIM)
|
||||
add_dependencies(LAMMPS::KIM kim_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(KIM-API REQUIRED IMPORTED_TARGET libkim-api>=${KIM-API_MIN_VERSION})
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
########################################################################
|
||||
# consistency checks and Kokkos options/settings required by LAMMPS
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
message(STATUS "KOKKOS: Enabling CUDA LAMBDA function support")
|
||||
set(Kokkos_ENABLE_CUDA_LAMBDA ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
# Adding OpenMP compiler flags without the checks done for
|
||||
# BUILD_OMP can result in compile failures. Enforce consistency.
|
||||
if(Kokkos_ENABLE_OPENMP AND NOT BUILD_OMP)
|
||||
message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP")
|
||||
endif()
|
||||
########################################################################
|
||||
|
||||
option(EXTERNAL_KOKKOS "Build against external kokkos library" OFF)
|
||||
option(DOWNLOAD_KOKKOS "Download the KOKKOS library instead of using the bundled one" OFF)
|
||||
if(DOWNLOAD_KOKKOS)
|
||||
|
@ -22,6 +35,9 @@ if(DOWNLOAD_KOKKOS)
|
|||
INTERFACE_LINK_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::KOKKOS)
|
||||
add_dependencies(LAMMPS::KOKKOS kokkos_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
elseif(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos 3)
|
||||
if(NOT Kokkos_FOUND)
|
||||
|
@ -64,7 +80,7 @@ if(PKG_KSPACE)
|
|||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/gridcomm_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
|
||||
if(KOKKOS_ENABLE_CUDA)
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if(NOT ${FFT} STREQUAL "KISS")
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
|
||||
target_link_libraries(lammps PRIVATE cufft)
|
||||
|
|
|
@ -27,6 +27,9 @@ if(DOWNLOAD_LATTE)
|
|||
INTERFACE_LINK_LIBRARIES "${LAPACK_LIBRARIES}")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::LATTE)
|
||||
add_dependencies(LAMMPS::LATTE latte_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
else()
|
||||
find_package(LATTE)
|
||||
if(NOT LATTE_FOUND)
|
||||
|
|
|
@ -35,6 +35,9 @@ if(DOWNLOAD_MSCG)
|
|||
INTERFACE_LINK_LIBRARIES "${LAPACK_LIBRARIES}")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::MSCG)
|
||||
add_dependencies(LAMMPS::MSCG mscg_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
else()
|
||||
find_package(MSCG)
|
||||
if(NOT MSCG_FOUND)
|
||||
|
|
|
@ -70,6 +70,9 @@ if(DOWNLOAD_PLUMED)
|
|||
ExternalProject_get_property(plumed_build INSTALL_DIR)
|
||||
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
|
||||
add_dependencies(LAMMPS::PLUMED plumed_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_WRAPPER_CXX=1")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/libplumed.a INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}")
|
||||
|
|
|
@ -52,6 +52,9 @@ if(DOWNLOAD_SCAFACOS)
|
|||
INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/libfcs.a;${INSTALL_DIR}/lib/libfcs_direct.a;${INSTALL_DIR}/lib/libfcs_ewald.a;${INSTALL_DIR}/lib/libfcs_fmm.a;${INSTALL_DIR}/lib/libfcs_p2nfft.a;${INSTALL_DIR}/lib/libfcs_p3m.a;GSL::gsl;${INSTALL_DIR}/lib/libfcs_near.a;${INSTALL_DIR}/lib/libfcs_gridsort.a;${INSTALL_DIR}/lib/libfcs_resort.a;${INSTALL_DIR}/lib/libfcs_redist.a;${INSTALL_DIR}/lib/libfcs_common.a;${INSTALL_DIR}/lib/libfcs_pnfft.a;${INSTALL_DIR}/lib/libfcs_pfft.a;${INSTALL_DIR}/lib/libfcs_fftw3_mpi.a;${INSTALL_DIR}/lib/libfcs_fftw3.a;MPI::MPI_Fortran;MPI::MPI_C")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::SCAFACOS)
|
||||
add_dependencies(LAMMPS::SCAFACOS scafacos_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SCAFACOS REQUIRED IMPORTED_TARGET scafacos)
|
||||
|
|
|
@ -18,6 +18,9 @@ if(DOWNLOAD_EIGEN3)
|
|||
set_target_properties(LAMMPS::EIGEN3 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::EIGEN3)
|
||||
add_dependencies(LAMMPS::EIGEN3 Eigen3_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
else()
|
||||
find_package(Eigen3 NO_MODULE)
|
||||
mark_as_advanced(Eigen3_DIR)
|
||||
|
|
|
@ -35,6 +35,9 @@ if(DOWNLOAD_VORO)
|
|||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/src")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::VORO)
|
||||
add_dependencies(LAMMPS::VORO voro_build)
|
||||
if(BUILD_LIB AND NOT BUILD_SHARED_LIBS)
|
||||
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
|
||||
endif()
|
||||
else()
|
||||
find_package(VORO)
|
||||
if(NOT VORO_FOUND)
|
||||
|
|
|
@ -28,7 +28,7 @@ if(ENABLE_TESTING AND BUILD_EXE)
|
|||
"https://github.com/lammps/lammps-testing in LAMMPS_TESTING_SOURCE_DIR")
|
||||
endif()
|
||||
|
||||
add_test(ShowHelp ${CMAKE_BINARY_DIR}/${LAMMPS_BINARY} -help)
|
||||
add_test(NAME ShowHelp COMMAND $<TARGET_FILE:lmp> -help)
|
||||
|
||||
if(EXISTS ${LAMMPS_TESTING_SOURCE_DIR})
|
||||
message(STATUS "Running test discovery...")
|
||||
|
@ -42,8 +42,7 @@ if(ENABLE_TESTING AND BUILD_EXE)
|
|||
string(REPLACE "-" "_" TEST_NAME ${TEST_NAME})
|
||||
string(REPLACE "+" "_" TEST_NAME ${TEST_NAME})
|
||||
set(TEST_NAME "test_core_${TEST_NAME}_serial")
|
||||
add_test(${TEST_NAME} ${CMAKE_BINARY_DIR}/${LAMMPS_BINARY} -in ${SCRIPT_NAME})
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES WORKING_DIRECTORY ${PARENT_DIR})
|
||||
add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:lmp> -in ${SCRIPT_NAME} WORKING_DIRECTORY ${PARENT_DIR})
|
||||
endforeach()
|
||||
list(LENGTH TEST_SCRIPTS NUM_TESTS)
|
||||
|
||||
|
|
|
@ -264,6 +264,16 @@ cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GP
|
|||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LAMMPS_OMP_COMPAT</code></td>
|
||||
<td>Workaround for backwards-incompatible changes regarding predetermined sharing modes in OpenMP 4.x. A value of 3 or 4 should be used, reflecting the version of the OpenMP spec that is implemented by the compiler.</td>
|
||||
<td>
|
||||
<dl>
|
||||
<dt><code>3</code> (default except for known OMP 4.0 compilers)</dt>
|
||||
<dt><code>4</code></dt>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LAMMPS_MEMALIGN</code></td>
|
||||
<td>controls the alignment of blocks of memory allocated by LAMMPS</td>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# preset that enables KOKKOS and selects CUDA compilation with OpenMP
|
||||
# enabled as well. This preselects CC 5.0 as default GPU arch, since
|
||||
# that is compatible with all higher CC, but not the default CC 3.5
|
||||
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ARCH_MAXWELL50 on CACHE BOOL "" FORCE)
|
||||
set(BUILD_OMP ON CACHE BOOL "" FORCE)
|
||||
get_filename_component(NVCC_WRAPPER_CMD ${CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE)
|
||||
set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_CMD} CACHE FILEPATH "" FORCE)
|
|
@ -0,0 +1,6 @@
|
|||
# preset that enables KOKKOS and selects OpenMP (only) compilation
|
||||
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
|
||||
set(BUILD_OMP ON CACHE BOOL "" FORCE)
|
|
@ -0,0 +1,5 @@
|
|||
# preset that enables KOKKOS and selects serial compilation only
|
||||
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
|
|
@ -142,14 +142,15 @@ please refer to its documentation.
|
|||
**OpenMP Compiler compatibility info**\ :
|
||||
|
||||
Some compilers do not fully support the ``default(none)`` directive
|
||||
and others (e.g. GCC version 9 and beyond) may implement OpenMP 4.0
|
||||
semantics, which are incompatible with the OpenMP 3.1 semantics used
|
||||
in LAMMPS (for maximal compatibility with compiler versions in use).
|
||||
In those case, all ``default(none)`` directives (which aid in detecting
|
||||
incorrect and unwanted sharing) can be replaced with ``default(shared)``
|
||||
while dropping all ``shared()`` directives. The script
|
||||
'src/USER-OMP/hack_openmp_for_pgi_gcc9.sh' can be used to automate
|
||||
this conversion.
|
||||
and others (e.g. GCC version 9 and beyond, Clang version 10 and later)
|
||||
may implement strict OpenMP 4.0 and later semantics, which are incompatible
|
||||
with the OpenMP 3.1 semantics used in LAMMPS for maximal compatibility
|
||||
with compiler versions in use. If compilation with OpenMP enabled fails
|
||||
because of your compiler requiring strict OpenMP 4.0 semantic, you can
|
||||
change the behavior by adding ``-D LAMMPS_OMP_COMPAT=4`` to the ``LMP_INC``
|
||||
variable in your makefile, or add it to the command line while configuring
|
||||
with CMake. CMake will detect the suitable setting for the GNU, Clang,
|
||||
and Intel compilers.
|
||||
|
||||
----------
|
||||
|
||||
|
|
|
@ -307,74 +307,131 @@ using. For example:
|
|||
.. _kokkos:
|
||||
|
||||
KOKKOS package
|
||||
---------------------------
|
||||
--------------
|
||||
|
||||
To build with this package, you must choose which hardware you want to
|
||||
build for, either CPUs (multi-threading via OpenMP) or KNLs (OpenMP)
|
||||
or GPUs (NVIDIA Cuda).
|
||||
Using the KOKKOS package requires choosing several settings. You have
|
||||
to select whether you want to compile with parallelization on the host
|
||||
and whether you want to include offloading of calculations to a device
|
||||
(e.g. a GPU). The default setting is to have no host parallelization
|
||||
and no device offloading. In addition, you can select the hardware
|
||||
architecture to select the instruction set. Since most hardware is
|
||||
backward compatible, you may choose settings for an older architecture
|
||||
to have an executable that will run on this and newer architectures.
|
||||
|
||||
For a CMake or make build, these are the possible choices for the
|
||||
``KOKKOS_ARCH`` settings described below. Note that for CMake, these are
|
||||
really Kokkos variables, not LAMMPS variables. Hence you must use
|
||||
case-sensitive values, e.g. BDW, not bdw.
|
||||
.. note::
|
||||
|
||||
* AMDAVX = AMD 64-bit x86 CPUs
|
||||
* EPYC = AMD EPYC Zen class CPUs
|
||||
* ARMv80 = ARMv8.0 Compatible CPU
|
||||
* ARMv81 = ARMv8.1 Compatible CPU
|
||||
* ARMv8-ThunderX = ARMv8 Cavium ThunderX CPU
|
||||
* ARMv8-TX2 = ARMv8 Cavium ThunderX2 CPU
|
||||
* WSM = Intel Westmere CPUs
|
||||
* SNB = Intel Sandy/Ivy Bridge CPUs
|
||||
* HSW = Intel Haswell CPUs
|
||||
* BDW = Intel Broadwell Xeon E-class CPUs
|
||||
* SKX = Intel Sky Lake Xeon E-class HPC CPUs (AVX512)
|
||||
* KNC = Intel Knights Corner Xeon Phi
|
||||
* KNL = Intel Knights Landing Xeon Phi
|
||||
* BGQ = IBM Blue Gene/Q CPUs
|
||||
* Power7 = IBM POWER8 CPUs
|
||||
* Power8 = IBM POWER8 CPUs
|
||||
* Power9 = IBM POWER9 CPUs
|
||||
* Kepler = NVIDIA Kepler default (generation CC 3.5)
|
||||
* Kepler30 = NVIDIA Kepler generation CC 3.0
|
||||
* Kepler32 = NVIDIA Kepler generation CC 3.2
|
||||
* Kepler35 = NVIDIA Kepler generation CC 3.5
|
||||
* Kepler37 = NVIDIA Kepler generation CC 3.7
|
||||
* Maxwell = NVIDIA Maxwell default (generation CC 5.0)
|
||||
* Maxwell50 = NVIDIA Maxwell generation CC 5.0
|
||||
* Maxwell52 = NVIDIA Maxwell generation CC 5.2
|
||||
* Maxwell53 = NVIDIA Maxwell generation CC 5.3
|
||||
* Pascal60 = NVIDIA Pascal generation CC 6.0
|
||||
* Pascal61 = NVIDIA Pascal generation CC 6.1
|
||||
* Volta70 = NVIDIA Volta generation CC 7.0
|
||||
* Volta72 = NVIDIA Volta generation CC 7.2
|
||||
* Turing75 = NVIDIA Turing generation CC 7.5
|
||||
NVIDIA GPUs with CC 5.0 (Maxwell) and newer are not compatible with
|
||||
CC 3.x (Kepler). If you run Kokkos on a newer architecture than what
|
||||
LAMMPS was compiled with, there will be a significant delay during
|
||||
device initialization since the just-in-time compiler has to
|
||||
recompile the GPU kernel code for the new hardware.
|
||||
|
||||
**CMake build**\ :
|
||||
The settings discussed below have been tested with LAMMPS and are
|
||||
confirmed to work. Kokkos is an active project with ongoing improvements
|
||||
and projects working on including support for additional architectures.
|
||||
More information on Kokkos can be found on the
|
||||
`Kokkos GitHub project <https://github.com/kokkos>`_.
|
||||
|
||||
Available Architecture settings
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
These are the possible choices for the Kokkos architecture ID. They must
|
||||
be specified in uppercase.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 0
|
||||
:widths: auto
|
||||
|
||||
* - **Arch-ID**
|
||||
- **Description**
|
||||
* - AMDAVX
|
||||
- AMD 64-bit x86 CPU (AVX 1)
|
||||
* - EPYC
|
||||
- AMD EPYC Zen class CPU (AVX 2)
|
||||
* - ARMV80
|
||||
- ARMv8.0 Compatible CPU
|
||||
* - ARMV81
|
||||
- ARMv8.1 Compatible CPU
|
||||
* - ARMV8_THUNDERX
|
||||
- ARMv8 Cavium ThunderX CPU
|
||||
* - ARMV8_THUNDERX2
|
||||
- ARMv8 Cavium ThunderX2 CPU
|
||||
* - WSM
|
||||
- Intel Westmere CPU (SSE 4.2)
|
||||
* - SNB
|
||||
- Intel Sandy/Ivy Bridge CPU (AVX 1)
|
||||
* - HSW
|
||||
- Intel Haswell CPU (AVX 2)
|
||||
* - BDW
|
||||
- Intel Broadwell Xeon E-class CPU (AVX 2 + transactional mem)
|
||||
* - SKX
|
||||
- Intel Sky Lake Xeon E-class HPC CPU (AVX512 + transactional mem)
|
||||
* - KNC
|
||||
- Intel Knights Corner Xeon Phi
|
||||
* - KNL
|
||||
- Intel Knights Landing Xeon Phi
|
||||
* - BGQ
|
||||
- IBM Blue Gene/Q CPU
|
||||
* - POWER7
|
||||
- IBM POWER8 CPU
|
||||
* - POWER8
|
||||
- IBM POWER8 CPU
|
||||
* - POWER9
|
||||
- IBM POWER9 CPU
|
||||
* - KEPLER30
|
||||
- NVIDIA Kepler generation CC 3.0 GPU
|
||||
* - KEPLER32
|
||||
- NVIDIA Kepler generation CC 3.2 GPU
|
||||
* - KEPLER35
|
||||
- NVIDIA Kepler generation CC 3.5 GPU
|
||||
* - KEPLER37
|
||||
- NVIDIA Kepler generation CC 3.7 GPU
|
||||
* - MAXWELL50
|
||||
- NVIDIA Maxwell generation CC 5.0 GPU
|
||||
* - MAXWELL52
|
||||
- NVIDIA Maxwell generation CC 5.2 GPU
|
||||
* - MAXWELL53
|
||||
- NVIDIA Maxwell generation CC 5.3 GPU
|
||||
* - PASCAL60
|
||||
- NVIDIA Pascal generation CC 6.0 GPU
|
||||
* - PASCAL61
|
||||
- NVIDIA Pascal generation CC 6.1 GPU
|
||||
* - VOLTA70
|
||||
- NVIDIA Volta generation CC 7.0 GPU
|
||||
* - VOLTA72
|
||||
- NVIDIA Volta generation CC 7.2 GPU
|
||||
* - TURING75
|
||||
- NVIDIA Turing generation CC 7.5 GPU
|
||||
|
||||
CMake build settings:
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
For multicore CPUs using OpenMP, set these 2 variables.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D KOKKOS_ARCH=archCPU # archCPU = CPU from list above
|
||||
-D KOKKOS_ENABLE_OPENMP=yes
|
||||
-D Kokkos_ARCH_CPUARCH=yes # CPUARCH = CPU from list above
|
||||
-D Kokkos_ENABLE_OPENMP=yes
|
||||
-D BUILD_OMP=yes
|
||||
|
||||
For Intel KNLs using OpenMP, set these 2 variables:
|
||||
Please note that enabling OpenMP for KOKKOS requires that OpenMP is
|
||||
also :ref:`enabled for the rest of LAMMPS <serial>`.
|
||||
|
||||
For Intel KNLs using OpenMP, set these variables:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D KOKKOS_ARCH=KNL
|
||||
-D KOKKOS_ENABLE_OPENMP=yes
|
||||
-D Kokkos_ARCH_KNL=yes
|
||||
-D Kokkos_ENABLE_OPENMP=yes
|
||||
|
||||
For NVIDIA GPUs using CUDA, set these 4 variables:
|
||||
For NVIDIA GPUs using CUDA, set these variables:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D KOKKOS_ARCH="archCPU;archGPU" # archCPU = CPU from list above that is hosting the GPU
|
||||
# archGPU = GPU from list above
|
||||
-D KOKKOS_ENABLE_CUDA=yes
|
||||
-D KOKKOS_ENABLE_OPENMP=yes
|
||||
-D CMAKE_CXX_COMPILER=wrapper # wrapper = full path to Cuda nvcc wrapper
|
||||
-D Kokkos_ARCH_CPUARCH=yes # CPUARCH = CPU from list above
|
||||
-D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above
|
||||
-D Kokkos_ENABLE_CUDA=yes
|
||||
-D Kokkos_ENABLE_OPENMP=yes
|
||||
-D CMAKE_CXX_COMPILER=wrapper # wrapper = full path to Cuda nvcc wrapper
|
||||
|
||||
The wrapper value is the Cuda nvcc compiler wrapper provided in the
|
||||
Kokkos library: ``lib/kokkos/bin/nvcc_wrapper``\ . The setting should
|
||||
|
@ -382,20 +439,35 @@ include the full path name to the wrapper, e.g.
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
-D CMAKE_CXX_COMPILER=/home/username/lammps/lib/kokkos/bin/nvcc_wrapper
|
||||
-D CMAKE_CXX_COMPILER=${HOME}/lammps/lib/kokkos/bin/nvcc_wrapper
|
||||
|
||||
**Traditional make**\ :
|
||||
To simplify the compilation, three preset files are included in the
|
||||
``cmake/presets`` folder, ``kokkos-serial.cmake``, ``kokkos-openmp.cmake``,
|
||||
and ``kokkos-cuda.cmake``. They will enable the KOKKOS package and
|
||||
enable some hardware choice. So to compile with OpenMP host parallelization,
|
||||
CUDA device parallelization (for GPUs with CC 5.0 and up) with some
|
||||
common packages enabled, you can do the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mkdir build-kokkos-cuda
|
||||
cd build-kokkos-cuda
|
||||
cmake -C ../cmake/presets/minimal.cmake -C ../cmake/presets/kokkos-cuda.cmake ../cmake
|
||||
cmake --build .
|
||||
|
||||
Traditional make settings:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Choose which hardware to support in ``Makefile.machine`` via
|
||||
``KOKKOS_DEVICES`` and ``KOKKOS_ARCH`` settings. See the
|
||||
``src/MAKE/OPTIONS/Makefile.kokkos\*`` files for examples.
|
||||
``src/MAKE/OPTIONS/Makefile.kokkos*`` files for examples.
|
||||
|
||||
For multicore CPUs using OpenMP:
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
KOKKOS_DEVICES = OpenMP
|
||||
KOKKOS_ARCH = archCPU # archCPU = CPU from list above
|
||||
KOKKOS_ARCH = CPUARCH # CPUARCH = CPU from list above
|
||||
|
||||
For Intel KNLs using OpenMP:
|
||||
|
||||
|
@ -409,22 +481,28 @@ For NVIDIA GPUs using CUDA:
|
|||
.. code-block:: make
|
||||
|
||||
KOKKOS_DEVICES = Cuda
|
||||
KOKKOS_ARCH = archCPU,archGPU # archCPU = CPU from list above that is hosting the GPU
|
||||
# archGPU = GPU from list above
|
||||
FFT_INC = -DFFT_CUFFT # enable use of cuFFT (optional)
|
||||
FFT_LIB = -lcufft # link to cuFFT library
|
||||
KOKKOS_ARCH = CPUARCH,GPUARCH # CPUARCH = CPU from list above that is hosting the GPU
|
||||
# GPUARCH = GPU from list above
|
||||
FFT_INC = -DFFT_CUFFT # enable use of cuFFT (optional)
|
||||
FFT_LIB = -lcufft # link to cuFFT library
|
||||
|
||||
For GPUs, you also need the following 2 lines in your Makefile.machine
|
||||
before the CC line is defined, in this case for use with OpenMPI mpicxx.
|
||||
The 2 lines define a nvcc wrapper compiler, which will use nvcc for
|
||||
compiling CUDA files and use a C++ compiler for non-Kokkos, non-CUDA
|
||||
files.
|
||||
For GPUs, you also need the following lines in your ``Makefile.machine``
|
||||
before the CC line is defined. They tell ``mpicxx`` to use an ``nvcc``
|
||||
compiler wrapper, which will use ``nvcc`` for compiling CUDA files and a
|
||||
C++ compiler for non-Kokkos, non-CUDA files.
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
# For OpenMPI
|
||||
KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
|
||||
export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper
|
||||
CC = mpicxx
|
||||
CC = mpicxx
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
# For MPICH and derivatives
|
||||
KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
|
||||
CC = mpicxx -cxx=$(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper
|
||||
|
||||
----------
|
||||
|
||||
|
@ -463,7 +541,7 @@ args:
|
|||
$ make lib-latte args="-b" # download and build in lib/latte/LATTE-master
|
||||
$ make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte
|
||||
$ make lib-latte args="-b -m gfortran" # download and build in lib/latte and
|
||||
# copy Makefile.lammps.gfortran to Makefile.lammps
|
||||
# copy Makefile.lammps.gfortran to Makefile.lammps
|
||||
|
||||
Note that 3 symbolic (soft) links, "includelink" and "liblink" and
|
||||
"filelink.o", are created in lib/latte to point into the LATTE home
|
||||
|
|
|
@ -48,7 +48,7 @@ The USER-CUDA package had been removed, since it had been unmaintained
|
|||
for a long time and had known bugs and problems. Significant parts of
|
||||
the design were transferred to the
|
||||
:ref:`KOKKOS package <PKG-KOKKOS>`, which has similar
|
||||
performance characteristics on Nvidia GPUs. Both, the KOKKOS
|
||||
performance characteristics on NVIDIA GPUs. Both, the KOKKOS
|
||||
and the :ref:`GPU package <PKG-GPU>` are maintained
|
||||
and allow running LAMMPS with GPU acceleration.
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ section below for examples where this has been done.
|
|||
* The GPU package requires neighbor lists to be built on the CPU when using
|
||||
exclusion lists, or a triclinic simulation box.
|
||||
* The GPU package can be compiled for CUDA or OpenCL and thus supports
|
||||
both, Nvidia and AMD GPUs well. On Nvidia hardware, using CUDA is typically
|
||||
both, NVIDIA and AMD GPUs well. On NVIDIA hardware, using CUDA is typically
|
||||
resulting in equal or better performance over OpenCL.
|
||||
* OpenCL in the GPU package does theoretically also support Intel CPUs or
|
||||
Intel Xeon Phi, but the native support for those in KOKKOS (or USER-INTEL)
|
||||
|
|
|
@ -20,7 +20,7 @@ standard or user packages:
|
|||
+-----------------------------------------+-------------------------------------------------------+
|
||||
| :doc:`USER-INTEL Package <Speed_intel>` | for Intel CPUs and Intel Xeon Phi |
|
||||
+-----------------------------------------+-------------------------------------------------------+
|
||||
| :doc:`KOKKOS Package <Speed_kokkos>` | for Nvidia GPUs, Intel Xeon Phi, and OpenMP threading |
|
||||
| :doc:`KOKKOS Package <Speed_kokkos>` | for NVIDIA GPUs, Intel Xeon Phi, and OpenMP threading |
|
||||
+-----------------------------------------+-------------------------------------------------------+
|
||||
| :doc:`USER-OMP Package <Speed_omp>` | for OpenMP threading and generic CPU optimizations |
|
||||
+-----------------------------------------+-------------------------------------------------------+
|
||||
|
|
|
@ -46,7 +46,7 @@ Style *cosine/squared* computes a potential of the form
|
|||
E =
|
||||
\begin{cases}
|
||||
-\epsilon& \quad r < \sigma \\
|
||||
-\epsilon\cos\left(\frac{\pi\left(r - \sigma\right)}{2\left(r_c - \sigma\right)}\right)&\quad \sigma \leq r < r_c \\
|
||||
-\epsilon\cos\left(\frac{\pi\left(r - \sigma\right)}{2\left(r_c - \sigma\right)}\right)^2&\quad \sigma \leq r < r_c \\
|
||||
0& \quad r \geq r_c
|
||||
\end{cases}
|
||||
|
||||
|
|
|
@ -1735,6 +1735,7 @@ Melchor
|
|||
Meloni
|
||||
Melrose
|
||||
Mem
|
||||
mem
|
||||
memalign
|
||||
MEMALIGN
|
||||
membered
|
||||
|
@ -2105,7 +2106,6 @@ nvc
|
|||
nvcc
|
||||
nve
|
||||
nvidia
|
||||
Nvidia
|
||||
nvk
|
||||
nvt
|
||||
Nwait
|
||||
|
@ -2960,6 +2960,7 @@ traceless
|
|||
tradeoff
|
||||
traj
|
||||
Tranchida
|
||||
transactional
|
||||
transferability
|
||||
translational
|
||||
Translational
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Paul Coffman (IBM)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "dump_atom_mpiio.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
@ -587,7 +588,7 @@ int DumpAtomMPIIO::convert_image_omp(int n, double *mybuf)
|
|||
mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char));
|
||||
mpifh_buffer_line_per_thread[i][0] = '\0';
|
||||
|
||||
#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
{
|
||||
int tid = omp_get_thread_num();
|
||||
int m=0;
|
||||
|
@ -677,7 +678,7 @@ int DumpAtomMPIIO::convert_noimage_omp(int n, double *mybuf)
|
|||
mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char));
|
||||
mpifh_buffer_line_per_thread[i][0] = '\0';
|
||||
|
||||
#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
{
|
||||
int tid = omp_get_thread_num();
|
||||
int m=0;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Paul Coffman (IBM)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "dump_cfg_mpiio.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
@ -365,7 +366,7 @@ int DumpCFGMPIIO::convert_string_omp(int n, double *mybuf)
|
|||
mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char));
|
||||
mpifh_buffer_line_per_thread[i][0] = '\0';
|
||||
|
||||
#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
{
|
||||
int tid = omp_get_thread_num();
|
||||
int m=0;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Paul Coffman (IBM)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "dump_custom_mpiio.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
@ -612,7 +613,7 @@ int DumpCustomMPIIO::convert_string_omp(int n, double *mybuf)
|
|||
mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char));
|
||||
mpifh_buffer_line_per_thread[i][0] = '\0';
|
||||
|
||||
#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
{
|
||||
int tid = omp_get_thread_num();
|
||||
int m=0;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Paul Coffman (IBM)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "dump_xyz_mpiio.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
@ -350,7 +351,7 @@ int DumpXYZMPIIO::convert_string_omp(int n, double *mybuf)
|
|||
mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char));
|
||||
mpifh_buffer_line_per_thread[i][0] = '\0';
|
||||
|
||||
#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf)
|
||||
{
|
||||
int tid = omp_get_thread_num();
|
||||
int m=0;
|
||||
|
|
|
@ -221,7 +221,7 @@ void BondOxdnaFene::compute(int eflag, int vflag)
|
|||
TAGINT_FORMAT " " TAGINT_FORMAT " %g",
|
||||
update->ntimestep,atom->tag[a],atom->tag[b],r);
|
||||
error->warning(FLERR,str,0);
|
||||
if (rlogarg <= -8.0) error->one(FLERR,"Bad FENE bond");
|
||||
rlogarg = 0.1;
|
||||
}
|
||||
|
||||
fbond = -k[type]*rr0/rlogarg/Deltasq/r;
|
||||
|
@ -421,7 +421,7 @@ double BondOxdnaFene::single(int type, double rsq, int /*i*/, int /*j*/,
|
|||
sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %g",
|
||||
update->ntimestep,sqrt(rsq));
|
||||
error->warning(FLERR,str,0);
|
||||
if (rlogarg <= -8.0) error->one(FLERR,"Bad FENE bond");
|
||||
rlogarg = 0.1;
|
||||
}
|
||||
|
||||
double eng = -0.5 * k[type]*log(rlogarg);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing authors: Shawn Coleman & Douglas Spearot (Arkansas)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "compute_saed.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
|
@ -418,7 +419,7 @@ void ComputeSAED::compute_vector()
|
|||
double frac = 0.1;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(offset,ASFSAED,typelocal,xlocal,Fvec,m,frac)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(offset,ASFSAED,typelocal,xlocal,Fvec,m,frac)
|
||||
#endif
|
||||
{
|
||||
double *f = new double[ntypes]; // atomic structure factor by type
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
Updated: 06/17/2015-2
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "compute_xrd.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
|
@ -353,7 +354,7 @@ void ComputeXRD::compute_array()
|
|||
double frac = 0.1;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(typelocal,xlocal,Fvec,m,frac,ASFXRD)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(typelocal,xlocal,Fvec,m,frac,ASFXRD)
|
||||
#endif
|
||||
{
|
||||
double *f = new double[ntypes]; // atomic structure factor by type
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include "angle_charmm_intel.h"
|
||||
|
@ -134,7 +135,7 @@ void AngleCharmmIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oeangle,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include "angle_harmonic_intel.h"
|
||||
|
@ -134,7 +135,7 @@ void AngleHarmonicIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oeangle,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Stan Moore (Sandia)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include "bond_fene_intel.h"
|
||||
|
@ -127,7 +128,7 @@ void BondFENEIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oebond,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include "bond_harmonic_intel.h"
|
||||
|
@ -127,7 +128,7 @@ void BondHarmonicIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oebond,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include "dihedral_charmm_intel.h"
|
||||
|
@ -148,7 +149,7 @@ void DihedralCharmmIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oevdwl,oecoul,oedihedral,ov0,ov1,ov2,ov3,ov4,ov5, \
|
||||
opv0,opv1,opv2,opv3,opv4,opv5)
|
||||
|
@ -522,7 +523,7 @@ void DihedralCharmmIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oevdwl,oecoul,oedihedral,ov0,ov1,ov2,ov3,ov4,ov5, \
|
||||
opv0,opv1,opv2,opv3,opv4,opv5)
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include "dihedral_fourier_intel.h"
|
||||
|
@ -127,7 +128,7 @@ void DihedralFourierIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oedihedral,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include "dihedral_harmonic_intel.h"
|
||||
|
@ -127,7 +128,7 @@ void DihedralHarmonicIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oedihedral,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include "dihedral_opls_intel.h"
|
||||
|
@ -131,7 +132,7 @@ void DihedralOPLSIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oedihedral,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
Anupama Kurpad (Intel) - Host Affinitization
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_intel.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
|
@ -220,7 +221,7 @@ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||
comm->nthreads = nomp;
|
||||
} else {
|
||||
int nthreads;
|
||||
#pragma omp parallel default(none) shared(nthreads)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(nthreads)
|
||||
nthreads = omp_get_num_threads();
|
||||
comm->nthreads = nthreads;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
@ -138,7 +139,7 @@ void ImproperCvffIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oeimproper,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
@ -139,7 +140,7 @@ void ImproperHarmonicIntel::eval(const int vflag,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(f_start,f_stride,fc) \
|
||||
reduction(+:oeimproper,ov0,ov1,ov2,ov3,ov4,ov5)
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "timer.h"
|
||||
|
@ -263,7 +264,7 @@ void NPairIntel::bin_newton(const int offload, NeighList *list,
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(overflow, nstencilp, binstart, binend)
|
||||
#endif
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing authors: William McDoniel (RWTH Aachen University)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
|
@ -729,7 +730,7 @@ void PPPMDispIntel::particle_map(double delx, double dely, double delz,
|
|||
int flag = 0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr, delx, dely, delz, sft, p2g, nup, nlow, nxlo,\
|
||||
nylo, nzlo, nxhi, nyhi, nzhi) reduction(+:flag) if(!_use_lrt)
|
||||
#endif
|
||||
|
@ -803,7 +804,7 @@ void PPPMDispIntel::make_rho_c(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
int nthr = comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, nlocal, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -909,7 +910,7 @@ void PPPMDispIntel::make_rho_c(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
|
||||
// reduce all the perthread_densities into global_density
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -951,7 +952,7 @@ void PPPMDispIntel::make_rho_g(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
int nthr = comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, nlocal, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -1059,7 +1060,7 @@ void PPPMDispIntel::make_rho_g(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
|
||||
// reduce all the perthread_densities into global_density
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -1234,7 +1235,7 @@ void PPPMDispIntel::make_rho_none(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
int nthr = comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, nlocal, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -1343,7 +1344,7 @@ void PPPMDispIntel::make_rho_none(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
|
||||
// reduce all the perthread_densities into global_density
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -1386,7 +1387,7 @@ void PPPMDispIntel::fieldforce_c_ik(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -1536,7 +1537,7 @@ void PPPMDispIntel::fieldforce_c_ad(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
FFT_SCALAR * _noalias const particle_ekz = this->particle_ekz;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -1734,7 +1735,7 @@ void PPPMDispIntel::fieldforce_g_ik(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -1881,7 +1882,7 @@ void PPPMDispIntel::fieldforce_g_ad(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
FFT_SCALAR * _noalias const particle_ekz = this->particle_ekz;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -2078,7 +2079,7 @@ void PPPMDispIntel::fieldforce_a_ik(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -2312,7 +2313,7 @@ void PPPMDispIntel::fieldforce_a_ad(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
FFT_SCALAR * _noalias const particle_ekz6 = this->particle_ekz6;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -2603,7 +2604,7 @@ void PPPMDispIntel::fieldforce_none_ik(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -2762,7 +2763,7 @@ void PPPMDispIntel::fieldforce_none_ad(IntelBuffers<flt_t,acc_t> * /*buffers*/)
|
|||
int nthr = comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
W. Michael Brown (Intel)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
|
@ -372,7 +373,7 @@ void PPPMIntel::particle_map(IntelBuffers<flt_t,acc_t> *buffers)
|
|||
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) reduction(+:flag) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -446,7 +447,7 @@ void PPPMIntel::make_rho(IntelBuffers<flt_t,acc_t> *buffers)
|
|||
nthr = comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, nlocal, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -549,7 +550,7 @@ void PPPMIntel::make_rho(IntelBuffers<flt_t,acc_t> *buffers)
|
|||
// reduce all the perthread_densities into global_density
|
||||
if (nthr > 1) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nthr, global_density) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -598,7 +599,7 @@ void PPPMIntel::fieldforce_ik(IntelBuffers<flt_t,acc_t> *buffers)
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
@ -749,7 +750,7 @@ void PPPMIntel::fieldforce_ad(IntelBuffers<flt_t,acc_t> *buffers)
|
|||
}
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) \
|
||||
#pragma omp parallel LMP_DEFAULT_NONE \
|
||||
shared(nlocal, nthr) if(!_use_lrt)
|
||||
#endif
|
||||
{
|
||||
|
|
|
@ -9,11 +9,3 @@ doc/Section_accelerate.html, sub-section 5.2
|
|||
The person who created this package is Axel Kohlmeyer at Temple U
|
||||
(akohlmey at gmail.com). Contact him directly if you have questions.
|
||||
|
||||
--------------------------
|
||||
|
||||
This directory also contains a shell script:
|
||||
|
||||
hack_openmp_for_pgi.sh
|
||||
|
||||
which will convert OpenMP directives in src files
|
||||
into a form compatible with the PGI compiler.
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_charmm_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleCharmmOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_class2_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleClass2OMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_cosine_delta_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleCosineDeltaOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_cosine_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleCosineOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_cosine_periodic_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -49,7 +50,7 @@ void AngleCosinePeriodicOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_cosine_shift_exp_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleCosineShiftExpOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_cosine_shift_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleCosineShiftOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_cosine_squared_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleCosineSquaredOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_dipole_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -51,7 +52,7 @@ void AngleDipoleOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_fourier_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleFourierOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_fourier_simple_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleFourierSimpleOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_harmonic_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleHarmonicOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_quartic_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleQuarticOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_sdk_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -49,7 +50,7 @@ void AngleSDKOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "angle_table_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -47,7 +48,7 @@ void AngleTableOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nanglelist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_class2_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -47,7 +48,7 @@ void BondClass2OMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_fene_expand_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -48,7 +49,7 @@ void BondFENEExpandOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_fene_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -48,7 +49,7 @@ void BondFENEOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_gromos_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -44,7 +45,7 @@ void BondGromosOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_harmonic_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -46,7 +47,7 @@ void BondHarmonicOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_harmonic_shift_cut_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -46,7 +47,7 @@ void BondHarmonicShiftCutOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_harmonic_shift_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -46,7 +47,7 @@ void BondHarmonicShiftOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_morse_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -46,7 +47,7 @@ void BondMorseOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_nonlinear_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -46,7 +47,7 @@ void BondNonlinearOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_quartic_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -52,7 +53,7 @@ void BondQuarticOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "bond_table_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -46,7 +47,7 @@ void BondTableOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nbondlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "dihedral_charmm_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -56,7 +57,7 @@ void DihedralCharmmOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_class2_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void DihedralClass2OMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_cosine_shift_exp_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void DihedralCosineShiftExpOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "dihedral_fourier_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -49,7 +50,7 @@ void DihedralFourierOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_harmonic_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void DihedralHarmonicOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_helix_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -53,7 +54,7 @@ void DihedralHelixOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_multi_harmonic_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void DihedralMultiHarmonicOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_nharmonic_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void DihedralNHarmonicOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_opls_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -51,7 +52,7 @@ void DihedralOPLSOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "dihedral_quadratic_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -51,7 +52,7 @@ void DihedralQuadraticOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "dihedral_table_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -113,7 +114,7 @@ void DihedralTableOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->ndihedrallist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author : Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "accelerator_omp.h"
|
||||
#include "atom.h"
|
||||
|
||||
|
@ -45,7 +46,7 @@ void DomainOMP::pbc()
|
|||
const int nlocal = atom->nlocal;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
imageint idim,otherdims;
|
||||
|
@ -143,7 +144,7 @@ void DomainOMP::lamda2x(int n)
|
|||
const int num = n;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < num; i++) {
|
||||
x[i].x = h[0]*x[i].x + h[5]*x[i].y + h[4]*x[i].z + boxlo[0];
|
||||
|
@ -163,7 +164,7 @@ void DomainOMP::x2lamda(int n)
|
|||
const int num = n;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < num; i++) {
|
||||
double delta0 = x[i].x - boxlo[0];
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing authors: Roy Pollock (LLNL), Paul Crozier (SNL)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "ewald_omp.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
|
@ -104,7 +105,7 @@ void EwaldOMP::compute(int eflag, int vflag)
|
|||
v0=v1=v2=v3=v4=v5=0.0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag) reduction(+:eng_tmp,v0,v1,v2,v3,v4,v5)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) reduction(+:eng_tmp,v0,v1,v2,v3,v4,v5)
|
||||
#endif
|
||||
{
|
||||
|
||||
|
@ -234,7 +235,7 @@ void EwaldOMP::eik_dot_r()
|
|||
const int nthreads = comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
int i,ifrom,ito,k,l,m,n,ic,tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_gravity_omp.h"
|
||||
#include "atom.h"
|
||||
#include "update.h"
|
||||
|
@ -69,7 +70,7 @@ void FixGravityOMP::post_force(int /* vflag */)
|
|||
|
||||
if (rmass) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) reduction(-:grav)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE reduction(-:grav)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -81,7 +82,7 @@ void FixGravityOMP::post_force(int /* vflag */)
|
|||
}
|
||||
} else {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) reduction(-:grav)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE reduction(-:grav)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_neigh_history_omp.h"
|
||||
#include <cstring>
|
||||
#include "my_page.h"
|
||||
|
@ -73,7 +74,7 @@ void FixNeighHistoryOMP::pre_exchange_onesided()
|
|||
maxpartner = 0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
|
||||
|
@ -199,7 +200,7 @@ void FixNeighHistoryOMP::pre_exchange_newton()
|
|||
for (int i = 0; i < nall_neigh; i++) npartner[i] = 0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
|
||||
|
@ -373,7 +374,7 @@ void FixNeighHistoryOMP::pre_exchange_no_newton()
|
|||
maxpartner = 0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
|
||||
|
@ -525,7 +526,7 @@ void FixNeighHistoryOMP::post_neighbor()
|
|||
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
|
@ -82,7 +83,7 @@ void FixNHAsphereOMP::nve_v()
|
|||
// merged with FixNHOMP instead of calling it for the COM update.
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -122,7 +123,7 @@ void FixNHAsphereOMP::nve_x()
|
|||
// principal moments of inertia
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -163,7 +164,7 @@ void FixNHAsphereOMP::nh_v_temp()
|
|||
|
||||
if (which == NOBIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -177,7 +178,7 @@ void FixNHAsphereOMP::nh_v_temp()
|
|||
}
|
||||
} else if (which == BIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
double buf[3];
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing authors: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_nh_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -57,7 +58,7 @@ void FixNHOMP::remap()
|
|||
if (allremap) domain->x2lamda(nlocal);
|
||||
else {
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & dilate_group_bit)
|
||||
|
@ -207,7 +208,7 @@ void FixNHOMP::remap()
|
|||
if (allremap) domain->lamda2x(nlocal);
|
||||
else {
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & dilate_group_bit)
|
||||
|
@ -235,7 +236,7 @@ void FixNHOMP::nh_v_press()
|
|||
|
||||
if (which == NOBIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -253,7 +254,7 @@ void FixNHOMP::nh_v_press()
|
|||
}
|
||||
} else if (which == BIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
double buf[3];
|
||||
|
@ -289,7 +290,7 @@ void FixNHOMP::nve_v()
|
|||
if (atom->rmass) {
|
||||
const double * _noalias const rmass = atom->rmass;
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -303,7 +304,7 @@ void FixNHOMP::nve_v()
|
|||
const double *_noalias const mass = atom->mass;
|
||||
const int * _noalias const type = atom->type;
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -330,7 +331,7 @@ void FixNHOMP::nve_x()
|
|||
// x update by full step only for atoms in group
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -352,7 +353,7 @@ void FixNHOMP::nh_v_temp()
|
|||
|
||||
if (which == NOBIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -363,7 +364,7 @@ void FixNHOMP::nh_v_temp()
|
|||
}
|
||||
} else if (which == BIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
double buf[3];
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_nh_sphere_omp.h"
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
|
@ -85,7 +86,7 @@ void FixNHSphereOMP::nve_v()
|
|||
// 4 cases depending on radius vs shape and rmass vs mass
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -115,7 +116,7 @@ void FixNHSphereOMP::nh_v_temp()
|
|||
|
||||
if (which == NOBIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -129,7 +130,7 @@ void FixNHSphereOMP::nh_v_temp()
|
|||
}
|
||||
} else if (which == BIAS) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
double buf[3];
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_nve_omp.h"
|
||||
#include "atom.h"
|
||||
|
||||
|
@ -41,7 +42,7 @@ void FixNVEOMP::initial_integrate(int /* vflag */)
|
|||
if (atom->rmass) {
|
||||
const double * const rmass = atom->rmass;
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -58,7 +59,7 @@ void FixNVEOMP::initial_integrate(int /* vflag */)
|
|||
const double * const mass = atom->mass;
|
||||
const int * const type = atom->type;
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -87,7 +88,7 @@ void FixNVEOMP::final_integrate()
|
|||
if (atom->rmass) {
|
||||
const double * const rmass = atom->rmass;
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -101,7 +102,7 @@ void FixNVEOMP::final_integrate()
|
|||
const double * const mass = atom->mass;
|
||||
const int * const type = atom->type;
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_nve_sphere_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -49,7 +50,7 @@ void FixNVESphereOMP::initial_integrate(int /* vflag */)
|
|||
// update v,x,omega for all particles
|
||||
// d_omega/dt = torque / inertia
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
|
@ -76,7 +77,7 @@ void FixNVESphereOMP::initial_integrate(int /* vflag */)
|
|||
double * const * const mu = atom->mu;
|
||||
if (dlm == NODLM) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
double g0,g1,g2,msq,scale;
|
||||
|
@ -95,7 +96,7 @@ void FixNVESphereOMP::initial_integrate(int /* vflag */)
|
|||
}
|
||||
} else {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE
|
||||
#endif
|
||||
// Integrate orientation following Dullweber-Leimkuhler-Maclachlan scheme
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
|
@ -223,7 +224,7 @@ void FixNVESphereOMP::final_integrate()
|
|||
// d_omega/dt = torque / inertia
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_nvt_sllod_omp.h"
|
||||
#include <cstring>
|
||||
#include "math_extra.h"
|
||||
|
@ -114,7 +115,7 @@ void FixNVTSllodOMP::nh_v_temp()
|
|||
MathExtra::multiply_shape_shape(domain->h_rate,domain->h_inv,h_two);
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) shared(h_two) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(h_two) schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
double vdelu0,vdelu1,vdelu2,buf[3];
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
OpenMP based threading support for LAMMPS
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
|
@ -70,7 +71,7 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg)
|
|||
if (narg > 3) {
|
||||
#if defined(_OPENMP)
|
||||
if (strcmp(arg[3],"0") == 0)
|
||||
#pragma omp parallel default(none) shared(nthreads)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(nthreads)
|
||||
nthreads = omp_get_num_threads();
|
||||
else
|
||||
nthreads = force->inumeric(FLERR,arg[3]);
|
||||
|
@ -134,7 +135,7 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg)
|
|||
thr = new ThrData *[nthreads];
|
||||
_nthr = nthreads;
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(lmp)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(lmp)
|
||||
#endif
|
||||
{
|
||||
const int tid = get_tid();
|
||||
|
@ -186,7 +187,7 @@ void FixOMP::init()
|
|||
thr = new ThrData *[nthreads];
|
||||
_nthr = nthreads;
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
const int tid = get_tid();
|
||||
|
@ -350,7 +351,7 @@ void FixOMP::pre_force(int)
|
|||
double *drho = atom->drho;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(f,torque,erforce,de,drho)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(f,torque,erforce,de,drho)
|
||||
#endif
|
||||
{
|
||||
const int tid = get_tid();
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_rigid_nh_omp.h"
|
||||
#include <mpi.h>
|
||||
#include <cstring>
|
||||
|
@ -89,7 +90,7 @@ void FixRigidNHOMP::initial_integrate(int vflag)
|
|||
double akt=0.0, akr=0.0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) shared(scale_r,scale_t,scale_v) schedule(static) reduction(+:akt,akr)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(scale_r,scale_t,scale_v) schedule(static) reduction(+:akt,akr)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
double mbody[3],tbody[3],fquat[4];
|
||||
|
@ -250,7 +251,7 @@ void FixRigidNHOMP::compute_forces_and_torques()
|
|||
int i;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) private(i) reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE private(i) reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#endif
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
@ -289,7 +290,7 @@ void FixRigidNHOMP::compute_forces_and_torques()
|
|||
int i;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) private(i) shared(ib) reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE private(i) LMP_SHARED(ib) reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#endif
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
@ -330,7 +331,7 @@ void FixRigidNHOMP::compute_forces_and_torques()
|
|||
memset(&sum[0][0],0,6*nbody*sizeof(double));
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
#if defined(_OPENMP)
|
||||
|
@ -373,7 +374,7 @@ void FixRigidNHOMP::compute_forces_and_torques()
|
|||
MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world);
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) private(ibody) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE private(ibody) schedule(static)
|
||||
#endif
|
||||
for (ibody = 0; ibody < nbody; ibody++) {
|
||||
fcm[ibody][0] = all[ibody][0] + langextra[ibody][0];
|
||||
|
@ -388,7 +389,7 @@ void FixRigidNHOMP::compute_forces_and_torques()
|
|||
|
||||
if (id_gravity) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) private(ibody) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE private(ibody) schedule(static)
|
||||
#endif
|
||||
for (ibody = 0; ibody < nbody; ibody++) {
|
||||
fcm[ibody][0] += gvec[0]*masstotal[ibody];
|
||||
|
@ -433,7 +434,7 @@ void FixRigidNHOMP::final_integrate()
|
|||
const double dtf2 = dtf * 2.0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) shared(scale_t,scale_r) schedule(static) reduction(+:akt,akr)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(scale_t,scale_r) schedule(static) reduction(+:akt,akr)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
double mbody[3],tbody[3],fquat[4];
|
||||
|
@ -554,7 +555,7 @@ void FixRigidNHOMP::remap()
|
|||
if (allremap) domain->x2lamda(nlocal);
|
||||
else {
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & dilate_group_bit)
|
||||
|
@ -586,7 +587,7 @@ void FixRigidNHOMP::remap()
|
|||
if (allremap) domain->lamda2x(nlocal);
|
||||
else {
|
||||
#if defined (_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & dilate_group_bit)
|
||||
|
@ -631,7 +632,7 @@ void FixRigidNHOMP::set_xv_thr()
|
|||
int i;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) private(i) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE private(i) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#endif
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
@ -832,7 +833,7 @@ void FixRigidNHOMP::set_v_thr()
|
|||
int i;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) private(i) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE private(i) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#endif
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_rigid_omp.h"
|
||||
#include <mpi.h>
|
||||
#include <cmath>
|
||||
|
@ -47,7 +48,7 @@ typedef struct { double x,y,z; } dbl3_t;
|
|||
void FixRigidOMP::initial_integrate(int vflag)
|
||||
{
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
|
||||
|
@ -120,7 +121,7 @@ void FixRigidOMP::compute_forces_and_torques()
|
|||
double s0=0.0,s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
@ -158,7 +159,7 @@ void FixRigidOMP::compute_forces_and_torques()
|
|||
double s0=0.0,s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) shared(ib) reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(ib) reduction(+:s0,s1,s2,s3,s4,s5)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
@ -199,7 +200,7 @@ void FixRigidOMP::compute_forces_and_torques()
|
|||
memset(&sum[0][0],0,6*nbody*sizeof(double));
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
#if defined(_OPENMP)
|
||||
|
@ -246,7 +247,7 @@ void FixRigidOMP::compute_forces_and_torques()
|
|||
// fflag,tflag = 0 for some dimensions in 2d
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
fcm[ibody][0] = all[ibody][0] + langextra[ibody][0];
|
||||
|
@ -261,7 +262,7 @@ void FixRigidOMP::compute_forces_and_torques()
|
|||
|
||||
if (id_gravity) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
fcm[ibody][0] += gvec[0]*masstotal[ibody];
|
||||
|
@ -280,7 +281,7 @@ void FixRigidOMP::final_integrate()
|
|||
// update vcm and angmom
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
|
||||
|
@ -346,7 +347,7 @@ void FixRigidOMP::set_xv_thr()
|
|||
const int nlocal = atom->nlocal;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
@ -546,7 +547,7 @@ void FixRigidOMP::set_v_thr()
|
|||
const int nlocal = atom->nlocal;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
const int ibody = body[i];
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include "fix_rigid_small_omp.h"
|
||||
#include <cmath>
|
||||
#include "atom.h"
|
||||
|
@ -46,7 +47,7 @@ void FixRigidSmallOMP::initial_integrate(int vflag)
|
|||
{
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nlocal_body; ibody++) {
|
||||
|
||||
|
@ -117,7 +118,7 @@ void FixRigidSmallOMP::compute_forces_and_torques()
|
|||
const int nthreads=comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nlocal_body+nghost_body; ibody++) {
|
||||
double * _noalias const fcm = body[ibody].fcm;
|
||||
|
@ -132,7 +133,7 @@ void FixRigidSmallOMP::compute_forces_and_torques()
|
|||
// and then each thread only processes some bodies.
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE
|
||||
#endif
|
||||
{
|
||||
#if defined(_OPENMP)
|
||||
|
@ -183,7 +184,7 @@ void FixRigidSmallOMP::compute_forces_and_torques()
|
|||
|
||||
if (langflag) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nlocal_body; ibody++) {
|
||||
double * _noalias const fcm = body[ibody].fcm;
|
||||
|
@ -201,7 +202,7 @@ void FixRigidSmallOMP::compute_forces_and_torques()
|
|||
|
||||
if (id_gravity) {
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
double * _noalias const fcm = body[ibody].fcm;
|
||||
|
@ -222,7 +223,7 @@ void FixRigidSmallOMP::final_integrate()
|
|||
// update vcm and angmom, recompute omega
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) schedule(static)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE schedule(static)
|
||||
#endif
|
||||
for (int ibody = 0; ibody < nlocal_body; ibody++) {
|
||||
Body &b = body[ibody];
|
||||
|
@ -294,7 +295,7 @@ void FixRigidSmallOMP::set_xv_thr()
|
|||
const int nlocal = atom->nlocal;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
const int ibody = atom2body[i];
|
||||
|
@ -489,7 +490,7 @@ void FixRigidSmallOMP::set_v_thr()
|
|||
const int nlocal = atom->nlocal;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5)
|
||||
#endif
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
const int ibody = atom2body[i];
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# convert default(none) directives for OpenMP pragmas to default(shared) and remove shared() directive
|
||||
# this allows compiling OpenMP pragmas in LAMMPS with compilers that don't support default(none) properly
|
||||
# or require backward incompatible OpenMP 4 and OpenMP 5 semantics
|
||||
|
||||
for f in *.h *.cpp
|
||||
do \
|
||||
sed -e '/#pragma omp/s/^\(.*default\)(none)\(.*\)$/\1(shared)\2/' \
|
||||
-e '/#pragma omp/s/shared([a-z0-9,_]\+)//' \
|
||||
-i.bak $f
|
||||
done
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "improper_class2_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void ImproperClass2OMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nimproperlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "improper_cossq_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void ImproperCossqOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nimproperlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "improper_cvff_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void ImproperCvffOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nimproperlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "omp_compat.h"
|
||||
#include <cmath>
|
||||
#include "improper_fourier_omp.h"
|
||||
#include "atom.h"
|
||||
|
@ -50,7 +51,7 @@ void ImproperFourierOMP::compute(int eflag, int vflag)
|
|||
const int inum = neighbor->nimproperlist;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue