Merge branch 'master' into kk_dihedral_charmm

This commit is contained in:
Stan Moore 2020-04-29 08:00:55 -06:00 committed by GitHub
commit fe9e6736e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 1125 additions and 534 deletions

View File

@ -135,23 +135,20 @@ if(PKG_USER-ADIOS)
target_link_libraries(lammps PRIVATE adios2::adios2)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
option(BUILD_MPI "Build MPI version" OFF)
else()
# do MPI detection after language activation,
# in case MPI for these languages is required
if(NOT CMAKE_CROSSCOMPILING)
set(MPI_CXX_SKIP_MPICXX TRUE)
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
else()
option(BUILD_MPI "Build MPI version" OFF)
endif()
if(BUILD_MPI)
# We use a non-standard procedure to compile with MPI on windows
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
# We use a non-standard procedure to cross-compile with MPI on Windows
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
include(MPI4WIN)
target_link_libraries(lammps PUBLIC MPI::MPI_CXX)
else()
set(MPI_CXX_SKIP_MPICXX ON)
find_package(MPI REQUIRED)
target_link_libraries(lammps PUBLIC MPI::MPI_CXX)
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
@ -332,8 +329,9 @@ set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler specific opt
separate_arguments(CMAKE_TUNE_FLAGS)
include(CheckCXXCompilerFlag)
foreach(_FLAG ${CMAKE_TUNE_FLAGS})
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAG})
if(COMPILER_SUPPORTS${_FLAG})
string(REGEX REPLACE "[=\"]" "" _FLAGX ${_FLAG})
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAGX})
if(COMPILER_SUPPORTS${_FLAGX})
target_compile_options(lammps PRIVATE ${_FLAG})
else()
message(WARNING "${_FLAG} found in CMAKE_TUNE_FLAGS, but not supported by the compiler, skipping")
@ -705,6 +703,7 @@ else()
endif()
if(BUILD_MPI)
message(STATUS "<<< MPI flags >>>
-- MPI_defines: ${MPI_CXX_COMPILE_DEFINITIONS}
-- MPI includes: ${MPI_CXX_INCLUDE_PATH}
-- MPI libraries: ${MPI_CXX_LIBRARIES};${MPI_Fortran_LIBRARIES}")
endif()

View File

@ -23,3 +23,8 @@ set_target_properties(MPI::MPI_CXX PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
add_dependencies(MPI::MPI_CXX mpi4win_build)
# set variables for status reporting at the end of CMake run
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a")

View File

@ -330,7 +330,7 @@ elseif(GPU_API STREQUAL "HIP")
if(HIP_PLATFORM STREQUAL "nvcc")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_NVCC__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/include)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_include_directories(gpu PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
@ -338,6 +338,12 @@ elseif(GPU_API STREQUAL "HIP")
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/include)
target_include_directories(hip_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(hip_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
elseif(HIP_PLATFORM STREQUAL "hcc")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_HCC__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__)
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
endif()
target_link_libraries(lammps PRIVATE gpu)
@ -353,7 +359,12 @@ RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES)
get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES)
target_link_libraries(gpu PRIVATE MPI::MPI_CXX)
if(NOT BUILD_MPI)
# mpistubs is aliased to MPI::MPI_CXX, but older versions of cmake won't work forward the include path
target_link_libraries(gpu PRIVATE mpi_stubs)
else()
target_link_libraries(gpu PRIVATE MPI::MPI_CXX)
endif()
if(NOT BUILD_SHARED_LIBS)
install(TARGETS gpu EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

View File

@ -1,4 +1,11 @@
enable_language(Fortran)
# using lammps in a super-build setting
if(TARGET LATTE::latte)
target_link_libraries(lammps PRIVATE LATTE::latte)
return()
endif()
find_package(LATTE)
if(LATTE_FOUND)
set(DOWNLOAD_LATTE_DEFAULT OFF)
@ -35,5 +42,6 @@ else()
if(NOT LATTE_FOUND)
message(FATAL_ERROR "LATTE library not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it")
endif()
target_link_libraries(lammps PRIVATE LATTE::latte)
# latte needs lapack
target_link_libraries(lammps PRIVATE LATTE::latte ${LAPACK_LIBRARIES})
endif()

View File

@ -2,7 +2,7 @@
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBG" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(MPI_CXX "clang++" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)

12
cmake/presets/hip.cmake Normal file
View File

@ -0,0 +1,12 @@
# preset that will enable hipcc plus gcc with support for MPI and OpenMP (on Linux boxes)
set(CMAKE_CXX_COMPILER "hipcc" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_CXX "hipcc" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "libomp.so" CACHE PATH "" FORCE)

View File

@ -87,7 +87,7 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`msd/chunk <compute_msd_chunk>`
* :doc:`msd/nongauss <compute_msd_nongauss>`
* :doc:`omega/chunk <compute_omega_chunk>`
* :doc:`orientorder/atom <compute_orientorder_atom>`
* :doc:`orientorder/atom (k) <compute_orientorder_atom>`
* :doc:`pair <compute_pair>`
* :doc:`pair/local <compute_pair_local>`
* :doc:`pe <compute_pe>`

View File

@ -378,9 +378,9 @@ change some variables later with additional *-D* flags. A few examples:
.. code-block:: bash
cmake -C ../cmake/preset/minimal.cmake -D PKG_MISC=on ../cmake
cmake -C ../cmake/preset/clang.cmake -C ../cmake/preset/most.cmake ../cmake
cmake -C ../cmake/preset/minimal.cmake -D BUILD_MPI=off ../cmake
cmake -C ../cmake/presets/minimal.cmake -D PKG_MISC=on ../cmake
cmake -C ../cmake/presets/clang.cmake -C ../cmake/presets/most.cmake ../cmake
cmake -C ../cmake/presets/minimal.cmake -D BUILD_MPI=off ../cmake
The first command will install the packages ``KSPACE``, ``MANYBODY``,
``MOLECULE``, ``RIGID`` and ``MISC``; the first four from the preset
@ -396,7 +396,7 @@ It is also possible to do this incrementally.
.. code-block:: bash
cmake -C ../cmake/preset/minimal.cmake ../cmake
cmake -C ../cmake/presets/minimal.cmake ../cmake
cmake -D PKG_MISC=on .
will achieve the same configuration like in the first example above. In

View File

@ -24,12 +24,13 @@ allows you to install LAMMPS with a single command, and stay
up-to-date with the current version of LAMMPS by simply updating your
operating system.
To install the appropriate personal-package archive (PPA), do the
To install the appropriate personal-package archives (PPAs), do the
following once:
.. code-block:: bash
$ sudo add-apt-repository ppa:gladky-anton/lammps
$ sudo add-apt-repository ppa:openkim/latest
$ sudo apt-get update
To install LAMMPS do the following once:
@ -38,7 +39,7 @@ To install LAMMPS do the following once:
$ sudo apt-get install lammps-daily
This downloads an executable named "lmp_daily" to your box, which
This downloads an executable named ``lmp_daily`` to your box, which
can then be used in the usual way to run input scripts:
.. code-block:: bash
@ -60,11 +61,29 @@ To get a copy of the current documentation and examples:
$ sudo apt-get install lammps-daily-doc
which will download the doc files in
/usr/share/doc/lammps-daily-doc/doc and example problems in
/usr/share/doc/lammps-doc/examples.
``/usr/share/doc/lammps-daily-doc/doc`` and example problems in
``/usr/share/doc/lammps-doc/examples``.
Note that you may still wish to download the tarball to get potential
files and auxiliary tools.
To get a copy of the current potentials files:
.. code-block:: bash
$ sudo apt-get install lammps-daily-data
which will download the potentials files to
``/usr/share/lammps-daily/potentials``. The ``lmp_daily`` binary is
hard-coded to look for potential files in this directory (it does not
use the `LAMMPS_POTENTIALS` environment variable, as described
in :doc:`pair_coeff <pair_coeff>` command).
The ``lmp_daily`` binary is built with the :ref:`KIM package <kim>` which
results in the above command also installing the `kim-api` binaries when LAMMPS
is installed. In order to use potentials from `openkim.org <openkim_>`_, you
can install the `openkim-models` package
.. code-block:: bash
$ sudo apt-get install openkim-models
To un-install LAMMPS, do the following:
@ -72,17 +91,8 @@ To un-install LAMMPS, do the following:
$ sudo apt-get remove lammps-daily
Note that the lammps-daily executable is built with the following
sequence of make commands, as if you had done the same with the
unpacked tarball files in the src directory:
.. code-block:: bash
$ make yes-all
$ make no-lib
$ make mpi
Thus it builds with FFTW3 and OpenMPI.
Please use ``lmp_daily -help`` to see which compilation options, packages,
and styles are included in the binary.
Thanks to Anton Gladky (gladky.anton at gmail.com) for setting up this
Ubuntu package capability.
@ -103,14 +113,14 @@ linking to the C library interface (lammps-devel, lammps-mpich-devel,
lammps-openmpi-devel), the header for compiling programs using
the C library interface (lammps-headers), and the LAMMPS python
module for Python 3. All packages can be installed at the same
time and the name of the LAMMPS executable is *lmp* and *lmp_openmpi*
or *lmp_mpich* respectively. By default, *lmp* will refer to the
time and the name of the LAMMPS executable is ``lmp`` and ``lmp_openmpi``
or ``lmp_mpich`` respectively. By default, ``lmp`` will refer to the
serial executable, unless one of the MPI environment modules is loaded
("module load mpi/mpich-x86_64" or "module load mpi/openmpi-x86_64").
(``module load mpi/mpich-x86_64`` or ``module load mpi/openmpi-x86_64``).
Then the corresponding parallel LAMMPS executable can be used.
The same mechanism applies when loading the LAMMPS python module.
To install LAMMPS with OpenMPI and run an input in.lj with 2 CPUs do:
To install LAMMPS with OpenMPI and run an input ``in.lj`` with 2 CPUs do:
.. code-block:: bash
@ -118,10 +128,10 @@ To install LAMMPS with OpenMPI and run an input in.lj with 2 CPUs do:
$ module load mpi/openmpi-x86_64
$ mpirun -np 2 lmp -in in.lj
The "dnf install" command is needed only once. In case of a new LAMMPS
stable release, "dnf update" will automatically update to the newer
The ``dnf install`` command is needed only once. In case of a new LAMMPS
stable release, ``dnf update`` will automatically update to the newer
version as soon at the RPM files are built and uploaded to the download
mirrors. The "module load" command is needed once per (shell) session
mirrors. The ``module load`` command is needed once per (shell) session
or shell terminal instance, unless it is automatically loaded from the
shell profile.
@ -134,7 +144,7 @@ can install the `openkim-models` package
$ dnf install openkim-models
Please use "lmp -help" to see which compilation options, packages,
Please use ``lmp -help`` to see which compilation options, packages,
and styles are included in the binary.
Thanks to Christoph Junghans (LANL) for making LAMMPS available in Fedora.
@ -153,10 +163,10 @@ in the `Extra Packages for Enterprise Linux (EPEL) repository <https://fedorapro
for use with Red Hat Enterprise Linux (RHEL) or CentOS version 7.x
and compatible Linux distributions. Names of packages, executable,
and content are the same as described above for Fedora Linux.
But RHEL/CentOS 7.x uses the "yum" package manager instead of "dnf"
But RHEL/CentOS 7.x uses the ``yum`` package manager instead of ``dnf``
in Fedora 28.
Please use "lmp -help" to see which compilation options, packages,
Please use ``lmp -help`` to see which compilation options, packages,
and styles are included in the binary.
Thanks to Christoph Junghans (LANL) for making LAMMPS available in EPEL.
@ -176,13 +186,13 @@ in OpenSuse as of Leap 15.0. You can install the package with:
$ zypper install lammps
This includes support for OpenMPI. The name of the LAMMPS executable
is *lmp*\ . Thus to run an input in parallel on 2 CPUs you would do:
is ``lmp``. Thus to run an input in parallel on 2 CPUs you would do:
.. code-block:: bash
$ mpirun -np 2 lmp -in in.lj
Please use "lmp -help" to see which compilation options, packages,
Please use ``lmp -help`` to see which compilation options, packages,
and styles are included in the binary.
The LAMMPS binary is built with the :ref:`KIM package <kim>` which

View File

@ -4,7 +4,7 @@ compute orientorder/atom command
================================
compute orientorder/atom/kk command
=======================
===================================
Syntax
""""""

52
doc/src/fix_bond_react.rst Normal file → Executable file
View File

@ -158,7 +158,9 @@ The following comments pertain to each *react* argument (in other
words, can be customized for each reaction, or reaction step):
A check for possible new reaction sites is performed every *Nevery*
timesteps.
timesteps. *Nevery* can be specified with an equal-style
:doc:`variable <variable>`, whose value is rounded up to the nearest
integer.
Three physical conditions must be met for a reaction to occur. First,
a bonding atom pair must be identified within the reaction distance
@ -171,19 +173,29 @@ modified to match the post-reaction template.
A bonding atom pair will be identified if several conditions are met.
First, a pair of atoms I,J within the specified react-group-ID of type
itype and jtype must be separated by a distance between *Rmin* and
*Rmax*\ . It is possible that multiple bonding atom pairs are
identified: if the bonding atoms in the pre-reacted template are 1-2
neighbors, i.e. directly bonded, the farthest bonding atom partner is
set as its bonding partner; otherwise, the closest potential partner
is chosen. Then, if both an atom I and atom J have each other as their
bonding partners, these two atoms are identified as the bonding atom
pair of the reaction site. Once this unique bonding atom pair is
identified for each reaction, there could two or more reactions that
involve a given atom on the same timestep. If this is the case, only
one such reaction is permitted to occur. This reaction is chosen
randomly from all potential reactions. This capability allows e.g. for
different reaction pathways to proceed from identical reaction sites
with user-specified probabilities.
*Rmax*\ . *Rmin* and *Rmax* can be specified with equal-style
:doc:`variables <variable>`. For example, these reaction cutoffs can
be a function of the reaction conversion using the following commands:
.. code-block:: LAMMPS
variable rmax equal 0 # initialize variable before bond/react
fix myrxn all bond/react react myrxn1 all 1 0 v_rmax mol1 mol2 map_file.txt
variable rmax equal 3+f_myrxn[1]/100 # arbitrary function of reaction count
It is possible that multiple bonding atom pairs are identified: if the
bonding atoms in the pre-reacted template are 1-2 neighbors, i.e.
directly bonded, the farthest bonding atom partner is set as its
bonding partner; otherwise, the closest potential partner is chosen.
Then, if both an atom I and atom J have each other as their bonding
partners, these two atoms are identified as the bonding atom pair of
the reaction site. Once this unique bonding atom pair is identified
for each reaction, there could two or more reactions that involve a
given atom on the same timestep. If this is the case, only one such
reaction is permitted to occur. This reaction is chosen randomly from
all potential reactions. This capability allows e.g. for different
reaction pathways to proceed from identical reaction sites with
user-specified probabilities.
The pre-reacted molecule template is specified by a molecule command.
This molecule template file contains a sample reaction site and its
@ -419,7 +431,8 @@ it occurs:
The *prob* keyword can affect whether or not an eligible reaction
actually occurs. The fraction setting must be a value between 0.0 and
1.0. A uniform random number between 0.0 and 1.0 is generated and the
1.0, and can be specified with an equal-style :doc:`variable <variable>`.
A uniform random number between 0.0 and 1.0 is generated and the
eligible reaction only occurs if the random number is less than the
fraction. Up to N reactions are permitted to occur, as optionally
specified by the *max_rxn* keyword.
@ -489,10 +502,11 @@ local command.
**Restart, fix_modify, output, run start/stop, minimize info:**
Cumulative reaction counts for each reaction are written to :doc:`binary restart files <restart>`. These values are associated with the
reaction name (react-ID). Additionally, internally-created per-atom
properties are stored to allow for smooth restarts. None of the
:doc:`fix_modify <fix_modify>` options are relevant to this fix.
Cumulative reaction counts for each reaction are written to :doc:`binary restart files <restart>`.
These values are associated with the reaction name (react-ID).
Additionally, internally-created per-atom properties are stored to
allow for smooth restarts. None of the :doc:`fix_modify <fix_modify>`
options are relevant to this fix.
This fix computes one statistic for each *react* argument that it
stores in a global vector, of length 'number of react arguments', that

View File

@ -0,0 +1,56 @@
# two monomer nylon example
# reaction produces a condensed water molecule
units real
boundary p p p
atom_style full
kspace_style pppm 1.0e-4
pair_style lj/class2/coul/long 8.5
angle_style class2
bond_style class2
dihedral_style class2
improper_style class2
read_data tiny_nylon.data
variable runsteps equal 1000
variable prob1 equal step/v_runsteps*2
variable prob2 equal (step/v_runsteps)>0.5
velocity all create 300.0 4928459 dist gaussian
molecule mol1 rxn1_stp1_unreacted.data_template
molecule mol2 rxn1_stp1_reacted.data_template
molecule mol3 rxn1_stp2_unreacted.data_template
molecule mol4 rxn1_stp2_reacted.data_template
thermo 50
# dump 1 all xyz 1 test_vis.xyz
fix myrxns all bond/react stabilization yes statted_grp .03 &
react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 &
react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234
fix 1 statted_grp_REACT nvt temp 300 300 100
# optionally, you can customize behavior of reacting atoms,
# by using the internally-created 'bond_react_MASTER_group', like so:
fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1
thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
# restart 100 restart1 restart2
run ${runsteps}
# write_restart restart_longrun
# write_data restart_longrun.data

View File

@ -0,0 +1,201 @@
LAMMPS (15 Apr 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94)
using 1 OpenMP thread(s) per MPI task
# two monomer nylon example
# reaction produces a condensed water molecule
units real
boundary p p p
atom_style full
kspace_style pppm 1.0e-4
pair_style lj/class2/coul/long 8.5
angle_style class2
bond_style class2
dihedral_style class2
improper_style class2
read_data tiny_nylon.data
orthogonal box = (-25 -25 -25) to (25 25 25)
1 by 1 by 1 MPI processor grid
reading atoms ...
44 atoms
reading velocities ...
44 velocities
scanning bonds ...
9 = max bonds/atom
scanning angles ...
21 = max angles/atom
scanning dihedrals ...
29 = max dihedrals/atom
scanning impropers ...
29 = max impropers/atom
reading bonds ...
42 bonds
reading angles ...
74 angles
reading dihedrals ...
100 dihedrals
reading impropers ...
44 impropers
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
41 = max # of special neighbors
special bonds CPU = 0.000385045 secs
read_data CPU = 0.013443 secs
variable runsteps equal 1000
variable prob1 equal step/v_runsteps*2
variable prob2 equal (step/v_runsteps)>0.5
velocity all create 300.0 4928459 dist gaussian
molecule mol1 rxn1_stp1_unreacted.data_template
Read molecule template mol1:
1 molecules
18 atoms with max type 8
16 bonds with max type 14
25 angles with max type 28
23 dihedrals with max type 36
14 impropers with max type 11
molecule mol2 rxn1_stp1_reacted.data_template
Read molecule template mol2:
1 molecules
18 atoms with max type 9
17 bonds with max type 13
31 angles with max type 27
39 dihedrals with max type 33
20 impropers with max type 1
molecule mol3 rxn1_stp2_unreacted.data_template
Read molecule template mol3:
1 molecules
15 atoms with max type 9
14 bonds with max type 13
25 angles with max type 27
30 dihedrals with max type 33
16 impropers with max type 1
molecule mol4 rxn1_stp2_reacted.data_template
Read molecule template mol4:
1 molecules
15 atoms with max type 11
13 bonds with max type 15
19 angles with max type 29
16 dihedrals with max type 32
10 impropers with max type 13
thermo 50
# dump 1 all xyz 1 test_vis.xyz
fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234
WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
dynamic group bond_react_MASTER_group defined
dynamic group statted_grp_REACT defined
fix 1 statted_grp_REACT nvt temp 300 300 100
# optionally, you can customize behavior of reacting atoms,
# by using the internally-created 'bond_react_MASTER_group', like so:
fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1
thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
# restart 100 restart1 restart2
run ${runsteps}
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:332)
G vector (1/distance) = 0.0534597
grid = 2 2 2
stencil order = 5
estimated absolute RMS force accuracy = 0.0402256
estimated relative force accuracy = 0.000121138
using double precision FFTW3
3d grid and FFT values/proc = 343 8
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 10.5
ghost atom cutoff = 10.5
binsize = 5.25, bins = 10 10 10
2 neighbor lists, perpetual/occasional/extra = 1 1 0
(1) pair lj/class2/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
(2) fix bond/react, occasional, copy from (1)
attributes: half, newton on
pair build: copy
stencil: none
bin: none
WARNING: Inconsistent image flags (src/domain.cpp:812)
Per MPI rank memory allocation (min/avg/max) = 33.78 | 33.78 | 33.78 Mbytes
Step Temp Press Density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
0 300 346.78165 0.0034851739 0 0 0 0
50 262.63913 -492.10749 0.0034851739 0.1 0 1 0
100 766.52962 -29.714349 0.0034851739 0.2 0 1 0
150 503.86837 50.220304 0.0034851739 0.3 0 1 0
200 456.51295 12.312892 0.0034851739 0.4 0 1 0
250 391.54928 9.2335844 0.0034851739 0.5 0 1 0
300 336.6988 -47.193937 0.0034851739 0.6 0 1 0
350 254.06985 -9.2867898 0.0034851739 0.7 0 1 0
400 259.41098 -25.657321 0.0034851739 0.8 0 1 0
450 258.10364 22.5086 0.0034851739 0.9 0 1 0
500 272.13412 -6.5391448 0.0034851739 1 0 1 0
550 202.75504 54.658731 0.0034851739 1.1 1 1 1
600 344.79887 23.798478 0.0034851739 1.2 1 1 1
650 328.44488 -29.908484 0.0034851739 1.3 1 1 1
700 280.13593 -8.3223255 0.0034851739 1.4 1 1 1
750 300.67624 1.0632669 0.0034851739 1.5 1 1 1
800 376.64234 12.488392 0.0034851739 1.6 1 1 1
850 321.07642 19.814074 0.0034851739 1.7 1 1 1
900 332.23751 30.814079 0.0034851739 1.8 1 1 1
950 311.14029 5.7853136 0.0034851739 1.9 1 1 1
1000 253.14634 -37.560642 0.0034851739 2 1 1 1
Loop time of 0.379454 on 1 procs for 1000 steps with 44 atoms
Performance: 227.696 ns/day, 0.105 hours/ns, 2635.368 timesteps/s
99.6% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.069723 | 0.069723 | 0.069723 | 0.0 | 18.37
Bond | 0.14802 | 0.14802 | 0.14802 | 0.0 | 39.01
Kspace | 0.044252 | 0.044252 | 0.044252 | 0.0 | 11.66
Neigh | 0.072359 | 0.072359 | 0.072359 | 0.0 | 19.07
Comm | 0.0044748 | 0.0044748 | 0.0044748 | 0.0 | 1.18
Output | 0.0022775 | 0.0022775 | 0.0022775 | 0.0 | 0.60
Modify | 0.036509 | 0.036509 | 0.036509 | 0.0 | 9.62
Other | | 0.00184 | | | 0.48
Nlocal: 44 ave 44 max 44 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 3 ave 3 max 3 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 722 ave 722 max 722 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 722
Ave neighs/atom = 16.4091
Ave special neighs/atom = 9.77273
Neighbor list builds = 1000
Dangerous builds = 0
# write_restart restart_longrun
# write_data restart_longrun.data
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:00

View File

@ -0,0 +1,201 @@
LAMMPS (15 Apr 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94)
using 1 OpenMP thread(s) per MPI task
# two monomer nylon example
# reaction produces a condensed water molecule
units real
boundary p p p
atom_style full
kspace_style pppm 1.0e-4
pair_style lj/class2/coul/long 8.5
angle_style class2
bond_style class2
dihedral_style class2
improper_style class2
read_data tiny_nylon.data
orthogonal box = (-25 -25 -25) to (25 25 25)
1 by 2 by 2 MPI processor grid
reading atoms ...
44 atoms
reading velocities ...
44 velocities
scanning bonds ...
9 = max bonds/atom
scanning angles ...
21 = max angles/atom
scanning dihedrals ...
29 = max dihedrals/atom
scanning impropers ...
29 = max impropers/atom
reading bonds ...
42 bonds
reading angles ...
74 angles
reading dihedrals ...
100 dihedrals
reading impropers ...
44 impropers
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
41 = max # of special neighbors
special bonds CPU = 0.000431282 secs
read_data CPU = 0.0129571 secs
variable runsteps equal 1000
variable prob1 equal step/v_runsteps*2
variable prob2 equal (step/v_runsteps)>0.5
velocity all create 300.0 4928459 dist gaussian
molecule mol1 rxn1_stp1_unreacted.data_template
Read molecule template mol1:
1 molecules
18 atoms with max type 8
16 bonds with max type 14
25 angles with max type 28
23 dihedrals with max type 36
14 impropers with max type 11
molecule mol2 rxn1_stp1_reacted.data_template
Read molecule template mol2:
1 molecules
18 atoms with max type 9
17 bonds with max type 13
31 angles with max type 27
39 dihedrals with max type 33
20 impropers with max type 1
molecule mol3 rxn1_stp2_unreacted.data_template
Read molecule template mol3:
1 molecules
15 atoms with max type 9
14 bonds with max type 13
25 angles with max type 27
30 dihedrals with max type 33
16 impropers with max type 1
molecule mol4 rxn1_stp2_reacted.data_template
Read molecule template mol4:
1 molecules
15 atoms with max type 11
13 bonds with max type 15
19 angles with max type 29
16 dihedrals with max type 32
10 impropers with max type 13
thermo 50
# dump 1 all xyz 1 test_vis.xyz
fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234
WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
dynamic group bond_react_MASTER_group defined
dynamic group statted_grp_REACT defined
fix 1 statted_grp_REACT nvt temp 300 300 100
# optionally, you can customize behavior of reacting atoms,
# by using the internally-created 'bond_react_MASTER_group', like so:
fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1
thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
# restart 100 restart1 restart2
run ${runsteps}
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:332)
G vector (1/distance) = 0.0534597
grid = 2 2 2
stencil order = 5
estimated absolute RMS force accuracy = 0.0402256
estimated relative force accuracy = 0.000121138
using double precision FFTW3
3d grid and FFT values/proc = 252 2
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 10.5
ghost atom cutoff = 10.5
binsize = 5.25, bins = 10 10 10
2 neighbor lists, perpetual/occasional/extra = 1 1 0
(1) pair lj/class2/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
(2) fix bond/react, occasional, copy from (1)
attributes: half, newton on
pair build: copy
stencil: none
bin: none
WARNING: Inconsistent image flags (src/domain.cpp:812)
Per MPI rank memory allocation (min/avg/max) = 33.66 | 33.88 | 34.43 Mbytes
Step Temp Press Density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
0 300 346.78165 0.0034851739 0 0 0 0
50 266.5092 -90.813802 0.0034851739 0.1 0 1 0
100 559.41271 -53.23688 0.0034851739 0.2 0 1 0
150 489.90516 31.555817 0.0034851739 0.3 0 1 0
200 326.18391 7.7889992 0.0034851739 0.4 0 1 0
250 339.78203 2.3919541 0.0034851739 0.5 0 1 0
300 370.90263 -32.01673 0.0034851739 0.6 0 1 0
350 294.07547 -5.4019813 0.0034851739 0.7 0 1 0
400 287.76477 12.254133 0.0034851739 0.8 0 1 0
450 293.36482 66.372956 0.0034851739 0.9 0 1 0
500 246.84496 26.132317 0.0034851739 1 0 1 0
550 253.08778 -15.350262 0.0034851739 1.1 1 1 1
600 358.83641 25.007371 0.0034851739 1.2 1 1 1
650 320.51492 -32.34823 0.0034851739 1.3 1 1 1
700 310.87976 -8.2306669 0.0034851739 1.4 1 1 1
750 307.54142 12.025818 0.0034851739 1.5 1 1 1
800 272.51724 -22.92823 0.0034851739 1.6 1 1 1
850 268.66181 10.069534 0.0034851739 1.7 1 1 1
900 265.5531 -10.471377 0.0034851739 1.8 1 1 1
950 259.43086 9.4546712 0.0034851739 1.9 1 1 1
1000 247.14622 20.250308 0.0034851739 2 1 1 1
Loop time of 0.357762 on 4 procs for 1000 steps with 44 atoms
Performance: 241.502 ns/day, 0.099 hours/ns, 2795.157 timesteps/s
99.0% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0003917 | 0.015545 | 0.033317 | 11.9 | 4.35
Bond | 0.0010131 | 0.030153 | 0.076975 | 18.2 | 8.43
Kspace | 0.092857 | 0.1462 | 0.18688 | 10.7 | 40.87
Neigh | 0.043786 | 0.044014 | 0.044189 | 0.1 | 12.30
Comm | 0.03636 | 0.038345 | 0.040538 | 0.8 | 10.72
Output | 0.00091578 | 0.0012541 | 0.0020923 | 1.4 | 0.35
Modify | 0.075379 | 0.080791 | 0.086052 | 1.8 | 22.58
Other | | 0.00146 | | | 0.41
Nlocal: 11 ave 32 max 0 min
Histogram: 2 0 1 0 0 0 0 0 0 1
Nghost: 40 ave 51 max 19 min
Histogram: 1 0 0 0 0 0 0 1 0 2
Neighs: 191 ave 529 max 0 min
Histogram: 2 0 0 0 1 0 0 0 0 1
Total # of neighbors = 764
Ave neighs/atom = 17.3636
Ave special neighs/atom = 9.77273
Neighbor list builds = 1000
Dangerous builds = 0
# write_restart restart_longrun
# write_data restart_longrun.data
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:00

View File

@ -17,6 +17,8 @@
#ifndef ZMQ_DUMMY_H
#define ZMQ_DUMMY_H
#include <cstddef>
namespace CSLIB_NS {
#define ZMQ_REQ 0

View File

@ -72,21 +72,21 @@ void AngleCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
//if(k_eatom.extent(0)<maxeatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_eatom,eatom);
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"improper:eatom");
d_eatom = k_eatom.template view<DeviceType>();
d_eatom = k_eatom.template view<KKDeviceType>();
//}
}
if (vflag_atom) {
//if(k_vatom.extent(0)<maxvatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_vatom,vatom);
memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"improper:vatom");
d_vatom = k_vatom.template view<DeviceType>();
d_vatom = k_vatom.template view<KKDeviceType>();
//}
}
x = atomKK->k_x.view<DeviceType>();
f = atomKK->k_f.view<DeviceType>();
neighborKK->k_anglelist.template sync<DeviceType>();
anglelist = neighborKK->k_anglelist.view<DeviceType>();
anglelist = neighborKK->k_anglelist.view<KKDeviceType>();
int nanglelist = neighborKK->nanglelist;
nlocal = atom->nlocal;
newton_bond = force->newton_bond;
@ -265,10 +265,10 @@ void AngleCharmmKokkos<DeviceType>::coeff(int narg, char **arg)
AngleCharmm::coeff(narg, arg);
int n = atom->nangletypes;
Kokkos::DualView<F_FLOAT*,DeviceType> k_k("AngleCharmm::k",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_theta0("AngleCharmm::theta0",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_k_ub("AngleCharmm::k_ub",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_r_ub("AngleCharmm::r_ub",n+1);
typename AT::tdual_ffloat_1d k_k("AngleCharmm::k",n+1);
typename AT::tdual_ffloat_1d k_theta0("AngleCharmm::theta0",n+1);
typename AT::tdual_ffloat_1d k_k_ub("AngleCharmm::k_ub",n+1);
typename AT::tdual_ffloat_1d k_r_ub("AngleCharmm::r_ub",n+1);
d_k = k_k.template view<DeviceType>();
d_theta0 = k_theta0.template view<DeviceType>();
@ -303,10 +303,10 @@ void AngleCharmmKokkos<DeviceType>::read_restart(FILE *fp)
AngleCharmm::read_restart(fp);
int n = atom->nangletypes;
Kokkos::DualView<F_FLOAT*,DeviceType> k_k("AngleCharmm::k",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_theta0("AngleCharmm::theta0",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_k_ub("AngleCharmm::k_ub",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_r_ub("AngleCharmm::r_ub",n+1);
typename AT::tdual_ffloat_1d k_k("AngleCharmm::k",n+1);
typename AT::tdual_ffloat_1d k_theta0("AngleCharmm::theta0",n+1);
typename AT::tdual_ffloat_1d k_k_ub("AngleCharmm::k_ub",n+1);
typename AT::tdual_ffloat_1d k_r_ub("AngleCharmm::r_ub",n+1);
d_k = k_k.template view<DeviceType>();
d_theta0 = k_theta0.template view<DeviceType>();

View File

@ -63,11 +63,13 @@ class AngleCharmmKokkos : public AngleCharmm {
typedef ArrayTypes<DeviceType> AT;
typename AT::t_x_array_randomread x;
typename Kokkos::View<double*[3],typename AT::t_f_array::array_layout,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > f;
typedef typename KKDevice<DeviceType>::value KKDeviceType;
typename Kokkos::View<double*[3],typename AT::t_f_array::array_layout,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > f;
typename AT::t_int_2d anglelist;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,DeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,DeviceType> k_vatom;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType> k_vatom;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom;

View File

@ -69,14 +69,14 @@ void BondHarmonicKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
//if(k_eatom.extent(0)<maxeatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_eatom,eatom);
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"improper:eatom");
d_eatom = k_eatom.template view<DeviceType>();
d_eatom = k_eatom.template view<KKDeviceType>();
//}
}
if (vflag_atom) {
//if(k_vatom.extent(0)<maxvatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_vatom,vatom);
memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"improper:vatom");
d_vatom = k_vatom.template view<DeviceType>();
d_vatom = k_vatom.template view<KKDeviceType>();
//}
}
@ -204,8 +204,8 @@ void BondHarmonicKokkos<DeviceType>::coeff(int narg, char **arg)
BondHarmonic::coeff(narg, arg);
int n = atom->nbondtypes;
Kokkos::DualView<F_FLOAT*,DeviceType> k_k("BondHarmonic::k",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_r0("BondHarmonic::r0",n+1);
typename AT::tdual_ffloat_1d k_k("BondHarmonic::k",n+1);
typename AT::tdual_ffloat_1d k_r0("BondHarmonic::r0",n+1);
d_k = k_k.template view<DeviceType>();
d_r0 = k_r0.template view<DeviceType>();
@ -231,8 +231,8 @@ void BondHarmonicKokkos<DeviceType>::read_restart(FILE *fp)
BondHarmonic::read_restart(fp);
int n = atom->nbondtypes;
Kokkos::DualView<F_FLOAT*,DeviceType> k_k("BondHarmonic::k",n+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_r0("BondHarmonic::r0",n+1);
typename AT::tdual_ffloat_1d k_k("BondHarmonic::k",n+1);
typename AT::tdual_ffloat_1d k_r0("BondHarmonic::r0",n+1);
d_k = k_k.template view<DeviceType>();
d_r0 = k_r0.template view<DeviceType>();

View File

@ -66,10 +66,11 @@ class BondHarmonicKokkos : public BondHarmonic {
typename Kokkos::View<double*[3],typename AT::t_f_array::array_layout,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > f;
typename AT::t_int_2d bondlist;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,DeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,DeviceType> k_vatom;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom;
typedef typename KKDevice<DeviceType>::value KKDeviceType;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType> k_vatom;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom;
int nlocal,newton_bond;
int eflag,vflag;

View File

@ -161,7 +161,7 @@ void ComputeOrientOrderAtomKokkos<DeviceType>::compute_peratom()
d_distsq = t_sna_2d_lr("orientorder/atom:distsq",chunk_size,maxneigh);
d_nearest = t_sna_2i_lr("orientorder/atom:nearest",chunk_size,maxneigh);
d_rlist = t_sna_3d_lr("orientorder/atom:rlist",chunk_size,maxneigh,3);
d_distsq_um = d_distsq;
d_rlist_um = d_rlist;
d_nearest_um = d_nearest;
@ -194,11 +194,11 @@ void ComputeOrientOrderAtomKokkos<DeviceType>::compute_peratom()
typename Kokkos::TeamPolicy<DeviceType, TagComputeOrientOrderAtomNeigh> policy_neigh(chunk_size,team_size,vector_length);
Kokkos::parallel_for("ComputeOrientOrderAtomNeigh",policy_neigh,*this);
}
//Select3
typename Kokkos::RangePolicy<DeviceType, TagComputeOrientOrderAtomSelect3> policy_select3(0,chunk_size);
Kokkos::parallel_for("ComputeOrientOrderAtomSelect3",policy_select3,*this);
//BOOP1
{
int vector_length = vector_length_default;
@ -207,7 +207,7 @@ void ComputeOrientOrderAtomKokkos<DeviceType>::compute_peratom()
typename Kokkos::TeamPolicy<DeviceType, TagComputeOrientOrderAtomBOOP1> policy_boop1(((chunk_size+team_size-1)/team_size)*maxneigh,team_size,vector_length);
Kokkos::parallel_for("ComputeOrientOrderAtomBOOP1",policy_boop1,*this);
}
//BOOP2
typename Kokkos::RangePolicy<DeviceType, TagComputeOrientOrderAtomBOOP2> policy_boop2(0,chunk_size);
Kokkos::parallel_for("ComputeOrientOrderAtomBOOP2",policy_boop2,*this);

View File

@ -86,18 +86,18 @@ void DihedralCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
//if(k_eatom.extent(0)<maxeatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_eatom,eatom);
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"dihedral:eatom");
d_eatom = k_eatom.template view<DeviceType>();
k_eatom_pair = Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,DeviceType>("dihedral:eatom_pair",maxeatom);
d_eatom_pair = k_eatom_pair.template view<DeviceType>();
d_eatom = k_eatom.template view<KKDeviceType>();
k_eatom_pair = Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType>("dihedral:eatom_pair",maxeatom);
d_eatom_pair = k_eatom_pair.template view<KKDeviceType>();
//}
}
if (vflag_atom) {
//if(k_vatom.extent(0)<maxvatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_vatom,vatom);
memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"dihedral:vatom");
d_vatom = k_vatom.template view<DeviceType>();
k_vatom_pair = Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,DeviceType>("dihedral:vatom_pair",maxvatom);
d_vatom_pair = k_vatom_pair.template view<DeviceType>();
d_vatom = k_vatom.template view<KKDeviceType>();
k_vatom_pair = Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType>("dihedral:vatom_pair",maxvatom);
d_vatom_pair = k_vatom_pair.template view<KKDeviceType>();
//}
}
@ -428,12 +428,12 @@ void DihedralCharmmKokkos<DeviceType>::coeff(int narg, char **arg)
DihedralCharmm::coeff(narg, arg);
int nd = atom->ndihedraltypes;
Kokkos::DualView<F_FLOAT*,DeviceType> k_k("DihedralCharmm::k",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_multiplicity("DihedralCharmm::multiplicity",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_shift("DihedralCharmm::shift",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_cos_shift("DihedralCharmm::cos_shift",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_sin_shift("DihedralCharmm::sin_shift",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_weight("DihedralCharmm::weight",nd+1);
typename AT::tdual_ffloat_1d k_k("DihedralCharmm::k",nd+1);
typename AT::tdual_ffloat_1d k_multiplicity("DihedralCharmm::multiplicity",nd+1);
typename AT::tdual_ffloat_1d k_shift("DihedralCharmm::shift",nd+1);
typename AT::tdual_ffloat_1d k_cos_shift("DihedralCharmm::cos_shift",nd+1);
typename AT::tdual_ffloat_1d k_sin_shift("DihedralCharmm::sin_shift",nd+1);
typename AT::tdual_ffloat_1d k_weight("DihedralCharmm::weight",nd+1);
d_k = k_k.template view<DeviceType>();
d_multiplicity = k_multiplicity.template view<DeviceType>();
@ -477,10 +477,10 @@ void DihedralCharmmKokkos<DeviceType>::init_style()
DihedralCharmm::init_style();
int n = atom->ntypes;
Kokkos::DualView<F_FLOAT**,Kokkos::LayoutRight,DeviceType> k_lj14_1("DihedralCharmm:lj14_1",n+1,n+1);
Kokkos::DualView<F_FLOAT**,Kokkos::LayoutRight,DeviceType> k_lj14_2("DihedralCharmm:lj14_2",n+1,n+1);
Kokkos::DualView<F_FLOAT**,Kokkos::LayoutRight,DeviceType> k_lj14_3("DihedralCharmm:lj14_3",n+1,n+1);
Kokkos::DualView<F_FLOAT**,Kokkos::LayoutRight,DeviceType> k_lj14_4("DihedralCharmm:lj14_4",n+1,n+1);
DAT::tdual_ffloat_2d k_lj14_1("DihedralCharmm:lj14_1",n+1,n+1);
DAT::tdual_ffloat_2d k_lj14_2("DihedralCharmm:lj14_2",n+1,n+1);
DAT::tdual_ffloat_2d k_lj14_3("DihedralCharmm:lj14_3",n+1,n+1);
DAT::tdual_ffloat_2d k_lj14_4("DihedralCharmm:lj14_4",n+1,n+1);
d_lj14_1 = k_lj14_1.template view<DeviceType>();
d_lj14_2 = k_lj14_2.template view<DeviceType>();
@ -521,12 +521,12 @@ void DihedralCharmmKokkos<DeviceType>::read_restart(FILE *fp)
DihedralCharmm::read_restart(fp);
int nd = atom->ndihedraltypes;
Kokkos::DualView<F_FLOAT*,DeviceType> k_k("DihedralCharmm::k",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_multiplicity("DihedralCharmm::multiplicity",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_shift("DihedralCharmm::shift",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_cos_shift("DihedralCharmm::cos_shift",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_sin_shift("DihedralCharmm::sin_shift",nd+1);
Kokkos::DualView<F_FLOAT*,DeviceType> k_weight("DihedralCharmm::weight",nd+1);
typename AT::tdual_ffloat_1d k_k("DihedralCharmm::k",nd+1);
typename AT::tdual_ffloat_1d k_multiplicity("DihedralCharmm::multiplicity",nd+1);
typename AT::tdual_ffloat_1d k_shift("DihedralCharmm::shift",nd+1);
typename AT::tdual_ffloat_1d k_cos_shift("DihedralCharmm::cos_shift",nd+1);
typename AT::tdual_ffloat_1d k_sin_shift("DihedralCharmm::sin_shift",nd+1);
typename AT::tdual_ffloat_1d k_weight("DihedralCharmm::weight",nd+1);
d_k = k_k.template view<DeviceType>();
d_multiplicity = k_multiplicity.template view<DeviceType>();

View File

@ -132,15 +132,16 @@ class DihedralCharmmKokkos : public DihedralCharmm {
typename AT::t_f_array f;
typename AT::t_int_2d dihedrallist;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,DeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,DeviceType> k_vatom;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom;
typedef typename KKDevice<DeviceType>::value KKDeviceType;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType> k_vatom;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,DeviceType> k_eatom_pair;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,DeviceType> k_vatom_pair;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom_pair;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom_pair;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType> k_eatom_pair;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType> k_vatom_pair;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom_pair;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom_pair;
int nlocal,newton_bond;
int eflag,vflag;

View File

@ -73,14 +73,14 @@ void ImproperHarmonicKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
//if(k_eatom.extent(0)<maxeatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_eatom,eatom);
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"improper:eatom");
d_eatom = k_eatom.template view<DeviceType>();
d_eatom = k_eatom.template view<KKDeviceType>();
//}
}
if (vflag_atom) {
//if(k_vatom.extent(0)<maxvatom) { // won't work without adding zero functor
memoryKK->destroy_kokkos(k_vatom,vatom);
memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"improper:vatom");
d_vatom = k_vatom.template view<DeviceType>();
d_vatom = k_vatom.template view<KKDeviceType>();
//}
}

View File

@ -63,14 +63,15 @@ class ImproperHarmonicKokkos : public ImproperHarmonic {
class NeighborKokkos *neighborKK;
typedef typename KKDevice<DeviceType>::value KKDeviceType;
typename AT::t_x_array_randomread x;
typename Kokkos::View<double*[3],typename AT::t_f_array::array_layout,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > f;
typename Kokkos::View<double*[3],typename AT::t_f_array::array_layout,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > f;
typename AT::t_int_2d improperlist;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,DeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,DeviceType> k_vatom;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,typename KKDevice<DeviceType>::value,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom;
Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType> k_eatom;
Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType> k_vatom;
Kokkos::View<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_eatom;
Kokkos::View<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType,Kokkos::MemoryTraits<Kokkos::Atomic> > d_vatom;
int nlocal,newton_bond;
int eflag,vflag;

View File

@ -306,7 +306,7 @@ void KokkosLMP::accelerator(int narg, char **arg)
neighflag = HALFTHREAD;
else
neighflag = HALF;
} else if (strcmp(arg[iarg+1],"n2") == 0) neighflag = N2;
}
else error->all(FLERR,"Illegal package kokkos command");
if (!neighflag_qeq_set) neighflag_qeq = neighflag;
iarg += 2;
@ -318,7 +318,7 @@ void KokkosLMP::accelerator(int narg, char **arg)
neighflag_qeq = HALFTHREAD;
else
neighflag_qeq = HALF;
} else if (strcmp(arg[iarg+1],"n2") == 0) neighflag_qeq = N2;
}
else error->all(FLERR,"Illegal package kokkos command");
neighflag_qeq_set = 1;
iarg += 2;

View File

@ -22,7 +22,7 @@
#include <Kokkos_Vectorization.hpp>
#include <Kokkos_ScatterView.hpp>
enum{FULL=1u,HALFTHREAD=2u,HALF=4u,N2=8u};
enum{FULL=1u,HALFTHREAD=2u,HALF=4u};
#if defined(KOKKOS_ENABLE_CXX11)
#undef ISFINITE

View File

@ -19,20 +19,20 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
template<class Device>
NeighListKokkos<Device>::NeighListKokkos(class LAMMPS *lmp):NeighList(lmp)
template<class DeviceType>
NeighListKokkos<DeviceType>::NeighListKokkos(class LAMMPS *lmp):NeighList(lmp)
{
_stride = 1;
maxneighs = 16;
kokkos = 1;
maxatoms = 0;
execution_space = ExecutionSpaceFromDevice<Device>::space;
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
};
/* ---------------------------------------------------------------------- */
template<class Device>
void NeighListKokkos<Device>::grow(int nmax)
template<class DeviceType>
void NeighListKokkos<DeviceType>::grow(int nmax)
{
// skip if this list is already long enough to store nmax atoms
// and maxneighs neighbors
@ -40,14 +40,12 @@ void NeighListKokkos<Device>::grow(int nmax)
if (nmax <= maxatoms && d_neighbors.extent(1) >= maxneighs) return;
maxatoms = nmax;
k_ilist =
DAT::tdual_int_1d("neighlist:ilist",maxatoms);
d_ilist = k_ilist.view<Device>();
d_numneigh =
typename ArrayTypes<Device>::t_int_1d("neighlist:numneigh",maxatoms);
d_neighbors =
typename ArrayTypes<Device>::t_neighbors_2d("neighlist:neighbors",
maxatoms,maxneighs);
k_ilist = DAT::tdual_int_1d("neighlist:ilist",maxatoms);
d_ilist = k_ilist.view<DeviceType>();
k_numneigh = DAT::tdual_int_1d("neighlist:numneigh",maxatoms);
d_numneigh = k_numneigh.view<DeviceType>();
k_neighbors = DAT::tdual_neighbors_2d("neighlist:neighbors",maxatoms,maxneighs);
d_neighbors = k_neighbors.view<DeviceType>();
}
/* ---------------------------------------------------------------------- */

View File

@ -59,7 +59,7 @@ class AtomNeighborsConst
const int _stride;
};
template<class Device>
template<class DeviceType>
class NeighListKokkos: public NeighList {
int _stride;
@ -67,10 +67,12 @@ public:
int maxneighs;
void grow(int nmax);
typename ArrayTypes<Device>::t_neighbors_2d d_neighbors;
typename DAT::tdual_int_1d k_ilist; // local indices of I atoms
typename ArrayTypes<Device>::t_int_1d d_ilist;
typename ArrayTypes<Device>::t_int_1d d_numneigh; // # of J neighs for each I
DAT::tdual_neighbors_2d k_neighbors;
typename ArrayTypes<DeviceType>::t_neighbors_2d d_neighbors;
DAT::tdual_int_1d k_ilist; // local indices of I atoms
typename ArrayTypes<DeviceType>::t_int_1d d_ilist;
DAT::tdual_int_1d k_numneigh; // # of J neighs for each I
typename ArrayTypes<DeviceType>::t_int_1d d_numneigh;
NeighListKokkos(class LAMMPS *lmp);
@ -82,8 +84,8 @@ public:
KOKKOS_INLINE_FUNCTION
static AtomNeighborsConst static_neighbors_const(int i,
typename ArrayTypes<Device>::t_neighbors_2d_const const& d_neighbors,
typename ArrayTypes<Device>::t_int_1d_const const& d_numneigh) {
typename ArrayTypes<DeviceType>::t_neighbors_2d_const const& d_neighbors,
typename ArrayTypes<DeviceType>::t_int_1d_const const& d_numneigh) {
return AtomNeighborsConst(&d_neighbors(i,0),d_numneigh(i),
&d_neighbors(i,1)-&d_neighbors(i,0));
}

View File

@ -13,6 +13,8 @@
#include "npair_copy_kokkos.h"
#include "neigh_list_kokkos.h"
#include "my_page.h"
#include "error.h"
using namespace LAMMPS_NS;
@ -30,6 +32,24 @@ void NPairCopyKokkos<DeviceType>::build(NeighList *list)
{
NeighList *listcopy = list->listcopy;
if (list->kokkos) {
if (!listcopy->kokkos)
error->all(FLERR,"Cannot copy non-Kokkos neighbor list to Kokkos neighbor list");
copy_to_kokkos(list);
} else {
if (!listcopy->kokkos)
error->all(FLERR,"Missing Kokkos neighbor list for copy");
copy_to_cpu(list);
}
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
void NPairCopyKokkos<DeviceType>::copy_to_kokkos(NeighList *list)
{
NeighList *listcopy = list->listcopy;
list->inum = listcopy->inum;
list->gnum = listcopy->gnum;
list->ilist = listcopy->ilist;
@ -44,6 +64,62 @@ void NPairCopyKokkos<DeviceType>::build(NeighList *list)
list_kk->d_neighbors = listcopy_kk->d_neighbors;
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
void NPairCopyKokkos<DeviceType>::copy_to_cpu(NeighList *list)
{
NeighList *listcopy = list->listcopy;
NeighListKokkos<DeviceType>* listcopy_kk = (NeighListKokkos<DeviceType>*) listcopy;
listcopy_kk->k_ilist.template sync<LMPHostType>();
listcopy_kk->k_numneigh.template sync<LMPHostType>();
listcopy_kk->k_neighbors.template sync<LMPHostType>();
int inum = listcopy->inum;
int gnum = listcopy->gnum;
int inum_all = inum;
if (list->ghost) inum_all += gnum;
auto h_ilist = listcopy_kk->k_ilist.h_view;
auto h_numneigh = listcopy_kk->k_numneigh.h_view;
auto h_neighbors = listcopy_kk->k_neighbors.h_view;
list->inum = inum;
list->gnum = gnum;
auto ilist = list->ilist;
auto numneigh = list->numneigh;
// Kokkos neighbor data is stored differently than regular CPU,
// must copy element by element
int *neighptr;
int **firstneigh = list->firstneigh;
MyPage<int> *ipage = list->ipage;
ipage->reset();
for (int ii = 0; ii < inum_all; ii++) {
neighptr = ipage->vget();
const int i = h_ilist[ii];
ilist[ii] = i;
// loop over Kokkos neighbor list
const int jnum = h_numneigh[i];
numneigh[i] = jnum;
for (int jj = 0; jj < jnum; jj++) {
const int joriginal = h_neighbors(i,jj);
neighptr[jj] = joriginal;
}
firstneigh[i] = neighptr;
ipage->vgot(jnum);
if (ipage->status())
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
}
}
namespace LAMMPS_NS {
template class NPairCopyKokkos<LMPDeviceType>;
#ifdef KOKKOS_ENABLE_CUDA

View File

@ -36,6 +36,9 @@ class NPairCopyKokkos : public NPair {
NPairCopyKokkos(class LAMMPS *);
~NPairCopyKokkos() {}
void build(class NeighList *);
private:
void copy_to_kokkos(class NeighList *);
void copy_to_cpu(class NeighList *);
};
}

View File

@ -68,12 +68,14 @@ void NPairHalffullKokkos<DeviceType,NEWTON>::build(NeighList *list)
copymode = 1;
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagNPairHalffullCompute>(0,inum_full),*this);
copymode = 0;
list->inum = k_list_full->inum;
list->gnum = k_list_full->gnum;
k_list->k_ilist.template modify<DeviceType>();
copymode = 0;
k_list->k_ilist.template modify<DeviceType>();
k_list->k_numneigh.template modify<DeviceType>();
k_list->k_neighbors.template modify<DeviceType>();
}
template<class DeviceType, int NEWTON>

View File

@ -97,7 +97,7 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::copy_stencil_info()
NPair::copy_stencil_info();
nstencil = ns->nstencil;
if (neighbor->last_setup_bins == update->ntimestep) {
if (ns->last_stencil == update->ntimestep) {
// copy stencil to device as it may have changed
int maxstencil = ns->get_maxstencil();
@ -301,7 +301,8 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::build(NeighList *list_)
if(data.h_resize()) {
list->maxneighs = data.h_new_maxneighs() * 1.2;
list->d_neighbors = typename ArrayTypes<DeviceType>::t_neighbors_2d("neighbors", list->d_neighbors.extent(0), list->maxneighs);
list->k_neighbors = DAT::tdual_neighbors_2d("neighbors", list->d_neighbors.extent(0), list->maxneighs);
list->d_neighbors = list->k_neighbors.template view<DeviceType>();
data.neigh_list.d_neighbors = list->d_neighbors;
data.neigh_list.maxneighs = list->maxneighs;
}
@ -316,6 +317,8 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::build(NeighList *list_)
}
list->k_ilist.template modify<DeviceType>();
list->k_numneigh.template modify<DeviceType>();
list->k_neighbors.template modify<DeviceType>();
}
/* ---------------------------------------------------------------------- */

View File

@ -519,6 +519,8 @@ fprintf(stdout, "Fina%03d %6d inum %6d gnum, total used %6d, allocated %6d\n"
#endif
list->k_ilist.template modify<DeviceType>();
list->k_numneigh.template modify<DeviceType>();
list->k_neighbors.template modify<DeviceType>();
}

View File

@ -307,9 +307,6 @@ void PairBuckCoulCutKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with buck/coul/cut/kk");
}

View File

@ -229,9 +229,6 @@ void PairBuckKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with buck/kk");
}

View File

@ -31,7 +31,7 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairBuckKokkos : public PairBuck {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
@ -98,15 +98,12 @@ class PairBuckKokkos : public PairBuck {
friend class PairComputeFunctor<PairBuckKokkos,FULL,true>;
friend class PairComputeFunctor<PairBuckKokkos,HALF,true>;
friend class PairComputeFunctor<PairBuckKokkos,HALFTHREAD,true>;
friend class PairComputeFunctor<PairBuckKokkos,N2,true>;
friend class PairComputeFunctor<PairBuckKokkos,FULL,false>;
friend class PairComputeFunctor<PairBuckKokkos,HALF,false>;
friend class PairComputeFunctor<PairBuckKokkos,HALFTHREAD,false>;
friend class PairComputeFunctor<PairBuckKokkos,N2,false>;
friend EV_FLOAT pair_compute_neighlist<PairBuckKokkos,FULL,void>(PairBuckKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairBuckKokkos,HALF,void>(PairBuckKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairBuckKokkos,HALFTHREAD,void>(PairBuckKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairBuckKokkos,N2,void>(PairBuckKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute<PairBuckKokkos,void>(PairBuckKokkos*,NeighListKokkos<DeviceType>*);
friend void pair_virial_fdotr_compute<PairBuckKokkos>(PairBuckKokkos*);
};

View File

@ -276,9 +276,6 @@ void PairCoulDebyeKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with coul/debye/kk");
}

View File

@ -87,6 +87,8 @@ struct PairComputeFunctor {
c(*c_ptr),list(*list_ptr) {
// allocate duplicated memory
f = c.f;
d_eatom = c.d_eatom;
d_vatom = c.d_vatom;
dup_f = Kokkos::Experimental::create_scatter_view<Kokkos::Experimental::ScatterSum, NeedDup<NEIGHFLAG,device_type>::value >(c.f);
dup_eatom = Kokkos::Experimental::create_scatter_view<Kokkos::Experimental::ScatterSum, NeedDup<NEIGHFLAG,device_type>::value >(c.d_eatom);
dup_vatom = Kokkos::Experimental::create_scatter_view<Kokkos::Experimental::ScatterSum, NeedDup<NEIGHFLAG,device_type>::value >(c.d_vatom);
@ -690,148 +692,6 @@ struct PairComputeFunctor {
}
};
template <class PairStyle, bool STACKPARAMS, class Specialisation>
struct PairComputeFunctor<PairStyle,N2,STACKPARAMS,Specialisation> {
typedef typename PairStyle::device_type device_type ;
typedef EV_FLOAT value_type;
PairStyle c;
NeighListKokkos<device_type> list;
PairComputeFunctor(PairStyle* c_ptr,
NeighListKokkos<device_type>* list_ptr):
c(*c_ptr),list(*list_ptr) {};
~PairComputeFunctor() {c.cleanup_copy();list.copymode = 1;};
KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const {
return j >> SBBITS & 3;
}
void contribute() {}
template<int EVFLAG, int NEWTON_PAIR>
KOKKOS_FUNCTION
EV_FLOAT compute_item(const int& ii,
const NeighListKokkos<device_type> &list, const NoCoulTag&) const {
(void) list;
EV_FLOAT ev;
const int i = ii;//list.d_ilist[ii];
const X_FLOAT xtmp = c.x(i,0);
const X_FLOAT ytmp = c.x(i,1);
const X_FLOAT ztmp = c.x(i,2);
const int itype = c.type(i);
//const AtomNeighborsConst neighbors_i = list.get_neighbors_const(i);
const int jnum = c.nall;
F_FLOAT fxtmp = 0.0;
F_FLOAT fytmp = 0.0;
F_FLOAT fztmp = 0.0;
for (int jj = 0; jj < jnum; jj++) {
int j = jj;//neighbors_i(jj);
if(i==j) continue;
const F_FLOAT factor_lj = c.special_lj[sbmask(j)];
j &= NEIGHMASK;
const X_FLOAT delx = xtmp - c.x(j,0);
const X_FLOAT dely = ytmp - c.x(j,1);
const X_FLOAT delz = ztmp - c.x(j,2);
const int jtype = c.type(j);
const F_FLOAT rsq = delx*delx + dely*dely + delz*delz;
if(rsq < (STACKPARAMS?c.m_cutsq[itype][jtype]:c.d_cutsq(itype,jtype))) {
const F_FLOAT fpair = factor_lj*c.template compute_fpair<STACKPARAMS,Specialisation>(rsq,i,j,itype,jtype);
fxtmp += delx*fpair;
fytmp += dely*fpair;
fztmp += delz*fpair;
if (EVFLAG) {
F_FLOAT evdwl = 0.0;
if (c.eflag) {
evdwl = 0.5*
factor_lj * c.template compute_evdwl<STACKPARAMS,Specialisation>(rsq,i,j,itype,jtype);
ev.evdwl += evdwl;
}
if (c.vflag_either || c.eflag_atom) ev_tally(ev,i,j,evdwl,fpair,delx,dely,delz);
}
}
}
c.f(i,0) += fxtmp;
c.f(i,1) += fytmp;
c.f(i,2) += fztmp;
return ev;
}
KOKKOS_INLINE_FUNCTION
void ev_tally(EV_FLOAT &ev, const int &i, const int &j,
const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx,
const F_FLOAT &dely, const F_FLOAT &delz) const
{
const int EFLAG = c.eflag;
const int VFLAG = c.vflag_either;
if (EFLAG) {
if (c.eflag_atom) {
const E_FLOAT epairhalf = 0.5 * epair;
if (i < c.nlocal) c.d_eatom[i] += epairhalf;
if (j < c.nlocal) c.d_eatom[j] += epairhalf;
}
}
if (VFLAG) {
const E_FLOAT v0 = delx*delx*fpair;
const E_FLOAT v1 = dely*dely*fpair;
const E_FLOAT v2 = delz*delz*fpair;
const E_FLOAT v3 = delx*dely*fpair;
const E_FLOAT v4 = delx*delz*fpair;
const E_FLOAT v5 = dely*delz*fpair;
if (c.vflag_global) {
ev.v[0] += 0.5*v0;
ev.v[1] += 0.5*v1;
ev.v[2] += 0.5*v2;
ev.v[3] += 0.5*v3;
ev.v[4] += 0.5*v4;
ev.v[5] += 0.5*v5;
}
if (c.vflag_atom) {
if (i < c.nlocal) {
c.d_vatom(i,0) += 0.5*v0;
c.d_vatom(i,1) += 0.5*v1;
c.d_vatom(i,2) += 0.5*v2;
c.d_vatom(i,3) += 0.5*v3;
c.d_vatom(i,4) += 0.5*v4;
c.d_vatom(i,5) += 0.5*v5;
}
}
}
}
KOKKOS_INLINE_FUNCTION
void operator()(const int i) const {
compute_item<0,0>(i,list,typename DoCoul<PairStyle::COUL_FLAG>::type());
}
KOKKOS_INLINE_FUNCTION
void operator()(const int i, value_type &energy_virial) const {
energy_virial += compute_item<1,0>(i,list,typename DoCoul<PairStyle::COUL_FLAG>::type());
}
KOKKOS_INLINE_FUNCTION
void operator()(const typename Kokkos::TeamPolicy<>::member_type& team) const
{}
KOKKOS_INLINE_FUNCTION
void operator()(const typename Kokkos::TeamPolicy<>::member_type& team, value_type &energy_virial) const
{}
};
// Filter out Neighflags which are not supported for PairStyle
// The enable_if clause will invalidate the last parameter of the function, so that
@ -867,7 +727,7 @@ int GetTeamSize(FunctorStyle& functor, int inum, int reduce_flag, int team_size,
return team_size;
}
// Submit ParallelFor for NEIGHFLAG=HALF,HALFTHREAD,FULL,N2
// Submit ParallelFor for NEIGHFLAG=HALF,HALFTHREAD,FULL
template<class PairStyle, unsigned NEIGHFLAG, class Specialisation>
EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename std::enable_if<(NEIGHFLAG&PairStyle::EnabledNeighFlags) != 0, NeighListKokkos<typename PairStyle::device_type>*>::type list) {
EV_FLOAT ev;
@ -918,8 +778,6 @@ EV_FLOAT pair_compute (PairStyle* fpair, NeighListKokkos<typename PairStyle::dev
ev = pair_compute_neighlist<PairStyle,HALFTHREAD,Specialisation> (fpair,list);
} else if (fpair->neighflag == HALF) {
ev = pair_compute_neighlist<PairStyle,HALF,Specialisation> (fpair,list);
} else if (fpair->neighflag == N2) {
ev = pair_compute_neighlist<PairStyle,N2,Specialisation> (fpair,list);
}
return ev;
}

View File

@ -309,9 +309,6 @@ void PairLJClass2CoulCutKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/class2/coul/cut/kk");
}

View File

@ -247,9 +247,6 @@ void PairLJClass2Kokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/class2/kk");
}

View File

@ -31,7 +31,7 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairLJClass2Kokkos : public PairLJClass2 {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
@ -104,15 +104,12 @@ class PairLJClass2Kokkos : public PairLJClass2 {
friend class PairComputeFunctor<PairLJClass2Kokkos,FULL,true>;
friend class PairComputeFunctor<PairLJClass2Kokkos,HALF,true>;
friend class PairComputeFunctor<PairLJClass2Kokkos,HALFTHREAD,true>;
friend class PairComputeFunctor<PairLJClass2Kokkos,N2,true>;
friend class PairComputeFunctor<PairLJClass2Kokkos,FULL,false>;
friend class PairComputeFunctor<PairLJClass2Kokkos,HALF,false>;
friend class PairComputeFunctor<PairLJClass2Kokkos,HALFTHREAD,false>;
friend class PairComputeFunctor<PairLJClass2Kokkos,N2,false>;
friend EV_FLOAT pair_compute_neighlist<PairLJClass2Kokkos,FULL,void>(PairLJClass2Kokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJClass2Kokkos,HALF,void>(PairLJClass2Kokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJClass2Kokkos,HALFTHREAD,void>(PairLJClass2Kokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJClass2Kokkos,N2,void>(PairLJClass2Kokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute<PairLJClass2Kokkos,void>(PairLJClass2Kokkos*,NeighListKokkos<DeviceType>*);
friend void pair_virial_fdotr_compute<PairLJClass2Kokkos>(PairLJClass2Kokkos*);
};

View File

@ -300,9 +300,6 @@ void PairLJCutCoulCutKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/coul/cut/kk");
}

View File

@ -329,9 +329,6 @@ void PairLJCutCoulDebyeKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/coul/debye/kk");
}

View File

@ -322,9 +322,6 @@ void PairLJCutCoulDSFKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/coul/cut/kk");
}

View File

@ -241,9 +241,6 @@ void PairLJCutKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk");
}

View File

@ -31,7 +31,7 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairLJCutKokkos : public PairLJCut {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
@ -99,15 +99,12 @@ class PairLJCutKokkos : public PairLJCut {
friend class PairComputeFunctor<PairLJCutKokkos,FULL,true>;
friend class PairComputeFunctor<PairLJCutKokkos,HALF,true>;
friend class PairComputeFunctor<PairLJCutKokkos,HALFTHREAD,true>;
friend class PairComputeFunctor<PairLJCutKokkos,N2,true>;
friend class PairComputeFunctor<PairLJCutKokkos,FULL,false>;
friend class PairComputeFunctor<PairLJCutKokkos,HALF,false>;
friend class PairComputeFunctor<PairLJCutKokkos,HALFTHREAD,false>;
friend class PairComputeFunctor<PairLJCutKokkos,N2,false>;
friend EV_FLOAT pair_compute_neighlist<PairLJCutKokkos,FULL,void>(PairLJCutKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJCutKokkos,HALF,void>(PairLJCutKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJCutKokkos,HALFTHREAD,void>(PairLJCutKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJCutKokkos,N2,void>(PairLJCutKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute<PairLJCutKokkos,void>(PairLJCutKokkos*,NeighListKokkos<DeviceType>*);
friend void pair_virial_fdotr_compute<PairLJCutKokkos>(PairLJCutKokkos*);
};

View File

@ -249,9 +249,6 @@ void PairLJExpandKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/expand/kk");
}

View File

@ -31,7 +31,7 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairLJExpandKokkos : public PairLJExpand {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
@ -105,15 +105,12 @@ class PairLJExpandKokkos : public PairLJExpand {
friend class PairComputeFunctor<PairLJExpandKokkos,FULL,true>;
friend class PairComputeFunctor<PairLJExpandKokkos,HALF,true>;
friend class PairComputeFunctor<PairLJExpandKokkos,HALFTHREAD,true>;
friend class PairComputeFunctor<PairLJExpandKokkos,N2,true>;
friend class PairComputeFunctor<PairLJExpandKokkos,FULL,false>;
friend class PairComputeFunctor<PairLJExpandKokkos,HALF,false>;
friend class PairComputeFunctor<PairLJExpandKokkos,HALFTHREAD,false>;
friend class PairComputeFunctor<PairLJExpandKokkos,N2,false>;
friend EV_FLOAT pair_compute_neighlist<PairLJExpandKokkos,FULL,void>(PairLJExpandKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJExpandKokkos,HALF,void>(PairLJExpandKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJExpandKokkos,HALFTHREAD,void>(PairLJExpandKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJExpandKokkos,N2,void>(PairLJExpandKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute<PairLJExpandKokkos,void>(PairLJExpandKokkos*,NeighListKokkos<DeviceType>*);
friend void pair_virial_fdotr_compute<PairLJExpandKokkos>(PairLJExpandKokkos*);
};

View File

@ -279,9 +279,6 @@ void PairLJSDKKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/sdk/kk");
}

View File

@ -31,7 +31,7 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairLJSDKKokkos : public PairLJSDK {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
@ -100,15 +100,12 @@ class PairLJSDKKokkos : public PairLJSDK {
friend class PairComputeFunctor<PairLJSDKKokkos,FULL,true>;
friend class PairComputeFunctor<PairLJSDKKokkos,HALF,true>;
friend class PairComputeFunctor<PairLJSDKKokkos,HALFTHREAD,true>;
friend class PairComputeFunctor<PairLJSDKKokkos,N2,true>;
friend class PairComputeFunctor<PairLJSDKKokkos,FULL,false>;
friend class PairComputeFunctor<PairLJSDKKokkos,HALF,false>;
friend class PairComputeFunctor<PairLJSDKKokkos,HALFTHREAD,false>;
friend class PairComputeFunctor<PairLJSDKKokkos,N2,false>;
friend EV_FLOAT pair_compute_neighlist<PairLJSDKKokkos,FULL,void>(PairLJSDKKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJSDKKokkos,HALF,void>(PairLJSDKKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJSDKKokkos,HALFTHREAD,void>(PairLJSDKKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairLJSDKKokkos,N2,void>(PairLJSDKKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute<PairLJSDKKokkos,void>(PairLJSDKKokkos*,NeighListKokkos<DeviceType>*);
friend void pair_virial_fdotr_compute<PairLJSDKKokkos>(PairLJSDKKokkos*);
};

View File

@ -258,9 +258,6 @@ void PairMorseKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with morse/kk");
}

View File

@ -31,7 +31,7 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairMorseKokkos : public PairMorse {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
PairMorseKokkos(class LAMMPS *);
@ -98,15 +98,12 @@ class PairMorseKokkos : public PairMorse {
friend class PairComputeFunctor<PairMorseKokkos,FULL,true>;
friend class PairComputeFunctor<PairMorseKokkos,HALF,true>;
friend class PairComputeFunctor<PairMorseKokkos,HALFTHREAD,true>;
friend class PairComputeFunctor<PairMorseKokkos,N2,true>;
friend class PairComputeFunctor<PairMorseKokkos,FULL,false>;
friend class PairComputeFunctor<PairMorseKokkos,HALF,false>;
friend class PairComputeFunctor<PairMorseKokkos,HALFTHREAD,false>;
friend class PairComputeFunctor<PairMorseKokkos,N2,false>;
friend EV_FLOAT pair_compute_neighlist<PairMorseKokkos,FULL,void>(PairMorseKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairMorseKokkos,HALF,void>(PairMorseKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairMorseKokkos,HALFTHREAD,void>(PairMorseKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairMorseKokkos,N2,void>(PairMorseKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute<PairMorseKokkos,void>(PairMorseKokkos*,NeighListKokkos<DeviceType>*);
friend void pair_virial_fdotr_compute<PairMorseKokkos>(PairMorseKokkos*);
};

View File

@ -136,12 +136,6 @@ void PairTableKokkos<DeviceType>::compute_style(int eflag_in, int vflag_in)
if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev);
else Kokkos::parallel_for(list->inum,f);
f.contribute();
} else if (neighflag == N2) {
PairComputeFunctor<PairTableKokkos<DeviceType>,N2,false,S_TableCompute<DeviceType,TABSTYLE> >
f(this,(NeighListKokkos<DeviceType>*) list);
if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev);
else Kokkos::parallel_for(list->inum,f);
f.contribute();
}
} else {
if (neighflag == FULL) {
@ -162,12 +156,6 @@ void PairTableKokkos<DeviceType>::compute_style(int eflag_in, int vflag_in)
if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev);
else Kokkos::parallel_for(list->inum,f);
f.contribute();
} else if (neighflag == N2) {
PairComputeFunctor<PairTableKokkos<DeviceType>,N2,true,S_TableCompute<DeviceType,TABSTYLE> >
f(this,(NeighListKokkos<DeviceType>*) list);
if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev);
else Kokkos::parallel_for(list->inum,f);
f.contribute();
}
}
@ -525,9 +513,6 @@ void PairTableKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk");
}

View File

@ -41,7 +41,7 @@ template<class DeviceType>
class PairTableKokkos : public PairTable {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
@ -139,38 +139,30 @@ class PairTableKokkos : public PairTable {
friend class PairComputeFunctor<PairTableKokkos,FULL,true,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,true,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,true,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,N2,true,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,FULL,false,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,false,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,false,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,N2,false,S_TableCompute<DeviceType,LOOKUP> >;
friend class PairComputeFunctor<PairTableKokkos,FULL,true,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,true,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,true,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,N2,true,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,FULL,false,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,false,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,false,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,N2,false,S_TableCompute<DeviceType,LINEAR> >;
friend class PairComputeFunctor<PairTableKokkos,FULL,true,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,true,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,true,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,N2,true,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,FULL,false,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,false,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,false,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,N2,false,S_TableCompute<DeviceType,SPLINE> >;
friend class PairComputeFunctor<PairTableKokkos,FULL,true,S_TableCompute<DeviceType,BITMAP> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,true,S_TableCompute<DeviceType,BITMAP> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,true,S_TableCompute<DeviceType,BITMAP> >;
friend class PairComputeFunctor<PairTableKokkos,N2,true,S_TableCompute<DeviceType,BITMAP> >;
friend class PairComputeFunctor<PairTableKokkos,FULL,false,S_TableCompute<DeviceType,BITMAP> >;
friend class PairComputeFunctor<PairTableKokkos,HALF,false,S_TableCompute<DeviceType,BITMAP> >;
friend class PairComputeFunctor<PairTableKokkos,HALFTHREAD,false,S_TableCompute<DeviceType,BITMAP> >;
friend class PairComputeFunctor<PairTableKokkos,N2,false,S_TableCompute<DeviceType,BITMAP> >;
friend void pair_virial_fdotr_compute<PairTableKokkos>(PairTableKokkos*);
};

View File

@ -665,8 +665,6 @@ void PairTableRXKokkos<DeviceType>::compute_style(int eflag_in, int vflag_in)
nspecies, isite1, isite2, fractionalWeighting,
mixWtSite1old, mixWtSite2old, mixWtSite1, mixWtSite2);
if (neighflag == N2) error->all(FLERR,"pair table/rx/kk can't handle N2 yet\n");
NeighListKokkos<DeviceType>* l =
dynamic_cast<NeighListKokkos<DeviceType>*>(list);
@ -1282,9 +1280,6 @@ void PairTableRXKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk");
}

View File

@ -30,7 +30,7 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairTableRXKokkos : public PairTable {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
typedef DeviceType device_type;
PairTableRXKokkos(class LAMMPS *);

View File

@ -103,19 +103,15 @@ class PairYukawaKokkos : public PairYukawa {
friend class PairComputeFunctor<PairYukawaKokkos,FULL,true>;
friend class PairComputeFunctor<PairYukawaKokkos,HALF,true>;
friend class PairComputeFunctor<PairYukawaKokkos,HALFTHREAD,true>;
friend class PairComputeFunctor<PairYukawaKokkos,N2,true>;
friend class PairComputeFunctor<PairYukawaKokkos,FULL,false>;
friend class PairComputeFunctor<PairYukawaKokkos,HALF,false>;
friend class PairComputeFunctor<PairYukawaKokkos,HALFTHREAD,false>;
friend class PairComputeFunctor<PairYukawaKokkos,N2,false>;
friend EV_FLOAT pair_compute_neighlist<PairYukawaKokkos,FULL,void>(
PairYukawaKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairYukawaKokkos,HALF,void>(
PairYukawaKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairYukawaKokkos,HALFTHREAD,void>(
PairYukawaKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute_neighlist<PairYukawaKokkos,N2,void>(
PairYukawaKokkos*,NeighListKokkos<DeviceType>*);
friend EV_FLOAT pair_compute<PairYukawaKokkos,void>(
PairYukawaKokkos*,NeighListKokkos<DeviceType>*);
friend void pair_virial_fdotr_compute<PairYukawaKokkos>(PairYukawaKokkos*);

View File

@ -103,9 +103,6 @@ void PairZBLKokkos<DeviceType>::init_style()
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
} else if (neighflag == N2) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk");
}

View File

@ -106,7 +106,7 @@ PPPMKokkos<DeviceType>::PPPMKokkos(LAMMPS *lmp) : PPPM(lmp)
// see JCP 109, pg 7698 for derivation of coefficients
// higher order coefficients may be computed if needed
acons = typename Kokkos::DualView<F_FLOAT[8][7],Kokkos::LayoutRight,LMPDeviceType>::t_host("pppm:acons");
acons = typename Kokkos::DualView<F_FLOAT[8][7],Kokkos::LayoutRight,DeviceType>::t_host("pppm:acons");
acons(1,0) = 2.0 / 3.0;
acons(2,0) = 1.0 / 50.0;
acons(2,1) = 5.0 / 294.0;
@ -2581,7 +2581,7 @@ void PPPMKokkos<DeviceType>::operator()(TagPPPM_fieldforce_peratom, const int &i
------------------------------------------------------------------------- */
template<class DeviceType>
void PPPMKokkos<DeviceType>::pack_forward_kspace_kokkos(int flag, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
void PPPMKokkos<DeviceType>::pack_forward_kspace_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
{
typename AT::t_int_2d_um d_list = k_list.view<DeviceType>();
d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL());
@ -2637,7 +2637,7 @@ void PPPMKokkos<DeviceType>::operator()(TagPPPM_pack_forward2, const int &i) con
------------------------------------------------------------------------- */
template<class DeviceType>
void PPPMKokkos<DeviceType>::unpack_forward_kspace_kokkos(int flag, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
void PPPMKokkos<DeviceType>::unpack_forward_kspace_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
{
typename AT::t_int_2d_um d_list = k_list.view<DeviceType>();
d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL());
@ -2694,7 +2694,7 @@ void PPPMKokkos<DeviceType>::operator()(TagPPPM_unpack_forward2, const int &i) c
------------------------------------------------------------------------- */
template<class DeviceType>
void PPPMKokkos<DeviceType>::pack_reverse_kspace_kokkos(int flag, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
void PPPMKokkos<DeviceType>::pack_reverse_kspace_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
{
typename AT::t_int_2d_um d_list = k_list.view<DeviceType>();
d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL());
@ -2724,7 +2724,7 @@ void PPPMKokkos<DeviceType>::operator()(TagPPPM_pack_reverse, const int &i) cons
------------------------------------------------------------------------- */
template<class DeviceType>
void PPPMKokkos<DeviceType>::unpack_reverse_kspace_kokkos(int flag, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
void PPPMKokkos<DeviceType>::unpack_reverse_kspace_kokkos(int flag, FFT_DAT::tdual_FFT_SCALAR_1d &k_buf, int nlist, DAT::tdual_int_2d &k_list, int index)
{
typename AT::t_int_2d_um d_list = k_list.view<DeviceType>();
d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL());

View File

@ -403,10 +403,10 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT {
// grid communication
void pack_forward_kspace_kokkos(int, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &, int, DAT::tdual_int_2d &, int);
void unpack_forward_kspace_kokkos(int, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &, int, DAT::tdual_int_2d &, int);
void pack_reverse_kspace_kokkos(int, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &, int, DAT::tdual_int_2d &, int);
void unpack_reverse_kspace_kokkos(int, Kokkos::DualView<FFT_SCALAR*,Kokkos::LayoutRight,LMPDeviceType> &, int, DAT::tdual_int_2d &, int);
void pack_forward_kspace_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int);
void unpack_forward_kspace_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int);
void pack_reverse_kspace_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int);
void unpack_reverse_kspace_kokkos(int, FFT_DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int);
// triclinic

View File

1
src/MAKE/MINE/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/Makefile.*

View File

@ -27,12 +27,12 @@ SHLIBFLAGS = -shared
# if you change any -D setting, do full re-compile after "make clean"
# LAMMPS ifdef settings
# see possible settings in Section 2.2 (step 4) of manual
# see possible settings in Section 3.5 of the manual
LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64
# MPI library
# see discussion in Section 2.2 (step 5) of manual
# see discussion in Section 3.4 of the manual
# MPI wrapper compiler/linker can provide this info
# can point to dummy MPI library in src/STUBS as in Makefile.serial
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
@ -45,7 +45,7 @@ MPI_PATH =
MPI_LIB =
# FFT library
# see discussion in Section 2.2 (step 6) of manual
# see discussion in Section 3.5.2 of manual
# can be left blank to use provided KISS FFT library
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
# PATH = path for FFT library
@ -56,7 +56,7 @@ FFT_PATH =
FFT_LIB =
# JPEG and/or PNG library
# see discussion in Section 2.2 (step 7) of manual
# see discussion in Section 3.5.4 of manual
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
# INC = path(s) for jpeglib.h and/or png.h
# PATH = path(s) for JPEG library and/or PNG library
@ -91,18 +91,22 @@ vpath %.h ..
# Link target
$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
$(SIZE) $(EXE)
$(EXE): main.o $(LMPLIB) $(EXTRA_LINK_DEPENDS)
$(LINK) $(LINKFLAGS) main.o $(EXTRA_PATH) $(LMPLINK) $(EXTRA_LIB) $(LIB) -o $@
$(SIZE) $@
# Library targets
lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
$(ARLIB): $(OBJ) $(EXTRA_LINK_DEPENDS)
$(ARCHIVE) $(ARFLAGS) ../$(ARLIB) $(OBJ)
@rm -f $(ARLIB)
@ln -s ../$(ARLIB) $(ARLIB)
shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
$(OBJ) $(EXTRA_LIB) $(LIB)
$(SHLIB): $(OBJ) $(EXTRA_LINK_DEPENDS)
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o ../$(SHLIB) \
$(OBJ) $(EXTRA_LIB) $(LIB)
@rm -f $(SHLIB)
@ln -s ../$(SHLIB) $(SHLIB)
# Compilation rules

View File

@ -33,6 +33,7 @@
#include "neigh_request.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
@ -116,8 +117,8 @@ void PairDRIP::allocate()
void PairDRIP::settings(int narg, char ** /* arg */)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
if (strcmp(force->pair_style,"hybrid/overlay")!=0)
error->all(FLERR,"ERROR: requires hybrid/overlay pair_style");
if (!utils::strmatch(force->pair_style,"^hybrid/overlay"))
error->all(FLERR,"Pair style drip must be used as sub-style with hybrid/overlay");
}
/* ----------------------------------------------------------------------

View File

@ -39,6 +39,8 @@ Contributing Author: Jacob Gissinger (jacob.gissinger@colorado.edu)
#include "math_extra.h"
#include "memory.h"
#include "error.h"
#include "input.h"
#include "variable.h"
#include <algorithm>
@ -61,6 +63,7 @@ static const char cite_fix_bond_react[] =
#define DELTA 16
#define MAXGUESS 20 // max # of guesses allowed by superimpose algorithm
#define MAXCONARGS 10 // max # of arguments for any type of constraint + rxnID
#define NUMVARVALS 4 // max # of keyword values that have variables as input
// various statuses of superimpose algorithm:
// ACCEPT: site successfully matched to pre-reacted template
@ -74,6 +77,9 @@ enum{ACCEPT,REJECT,PROCEED,CONTINUE,GUESSFAIL,RESTORE};
// types of available reaction constraints
enum{DISTANCE,ANGLE,DIHEDRAL,ARRHENIUS};
// keyword values that accept variables as input
enum{NEVERY,RMIN,RMAX,PROB};
/* ---------------------------------------------------------------------- */
FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
@ -178,6 +184,8 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
memory->create(stabilize_steps_flag,nreacts,"bond/react:stabilize_steps_flag");
memory->create(update_edges_flag,nreacts,"bond/react:update_edges_flag");
memory->create(constraints,1,MAXCONARGS,"bond/react:constraints");
memory->create(var_flag,NUMVARVALS,nreacts,"bond/react:var_flag");
memory->create(var_id,NUMVARVALS,nreacts,"bond/react:var_id");
memory->create(iatomtype,nreacts,"bond/react:iatomtype");
memory->create(jatomtype,nreacts,"bond/react:jatomtype");
memory->create(ibonding,nreacts,"bond/react:ibonding");
@ -201,6 +209,10 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
local_rxn_count[i] = 0;
ghostly_rxn_count[i] = 0;
reaction_count_total[i] = 0;
for (int j = 0; j < NUMVARVALS; j++) {
var_flag[j][i] = 0;
var_id[j][i] = 0;
}
}
char **files;
@ -221,19 +233,65 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
if (igroup == -1) error->all(FLERR,"Could not find fix group ID");
groupbits[rxn] = group->bitmask[igroup];
nevery[rxn] = force->inumeric(FLERR,arg[iarg++]);
if (nevery[rxn] <= 0) error->all(FLERR,"Illegal fix bond/react command: "
"'Nevery' must be a positive integer");
if (strncmp(arg[iarg],"v_",2) == 0) {
n = strlen(&arg[iarg][2]) + 1;
char *str = new char[n];
strcpy(str,&arg[iarg][2]);
var_id[NEVERY][rxn] = input->variable->find(str);
if (var_id[NEVERY][rxn] < 0)
error->all(FLERR,"Bond/react: Variable name does not exist");
if (!input->variable->equalstyle(var_id[NEVERY][rxn]))
error->all(FLERR,"Bond/react: Variable is not equal-style");
var_flag[NEVERY][rxn] = 1;
delete [] str;
} else {
nevery[rxn] = force->inumeric(FLERR,arg[iarg]);
if (nevery[rxn] <= 0) error->all(FLERR,"Illegal fix bond/react command: "
"'Nevery' must be a positive integer");
}
iarg++;
double cutoff = force->numeric(FLERR,arg[iarg++]);
if (cutoff < 0.0) error->all(FLERR,"Illegal fix bond/react command: "
"'Rmin' cannot be negative");
cutsq[rxn][0] = cutoff*cutoff;
if (strncmp(arg[iarg],"v_",2) == 0) {
n = strlen(&arg[iarg][2]) + 1;
char *str = new char[n];
strcpy(str,&arg[iarg][2]);
var_id[RMIN][rxn] = input->variable->find(str);
if (var_id[RMIN][rxn] < 0)
error->all(FLERR,"Bond/react: Variable name does not exist");
if (!input->variable->equalstyle(var_id[RMIN][rxn]))
error->all(FLERR,"Bond/react: Variable is not equal-style");
double cutoff = input->variable->compute_equal(var_id[RMIN][rxn]);
cutsq[rxn][0] = cutoff*cutoff;
var_flag[RMIN][rxn] = 1;
delete [] str;
} else {
double cutoff = force->numeric(FLERR,arg[iarg]);
if (cutoff < 0.0) error->all(FLERR,"Illegal fix bond/react command: "
"'Rmin' cannot be negative");
cutsq[rxn][0] = cutoff*cutoff;
}
iarg++;
cutoff = force->numeric(FLERR,arg[iarg++]);
if (cutoff < 0.0) error->all(FLERR,"Illegal fix bond/react command:"
"'Rmax' cannot be negative");
cutsq[rxn][1] = cutoff*cutoff;
if (strncmp(arg[iarg],"v_",2) == 0) {
n = strlen(&arg[iarg][2]) + 1;
char *str = new char[n];
strcpy(str,&arg[iarg][2]);
var_id[RMAX][rxn] = input->variable->find(str);
if (var_id[RMAX][rxn] < 0)
error->all(FLERR,"Bond/react: Variable name does not exist");
if (!input->variable->equalstyle(var_id[RMAX][rxn]))
error->all(FLERR,"Bond/react: Variable is not equal-style");
double cutoff = input->variable->compute_equal(var_id[RMAX][rxn]);
cutsq[rxn][1] = cutoff*cutoff;
var_flag[RMAX][rxn] = 1;
delete [] str;
} else {
double cutoff = force->numeric(FLERR,arg[iarg]);
if (cutoff < 0.0) error->all(FLERR,"Illegal fix bond/react command:"
"'Rmax' cannot be negative");
cutsq[rxn][1] = cutoff*cutoff;
}
iarg++;
unreacted_mol[rxn] = atom->find_molecule(arg[iarg++]);
if (unreacted_mol[rxn] == -1) error->all(FLERR,"Unreacted molecule template ID for "
@ -251,7 +309,23 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
if (strcmp(arg[iarg],"prob") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal fix bond/react command: "
"'prob' keyword has too few arguments");
fraction[rxn] = force->numeric(FLERR,arg[iarg+1]);
// check if probability is a variable
if (strncmp(arg[iarg+1],"v_",2) == 0) {
int n = strlen(&arg[iarg+1][2]) + 1;
char *str = new char[n];
strcpy(str,&arg[iarg+1][2]);
var_id[PROB][rxn] = input->variable->find(str);
if (var_id[PROB][rxn] < 0)
error->all(FLERR,"Bond/react: Variable name does not exist");
if (!input->variable->equalstyle(var_id[PROB][rxn]))
error->all(FLERR,"Bond/react: Variable is not equal-style");
fraction[rxn] = input->variable->compute_equal(var_id[PROB][rxn]);
var_flag[PROB][rxn] = 1;
delete [] str;
} else {
// otherwise probability should be a number
fraction[rxn] = force->numeric(FLERR,arg[iarg+1]);
}
seed[rxn] = force->inumeric(FLERR,arg[iarg+2]);
if (fraction[rxn] < 0.0 || fraction[rxn] > 1.0)
error->all(FLERR,"Illegal fix bond/react command: "
@ -260,12 +334,12 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
"probability seed must be positive");
iarg += 3;
} else if (strcmp(arg[iarg],"max_rxn") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal fix bond/react command: "
"'max_rxn' has too few arguments");
max_rxn[rxn] = force->inumeric(FLERR,arg[iarg+1]);
if (max_rxn[rxn] < 0) error->all(FLERR,"Illegal fix bond/react command: "
"'max_rxn' cannot be negative");
iarg += 2;
if (iarg+2 > narg) error->all(FLERR,"Illegal fix bond/react command: "
"'max_rxn' has too few arguments");
max_rxn[rxn] = force->inumeric(FLERR,arg[iarg+1]);
if (max_rxn[rxn] < 0) error->all(FLERR,"Illegal fix bond/react command: "
"'max_rxn' cannot be negative");
iarg += 2;
} else if (strcmp(arg[iarg],"stabilize_steps") == 0) {
if (stabilization_flag == 0) error->all(FLERR,"Stabilize_steps keyword "
"used without stabilization keyword");
@ -447,6 +521,8 @@ FixBondReact::~FixBondReact()
memory->destroy(nlocalskips);
memory->destroy(nghostlyskips);
memory->destroy(limit_duration);
memory->destroy(var_flag);
memory->destroy(var_id);
memory->destroy(stabilize_steps_flag);
memory->destroy(update_edges_flag);
@ -628,36 +704,36 @@ void FixBondReact::post_constructor()
i_statted_tags[i] = 1;
}
} else {
// sleeping code, for future capabilities
custom_exclude_flag = 1;
// first we have to find correct fix group reference
int n = strlen("GROUP_") + strlen(exclude_group) + 1;
char *fix_group = new char[n];
strcpy(fix_group,"GROUP_");
strcat(fix_group,exclude_group);
int ifix = modify->find_fix(fix_group);
Fix *fix = modify->fix[ifix];
delete [] fix_group;
// sleeping code, for future capabilities
custom_exclude_flag = 1;
// first we have to find correct fix group reference
int n = strlen("GROUP_") + strlen(exclude_group) + 1;
char *fix_group = new char[n];
strcpy(fix_group,"GROUP_");
strcat(fix_group,exclude_group);
int ifix = modify->find_fix(fix_group);
Fix *fix = modify->fix[ifix];
delete [] fix_group;
// this returns names of corresponding property
int unused;
char * idprop;
idprop = (char *) fix->extract("property",unused);
if (idprop == NULL)
error->all(FLERR,"Exclude group must be a per-atom property group");
// this returns names of corresponding property
int unused;
char * idprop;
idprop = (char *) fix->extract("property",unused);
if (idprop == NULL)
error->all(FLERR,"Exclude group must be a per-atom property group");
len = strlen(idprop) + 1;
statted_id = new char[len];
strcpy(statted_id,idprop);
len = strlen(idprop) + 1;
statted_id = new char[len];
strcpy(statted_id,idprop);
// initialize per-atom statted_tags to 1
// need to correct for smooth restarts
//int flag;
//int index = atom->find_custom(statted_id,flag);
//int *i_statted_tags = atom->ivector[index];
//for (int i = 0; i < atom->nlocal; i++)
// i_statted_tags[i] = 1;
}
// initialize per-atom statted_tags to 1
// need to correct for smooth restarts
//int flag;
//int index = atom->find_custom(statted_id,flag);
//int *i_statted_tags = atom->ivector[index];
//for (int i = 0; i < atom->nlocal; i++)
// i_statted_tags[i] = 1;
}
// let's create a new nve/limit fix to limit newly reacted atoms
@ -720,6 +796,11 @@ void FixBondReact::post_integrate()
// check if any reactions could occur on this timestep
int nevery_check = 1;
for (int i = 0; i < nreacts; i++) {
if (var_flag[NEVERY][i])
nevery[i] = ceil(input->variable->compute_equal(var_id[NEVERY][i]));
if (nevery[i] <= 0)
error->all(FLERR,"Illegal fix bond/react command: "
"'Nevery' must be a positive integer");
if (!(update->ntimestep % nevery[i])) {
nevery_check = 0;
break;
@ -824,13 +905,17 @@ void FixBondReact::post_integrate()
comm->reverse_comm_fix(this);
}
// update reaction probability
if (var_flag[PROB][rxnID])
fraction[rxnID] = input->variable->compute_equal(var_id[PROB][rxnID]);
// each atom now knows its winning partner
// for prob check, generate random value for each atom with a bond partner
// forward comm of partner and random value, so ghosts have it
if (fraction[rxnID] < 1.0) {
for (int i = 0; i < nlocal; i++)
if (partner[i]) probability[i] = random[rxnID]->uniform();
if (partner[i]) probability[i] = random[rxnID]->uniform();
}
commflag = 2;
@ -1003,6 +1088,14 @@ void FixBondReact::far_partner()
domain->minimum_image(delx,dely,delz); // ghost location fix
rsq = delx*delx + dely*dely + delz*delz;
if (var_flag[RMIN][rxnID]) {
double cutoff = input->variable->compute_equal(var_id[RMIN][rxnID]);
cutsq[rxnID][0] = cutoff*cutoff;
}
if (var_flag[RMAX][rxnID]) {
double cutoff = input->variable->compute_equal(var_id[RMAX][rxnID]);
cutsq[rxnID][1] = cutoff*cutoff;
}
if (rsq >= cutsq[rxnID][1] || rsq <= cutsq[rxnID][0]) {
continue;
}
@ -1058,6 +1151,15 @@ void FixBondReact::close_partner()
delz = x[i1][2] - x[i2][2];
domain->minimum_image(delx,dely,delz); // ghost location fix
rsq = delx*delx + dely*dely + delz*delz;
if (var_flag[RMIN][rxnID]) {
double cutoff = input->variable->compute_equal(var_id[RMIN][rxnID]);
cutsq[rxnID][0] = cutoff*cutoff;
}
if (var_flag[RMAX][rxnID]) {
double cutoff = input->variable->compute_equal(var_id[RMAX][rxnID]);
cutsq[rxnID][1] = cutoff*cutoff;
}
if (rsq >= cutsq[rxnID][1] || rsq <= cutsq[rxnID][0]) continue;
if (closeneigh[rxnID] == 0) {
@ -1770,7 +1872,7 @@ int FixBondReact::check_constraints()
} else if (constraints[i][1] == ARRHENIUS) {
t = get_temperature();
prrhob = constraints[i][3]*pow(t,constraints[i][4])*
exp(-constraints[i][5]/(force->boltz*t));
exp(-constraints[i][5]/(force->boltz*t));
if (prrhob < rrhandom[(int) constraints[i][2]]->uniform()) return 0;
}
}
@ -1822,13 +1924,13 @@ double FixBondReact::get_temperature()
for (i = 0; i < onemol->natoms; i++) {
ilocal = atom->map(glove[i][1]);
t += (v[ilocal][0]*v[ilocal][0] + v[ilocal][1]*v[ilocal][1] +
v[ilocal][2]*v[ilocal][2]) * rmass[ilocal];
v[ilocal][2]*v[ilocal][2]) * rmass[ilocal];
}
} else {
for (i = 0; i < onemol->natoms; i++) {
ilocal = atom->map(glove[i][1]);
t += (v[ilocal][0]*v[ilocal][0] + v[ilocal][1]*v[ilocal][1] +
v[ilocal][2]*v[ilocal][2]) * mass[type[ilocal]];
v[ilocal][2]*v[ilocal][2]) * mass[type[ilocal]];
}
}
@ -1857,7 +1959,7 @@ int FixBondReact::get_chirality(double four_coords[12])
for (int i = 0; i < 3; i++) {
mean3[i] = (four_coords[i] + four_coords[i+3] +
four_coords[i+6])/3;
four_coords[i+6])/3;
vec4[i] = four_coords[i+9] - mean3[i];
}
@ -2005,7 +2107,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
int ii = reverse_equiv[i][1][myrxn] - 1;
for (int j = 0; j < twomol_nxspecial[ii][0]; j++) {
if (delete_atoms[equivalences[twomol_xspecial[ii][j]-1][1][myrxn]-1][myrxn] == 0) {
error->all(FLERR,"Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted");
error->all(FLERR,"Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted");
}
}
}
@ -2292,19 +2394,19 @@ void FixBondReact::glove_ghostcheck()
// 'ghosts of another' indication taken from comm->sendlist
int ghostly = 0;
#if !defined(MPI_STUBS)
if (comm->style == 0) {
for (int i = 0; i < onemol->natoms; i++) {
int ilocal = atom->map(glove[i][1]);
if (ilocal >= atom->nlocal || localsendlist[ilocal] == 1) {
ghostly = 1;
break;
}
#if !defined(MPI_STUBS)
if (comm->style == 0) {
for (int i = 0; i < onemol->natoms; i++) {
int ilocal = atom->map(glove[i][1]);
if (ilocal >= atom->nlocal || localsendlist[ilocal] == 1) {
ghostly = 1;
break;
}
} else {
ghostly = 1;
}
#endif
} else {
ghostly = 1;
}
#endif
if (ghostly == 1) {
ghostly_mega_glove[0][ghostly_num_mega] = rxnID;
@ -2378,12 +2480,12 @@ void FixBondReact::ghost_glovecast()
// let's send to root, dedup, then broadcast
if (me == 0) {
MPI_Gatherv(MPI_IN_PLACE, ghostly_num_mega, column, // Note: some values ignored for MPI_IN_PLACE
&(global_mega_glove[0][0]), allncols, allstarts,
column, 0, world);
&(global_mega_glove[0][0]), allncols, allstarts,
column, 0, world);
} else {
MPI_Gatherv(&(global_mega_glove[0][start]), ghostly_num_mega, column,
&(global_mega_glove[0][0]), allncols, allstarts,
column, 0, world);
&(global_mega_glove[0][0]), allncols, allstarts,
column, 0, world);
}
if (me == 0) dedup_mega_gloves(1); // global_mega_glove mode
@ -2990,7 +3092,7 @@ void FixBondReact::read(int myrxn)
sscanf(line,"%d",&nequivalent);
if (nequivalent != onemol->natoms)
error->one(FLERR,"Bond/react: Number of equivalences in map file must "
"equal number of atoms in reaction templates");
"equal number of atoms in reaction templates");
}
else if (strstr(line,"customIDs")) sscanf(line,"%d",&ncustom);
else if (strstr(line,"deleteIDs")) sscanf(line,"%d",&ndelete);
@ -3183,7 +3285,7 @@ void FixBondReact::Constraints(char *line, int myrxn)
tmp[6] = 181.0; // impossible range
tmp[7] = 182.0;
sscanf(line,"%*s %lg %lg %lg %lg %lg %lg %lg %lg",&tmp[0],&tmp[1],
&tmp[2],&tmp[3],&tmp[4],&tmp[5],&tmp[6],&tmp[7]);
&tmp[2],&tmp[3],&tmp[4],&tmp[5],&tmp[6],&tmp[7]);
if (tmp[0] > onemol->natoms || tmp[1] > onemol->natoms ||
tmp[2] > onemol->natoms || tmp[3] > onemol->natoms)
error->one(FLERR,"Bond/react: Invalid template atom ID in map file");
@ -3411,16 +3513,17 @@ void FixBondReact::unpack_reverse_comm(int n, int *list, double *buf)
if (commflag != 1) {
for (i = 0; i < n; i++) {
j = list[i];
if (closeneigh[rxnID] != 0)
if (closeneigh[rxnID] != 0) {
if (buf[m+1] < distsq[j][1]) {
partner[j] = (tagint) ubuf(buf[m++]).i;
partner[j] = (tagint) ubuf(buf[m++]).i;
distsq[j][1] = buf[m++];
} else m += 2;
else
} else {
if (buf[m+1] > distsq[j][0]) {
partner[j] = (tagint) ubuf(buf[m++]).i;
distsq[j][0] = buf[m++];
} else m += 2;
}
}
}
}
@ -3478,9 +3581,9 @@ double FixBondReact::memory_usage()
void FixBondReact::print_bb()
{
#if 0
//fix bond/create cargo code. eg nbonds needs to be added
/*
for (int i = 0; i < atom->nlocal; i++) {
// printf("TAG " TAGINT_FORMAT ": %d nbonds: ",atom->tag[i],atom->num_bond[i]);
for (int j = 0; j < atom->num_bond[i]; j++) {
@ -3513,9 +3616,9 @@ for (int i = 0; i < atom->nlocal; i++) {
// printf("TAG " TAGINT_FORMAT ": %d %d %d nspecial: ",atom->tag[i],
atom->nspecial[i][0],atom->nspecial[i][1],atom->nspecial[i][2]);
for (int j = 0; j < atom->nspecial[i][2]; j++) {
// printf(" " TAGINT_FORMAT,atom->special[i][j]);
printf(" " TAGINT_FORMAT,atom->special[i][j]);
}
// printf("\n");
}
*/
#endif
}

View File

@ -67,6 +67,7 @@ class FixBondReact : public Fix {
int nconstraints;
int narrhenius;
double **constraints;
int **var_flag,**var_id; // for keyword values with variable inputs
int status;
int *groupbits;
@ -279,4 +280,12 @@ The number of bonds, angles etc per-atom created by a reaction exceeds
the system setting. See the read_data or create_box command for how to
specify this value.
E: Bond/react: Variable name does not exist
Self-explanatory.
E: Bond/react: Variable is not equal-style
Self-explanatory.
*/

View File

@ -80,6 +80,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp)
// Kokkos package
kokkos = 0;
kk2cpu = 0;
execution_space = Host;
// USER-DPD package
@ -143,8 +144,11 @@ void NeighList::post_constructor(NeighRequest *nq)
respainner = nq->respainner;
copy = nq->copy;
if (nq->copy)
if (nq->copy) {
listcopy = neighbor->lists[nq->copylist];
if (listcopy->kokkos && !this->kokkos)
kk2cpu = 1;
}
if (nq->skip) {
listskip = neighbor->lists[nq->skiplist];

View File

@ -42,6 +42,7 @@ class NeighList : protected Pointers {
int respamiddle; // 1 if there is also a rRespa middle list
int respainner; // 1 if there is also a rRespa inner list
int copy; // 1 if this list is copied from another list
int kk2cpu; // 1 if this list is copied from Kokkos to CPU
int copymode; // 1 if this is a Kokkos on-device copy
// data structs to store neighbor pairs I,J and associated values

View File

@ -849,7 +849,8 @@ int Neighbor::init_pair()
// allocate initial pages for each list, except if copy flag set
for (i = 0; i < nlist; i++) {
if (lists[i]->copy) continue;
if (lists[i]->copy && !lists[i]->kk2cpu)
continue;
lists[i]->setup_pages(pgsize,oneatom);
}
@ -860,8 +861,10 @@ int Neighbor::init_pair()
// also Kokkos list initialization
int maxatom = atom->nmax;
for (i = 0; i < nlist; i++)
if (neigh_pair[i] && !lists[i]->copy) lists[i]->grow(maxatom,maxatom);
for (i = 0; i < nlist; i++) {
if (neigh_pair[i] && (!lists[i]->copy || lists[i]->kk2cpu))
lists[i]->grow(maxatom,maxatom);
}
// plist = indices of perpetual NPair classes
// perpetual = non-occasional, re-built at every reneighboring
@ -1257,8 +1260,8 @@ void Neighbor::morph_copy()
if (irq->history != jrq->history) continue;
if (irq->bond != jrq->bond) continue;
if (irq->intel != jrq->intel) continue;
if (irq->kokkos_host != jrq->kokkos_host) continue;
if (irq->kokkos_device != jrq->kokkos_device) continue;
if (irq->kokkos_host && !jrq->kokkos_host) continue;
if (irq->kokkos_device && !jrq->kokkos_device) continue;
if (irq->ssa != jrq->ssa) continue;
if (irq->cut != jrq->cut) continue;
if (irq->cutoff != jrq->cutoff) continue;
@ -1789,8 +1792,12 @@ int Neighbor::choose_pair(NeighRequest *rq)
if (rq->copy) {
if (!(mask & NP_COPY)) continue;
if (!rq->kokkos_device != !(mask & NP_KOKKOS_DEVICE)) continue;
if (!rq->kokkos_host != !(mask & NP_KOKKOS_HOST)) continue;
if (rq->kokkos_device || rq->kokkos_host) {
if (!rq->kokkos_device != !(mask & NP_KOKKOS_DEVICE)) continue;
if (!rq->kokkos_host != !(mask & NP_KOKKOS_HOST)) continue;
}
if (!requests[rq->copylist]->kokkos_device != !(mask & NP_KOKKOS_DEVICE)) continue;
if (!requests[rq->copylist]->kokkos_host != !(mask & NP_KOKKOS_HOST)) continue;
return i+1;
}
@ -2102,7 +2109,8 @@ void Neighbor::build(int topoflag)
for (i = 0; i < npair_perpetual; i++) {
m = plist[i];
if (!lists[m]->copy) lists[m]->grow(nlocal,nall);
if (!lists[i]->copy || lists[i]->kk2cpu)
lists[m]->grow(nlocal,nall);
neigh_pair[m]->build_setup();
neigh_pair[m]->build(lists[m]);
}
@ -2191,7 +2199,8 @@ void Neighbor::build_one(class NeighList *mylist, int preflag)
// build the list
if (!mylist->copy) mylist->grow(atom->nlocal,atom->nlocal+atom->nghost);
if (!mylist->copy || mylist->kk2cpu)
mylist->grow(atom->nlocal,atom->nlocal+atom->nghost);
np->build_setup();
np->build(mylist);
}

View File

@ -1007,7 +1007,7 @@ void *PairHybrid::extract(const char *str, int &dim)
for (int m = 0; m < nstyles; m++) {
ptr = styles[m]->extract(str,dim);
if (ptr && strcmp(str,"cut_coul") == 0) {
if (cutptr && dim != couldim)
if (couldim != -1 && dim != couldim)
error->all(FLERR,
"Coulomb styles of pair hybrid sub-styles do not match");
double *p_newvalue = (double *) ptr;

View File

@ -53,7 +53,7 @@ make
| ubuntu16.04.def | Ubuntu 16.04LTS with MPI == OpenMPI, no LaTeX |
| ubuntu18.04.def | Ubuntu 18.04LTS with MPI == OpenMPI |
| ubuntu18.04_amd_rocm.def | Ubuntu 18.04LTS with AMD ROCm toolkit |
| ubuntu18.04_amd_rocm_cuda.def | Ubuntu 18.04LTS with -"- plus Nvidia CUDA 10.2 |
| ubuntu18.04_gpu.def | Ubuntu 18.04LTS with -"- plus Nvidia CUDA 10.2 |
| ubuntu18.04_nvidia.def | Ubuntu 18.04LTS with Nvidia CUDA 10.2 toolkit |
| ubuntu18.04_intel_opencl.def | Ubuntu 18.04LTS with Intel OpenCL runtime |
| ubuntu20.04.def | Ubuntu 20.04LTS with MPI == OpenMPI |

View File

@ -3,9 +3,11 @@ From: fedora:30
%post
dnf -y update
dnf -y install vim-enhanced git file make cmake patch which file \
dos2unix findutils rsync \
ccache gcc-c++ gdb valgrind eigen3-devel \
dnf -y install vim-enhanced git file make cmake patch which file Lmod \
ninja-build clang libomp-devel libubsan libasan libtsan \
dos2unix findutils rsync python-devel libjpeg-devel libpng-devel \
ccache gcc-c++ gcc-gfortran gdb valgrind eigen3-devel openblas-devel \
openmpi-devel mpich-devel fftw-devel voro++-devel gsl-devel \
mingw-filesystem-base mingw32-nsis mingw-binutils-generic \
mingw32-filesystem mingw32-pkg-config \
mingw64-filesystem mingw64-pkg-config \
@ -39,7 +41,7 @@ From: fedora:30
# we need to reset any module variables
# inherited from the host.
unset LOADEDMODULES
source /etc/profile.d/modules.sh
. /etc/profile.d/modules.sh
module purge
module load mpi

View File

@ -38,6 +38,8 @@ From: fedora:32
%environment
LC_ALL=C
export LC_ALL
# we need to reset any module variables
# inherited from the host.
unset LOADEDMODULES
. /etc/profile.d/modules.sh
module purge

View File

@ -57,12 +57,6 @@ From: rocm/dev-ubuntu-18.04
rocm-libs \
rsync \
ssh \
texlive \
texlive-latex-recommended \
texlive-pictures \
texlive-publishers \
texlive-science \
dvipng \
vim-nox \
virtualenv \
voro++-dev \

View File

@ -0,0 +1,94 @@
BootStrap: docker
From: rocm/dev-ubuntu-18.04
%environment
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
export CUDADIR=/usr/local/cuda
export CUDA_PATH=/usr/local/cuda
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
export LIBRARY_PATH=/usr/local/cuda/lib64/stubs
%post
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get upgrade --no-install-recommends -y
apt-get install --no-install-recommends -y software-properties-common
apt-get install --no-install-recommends -y \
bc \
build-essential \
ccache \
clang \
cmake \
cmake-curses-gui \
curl \
doxygen \
enchant \
g++ \
gcc \
gfortran \
git \
hdf5-tools \
kmod \
less \
libblas-dev \
libeigen3-dev \
libenchant-dev \
libfftw3-dev \
libgsl-dev \
libhdf5-serial-dev \
libhwloc-dev \
libjpeg-dev \
liblapack-dev \
libomp-dev \
libopenblas-dev \
libnuma-dev \
libpng-dev \
libproj-dev \
libvtk6-dev \
make \
mpi-default-bin \
mpi-default-dev \
ninja-build \
python-dev \
python-pip \
python-pygments \
python-virtualenv \
python3-dev \
python3-pip \
python3-pkg-resources \
python3-setuptools \
python3-virtualenv \
rocm-libs \
rsync \
ssh \
vim-nox \
virtualenv \
voro++-dev \
wget \
xxd
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
apt-get update
apt-get install --no-install-recommends -y \
cuda \
cuda-compiler-10-2 \
export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
git clone -b master-rocm-3.3 https://github.com/ROCmSoftwarePlatform/hipCUB.git
mkdir hipCUB/build
cd hipCUB/build
CXX=hcc cmake -D BUILD_TEST=off ..
make -j4
make package
make install
echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
%environment
LC_ALL=C
export LC_ALL
%labels
Author rbberger

View File

@ -55,12 +55,6 @@ From: ubuntu:18.04
python3-virtualenv \
rsync \
ssh \
texlive \
texlive-latex-recommended \
texlive-pictures \
texlive-publishers \
texlive-science \
dvipng \
vim-nox \
virtualenv \
voro++-dev \

View File

@ -55,12 +55,6 @@ From: nvidia/cuda:10.2-devel-ubuntu18.04
python3-virtualenv \
rsync \
ssh \
texlive \
texlive-latex-recommended \
texlive-pictures \
texlive-publishers \
texlive-science \
dvipng \
vim-nox \
virtualenv \
voro++-dev \