Syntax
-
suffix style
+
-- style = off or on or cuda or gpu or intel or kk or omp or opt
+- style = off or on or cuda or gpu or intel or kk or omp or opt or hybrid
+- args = for hybrid style, default suffix to be used and alternative suffix
@@ -141,6 +142,7 @@
suffix on
suffix gpu
suffix intel
+suffix hybrid intel omp
suffix kk
@@ -150,13 +152,13 @@ suffix kk
This command allows you to use variants of various styles if they
exist. In that respect it operates the same as the -suffix command-line switch. It also has options
to turn off or back on any suffix setting made via the command line.
-
The specified style can be cuda, gpu, intel, kk, omp, or
-opt. These refer to optional packages that LAMMPS can be built
+
The specified style can be cuda, gpu, intel, kk, omp, opt
+or hybrid. These refer to optional packages that LAMMPS can be built
with, as described in this section of the manual. The “cuda” style corresponds to
the USER-CUDA package, the “gpu” style to the GPU package, the “intel”
style to the USER-INTEL package, the “kk” style to the KOKKOS package,
the “omp” style to the USER-OMP package, and the “opt” style to the
-OPT package,
+OPT package.
These are the variants these packages provide:
- USER-CUDA = a collection of atom, pair, fix, compute, and intergrate
@@ -174,6 +176,7 @@ kspace, compute, and fix styles with support for OpenMP
multi-threading
- OPT = a handful of pair styles, cache-optimized for faster CPU
performance
+- HYBRID = a combination of two packages can be specified (see below)
As an example, all of the packages provide a pair_style lj/cut variant, with style names lj/cut/opt, lj/cut/omp,
lj/cut/gpu, lj/cut/intel, lj/cut/cuda, or lj/cut/kk. A variant styles
@@ -188,10 +191,12 @@ input script command creates a new fix, compute, or run style.
If the variant version does not exist, the standard version is
created.
-
When using the intel suffix, LAMMPS will first attempt to use a style
-with the intel suffix. If the USER-OMP package is installed, the the
-omp suffix will be tried as a second choice, if a requested style is
-not available in the USER-INTEL package.
+
For “hybrid”, two packages are specified. The first is used whenever
+available. If a style with the first suffix is not available, the style
+with the suffix for the second package will be used if available. For
+example, “hybrid intel omp” will use styles from the USER-INTEL package
+as a first choice and styles from the USER-OMP package as a second choice
+if no USER-INTEL variant is available.
If the specified style is off, then any previously specified suffix
is temporarily disabled, whether it was specified by a command-line
switch or a previous suffix command. If the specified style is on,
diff --git a/doc/suffix.txt b/doc/suffix.txt
index d2e0780dda..35197c0983 100644
--- a/doc/suffix.txt
+++ b/doc/suffix.txt
@@ -10,9 +10,10 @@ suffix command :h3
[Syntax:]
-suffix style :pre
+suffix style args :pre
-style = {off} or {on} or {cuda} or {gpu} or {intel} or {kk} or {omp} or {opt} :ul
+style = {off} or {on} or {cuda} or {gpu} or {intel} or {kk} or {omp} or {opt} or {hybrid}
+args = for hybrid style, default suffix to be used and alternative suffix :ul
[Examples:]
@@ -20,6 +21,7 @@ suffix off
suffix on
suffix gpu
suffix intel
+suffix hybrid intel omp
suffix kk :pre
[Description:]
@@ -29,14 +31,14 @@ exist. In that respect it operates the same as the "-suffix
command-line switch"_Section_start.html#start_7. It also has options
to turn off or back on any suffix setting made via the command line.
-The specified style can be {cuda}, {gpu}, {intel}, {kk}, {omp}, or
-{opt}. These refer to optional packages that LAMMPS can be built
+The specified style can be {cuda}, {gpu}, {intel}, {kk}, {omp}, {opt}
+or {hybrid}. These refer to optional packages that LAMMPS can be built
with, as described in "this section of the
manual"_Section_start.html#start_3. The "cuda" style corresponds to
the USER-CUDA package, the "gpu" style to the GPU package, the "intel"
style to the USER-INTEL package, the "kk" style to the KOKKOS package,
the "omp" style to the USER-OMP package, and the "opt" style to the
-OPT package,
+OPT package.
These are the variants these packages provide:
@@ -59,7 +61,9 @@ kspace, compute, and fix styles with support for OpenMP
multi-threading :l
OPT = a handful of pair styles, cache-optimized for faster CPU
-performance :ule,l
+performance :l
+
+HYBRID = a combination of two packages can be specified (see below) :ule,l
As an example, all of the packages provide a "pair_style
lj/cut"_pair_lj.html variant, with style names lj/cut/opt, lj/cut/omp,
@@ -76,10 +80,12 @@ input script command creates a new "atom"_atom_style.html,
If the variant version does not exist, the standard version is
created.
-When using the intel suffix, LAMMPS will first attempt to use a style
-with the intel suffix. If the USER-OMP package is installed, the the
-omp suffix will be tried as a second choice, if a requested style is
-not available in the USER-INTEL package.
+For "hybrid", two packages are specified. The first is used whenever
+available. If a style with the first suffix is not available, the style
+with the suffix for the second package will be used if available. For
+example, "hybrid intel omp" will use styles from the USER-INTEL package
+as a first choice and styles from the USER-OMP package as a second choice
+if no USER-INTEL variant is available.
If the specified style is {off}, then any previously specified suffix
is temporarily disabled, whether it was specified by a command-line
diff --git a/examples/ELASTIC/in.elastic b/examples/ELASTIC/in.elastic
index ccd2b7367d..15db19913e 100644
--- a/examples/ELASTIC/in.elastic
+++ b/examples/ELASTIC/in.elastic
@@ -42,12 +42,6 @@
# that minimization is not required, you can set maxiter = 0.0 in
# init.mod.
#
-# There are two alternate versions of displace.mod provided.
-# They are displace_restart.mod and displace_reverse.mod.
-# The former resets the box using a restart file while
-# the latter reverses the deformation. Copy whichever
-# one you like best to displace.mod.
-#
include init.mod
include potential.mod
@@ -151,12 +145,27 @@ variable C45all equal 0.5*(${C45}+${C54})
variable C46all equal 0.5*(${C46}+${C64})
variable C56all equal 0.5*(${C56}+${C65})
+# Average moduli for cubic crystals
+
+variable C11cubic equal (${C11all}+${C22all}+${C33all})/3.0
+variable C12cubic equal (${C12all}+${C13all}+${C23all})/3.0
+variable C44cubic equal (${C44all}+${C55all}+${C66all})/3.0
+
+variable bulkmodulus equal (${C11cubic}+2*${C12cubic})/3.0
+variable shearmodulus1 equal ${C44cubic}
+variable shearmodulus2 equal (${C11cubic}-${C12cubic})/2.0
+variable poissonratio equal 1.0/(1.0+${C11cubic}/${C12cubic})
+
# For Stillinger-Weber silicon, the analytical results
# are known to be (E. R. Cowley, 1988):
# C11 = 151.4 GPa
# C12 = 76.4 GPa
# C44 = 56.4 GPa
+print "========================================="
+print "Components of the Elastic Constant Tensor"
+print "========================================="
+
print "Elastic Constant C11all = ${C11all} ${cunits}"
print "Elastic Constant C22all = ${C22all} ${cunits}"
print "Elastic Constant C33all = ${C33all} ${cunits}"
@@ -185,3 +194,11 @@ print "Elastic Constant C45all = ${C45all} ${cunits}"
print "Elastic Constant C46all = ${C46all} ${cunits}"
print "Elastic Constant C56all = ${C56all} ${cunits}"
+print "========================================="
+print "Average properties for a cubic crystal"
+print "========================================="
+
+print "Bulk Modulus = ${bulkmodulus} ${cunits}"
+print "Shear Modulus 1 = ${shearmodulus1} ${cunits}"
+print "Shear Modulus 2 = ${shearmodulus2} ${cunits}"
+print "Poisson Ratio = ${poissonratio}"
diff --git a/examples/ELASTIC_T/Si.sw b/examples/ELASTIC_T/Si.sw
new file mode 100644
index 0000000000..db4be100ef
--- /dev/null
+++ b/examples/ELASTIC_T/Si.sw
@@ -0,0 +1,18 @@
+# DATE: 2007-06-11 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Stillinger and Weber, Phys Rev B, 31, 5262, (1985)
+# Stillinger-Weber parameters for various elements and mixtures
+# multiple entries can be added to this file, LAMMPS reads the ones it needs
+# these entries are in LAMMPS "metal" units:
+# epsilon = eV; sigma = Angstroms
+# other quantities are unitless
+
+# format of a single entry (one or more lines):
+# element 1, element 2, element 3,
+# epsilon, sigma, a, lambda, gamma, costheta0, A, B, p, q, tol
+
+# Here are the original parameters in metal units, for Silicon from:
+#
+# Stillinger and Weber, Phys. Rev. B, v. 31, p. 5262, (1985)
+#
+
+Si Si Si 2.1683 2.0951 1.80 21.0 1.20 -0.333333333333
+ 7.049556277 0.6022245584 4.0 0.0 0.0
diff --git a/examples/ELASTIC_T/displace.mod b/examples/ELASTIC_T/displace.mod
new file mode 100644
index 0000000000..b121f2f694
--- /dev/null
+++ b/examples/ELASTIC_T/displace.mod
@@ -0,0 +1,140 @@
+# NOTE: This script should not need to be
+# modified. See in.elastic for more info.
+#
+# Find which reference length to use
+
+if "${dir} == 1" then &
+ "variable len0 equal ${lx0}"
+if "${dir} == 2" then &
+ "variable len0 equal ${ly0}"
+if "${dir} == 3" then &
+ "variable len0 equal ${lz0}"
+if "${dir} == 4" then &
+ "variable len0 equal ${lz0}"
+if "${dir} == 5" then &
+ "variable len0 equal ${lz0}"
+if "${dir} == 6" then &
+ "variable len0 equal ${ly0}"
+
+# Reset box and simulation parameters
+
+clear
+box tilt large
+read_restart restart.equil
+include potential.mod
+
+# Negative deformation
+
+variable delta equal -${up}*${len0}
+variable deltaxy equal -${up}*xy
+variable deltaxz equal -${up}*xz
+variable deltayz equal -${up}*yz
+if "${dir} == 1" then &
+ "change_box all x delta 0 ${delta} xy delta ${deltaxy} xz delta ${deltaxz} remap units box"
+if "${dir} == 2" then &
+ "change_box all y delta 0 ${delta} yz delta ${deltayz} remap units box"
+if "${dir} == 3" then &
+ "change_box all z delta 0 ${delta} remap units box"
+if "${dir} == 4" then &
+ "change_box all yz delta ${delta} remap units box"
+if "${dir} == 5" then &
+ "change_box all xz delta ${delta} remap units box"
+if "${dir} == 6" then &
+ "change_box all xy delta ${delta} remap units box"
+
+# Run MD
+
+run ${nequil}
+include potential.mod
+run ${nrun}
+
+# Obtain new stress tensor
+
+variable pxx1 equal f_avp[1]
+variable pyy1 equal f_avp[2]
+variable pzz1 equal f_avp[3]
+variable pxy1 equal f_avp[4]
+variable pxz1 equal f_avp[5]
+variable pyz1 equal f_avp[6]
+
+# Compute elastic constant from pressure tensor
+
+variable C1neg equal ${d1}
+variable C2neg equal ${d2}
+variable C3neg equal ${d3}
+variable C4neg equal ${d4}
+variable C5neg equal ${d5}
+variable C6neg equal ${d6}
+
+# Reset box and simulation parameters
+
+clear
+box tilt large
+read_restart restart.equil
+include potential.mod
+
+# Positive deformation
+
+variable delta equal ${up}*${len0}
+variable deltaxy equal ${up}*xy
+variable deltaxz equal ${up}*xz
+variable deltayz equal ${up}*yz
+if "${dir} == 1" then &
+ "change_box all x delta 0 ${delta} xy delta ${deltaxy} xz delta ${deltaxz} remap units box"
+if "${dir} == 2" then &
+ "change_box all y delta 0 ${delta} yz delta ${deltayz} remap units box"
+if "${dir} == 3" then &
+ "change_box all z delta 0 ${delta} remap units box"
+if "${dir} == 4" then &
+ "change_box all yz delta ${delta} remap units box"
+if "${dir} == 5" then &
+ "change_box all xz delta ${delta} remap units box"
+if "${dir} == 6" then &
+ "change_box all xy delta ${delta} remap units box"
+
+# Run MD
+
+run ${nequil}
+include potential.mod
+run ${nrun}
+
+# Obtain new stress tensor
+
+variable tmp equal pe
+variable e1 equal ${tmp}
+variable tmp equal press
+variable p1 equal ${tmp}
+variable tmp equal pxx
+variable pxx1 equal ${tmp}
+variable tmp equal pyy
+variable pyy1 equal ${tmp}
+variable tmp equal pzz
+variable pzz1 equal ${tmp}
+variable tmp equal pxy
+variable pxy1 equal ${tmp}
+variable tmp equal pxz
+variable pxz1 equal ${tmp}
+variable tmp equal pyz
+variable pyz1 equal ${tmp}
+
+# Compute elastic constant from pressure tensor
+
+variable C1pos equal ${d1}
+variable C2pos equal ${d2}
+variable C3pos equal ${d3}
+variable C4pos equal ${d4}
+variable C5pos equal ${d5}
+variable C6pos equal ${d6}
+
+# Combine positive and negative
+
+variable C1${dir} equal 0.5*(${C1neg}+${C1pos})
+variable C2${dir} equal 0.5*(${C2neg}+${C2pos})
+variable C3${dir} equal 0.5*(${C3neg}+${C3pos})
+variable C4${dir} equal 0.5*(${C4neg}+${C4pos})
+variable C5${dir} equal 0.5*(${C5neg}+${C5pos})
+variable C6${dir} equal 0.5*(${C6neg}+${C6pos})
+
+# Delete dir to make sure it is not reused
+
+variable dir delete
diff --git a/examples/ELASTIC_T/in.elastic b/examples/ELASTIC_T/in.elastic
new file mode 100644
index 0000000000..f1fcafe6e1
--- /dev/null
+++ b/examples/ELASTIC_T/in.elastic
@@ -0,0 +1,210 @@
+# Compute elastic constant tensor for a crystal at finite temperature
+#
+# WARNING: This script attempts to measure small differences in
+# statistical averages generated by finite temperature MD simulations.
+# This creates many more opportunities for errors to occur, compared
+# to the zero temperature version provided in examples/ELASTIC.
+# Hence, it is always a good idea to start with the zero temperature
+# calculation, before attempting to use this script.
+#
+# Written by Aidan Thompson (Sandia, athomps@sandia.gov)
+#
+# This script uses the following three include files.
+#
+# init.mod (must be modified for different crystal structures)
+# Define units, MD parameters, deformation parameters,
+# and initial configuration of the atoms and simulation cell.
+#
+#
+# potential.mod (must be modified for different pair styles)
+# Define pair style and other attributes
+# not stored in restart file
+#
+#
+# displace.mod (displace.mod should not need to be modified)
+# Perform positive and negative box displacements
+# in direction ${dir} and size ${up}.
+# It uses the resultant changes
+# in stress to compute one
+# row of the elastic stiffness tensor
+#
+# Inputs variables:
+# dir = the Voigt deformation component
+# (1,2,3,4,5,6)
+# Global constants:
+# up = the deformation magnitude (strain units)
+# cfac = conversion from LAMMPS pressure units to
+# output units for elastic constants
+#
+#
+# To run this on a different system, it should only be necessary to
+# modify the files init.mod and potential.mod. In order to calculate
+# the elastic constants correctly, care must be taken to specify
+# the correct units in init.mod (units, cfac and cunits). It is also
+# important to verify that the MD sampling of stress components
+# is generating accurate statistical averages.
+# One indication of this is that the elastic constants are insensitive
+# to the choice of the variable ${up} in init.mod. Another is to
+# check for finite size effects.
+#
+
+include init.mod
+
+# Compute initial state
+
+variable thermostat equal 1
+include potential.mod
+run ${nequil}
+
+if "${adiabatic} == 1" &
+then "variable thermostat equal 0" &
+else "variable thermostat equal 1"
+
+print ${thermostat}
+
+include potential.mod
+run ${nrun}
+
+variable pxx0 equal f_avp[1]
+variable pyy0 equal f_avp[2]
+variable pzz0 equal f_avp[3]
+variable pxy0 equal f_avp[4]
+variable pxz0 equal f_avp[5]
+variable pyz0 equal f_avp[6]
+
+variable tmp equal lx
+variable lx0 equal ${tmp}
+variable tmp equal ly
+variable ly0 equal ${tmp}
+variable tmp equal lz
+variable lz0 equal ${tmp}
+
+# These formulas define the derivatives w.r.t. strain components
+# Constants uses $, variables use v_
+variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
+variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
+variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
+variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
+variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
+variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
+
+# Write restart
+write_restart restart.equil
+
+# uxx Perturbation
+
+variable dir equal 1
+include displace.mod
+
+# uyy Perturbation
+
+variable dir equal 2
+include displace.mod
+
+# uzz Perturbation
+
+variable dir equal 3
+include displace.mod
+
+# uyz Perturbation
+
+variable dir equal 4
+include displace.mod
+
+# uxz Perturbation
+
+variable dir equal 5
+include displace.mod
+
+# uxy Perturbation
+
+variable dir equal 6
+include displace.mod
+
+# Output final values
+
+variable C11all equal ${C11}
+variable C22all equal ${C22}
+variable C33all equal ${C33}
+
+variable C12all equal 0.5*(${C12}+${C21})
+variable C13all equal 0.5*(${C13}+${C31})
+variable C23all equal 0.5*(${C23}+${C32})
+
+variable C44all equal ${C44}
+variable C55all equal ${C55}
+variable C66all equal ${C66}
+
+variable C14all equal 0.5*(${C14}+${C41})
+variable C15all equal 0.5*(${C15}+${C51})
+variable C16all equal 0.5*(${C16}+${C61})
+
+variable C24all equal 0.5*(${C24}+${C42})
+variable C25all equal 0.5*(${C25}+${C52})
+variable C26all equal 0.5*(${C26}+${C62})
+
+variable C34all equal 0.5*(${C34}+${C43})
+variable C35all equal 0.5*(${C35}+${C53})
+variable C36all equal 0.5*(${C36}+${C63})
+
+variable C45all equal 0.5*(${C45}+${C54})
+variable C46all equal 0.5*(${C46}+${C64})
+variable C56all equal 0.5*(${C56}+${C65})
+
+# Average moduli for cubic crystals
+
+variable C11cubic equal (${C11all}+${C22all}+${C33all})/3.0
+variable C12cubic equal (${C12all}+${C13all}+${C23all})/3.0
+variable C44cubic equal (${C44all}+${C55all}+${C66all})/3.0
+
+variable bulkmodulus equal (${C11cubic}+2*${C12cubic})/3.0
+variable shearmodulus1 equal ${C44cubic}
+variable shearmodulus2 equal (${C11cubic}-${C12cubic})/2.0
+variable poissonratio equal 1.0/(1.0+${C11cubic}/${C12cubic})
+
+# For Stillinger-Weber silicon, the analytical results
+# are known to be (E. R. Cowley, 1988):
+# C11 = 151.4 GPa
+# C12 = 76.4 GPa
+# C44 = 56.4 GPa
+
+print "========================================="
+print "Components of the Elastic Constant Tensor"
+print "========================================="
+
+print "Elastic Constant C11all = ${C11all} ${cunits}"
+print "Elastic Constant C22all = ${C22all} ${cunits}"
+print "Elastic Constant C33all = ${C33all} ${cunits}"
+
+print "Elastic Constant C12all = ${C12all} ${cunits}"
+print "Elastic Constant C13all = ${C13all} ${cunits}"
+print "Elastic Constant C23all = ${C23all} ${cunits}"
+
+print "Elastic Constant C44all = ${C44all} ${cunits}"
+print "Elastic Constant C55all = ${C55all} ${cunits}"
+print "Elastic Constant C66all = ${C66all} ${cunits}"
+
+print "Elastic Constant C14all = ${C14all} ${cunits}"
+print "Elastic Constant C15all = ${C15all} ${cunits}"
+print "Elastic Constant C16all = ${C16all} ${cunits}"
+
+print "Elastic Constant C24all = ${C24all} ${cunits}"
+print "Elastic Constant C25all = ${C25all} ${cunits}"
+print "Elastic Constant C26all = ${C26all} ${cunits}"
+
+print "Elastic Constant C34all = ${C34all} ${cunits}"
+print "Elastic Constant C35all = ${C35all} ${cunits}"
+print "Elastic Constant C36all = ${C36all} ${cunits}"
+
+print "Elastic Constant C45all = ${C45all} ${cunits}"
+print "Elastic Constant C46all = ${C46all} ${cunits}"
+print "Elastic Constant C56all = ${C56all} ${cunits}"
+
+print "========================================="
+print "Average properties for a cubic crystal"
+print "========================================="
+
+print "Bulk Modulus = ${bulkmodulus} ${cunits}"
+print "Shear Modulus 1 = ${shearmodulus1} ${cunits}"
+print "Shear Modulus 2 = ${shearmodulus2} ${cunits}"
+print "Poisson Ratio = ${poissonratio}"
diff --git a/examples/ELASTIC_T/init.mod b/examples/ELASTIC_T/init.mod
new file mode 100644
index 0000000000..743b6b17d3
--- /dev/null
+++ b/examples/ELASTIC_T/init.mod
@@ -0,0 +1,40 @@
+# NOTE: This script can be modified for different atomic structures,
+# units, etc. See in.elastic for more info.
+#
+
+# Define the finite deformation size. Try several values of this
+# variable to verify that results do not depend on it.
+variable up equal 2.0e-2
+
+# metal units, elastic constants in GPa
+units metal
+variable cfac equal 1.0e-4
+variable cunits string GPa
+
+# Define MD parameters
+variable nevery equal 10 # sampling interval
+variable nrepeat equal 10 # number of samples
+variable nfreq equal ${nevery}*${nrepeat} # length of one average
+variable nthermo equal ${nfreq} # interval for thermo output
+variable nequil equal 10*${nthermo} # length of equilibration run
+variable nrun equal 3*${nthermo} # length of equilibrated run
+variable temp equal 2000.0 # temperature of initial sample
+variable timestep equal 0.001 # timestep
+variable mass1 equal 28.06 # mass
+variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
+variable tdamp equal 0.01 # time constant for thermostat
+variable seed equal 123457 # seed for thermostat
+
+# generate the box and atom positions using a diamond lattice
+variable a equal 5.431
+
+boundary p p p
+
+lattice diamond $a
+region box prism 0 3.0 0 3.0 0 3.0 0.0 0.0 0.0
+create_box 1 box
+create_atoms 1 box
+mass 1 ${mass1}
+velocity all create ${temp} 87287
+
+
diff --git a/examples/ELASTIC_T/potential.mod b/examples/ELASTIC_T/potential.mod
new file mode 100644
index 0000000000..b9ed80d865
--- /dev/null
+++ b/examples/ELASTIC_T/potential.mod
@@ -0,0 +1,28 @@
+# NOTE: This script can be modified for different pair styles
+# See in.elastic for more info.
+
+reset_timestep 0
+
+# Choose potential
+pair_style sw
+pair_coeff * * Si.sw Si
+
+# Setup neighbor style
+neighbor 1.0 nsq
+neigh_modify once no every 1 delay 0 check yes
+
+# Setup output
+
+fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
+thermo ${nthermo}
+thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
+thermo_modify norm no
+
+# Setup MD
+
+timestep ${timestep}
+fix 4 all nve
+if "${thermostat} == 1" then &
+ "fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
+
+
diff --git a/examples/README b/examples/README
index 60fc4bebc1..c2a9023108 100644
--- a/examples/README
+++ b/examples/README
@@ -144,9 +144,13 @@ either by itself or in tandem with another code or library. See the
COUPLE/README file to get started.
The ELASTIC directory has an example script for computing elastic
-constants, using a zero temperature Si example. See the
+constants at zero temperature, using an Si example. See the
ELASTIC/in.elastic file for more info.
+The ELASTIC_T directory has an example script for computing elastic
+constants at finite temperature, using an Si example. See the
+ELASTIC_T/in.elastic file for more info.
+
The KAPPA directory has example scripts for computing the thermal
conductivity (kappa) of a LJ liquid using 4 different methods. See
the KAPPA/README file for more info.
diff --git a/src/MAKE/OPTIONS/Makefile.kokkos_cuda b/src/MAKE/OPTIONS/Makefile.kokkos_cuda
index 2d825baadf..af557992e0 100755
--- a/src/MAKE/OPTIONS/Makefile.kokkos_cuda
+++ b/src/MAKE/OPTIONS/Makefile.kokkos_cuda
@@ -2,7 +2,8 @@
SHELL = /bin/sh
-export OMPI_CXX = ../../lib/kokkos/config/nvcc_wrapper
+KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
+export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper
# ---------------------------------------------------------------------
# compiler/linker settings
diff --git a/src/USER-INTEL/README b/src/USER-INTEL/README
index 929bd00871..3465101074 100644
--- a/src/USER-INTEL/README
+++ b/src/USER-INTEL/README
@@ -21,11 +21,12 @@ This package is based on the USER-OMP package and provides LAMMPS styles that:
-----------------------------------------------------------------------------
When using the suffix command with "intel", intel styles will be used if they
-exist; if they do not, and the USER-OMP package is installed and an omp version
-exists, that style will be used. For example, in the case the USER-OMP package
-is installed,
+exist. If the suffix command is used with "hybrid intel omp" and the USER-OMP
+USER-OMP styles will be used whenever USER-INTEL styles are not available. This
+allow for running most styles in LAMMPS with threading. For example, in the
+latter case with the USER-OMP package installed,
- kspace_style pppm/intel 1e-4
+ kspace_style pppm 1e-4
is equivalent to:
diff --git a/src/input.cpp b/src/input.cpp
index 917a25662f..5b0c27e603 100644
--- a/src/input.cpp
+++ b/src/input.cpp
@@ -1699,7 +1699,7 @@ void Input::special_bonds()
void Input::suffix()
{
- if (narg != 1) error->all(FLERR,"Illegal suffix command");
+ if (narg < 1) error->all(FLERR,"Illegal suffix command");
if (strcmp(arg[0],"off") == 0) lmp->suffix_enable = 0;
else if (strcmp(arg[0],"on") == 0) lmp->suffix_enable = 1;
@@ -1707,17 +1707,21 @@ void Input::suffix()
lmp->suffix_enable = 1;
delete [] lmp->suffix;
- int n = strlen(arg[0]) + 1;
- lmp->suffix = new char[n];
- strcpy(lmp->suffix,arg[0]);
+ delete [] lmp->suffix2;
- // set 2nd suffix = "omp" when suffix = "intel"
- // but only if USER-OMP package is installed
-
- if (strcmp(lmp->suffix,"intel") == 0 && modify->check_package("OMP")) {
- delete [] lmp->suffix2;
- lmp->suffix2 = new char[4];
- strcpy(lmp->suffix2,"omp");
+ if (strcmp(arg[0],"hybrid") == 0) {
+ if (narg != 3) error->all(FLERR,"Illegal suffix command");
+ int n = strlen(arg[1]) + 1;
+ lmp->suffix = new char[n];
+ strcpy(lmp->suffix,arg[1]);
+ n = strlen(arg[2]) + 1;
+ lmp->suffix2 = new char[n];
+ strcpy(lmp->suffix2,arg[2]);
+ } else {
+ if (narg != 1) error->all(FLERR,"Illegal suffix command");
+ int n = strlen(arg[0]) + 1;
+ lmp->suffix = new char[n];
+ strcpy(lmp->suffix,arg[0]);
}
}
}
diff --git a/src/lammps.cpp b/src/lammps.cpp
index 17e15b91f9..ff6db7a667 100644
--- a/src/lammps.cpp
+++ b/src/lammps.cpp
@@ -203,16 +203,25 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
if (iarg+2 > narg)
error->universe_all(FLERR,"Invalid command-line argument");
delete [] suffix;
- int n = strlen(arg[iarg+1]) + 1;
- suffix = new char[n];
- strcpy(suffix,arg[iarg+1]);
- // set 2nd suffix = "omp" when suffix = "intel"
- if (strcmp(suffix,"intel") == 0) {
- suffix2 = new char[4];
- strcpy(suffix2,"omp");
- }
+ delete [] suffix2;
suffix_enable = 1;
- iarg += 2;
+ // hybrid option to set fall-back for suffix2
+ if (strcmp(arg[iarg+1],"hybrid") == 0) {
+ if (iarg+4 > narg)
+ error->universe_all(FLERR,"Invalid command-line argument");
+ int n = strlen(arg[iarg+2]) + 1;
+ suffix = new char[n];
+ strcpy(suffix,arg[iarg+2]);
+ n = strlen(arg[iarg+3]) + 1;
+ suffix2 = new char[n];
+ strcpy(suffix2,arg[iarg+3]);
+ iarg += 4;
+ } else {
+ int n = strlen(arg[iarg+1]) + 1;
+ suffix = new char[n];
+ strcpy(suffix,arg[iarg+1]);
+ iarg += 2;
+ }
} else if (strcmp(arg[iarg],"-reorder") == 0 ||
strcmp(arg[iarg],"-ro") == 0) {
if (iarg+3 > narg)
@@ -669,7 +678,6 @@ void LAMMPS::create()
/* ----------------------------------------------------------------------
check suffix consistency with installed packages
- turn off suffix2 = omp if USER-OMP is not installed
invoke package-specific deafult package commands
only invoke if suffix is set and enabled
also check if suffix2 is set
@@ -702,19 +710,13 @@ void LAMMPS::post_create()
if (strcmp(suffix,"omp") == 0 && !modify->check_package("OMP"))
error->all(FLERR,"Using suffix omp without USER-OMP package installed");
- // suffix2 only currently set by -sf intel
- // unset if LAMMPS was not built with USER-OMP package
-
- if (suffix2 && strcmp(suffix2,"omp") == 0 && !modify->check_package("OMP")) {
- delete [] suffix2;
- suffix2 = NULL;
- }
-
if (strcmp(suffix,"gpu") == 0) input->one("package gpu 1");
if (strcmp(suffix,"intel") == 0) input->one("package intel 1");
if (strcmp(suffix,"omp") == 0) input->one("package omp 0");
if (suffix2) {
+ if (strcmp(suffix2,"gpu") == 0) input->one("package gpu 1");
+ if (strcmp(suffix2,"intel") == 0) input->one("package intel 1");
if (strcmp(suffix2,"omp") == 0) input->one("package omp 0");
}
diff --git a/src/version.h b/src/version.h
index 903aac965f..04b0c2166c 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define LAMMPS_VERSION "25 Sep 2015"
+#define LAMMPS_VERSION "5 Oct 2015"