From 296e572e6998214669d573562335b145c22b758a Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 14 Jul 2017 16:25:16 -0600 Subject: [PATCH 01/11] better Install.py script for KIM from Ryan Elliott --- doc/src/Section_example.txt | 1 + doc/src/Section_packages.txt | 44 +++++-- doc/src/neigh_modify.txt | 7 +- examples/README | 1 + lib/Install.py | 13 +- lib/atc/Install.py | 13 +- lib/awpmd/Install.py | 13 +- lib/colvars/Install.py | 13 +- lib/gpu/Install.py | 25 ++-- lib/h5md/Install.py | 13 +- lib/kim/Install.py | 223 ++++++++++++++++++++++++++--------- lib/kim/README | 10 +- lib/linalg/Install.py | 8 +- lib/meam/Install.py | 13 +- lib/mscg/Install.py | 11 +- lib/poems/Install.py | 13 +- lib/qmmm/Install.py | 13 +- lib/reax/Install.py | 13 +- lib/smd/Install.py | 11 +- lib/voronoi/Install.py | 11 +- src/Makefile | 3 +- 21 files changed, 363 insertions(+), 109 deletions(-) diff --git a/doc/src/Section_example.txt b/doc/src/Section_example.txt index 26dc3b9698..f8b39be173 100644 --- a/doc/src/Section_example.txt +++ b/doc/src/Section_example.txt @@ -49,6 +49,7 @@ Lists of both kinds of directories are given below. Lowercase directories :h4 accelerate: run with various acceleration options (OpenMP, GPU, Phi) +airebo: polyethylene with AIREBO potential balance: dynamic load balancing, 2d system body: body particles, 2d system cmap: CMAP 5-body contributions to CHARMM force field diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 76f88b8ab8..a65e510654 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -492,14 +492,38 @@ Minnesota). [Install or un-install:] -Using this package requires the KIM library and its models -(interatomic potentials) to be downloaded and installed on your -system. The library can be downloaded and built in lib/kim or -elsewhere on your system. Details of the download, build, and install -process for KIM are given in the lib/kim/README file. +Before building LAMMPS with this package, you must first download and +build the KIM library and include the KIM models that you want to +use. You can do this manually if you prefer; follow the instructions +in lib/kim/README. You can also do it in one step from the lammps/src +dir, using a command like these, which simply invoke the +lib/kim/Install.py script with the specified args. -Once that process is complete, you can then install/un-install the -package and build LAMMPS in the usual manner: +make lib-kim # print help message +make lib-kim args="-b . none" # install KIM API lib with only example models +make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model +make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver :pre + +Note that in LAMMPS lingo, a KIM model driver is a pair style +(e.g. EAM or Tersoff). A KIM model is a pair style for a particular +element or alloy and set of parameters, e.g. EAM for Cu with a +specific EAM potential file. Also note that installing the KIM API +library with all its models, may take around 30 min to build. Of +course you only need to do that once. + +See the list of KIM model drivers here: +https://openkim.org/kim-items/model-drivers/alphabetical + +See the list of all KIM models here: +https://openkim.org/kim-items/models/by-model-drivers + +See the list of example KIM models included by default here: +https://openkim.org/kim-api +in the "What is in the KIM API source package?" section + +You can then install/un-install the package and build LAMMPS in the +usual manner: make yes-kim make machine :pre @@ -1414,7 +1438,7 @@ lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: make lib-linalg # print help message -make lib-atc args="-m gfortran" # build with GNU Fortran compiler +make lib-linalg args="-m gfortran" # build with GNU Fortran compiler You can then install/un-install the package and build LAMMPS in the usual manner: @@ -2469,8 +2493,8 @@ step from the lammps/src dir, using a command like these, which simply invoke the lib/smd/Install.py script with the specified args: make lib-smd # print help message -make lib-smd args="-g -l" # download in default lib/smd/eigen-eigen-* -make lib-smd args="-h . eigen -g -l" # download in lib/smd/eigen +make lib-smd args="-g -l" # download and build in default lib/smd/eigen-eigen-* +make lib-smd args="-h . eigen -g -l" # download and build in lib/smd/eigen make lib-smd args="-h ~ eigen -g -l" # download and build in ~/eigen :pre Note that the final -l switch is to create a symbolic (soft) link diff --git a/doc/src/neigh_modify.txt b/doc/src/neigh_modify.txt index 5c149d892d..c4544cb29b 100644 --- a/doc/src/neigh_modify.txt +++ b/doc/src/neigh_modify.txt @@ -109,7 +109,8 @@ atoms in the specified group. This can be useful for models where a large portion of the simulation is particles that do not interact with other particles or with each other via pairwise interactions. The group specified with this option must also be specified via the -"atom_modify first"_atom_modify.html command. +"atom_modify first"_atom_modify.html command. Note that specifying +"all" as the group-ID effectively turns off the {include} option. The {exclude} option turns off pairwise interactions between certain pairs of atoms, by not including them in the neighbor list. These are @@ -213,5 +214,5 @@ space. [Default:] The option defaults are delay = 10, every = 1, check = yes, once = no, -cluster = no, include = all, exclude = none, page = 100000, one = -2000, and binsize = 0.0. +cluster = no, include = all (same as no include option defined), +exclude = none, page = 100000, one = 2000, and binsize = 0.0. diff --git a/examples/README b/examples/README index e4312e2598..0ec28aa2c2 100644 --- a/examples/README +++ b/examples/README @@ -58,6 +58,7 @@ These are the sample problems and their output in the various sub-directories: accelerate: use of all the various accelerator packages +airebo: polyethylene with AIREBO potential balance: dynamic load balancing, 2d system body: body particles, 2d system cmap: CMAP 5-body contributions to CHARMM force field diff --git a/lib/Install.py b/lib/Install.py index 18b426f928..29270560a6 100644 --- a/lib/Install.py +++ b/lib/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/atc/Install.py b/lib/atc/Install.py index 18b426f928..29270560a6 100644 --- a/lib/atc/Install.py +++ b/lib/atc/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py index 18b426f928..29270560a6 100644 --- a/lib/awpmd/Install.py +++ b/lib/awpmd/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index 18b426f928..29270560a6 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/gpu/Install.py b/lib/gpu/Install.py index d396be5e1a..c6cd1f3021 100644 --- a/lib/gpu/Install.py +++ b/lib/gpu/Install.py @@ -8,14 +8,17 @@ import sys,os,re,commands # help message help = """ -Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix - specify one or more options, order does not matter - copies an existing Makefile.isuffix in lib/gpu to Makefile.auto - optionally edits these variables in Makefile.auto: - CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE - optionally uses Makefile.auto to build the GPU library -> libgpu.a - and to copy a Makefile.lammps.esuffix -> Makefile.lammps - optionally copies Makefile.auto to a new Makefile.osuffix +Syntax from src dir: make lib-gpu args="-i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix" +Syntax from lib dir: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix + +specify one or more options, order does not matter + +copies an existing Makefile.isuffix in lib/gpu to Makefile.auto +optionally edits these variables in Makefile.auto: + CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE +optionally uses Makefile.auto to build the GPU library -> libgpu.a + and to copy a Makefile.lammps.esuffix -> Makefile.lammps +optionally copies Makefile.auto to a new Makefile.osuffix -i = use Makefile.isuffix as starting point, copy to Makefile.auto default isuffix = linux @@ -34,6 +37,12 @@ Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m also copies EXTRAMAKE file -> Makefile.lammps -e can set which Makefile.lammps.esuffix file is copied -o = copy final Makefile.auto to Makefile.osuffix + +Examples: + +make lib-gpu args="-m" # build GPU lib with default Makefile.linux +make lib-gpu args="-i xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision +make lib-gpu args="-i xk7 -p single -o xk7.single -m" # ditto, also build GPU lib """ # print error message or help diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py index 18b426f928..29270560a6 100644 --- a/lib/h5md/Install.py +++ b/lib/h5md/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/kim/Install.py b/lib/kim/Install.py index bcd22dcbb3..9f36f9fedb 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -1,25 +1,44 @@ #!/usr/bin/env python -# install.py tool to setup the kim-api library +# install.pa tool to setup the kim-api library # used to automate the steps described in the README file in this dir import sys,os,re,urllib,commands help = """ -Syntax: install.py -v version -c kim-dir -b kim-model-name -a kim-name - specify one or more options, order does not matter - -v = version of kim-api to download and work with - default = kim-api-v1.8.2 (current as of June 2017) - -c = create Makefile.KIM_DIR within lammps lib/kim to configure lammps - for use with the kim-api library installed at "kim-dir" (absolute - path). default = this dir - -b = build kim-api and kim model where kim-model-name can be a specific - openkim.org model name (such as - "EAM_Dynamo_Ackland_W__MO_141627196590_002") or the keyword - "OpenKIM" to install all compatible models from the openkim.org - site. - -a = add kim-name openkim.org item (model driver or model) to existing - kim-api instalation. +Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" +Syntax from lib dir: python Install.py -v version -b kim-install-dir kim-name -a kim-name + +specify one or more options, order does not matter + + -v = version of KIM API library to use + default = kim-api-v1.8.2 (current as of June 2017) + -b = download and build KIM API library with KIM models + kim-dir = where to install/build the KIM API library + use "." to install in lib/kim + kim-name = none to install only the example KIM models + kim-name = KIM model name (see example below) + examples + kim-name = OpenKIM to install all models + from the openkim.org site (this can take 30 minutes or more) + -a = add single KIM model or model driver with kim-name + to existing KIM API lib (see example below) + +Examples: + +make lib-kim args="-b . none" # install KIM API lib with only example models +make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model +make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver + +See the list of KIM model drivers here: +https://openkim.org/kim-items/model-drivers/alphabetical + +See the list of all KIM models here: +https://openkim.org/kim-items/models/by-model-drivers + +See the list of example KIM models included by default here: +https://openkim.org/kim-api +in the "What is in the KIM API source package?" section """ def error(): @@ -28,32 +47,28 @@ def error(): # parse args -args = sys.argv +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() thisdir = os.environ['PWD'] -dir = thisdir version = "kim-api-v1.8.2" -dirflag = 0 buildflag = 0 addflag = 0 -iarg = 1 +iarg = 0 while iarg < len(args): if args[iarg] == "-v": if iarg+2 > len(args): error() version = args[iarg+1] iarg += 2 - elif args[iarg] == "-c": - dirflag = 1 - if iarg+2 > len(args): error() - dir = args[iarg+1] - iarg += 2 elif args[iarg] == "-b": buildflag = 1 - if iarg+2 > len(args): error() - modelname = args[iarg+1] - iarg += 2 + if iarg+3 > len(args): error() + dir = args[iarg+1] + modelname = args[iarg+2] + iarg += 3 elif args[iarg] == "-a": addflag = 1 if iarg+2 > len(args): error() @@ -62,33 +77,59 @@ while iarg < len(args): else: error() thisdir = os.path.abspath(thisdir) -dir = os.path.abspath(dir) url = "https://s3.openkim.org/kim-api/%s.tgz" % version -# download and unpack tarball - - -if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): - open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) - open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) - print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) -else: - if dirflag == 1: - open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) - open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) - print "Updated %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) - +# download KIM tarball, unpack, build KIM +# either in lib/kim or user-requested location if buildflag == 1: - # download kim-api + + # set install directory + dir = os.path.abspath(dir) + "/installed-" + version + + # check to see if an installed kim-api already exists + + if os.path.isdir(dir): + print "kim-api is already installed at %s" % dir + print "Must remove this directory in order to resintall at this location" + sys.exit() + + # configure LAMMPS to use kim-api to be installed + + mkfle = open("%s/Makefile.KIM_DIR" % thisdir, 'w') + mkfle.write("KIM_INSTALL_DIR=%s\n" % dir) + mkfle.write("\n") + mkfle.write(".DUMMY: print_dir\n") + mkfle.write("\n") + mkfle.write("print_dir:\n") + mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") + mkfle.close() + open("%s/Makefile.KIM_Config" % thisdir, 'w'). \ + write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) + print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) + + # download entire kim-api tarball + # try first via urllib + # if fails (probably due to no SSL support), use wget + print "Downloading kim-api tarball ..." - urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + + try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + except: + cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) + txt = commands.getstatusoutput(cmd) + print txt[1] + if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): + print "Both urllib.urlretrieve() and wget command failed to download" + sys.exit() + print "Unpacking kim-api tarball ..." cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) txt = commands.getstatusoutput(cmd) if txt[0] != 0: error() # configure kim-api + print "Configuring kim-api ..." cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) txt = commands.getstatusoutput(cmd) @@ -96,12 +137,19 @@ if buildflag == 1: if txt[0] != 0: error() # build kim-api + print "Configuring model : %s" % modelname - cmd = "cd %s/%s; make add-%s" % (thisdir,version,modelname) + if modelname == "none": + cmd = "cd %s/%s; make add-examples" % (thisdir,version) + else: + if modelname == "OpenKIM": + print "configuring all OpenKIM models, this will take a while ..." + cmd = "cd %s/%s; make add-examples; make add-%s" % \ + (thisdir,version,modelname) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() - # + print "Building kim-api ..." cmd = "cd %s/%s; make" % (thisdir,version) txt = commands.getstatusoutput(cmd) @@ -109,42 +157,101 @@ if buildflag == 1: if txt[0] != 0: error() # install kim-api + print "Installing kim-api ..." cmd = "cd %s/%s; make install" % (thisdir,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() - # + cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() # remove source files + print "Removing kim-api source and build files ..." cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() +# add a single model (and possibly its driver) to existing KIM installation + if addflag == 1: - # download model - url = "https://openkim.org/download/%s.tgz" % addmodelname + + # get location of installed kim-api + + if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): + print "kim-api is not installed" + error() + else: + cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir + dir = commands.getstatusoutput(cmd)[1] + + # download single model + # try first via urllib + # if fails (probably due to no SSL support), use wget + print "Downloading item tarball ..." - urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + + url = "https://openkim.org/download/%s.tgz" % addmodelname + + try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + except: + cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): + print "Both urllib.urlretrieve() and wget command failed to download" + sys.exit() + print "Unpacking item tarball ..." cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) txt = commands.getstatusoutput(cmd) if txt[0] != 0: error() - # + print "Building item ..." cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) txt = commands.getstatusoutput(cmd) - print txt[1] - if txt[0] != 0: error() - # - print "Removing kim item source and build files ..." - cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] - if txt[0] != 0: error() + firstRunOutput = txt[1] + if txt[0] != 0: + # Error: but first, check to see if it needs a driver + + cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + if txt[1] == "ParameterizedModel": + + # Get and install driver + + cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + adddrivername = txt[1] + print "First Installing model driver: %s" % adddrivername + cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) + txt = commands.getstatusoutput(cmd) + if txt[0] != 0: + print firstRunOutput + print txt[1] + error() + else: + print txt[1] + cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: + error() + else: + print firstRunOutput + error() + else: + + # success + + print firstRunOutput + print "Removing kim item source and build files ..." + cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() diff --git a/lib/kim/README b/lib/kim/README index 00d6ea8fad..7a4230dc25 100644 --- a/lib/kim/README +++ b/lib/kim/README @@ -8,14 +8,16 @@ James Sethna (Cornell U). Ryan Elliott is the main developer for the KIM API and he also maintains the code that implements the pair_style kim command. -To download, build, and install the KIM API on your system, follow -these steps. You can use the install.py script to automate these steps. +You can type "make lib-kim" from the src directory to see help on +how to download and build this library via make commands, or you can +do the same thing by typing "python Install.py" from within this +directory, or you can do it manually by following the instructions +below. ----------------- Instructions: - 1. Configure lammps for use with the kim-api library installed in this directory $ printf "KIM_INSTALL_DIR=${PWD}\n" > ./Makefile.KIM_DIR @@ -65,7 +67,7 @@ $ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz When these steps are complete you can build LAMMPS with the KIM package installed: -$ cd ../../src +$ cd lammpos/src $ make yes-kim $ make g++ (or whatever target you wish) diff --git a/lib/linalg/Install.py b/lib/linalg/Install.py index c7076ca52f..560afecec4 100644 --- a/lib/linalg/Install.py +++ b/lib/linalg/Install.py @@ -8,9 +8,15 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine +Syntax from src dir: make lib-linalg args="-m machine" +Syntax from lib dir: python Install.py -m machine + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file + +Example: + +make lib-linalg args="-m gfortran" # build with GNU Fortran compiler """ # print error message or help diff --git a/lib/meam/Install.py b/lib/meam/Install.py index 18b426f928..29270560a6 100644 --- a/lib/meam/Install.py +++ b/lib/meam/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/mscg/Install.py b/lib/mscg/Install.py index e547232614..7b10be189f 100644 --- a/lib/mscg/Install.py +++ b/lib/mscg/Install.py @@ -8,8 +8,11 @@ import sys,os,re,commands # help message help = """ -Syntax: python Install.py -h hpath hdir -g -b [suffix] -l - specify one or more options, order does not matter +Syntax from src dir: make lib-mscg args="-h hpath hdir -g -b [suffix] -l" +Syntax from lib dir: python Install.py -h hpath hdir -g -b [suffix] -l + +specify one or more options, order does not matter + -h = set home dir of MS-CG to be hpath/hdir hpath can be full path, contain '~' or '.' chars default hpath = . = lib/mscg @@ -22,6 +25,10 @@ Syntax: python Install.py -h hpath hdir -g -b [suffix] -l optional suffix specifies which src/Make/Makefile.suffix to use default suffix = g++_simple -l = create 2 softlinks (includelink,liblink) in lib/mscg to MS-CG src dir + +Example: + +make lib-mscg args="-g -b -l" # download/build in lib/mscg/MSCG-release-master """ # settings diff --git a/lib/poems/Install.py b/lib/poems/Install.py index 18b426f928..29270560a6 100644 --- a/lib/poems/Install.py +++ b/lib/poems/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py index 18b426f928..29270560a6 100644 --- a/lib/qmmm/Install.py +++ b/lib/qmmm/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/reax/Install.py b/lib/reax/Install.py index 18b426f928..29270560a6 100644 --- a/lib/reax/Install.py +++ b/lib/reax/Install.py @@ -9,12 +9,21 @@ import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help diff --git a/lib/smd/Install.py b/lib/smd/Install.py index dc0a3187ce..e6fe8926a4 100644 --- a/lib/smd/Install.py +++ b/lib/smd/Install.py @@ -8,8 +8,11 @@ import sys,os,re,glob,commands # help message help = """ -Syntax: python Install.py -h hpath hdir -g -l - specify one or more options, order does not matter +Syntax from src dir: make lib-smd args="-h hpath hdir -g -l" +Syntax from lib dir: python Install.py -h hpath hdir -g -l + +specify one or more options, order does not matter + -h = set home dir of Eigen to be hpath/hdir hpath can be full path, contain '~' or '.' chars default hpath = . = lib/smd @@ -19,6 +22,10 @@ Syntax: python Install.py -h hpath hdir -g -l hpath must already exist if hdir already exists, it will be deleted before unpack -l = create softlink (includelink) in lib/smd to Eigen src dir + +Example: + +make lib-smd args="-g -l" # download/build in default lib/smd/eigen-eigen-* """ # settings diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 7d847183b3..54246f113e 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -8,8 +8,11 @@ import sys,os,re,urllib,commands # help message help = """ -Syntax: python Install.py -v version -h hpath hdir -g -b -l - specify one or more options, order does not matter +Syntax from src dir: make lib-voronoi args="-v version -h hpath hdir -g -b -l" +Syntax from lib dir: python Install.py -v version -h hpath hdir -g -b -l + +specify one or more options, order does not matter + -v = version of Voro++ to download and build default version = voro++-0.4.6 (current as of Jan 2015) -h = set home dir of Voro++ to be hpath/hdir @@ -22,6 +25,10 @@ Syntax: python Install.py -v version -h hpath hdir -g -b -l if hdir already exists, it will be deleted before unpack -b = build Voro++ library in its src dir -l = create 2 softlinks (includelink,liblink) in lib/voronoi to Voro++ src dir + +Example: + +make lib-voronoi args="-g -b -l" # download/build in lib/voronoi/voro++-0.4.6 """ # settings diff --git a/src/Makefile b/src/Makefile index c7b20dcb13..3d1085e0be 100644 --- a/src/Makefile +++ b/src/Makefile @@ -116,7 +116,8 @@ help: @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package files' @echo '' - @echo 'make lib-package download/build/install a package library' + @echo 'make lib-package help for download/build/install a package library' + @echo 'make lib-package args="..." download/build/install a package library' @echo 'make purge purge obsolete copies of source files' @echo '' @echo 'make machine build LAMMPS for machine' From d7355801dff5d7ef2aed45fa0a90bb9a40016ff5 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Sat, 15 Jul 2017 12:03:04 -0500 Subject: [PATCH 02/11] Make KIM Install.py Python 3 compatible --- lib/kim/Install.py | 141 ++++++++++++++++++++++----------------------- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index 9f36f9fedb..cf1b254ecd 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -2,8 +2,8 @@ # install.pa tool to setup the kim-api library # used to automate the steps described in the README file in this dir - -import sys,os,re,urllib,commands +from __future__ import print_function +import sys,os,re,urllib,subprocess help = """ Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" @@ -42,7 +42,7 @@ in the "What is in the KIM API source package?" section """ def error(): - print help + print(help) sys.exit() # parse args @@ -54,8 +54,8 @@ if nargs == 0: error() thisdir = os.environ['PWD'] version = "kim-api-v1.8.2" -buildflag = 0 -addflag = 0 +buildflag = False +addflag = False iarg = 0 while iarg < len(args): @@ -64,13 +64,13 @@ while iarg < len(args): version = args[iarg+1] iarg += 2 elif args[iarg] == "-b": - buildflag = 1 + buildflag = True if iarg+3 > len(args): error() dir = args[iarg+1] modelname = args[iarg+2] iarg += 3 elif args[iarg] == "-a": - addflag = 1 + addflag = True if iarg+2 > len(args): error() addmodelname = args[iarg+1] iarg += 2 @@ -82,176 +82,175 @@ url = "https://s3.openkim.org/kim-api/%s.tgz" % version # download KIM tarball, unpack, build KIM # either in lib/kim or user-requested location -if buildflag == 1: +if buildflag: # set install directory - dir = os.path.abspath(dir) + "/installed-" + version + dir = os.path.join(os.path.abspath(dir), "installed-" + version) # check to see if an installed kim-api already exists if os.path.isdir(dir): - print "kim-api is already installed at %s" % dir - print "Must remove this directory in order to resintall at this location" + print("kim-api is already installed at %s" % dir) + print("Must remove this directory in order to resintall at this location") sys.exit() # configure LAMMPS to use kim-api to be installed - mkfle = open("%s/Makefile.KIM_DIR" % thisdir, 'w') - mkfle.write("KIM_INSTALL_DIR=%s\n" % dir) - mkfle.write("\n") - mkfle.write(".DUMMY: print_dir\n") - mkfle.write("\n") - mkfle.write("print_dir:\n") - mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") - mkfle.close() - open("%s/Makefile.KIM_Config" % thisdir, 'w'). \ - write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) - print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) + with open("%s/Makefile.KIM_DIR" % thisdir, 'w') as mkfile: + mkfle.write("KIM_INSTALL_DIR=%s\n\n" % dir) + mkfle.write(".DUMMY: print_dir\n\n") + mkfle.write("print_dir:\n") + mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") + + with open("%s/Makefile.KIM_Config" % thisdir, 'w') as cfgfile: + cfgfile.write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) + + print("Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir)) # download entire kim-api tarball # try first via urllib # if fails (probably due to no SSL support), use wget - print "Downloading kim-api tarball ..." + print("Downloading kim-api tarball ...") try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): - print "Both urllib.urlretrieve() and wget command failed to download" + print("Both urllib.urlretrieve() and wget command failed to download") sys.exit() - print "Unpacking kim-api tarball ..." + print("Unpacking kim-api tarball ...") cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[0] != 0: error() # configure kim-api - print "Configuring kim-api ..." + print("Configuring kim-api ...") cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # build kim-api - print "Configuring model : %s" % modelname + print("Configuring model : %s" % modelname) if modelname == "none": cmd = "cd %s/%s; make add-examples" % (thisdir,version) else: if modelname == "OpenKIM": - print "configuring all OpenKIM models, this will take a while ..." + print("configuring all OpenKIM models, this will take a while ...") cmd = "cd %s/%s; make add-examples; make add-%s" % \ (thisdir,version,modelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() - print "Building kim-api ..." + print("Building kim-api ...") cmd = "cd %s/%s; make" % (thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # install kim-api - print "Installing kim-api ..." + print("Installing kim-api ...") cmd = "cd %s/%s; make install" % (thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # remove source files - print "Removing kim-api source and build files ..." + print("Removing kim-api source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() # add a single model (and possibly its driver) to existing KIM installation -if addflag == 1: +if addflag: # get location of installed kim-api if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): - print "kim-api is not installed" + print("kim-api is not installed") error() else: cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir - dir = commands.getstatusoutput(cmd)[1] + dir = subprocess.getstatusoutput(cmd)[1] # download single model # try first via urllib # if fails (probably due to no SSL support), use wget - print "Downloading item tarball ..." + print("Downloading item tarball ...") url = "https://openkim.org/download/%s.tgz" % addmodelname try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): - print "Both urllib.urlretrieve() and wget command failed to download" + print("Both urllib.urlretrieve() and wget command failed to download") sys.exit() - print "Unpacking item tarball ..." + print("Unpacking item tarball ...") cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[0] != 0: error() - print "Building item ..." + print("Building item ...") cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) firstRunOutput = txt[1] if txt[0] != 0: # Error: but first, check to see if it needs a driver cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[1] == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) adddrivername = txt[1] - print "First Installing model driver: %s" % adddrivername + print("First Installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) - txt = commands.getstatusoutput(cmd) + txt = subprocess.getstatusoutput(cmd) if txt[0] != 0: - print firstRunOutput - print txt[1] + print(firstRunOutput) + print(txt[1]) error() else: - print txt[1] + print(txt[1]) cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() else: - print firstRunOutput + print(firstRunOutput) error() else: # success - print firstRunOutput - print "Removing kim item source and build files ..." + print(firstRunOutput) + print("Removing kim item source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] + txt = subprocess.getstatusoutput(cmd) + print(txt[1]) if txt[0] != 0: error() From a92d79253734ab7d7ef8288b35920a5bc368eec1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 12:55:55 -0400 Subject: [PATCH 03/11] update manual links that got broken when removing and renumbering a section --- doc/src/Manual.txt | 1 - doc/src/Section_accelerate.txt | 10 +- doc/src/Section_errors.txt | 2 +- doc/src/Section_howto.txt | 10 +- doc/src/Section_packages.txt | 30 +- doc/src/Section_python.txt | 6 +- doc/src/Section_start.txt | 12 +- doc/src/accelerate_gpu.txt | 10 +- doc/src/accelerate_intel.txt | 10 +- doc/src/accelerate_kokkos.txt | 24 +- doc/src/accelerate_omp.txt | 6 +- doc/src/accelerate_opt.txt | 4 +- doc/src/angle_charmm.txt | 2 +- doc/src/angle_class2.txt | 2 +- doc/src/angle_cosine.txt | 2 +- doc/src/angle_cosine_delta.txt | 2 +- doc/src/angle_cosine_periodic.txt | 2 +- doc/src/angle_cosine_shift.txt | 2 +- doc/src/angle_cosine_shift_exp.txt | 2 +- doc/src/angle_cosine_squared.txt | 2 +- doc/src/angle_fourier.txt | 2 +- doc/src/angle_fourier_simple.txt | 2 +- doc/src/angle_harmonic.txt | 2 +- doc/src/angle_quartic.txt | 2 +- doc/src/angle_table.txt | 2 +- doc/src/balance.txt | 2 +- doc/src/bond_class2.txt | 2 +- doc/src/bond_fene.txt | 2 +- doc/src/bond_fene_expand.txt | 2 +- doc/src/bond_harmonic.txt | 2 +- doc/src/bond_harmonic_shift.txt | 2 +- doc/src/bond_harmonic_shift_cut.txt | 2 +- doc/src/bond_morse.txt | 2 +- doc/src/bond_nonlinear.txt | 2 +- doc/src/bond_quartic.txt | 2 +- doc/src/bond_table.txt | 2 +- doc/src/compute_pressure.txt | 2 +- doc/src/compute_temp.txt | 2 +- doc/src/compute_temp_partial.txt | 2 +- doc/src/dihedral_charmm.txt | 2 +- doc/src/dihedral_class2.txt | 2 +- doc/src/dihedral_cosine_shift_exp.txt | 2 +- doc/src/dihedral_fourier.txt | 2 +- doc/src/dihedral_harmonic.txt | 2 +- doc/src/dihedral_helix.txt | 2 +- doc/src/dihedral_multi_harmonic.txt | 2 +- doc/src/dihedral_nharmonic.txt | 2 +- doc/src/dihedral_opls.txt | 2 +- doc/src/dihedral_quadratic.txt | 2 +- doc/src/echo.txt | 2 +- doc/src/fix_addforce.txt | 2 +- doc/src/fix_aveforce.txt | 2 +- doc/src/fix_deform.txt | 2 +- doc/src/fix_enforce2d.txt | 2 +- doc/src/fix_freeze.txt | 2 +- doc/src/fix_gravity.txt | 2 +- doc/src/fix_langevin.txt | 2 +- doc/src/fix_momentum.txt | 2 +- doc/src/fix_nh.txt | 2 +- doc/src/fix_nph_asphere.txt | 2 +- doc/src/fix_nph_body.txt | 2 +- doc/src/fix_nph_sphere.txt | 2 +- doc/src/fix_nphug.txt | 2 +- doc/src/fix_npt_asphere.txt | 2 +- doc/src/fix_npt_body.txt | 2 +- doc/src/fix_npt_sphere.txt | 2 +- doc/src/fix_nve.txt | 2 +- doc/src/fix_nve_asphere.txt | 2 +- doc/src/fix_nve_sphere.txt | 2 +- doc/src/fix_nvt_asphere.txt | 2 +- doc/src/fix_nvt_body.txt | 2 +- doc/src/fix_nvt_sllod.txt | 2 +- doc/src/fix_nvt_sphere.txt | 2 +- doc/src/fix_qeq_comb.txt | 2 +- doc/src/fix_qeq_reax.txt | 2 +- doc/src/fix_reax_bonds.txt | 2 +- doc/src/fix_reaxc_species.txt | 2 +- doc/src/fix_rigid.txt | 2 +- doc/src/fix_setforce.txt | 2 +- doc/src/fix_shake.txt | 2 +- doc/src/fix_wall_reflect.txt | 2 +- doc/src/improper_class2.txt | 2 +- doc/src/improper_cossq.txt | 2 +- doc/src/improper_cvff.txt | 2 +- doc/src/improper_fourier.txt | 2 +- doc/src/improper_harmonic.txt | 2 +- doc/src/improper_ring.txt | 2 +- doc/src/improper_umbrella.txt | 2 +- doc/src/jump.txt | 4 +- doc/src/log.txt | 2 +- doc/src/neb.txt | 2 +- doc/src/neighbor.txt | 2 +- doc/src/next.txt | 2 +- doc/src/package.txt | 28 +- doc/src/pair_adp.txt | 2 +- doc/src/pair_agni.txt | 2 +- doc/src/pair_airebo.txt | 2 +- doc/src/pair_beck.txt | 2 +- doc/src/pair_born.txt | 2 +- doc/src/pair_brownian.txt | 2 +- doc/src/pair_buck.txt | 2 +- doc/src/pair_buck_long.txt | 2 +- doc/src/pair_charmm.txt | 2 +- doc/src/pair_class2.txt | 2 +- doc/src/pair_colloid.txt | 2 +- doc/src/pair_comb.txt | 2 +- doc/src/pair_coul.txt | 2 +- doc/src/pair_dipole.txt | 2 +- doc/src/pair_dpd.txt | 2 +- doc/src/pair_eam.txt | 2 +- doc/src/pair_edip.txt | 2 +- doc/src/pair_eim.txt | 2 +- doc/src/pair_gayberne.txt | 2 +- doc/src/pair_gran.txt | 2 +- doc/src/pair_gromacs.txt | 2 +- doc/src/pair_hbond_dreiding.txt | 2 +- doc/src/pair_hybrid.txt | 2 +- doc/src/pair_lj.txt | 2 +- doc/src/pair_lj96.txt | 2 +- doc/src/pair_lj_cubic.txt | 2 +- doc/src/pair_lj_expand.txt | 2 +- doc/src/pair_lj_long.txt | 2 +- doc/src/pair_lj_smooth.txt | 2 +- doc/src/pair_lj_smooth_linear.txt | 2 +- doc/src/pair_lj_soft.txt | 2 +- doc/src/pair_lubricate.txt | 2 +- doc/src/pair_meam_spline.txt | 2 +- doc/src/pair_morse.txt | 2 +- doc/src/pair_nb3b_harmonic.txt | 2 +- doc/src/pair_nm.txt | 2 +- doc/src/pair_peri.txt | 2 +- doc/src/pair_reaxc.txt | 2 +- doc/src/pair_resquared.txt | 2 +- doc/src/pair_sdk.txt | 2 +- doc/src/pair_soft.txt | 2 +- doc/src/pair_sw.txt | 2 +- doc/src/pair_table.txt | 2 +- doc/src/pair_tersoff.txt | 2 +- doc/src/pair_tersoff_mod.txt | 2 +- doc/src/pair_tersoff_zbl.txt | 2 +- doc/src/pair_thole.txt | 2 +- doc/src/pair_vashishta.txt | 2 +- doc/src/pair_yukawa.txt | 2 +- doc/src/pair_yukawa_colloid.txt | 2 +- doc/src/pair_zbl.txt | 2 +- doc/src/partition.txt | 4 +- doc/src/prd.txt | 2 +- doc/src/processors.txt | 12 +- doc/src/read_data.txt | 2 +- doc/src/read_restart.txt | 2 +- doc/src/region.txt | 2 +- doc/src/restart.txt | 2 +- doc/src/run_style.txt | 6 +- doc/src/suffix.txt | 4 +- doc/src/temper.txt | 4 +- doc/src/thermo_style.txt | 2 +- doc/src/timer.txt | 2 +- doc/src/variable.txt | 8 +- doc/src/write_data.txt | 2 +- doc/src/write_restart.txt | 2 +- src/Make.py | 2378 ------------------------- 161 files changed, 237 insertions(+), 2616 deletions(-) delete mode 100755 src/Make.py diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 36391731d0..359aa19edb 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -261,7 +261,6 @@ END_RST --> :link(start_6,Section_start.html#start_6) :link(start_7,Section_start.html#start_7) :link(start_8,Section_start.html#start_8) -:link(start_9,Section_start.html#start_9) :link(cmd_1,Section_commands.html#cmd_1) :link(cmd_2,Section_commands.html#cmd_2) diff --git a/doc/src/Section_accelerate.txt b/doc/src/Section_accelerate.txt index 64b80c1a55..8812358886 100644 --- a/doc/src/Section_accelerate.txt +++ b/doc/src/Section_accelerate.txt @@ -56,7 +56,7 @@ timings; you can simply extrapolate from short runs. For the set of runs, look at the timing data printed to the screen and log file at the end of each LAMMPS run. "This -section"_Section_start.html#start_8 of the manual has an overview. +section"_Section_start.html#start_7 of the manual has an overview. Running on one (or a few processors) should give a good estimate of the serial performance and what portions of the timestep are taking @@ -226,16 +226,16 @@ re-build LAMMPS | make machine | prepare and test a regular LAMMPS simulation | lmp_machine -in in.script; mpirun -np 32 lmp_machine -in in.script | -enable specific accelerator support via '-k on' "command-line switch"_Section_start.html#start_7, | +enable specific accelerator support via '-k on' "command-line switch"_Section_start.html#start_6, | only needed for KOKKOS package | -set any needed options for the package via "-pk" "command-line switch"_Section_start.html#start_7 or "package"_package.html command, | +set any needed options for the package via "-pk" "command-line switch"_Section_start.html#start_6 or "package"_package.html command, | only if defaults need to be changed | -use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_7 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu +use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_6 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu :tb(c=2,s=|) Note that the first 4 steps can be done as a single command, using the src/Make.py tool. This tool is discussed in "Section -2.4"_Section_start.html#start_4 of the manual, and its use is +4"_Section_packages.html of the manual, and its use is illustrated in the individual accelerator sections. Typically these steps only need to be done once, to create an executable that uses one or more accelerator packages. diff --git a/doc/src/Section_errors.txt b/doc/src/Section_errors.txt index 40e61a248e..408c01d52c 100644 --- a/doc/src/Section_errors.txt +++ b/doc/src/Section_errors.txt @@ -71,7 +71,7 @@ style", with ... being fix, compute, pair, etc, it means that you mistyped the style name or that the command is part of an optional package which was not compiled into your executable. The list of available styles in your executable can be listed by using "the -h -command-line argument"_Section_start.html#start_7. The installation +command-line argument"_Section_start.html#start_6. The installation and compilation of optional packages is explained in the "installation instructions"_Section_start.html#start_3. diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index f2f2561af8..6d699fe24b 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -54,7 +54,7 @@ restart files can be saved to disk using the "restart"_restart.html command. At a later time, these binary files can be read via a "read_restart"_read_restart.html command in a new script. Or they can be converted to text data files using the "-r command-line -switch"_Section_start.html#start_7 and read by a +switch"_Section_start.html#start_6 and read by a "read_data"_read_data.html command in a new script. Here we give examples of 2 scripts that read either a binary restart @@ -337,7 +337,7 @@ All of the above examples work whether you are running on 1 or multiple processors, but assumed you are running LAMMPS on a single partition of processors. LAMMPS can be run on multiple partitions via the "-partition" command-line switch as described in "this -section"_Section_start.html#start_7 of the manual. +section"_Section_start.html#start_6 of the manual. In the last 2 examples, if LAMMPS were run on 3 partitions, the same scripts could be used if the "index" and "loop" variables were @@ -387,7 +387,7 @@ for more info on packages. In all these cases, you must run with one or more processors per replica. The processors assigned to each replica are determined at run-time by using the "-partition command-line -switch"_Section_start.html#start_7 to launch LAMMPS on multiple +switch"_Section_start.html#start_6 to launch LAMMPS on multiple partitions, which in this context are the same as replicas. E.g. these commands: @@ -395,7 +395,7 @@ mpirun -np 16 lmp_linux -partition 8x2 -in in.temper mpirun -np 8 lmp_linux -partition 8x1 -in in.neb :pre would each run 8 replicas, on either 16 or 8 processors. Note the use -of the "-in command-line switch"_Section_start.html#start_7 to specify +of the "-in command-line switch"_Section_start.html#start_6 to specify the input script which is required when running in multi-replica mode. Also note that with MPI installed on a machine (e.g. your desktop), @@ -1872,7 +1872,7 @@ void lammps_free(void *) :pre The lammps_open() function is used to initialize LAMMPS, passing in a list of strings as if they were "command-line -arguments"_Section_start.html#start_7 when LAMMPS is run in +arguments"_Section_start.html#start_6 when LAMMPS is run in stand-alone mode from the command line, and a MPI communicator for LAMMPS to run under. It returns a ptr to the LAMMPS object that is created, and which is used in subsequent library calls. The diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index a65e510654..c7e6e84831 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -369,7 +369,7 @@ suffix in their style name. "Section 5.3.1"_accelerate_gpu.html gives details of what hardware and Cuda software is required on your system, and details on how to build and use this package. Its styles can be invoked at run time via the "-sf gpu" or "-suffix gpu" "command-line -switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS +switches"_Section_start.html#start_6. See also the "KOKKOS"_#KOKKOS package, which has GPU-enabled styles. [Authors:] Mike Brown (Intel) while at Sandia and ORNL and Trung Nguyen @@ -427,8 +427,8 @@ src/GPU/README lib/gpu/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.1"_accelerate_gpu.html -"Section 2.7 -sf gpu"_Section_start.html#start_7 -"Section 2.7 -pk gpu"_Section_start.html#start_7 +"Section 2.6 -sf gpu"_Section_start.html#start_6 +"Section 2.6 -pk gpu"_Section_start.html#start_6 "package gpu"_package.html Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (g) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -553,7 +553,7 @@ style name. "Section 5.3.3"_accelerate_kokkos.html gives details of what hardware and software is required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf kk" or "-suffix kk" "command-line -switches"_Section_start.html#start_7. Also see the "GPU"_#GPU, +switches"_Section_start.html#start_6. Also see the "GPU"_#GPU, "OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs, KNLs, and GPUs. @@ -621,9 +621,9 @@ src/KOKKOS/README lib/kokkos/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.3"_accelerate_kokkos.html -"Section 2.7 -k on ..."_Section_start.html#start_7 -"Section 2.7 -sf kk"_Section_start.html#start_7 -"Section 2.7 -pk kokkos"_Section_start.html#start_7 +"Section 2.6 -k on ..."_Section_start.html#start_6 +"Section 2.6 -sf kk"_Section_start.html#start_6 +"Section 2.6 -pk kokkos"_Section_start.html#start_6 "package kokkos"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (k) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -950,7 +950,7 @@ CHARMM, and Morse potentials. The styles have an "opt" suffix in their style name. "Section 5.3.5"_accelerate_opt.html gives details of how to build and use this package. Its styles can be invoked at run time via the "-sf opt" or "-suffix opt" "command-line -switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS, +switches"_Section_start.html#start_6. See also the "KOKKOS"_#KOKKOS, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPU performance. @@ -977,7 +977,7 @@ CCFLAGS: add -restrict :ul src/OPT: filenames -> commands "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.5"_accelerate_opt.html -"Section 2.7 -sf opt"_Section_start.html#start_7 +"Section 2.6 -sf opt"_Section_start.html#start_6 Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (t) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul @@ -1887,7 +1887,7 @@ All of them have an "intel" in their style name. "Section 5.3.2"_accelerate_intel.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf intel" or -"-suffix intel" "command-line switches"_Section_start.html#start_7. +"-suffix intel" "command-line switches"_Section_start.html#start_6. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs and KNLs. @@ -1943,8 +1943,8 @@ src/USER-INTEL: filenames -> commands src/USER-INTEL/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.2"_accelerate_gpu.html -"Section 2.7 -sf intel"_Section_start.html#start_7 -"Section 2.7 -pk intel"_Section_start.html#start_7 +"Section 2.6 -sf intel"_Section_start.html#start_6 +"Section 2.6 -pk intel"_Section_start.html#start_6 "package intel"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (i) src/USER-INTEL/TEST @@ -2217,7 +2217,7 @@ via OpenMP directives. All of them have an "omp" in their style name. "Section 5.3.4"_accelerate_omp.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf omp" or -"-suffix omp" "command-line switches"_Section_start.html#start_7. +"-suffix omp" "command-line switches"_Section_start.html#start_6. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-INTEL"_#USER-INTEL packages, which have styles optimized for CPUs. @@ -2250,8 +2250,8 @@ src/USER-OMP: filenames -> commands src/USER-OMP/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.4"_accelerate_omp.html -"Section 2.7 -sf omp"_Section_start.html#start_7 -"Section 2.7 -pk omp"_Section_start.html#start_7 +"Section 2.6 -sf omp"_Section_start.html#start_6 +"Section 2.6 -pk omp"_Section_start.html#start_6 "package omp"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (o) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul diff --git a/doc/src/Section_python.txt b/doc/src/Section_python.txt index 1e67fca321..f4b6bdad97 100644 --- a/doc/src/Section_python.txt +++ b/doc/src/Section_python.txt @@ -198,7 +198,7 @@ file and the shared library. 11.3 Building LAMMPS as a shared library :link(py_3),h4 Instructions on how to build LAMMPS as a shared library are given in -"Section 2.5"_Section_start.html#start_5. A shared library is one +"Section 2.4"_Section_start.html#start_4. A shared library is one that is dynamically loadable, which is what Python requires to wrap LAMMPS. On Linux this is a library file that ends in ".so", not ".a". @@ -217,7 +217,7 @@ NOTE: If you are building LAMMPS with an MPI or FFT library or other auxiliary libraries (used by various packages), then all of these extra libraries must also be shared libraries. If the LAMMPS shared-library build fails with an error complaining about this, see -"Section 2.5"_Section_start.html#start_5 for more details. +"Section 2.4"_Section_start.html#start_4 for more details. :line @@ -439,7 +439,7 @@ first importing from the lammps.py file: >>> CDLL("liblammps.so") :pre If an error occurs, carefully go thru the steps in "Section -2.5"_Section_start.html#start_5 and above about building a shared +2.4"_Section_start.html#start_4 and above about building a shared library and about insuring Python can find the necessary two files it needs. diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index b7a471c3fa..c798005f5e 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -14,11 +14,11 @@ experienced users. 2.1 "What's in the LAMMPS distribution"_#start_1 2.2 "Making LAMMPS"_#start_2 2.3 "Making LAMMPS with optional packages"_#start_3 -2.5 "Building LAMMPS as a library"_#start_4 -2.6 "Running LAMMPS"_#start_5 -2.7 "Command-line options"_#start_6 -2.8 "Screen output"_#start_7 -2.9 "Tips for users of previous versions"_#start_8 :all(b) +2.4 "Building LAMMPS as a library"_#start_4 +2.5 "Running LAMMPS"_#start_5 +2.6 "Command-line options"_#start_6 +2.7 "Screen output"_#start_7 +2.8 "Tips for users of previous versions"_#start_8 :all(b) :line @@ -714,7 +714,7 @@ type lmp_machine -h :pre to run your executable with the optional "-h command-line -switch"_#start_7 for "help", which will list the styles and commands +switch"_#start_6 for "help", which will list the styles and commands known to your executable, and immediately exit. :line diff --git a/doc/src/accelerate_gpu.txt b/doc/src/accelerate_gpu.txt index 2ac7d62f6c..68e9fa477a 100644 --- a/doc/src/accelerate_gpu.txt +++ b/doc/src/accelerate_gpu.txt @@ -54,7 +54,7 @@ specify the # of GPUs per node use GPU styles in your input script :ul The latter two steps can be done using the "-pk gpu" and "-sf gpu" -"command-line switches"_Section_start.html#start_7 respectively. Or +"command-line switches"_Section_start.html#start_6 respectively. Or the effect of the "-pk" or "-sf" switches can be duplicated by adding the "package gpu"_package.html or "suffix gpu"_suffix.html commands respectively to your input script. @@ -75,7 +75,7 @@ This requires two steps (a,b): build the GPU library, then build LAMMPS with the GPU package. You can do both these steps in one line, using the src/Make.py script, -described in "Section 2.4"_Section_start.html#start_4 of the manual. +described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. If run from the src directory, this command will create src/lmp_gpu using src/MAKE/Makefile.mpi as the starting Makefile.machine: @@ -151,9 +151,9 @@ automatically if you create more MPI tasks/node than there are GPUs/mode. E.g. with 8 MPI tasks/node and 2 GPUs, each GPU will be shared by 4 MPI tasks. -Use the "-sf gpu" "command-line switch"_Section_start.html#start_7, +Use the "-sf gpu" "command-line switch"_Section_start.html#start_6, which will automatically append "gpu" to styles that support it. Use -the "-pk gpu Ng" "command-line switch"_Section_start.html#start_7 to +the "-pk gpu Ng" "command-line switch"_Section_start.html#start_6 to set Ng = # of GPUs/node to use. lmp_machine -sf gpu -pk gpu 1 -in in.script # 1 MPI task uses 1 GPU @@ -188,7 +188,7 @@ pair_style lj/cut/gpu 2.5 :pre You must also use the "package gpu"_package.html command to enable the GPU package, unless the "-sf gpu" or "-pk gpu" "command-line -switches"_Section_start.html#start_7 were used. It specifies the +switches"_Section_start.html#start_6 were used. It specifies the number of GPUs/node to use, as well as other options. [Speed-ups to expect:] diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index 155e29e367..74ae9d9a42 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -226,7 +226,7 @@ source /opt/intel/parallel_studio_xe_2016.3.067/psxevars.sh make intel_cpu_intelmpi :pre Alternatively, the build can be accomplished with the src/Make.py -script, described in "Section 2.4"_Section_start.html#start_4 of the +script, described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. For an example: Make.py -v -p intel omp -intel cpu -a file intel_cpu_intelmpi :pre @@ -301,7 +301,7 @@ Hyper-Threading technology disabled. To enable USER-INTEL optimizations for all available styles used in the input script, the "-sf intel" -"command-line switch"_Section_start.html#start_7 can be used without +"command-line switch"_Section_start.html#start_6 can be used without any requirement for editing the input script. This switch will automatically append "intel" to styles that support it. It also invokes a default command: "package intel 1"_package.html. This @@ -314,7 +314,7 @@ support, that 1 coprocessor per node will be used with automatic balancing of work between the CPU and the coprocessor. You can specify different options for the USER-INTEL package by using -the "-pk intel Nphi" "command-line switch"_Section_start.html#start_7 +the "-pk intel Nphi" "command-line switch"_Section_start.html#start_6 with keyword/value pairs as specified in the documentation. Here, Nphi = # of Xeon Phi coprocessors/node (ignored without offload support). Common options to the USER-INTEL package include {omp} to @@ -387,7 +387,7 @@ can performed automatically by using "-sf hybrid intel opt" or and "omp" suffixes can be appended manually in the input script. For the latter, the "package omp"_package.html command must be in the input script or the "-pk omp Nt" "command-line -switch"_Section_start.html#start_7 must be used where Nt is the +switch"_Section_start.html#start_6 must be used where Nt is the number of OpenMP threads. The number of OpenMP threads should not be set differently for the different packages. Note that the "suffix hybrid intel omp"_suffix.html command can also be used within the @@ -486,7 +486,7 @@ sorting"_atom_modify.html is changed to 1 so that the per-atom data is effectively sorted at every rebuild of the neighbor lists. All the available coprocessor threads on each Phi will be divided among MPI tasks, unless the {tptask} option of the "-pk intel" "command-line -switch"_Section_start.html#start_7 is used to limit the coprocessor +switch"_Section_start.html#start_6 is used to limit the coprocessor threads per MPI task. [Restrictions:] diff --git a/doc/src/accelerate_kokkos.txt b/doc/src/accelerate_kokkos.txt index 602c3191f6..6ccd695841 100644 --- a/doc/src/accelerate_kokkos.txt +++ b/doc/src/accelerate_kokkos.txt @@ -136,7 +136,7 @@ You must choose at build time whether to build for CPUs (OpenMP), GPUs, or Phi. You can do any of these in one line, using the src/Make.py script, -described in "Section 2.4"_Section_start.html#start_4 of the manual. +described in "Section 4"_Section_packages.html of the manual. Type "Make.py -h" for help. If run from the src directory, these commands will create src/lmp_kokkos_omp, lmp_kokkos_cuda, and lmp_kokkos_phi. Note that the OMP and PHI options use @@ -144,7 +144,7 @@ src/MAKE/Makefile.mpi as the starting Makefile.machine. The CUDA option uses src/MAKE/OPTIONS/Makefile.kokkos_cuda. The latter two steps can be done using the "-k on", "-pk kokkos" and -"-sf kk" "command-line switches"_Section_start.html#start_7 +"-sf kk" "command-line switches"_Section_start.html#start_6 respectively. Or the effect of the "-pk" or "-sf" switches can be duplicated by adding the "package kokkos"_package.html or "suffix kk"_suffix.html commands respectively to your input script. @@ -280,10 +280,10 @@ specify how many Phi coprocessors there are per node; each coprocessors is simply treated as running some number of MPI tasks. You must use the "-k on" "command-line -switch"_Section_start.html#start_7 to enable the KOKKOS package. It +switch"_Section_start.html#start_6 to enable the KOKKOS package. It takes additional arguments for hardware settings appropriate to your system. Those arguments are "documented -here"_Section_start.html#start_7. The two most commonly used +here"_Section_start.html#start_6. The two most commonly used options are: -k on t Nt g Ng :pre @@ -304,12 +304,12 @@ The "-k on" switch also issues a "package kokkos" command (with no additional arguments) which sets various KOKKOS options to default values, as discussed on the "package"_package.html command doc page. -Use the "-sf kk" "command-line switch"_Section_start.html#start_7, +Use the "-sf kk" "command-line switch"_Section_start.html#start_6, which will automatically append "kk" to styles that support it. Use -the "-pk kokkos" "command-line switch"_Section_start.html#start_7 if +the "-pk kokkos" "command-line switch"_Section_start.html#start_6 if you wish to change any of the default "package kokkos"_package.html optionns set by the "-k on" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. @@ -323,7 +323,7 @@ However, when running in MPI-only mode with 1 thread per MPI task, it will typically be faster to use "half" neighbor lists and set the Newton flag to "on", just as is the case for non-accelerated pair styles. You can do this with the "-pk" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. [Or run with the KOKKOS package by editing an input script:] @@ -332,7 +332,7 @@ appropriate thread and GPU values for host=OMP or host=MIC or device=CUDA are the same. You must still use the "-k on" "command-line -switch"_Section_start.html#start_7 to enable the KOKKOS package, and +switch"_Section_start.html#start_6 to enable the KOKKOS package, and specify its additional arguments for hardware options appropriate to your system, as documented above. @@ -343,7 +343,7 @@ pair_style lj/cut/kk 2.5 :pre You only need to use the "package kokkos"_package.html command if you wish to change any of its option defaults, as set by the "-k on" -"command-line switch"_Section_start.html#start_7. +"command-line switch"_Section_start.html#start_6. [Speed-ups to expect:] @@ -389,7 +389,7 @@ If N is the number of physical cores/node, then the number of MPI tasks/node * number of threads/task should not exceed N, and should typically equal N. Note that the default threads/task is 1, as set by the "t" keyword of the "-k" "command-line -switch"_Section_start.html#start_7. If you do not change this, no +switch"_Section_start.html#start_6. If you do not change this, no additional parallelism (beyond MPI) will be invoked on the host CPU(s). @@ -429,7 +429,7 @@ details). The -np setting of the mpirun command should set the number of MPI tasks/node to be equal to the # of physical GPUs on the node. -Use the "-k" "command-line switch"_Section_commands.html#start_7 to +Use the "-k" "command-line switch"_Section_commands.html#start_6 to specify the number of GPUs per node, and the number of threads per MPI task. As above for multi-core CPUs (and no GPU), if N is the number of physical cores/node, then the number of MPI tasks/node * number of diff --git a/doc/src/accelerate_omp.txt b/doc/src/accelerate_omp.txt index c8dd343861..81b7a5adc2 100644 --- a/doc/src/accelerate_omp.txt +++ b/doc/src/accelerate_omp.txt @@ -41,7 +41,7 @@ each MPI task running on a CPU. The lines above illustrate how to include/build with the USER-OMP package in two steps, using the "make" command. Or how to do it with one command via the src/Make.py script, described in "Section -2.4"_Section_start.html#start_4 of the manual. Type "Make.py -h" for +4"_Section_packages.html of the manual. Type "Make.py -h" for help. Note that the CCFLAGS and LINKFLAGS settings in Makefile.machine must @@ -62,14 +62,14 @@ threads/task should not exceed the physical number of cores (on a node), otherwise performance will suffer. As in the lines above, use the "-sf omp" "command-line -switch"_Section_start.html#start_7, which will automatically append +switch"_Section_start.html#start_6, which will automatically append "omp" to styles that support it. The "-sf omp" switch also issues a default "package omp 0"_package.html command, which will set the number of threads per MPI task via the OMP_NUM_THREADS environment variable. You can also use the "-pk omp Nt" "command-line -switch"_Section_start.html#start_7, to explicitly set Nt = # of OpenMP +switch"_Section_start.html#start_6, to explicitly set Nt = # of OpenMP threads per MPI task to use, as well as additional options. Its syntax is the same as the "package omp"_package.html command whose doc page gives details, including the default values used if it is not diff --git a/doc/src/accelerate_opt.txt b/doc/src/accelerate_opt.txt index 704321ca07..5a2a5eac0a 100644 --- a/doc/src/accelerate_opt.txt +++ b/doc/src/accelerate_opt.txt @@ -36,7 +36,7 @@ None. The lines above illustrate how to build LAMMPS with the OPT package in two steps, using the "make" command. Or how to do it with one command via the src/Make.py script, described in "Section -2.4"_Section_start.html#start_4 of the manual. Type "Make.py -h" for +4"_Section_packages.html of the manual. Type "Make.py -h" for help. Note that if you use an Intel compiler to build with the OPT package, @@ -46,7 +46,7 @@ The Make.py command will add this automatically. [Run with the OPT package from the command line:] As in the lines above, use the "-sf opt" "command-line -switch"_Section_start.html#start_7, which will automatically append +switch"_Section_start.html#start_6, which will automatically append "opt" to styles that support it. [Or run with the OPT package by editing an input script:] diff --git a/doc/src/angle_charmm.txt b/doc/src/angle_charmm.txt index a02e604258..7ff7ef8fd4 100644 --- a/doc/src/angle_charmm.txt +++ b/doc/src/angle_charmm.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_class2.txt b/doc/src/angle_class2.txt index 74f2544cd4..71a508d691 100644 --- a/doc/src/angle_class2.txt +++ b/doc/src/angle_class2.txt @@ -94,7 +94,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine.txt b/doc/src/angle_cosine.txt index 4fb2ccaf7c..c0ce3c9301 100644 --- a/doc/src/angle_cosine.txt +++ b/doc/src/angle_cosine.txt @@ -50,7 +50,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_delta.txt b/doc/src/angle_cosine_delta.txt index 6ab214508c..830fd6db58 100644 --- a/doc/src/angle_cosine_delta.txt +++ b/doc/src/angle_cosine_delta.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_periodic.txt b/doc/src/angle_cosine_periodic.txt index c6cd57e419..b5c53b1b0f 100644 --- a/doc/src/angle_cosine_periodic.txt +++ b/doc/src/angle_cosine_periodic.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_shift.txt b/doc/src/angle_cosine_shift.txt index dc1a29a86b..6ed9fe2150 100644 --- a/doc/src/angle_cosine_shift.txt +++ b/doc/src/angle_cosine_shift.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_shift_exp.txt b/doc/src/angle_cosine_shift_exp.txt index 48af5ba76a..44a68c1087 100644 --- a/doc/src/angle_cosine_shift_exp.txt +++ b/doc/src/angle_cosine_shift_exp.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_cosine_squared.txt b/doc/src/angle_cosine_squared.txt index 23e1b150a8..065cdad542 100644 --- a/doc/src/angle_cosine_squared.txt +++ b/doc/src/angle_cosine_squared.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_fourier.txt b/doc/src/angle_fourier.txt index f58ae8e4f4..da39e7cf32 100644 --- a/doc/src/angle_fourier.txt +++ b/doc/src/angle_fourier.txt @@ -51,7 +51,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_fourier_simple.txt b/doc/src/angle_fourier_simple.txt index 9da8ffed28..5adda6cb32 100644 --- a/doc/src/angle_fourier_simple.txt +++ b/doc/src/angle_fourier_simple.txt @@ -50,7 +50,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_harmonic.txt b/doc/src/angle_harmonic.txt index 12ee805218..4c74763964 100644 --- a/doc/src/angle_harmonic.txt +++ b/doc/src/angle_harmonic.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_quartic.txt b/doc/src/angle_quartic.txt index fea2eb9e03..f7640bdfbc 100644 --- a/doc/src/angle_quartic.txt +++ b/doc/src/angle_quartic.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/angle_table.txt b/doc/src/angle_table.txt index 61dd7b041e..bd6e167bd8 100644 --- a/doc/src/angle_table.txt +++ b/doc/src/angle_table.txt @@ -136,7 +136,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/balance.txt b/doc/src/balance.txt index 79728d6569..da6f59900d 100644 --- a/doc/src/balance.txt +++ b/doc/src/balance.txt @@ -394,7 +394,7 @@ weights. It assigns the same weight to each particle owned by a processor based on the total computational time spent by that processor. See details below on what time window is used. It uses the same timing information as is used for the "MPI task timing -breakdown"_Section_start.html#start_8, namely, for sections {Pair}, +breakdown"_Section_start.html#start_7, namely, for sections {Pair}, {Bond}, {Kspace}, and {Neigh}. The time spent in those portions of the timestep are measured for each MPI rank, summed, then divided by the number of particles owned by that processor. I.e. the weight is diff --git a/doc/src/bond_class2.txt b/doc/src/bond_class2.txt index aa05412387..9687a63168 100644 --- a/doc/src/bond_class2.txt +++ b/doc/src/bond_class2.txt @@ -56,7 +56,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_fene.txt b/doc/src/bond_fene.txt index 80d2a805c5..9050c3bf5c 100644 --- a/doc/src/bond_fene.txt +++ b/doc/src/bond_fene.txt @@ -59,7 +59,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_fene_expand.txt b/doc/src/bond_fene_expand.txt index 3908c16a7e..ff687444a9 100644 --- a/doc/src/bond_fene_expand.txt +++ b/doc/src/bond_fene_expand.txt @@ -62,7 +62,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic.txt b/doc/src/bond_harmonic.txt index 1cbd897dac..c18a7e0fd4 100644 --- a/doc/src/bond_harmonic.txt +++ b/doc/src/bond_harmonic.txt @@ -54,7 +54,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic_shift.txt b/doc/src/bond_harmonic_shift.txt index 8cb2d2ce7d..bf3b3c115a 100644 --- a/doc/src/bond_harmonic_shift.txt +++ b/doc/src/bond_harmonic_shift.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_harmonic_shift_cut.txt b/doc/src/bond_harmonic_shift_cut.txt index 836d6afda4..1918ce00b6 100644 --- a/doc/src/bond_harmonic_shift_cut.txt +++ b/doc/src/bond_harmonic_shift_cut.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_morse.txt b/doc/src/bond_morse.txt index 12e51f9bef..4f6a32e341 100644 --- a/doc/src/bond_morse.txt +++ b/doc/src/bond_morse.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_nonlinear.txt b/doc/src/bond_nonlinear.txt index ac9f3369c2..434af62506 100644 --- a/doc/src/bond_nonlinear.txt +++ b/doc/src/bond_nonlinear.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_quartic.txt b/doc/src/bond_quartic.txt index e61f4f0343..4dc7ad4a36 100644 --- a/doc/src/bond_quartic.txt +++ b/doc/src/bond_quartic.txt @@ -88,7 +88,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/bond_table.txt b/doc/src/bond_table.txt index cb096fba11..906d3e5d76 100644 --- a/doc/src/bond_table.txt +++ b/doc/src/bond_table.txt @@ -133,7 +133,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_pressure.txt b/doc/src/compute_pressure.txt index 292e779f72..f0691ad207 100644 --- a/doc/src/compute_pressure.txt +++ b/doc/src/compute_pressure.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_temp.txt b/doc/src/compute_temp.txt index 0bd2d4b121..b88be79e20 100644 --- a/doc/src/compute_temp.txt +++ b/doc/src/compute_temp.txt @@ -79,7 +79,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/compute_temp_partial.txt b/doc/src/compute_temp_partial.txt index 163a00af52..fe2420b4e4 100644 --- a/doc/src/compute_temp_partial.txt +++ b/doc/src/compute_temp_partial.txt @@ -86,7 +86,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_charmm.txt b/doc/src/dihedral_charmm.txt index 73dc67cdef..06abe054e4 100644 --- a/doc/src/dihedral_charmm.txt +++ b/doc/src/dihedral_charmm.txt @@ -128,7 +128,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_class2.txt b/doc/src/dihedral_class2.txt index 91ab6f3738..cb9fc72c22 100644 --- a/doc/src/dihedral_class2.txt +++ b/doc/src/dihedral_class2.txt @@ -153,7 +153,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_cosine_shift_exp.txt b/doc/src/dihedral_cosine_shift_exp.txt index 89614a3fdb..715682affc 100644 --- a/doc/src/dihedral_cosine_shift_exp.txt +++ b/doc/src/dihedral_cosine_shift_exp.txt @@ -64,7 +64,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_fourier.txt b/doc/src/dihedral_fourier.txt index 5682309b83..da892b59da 100644 --- a/doc/src/dihedral_fourier.txt +++ b/doc/src/dihedral_fourier.txt @@ -55,7 +55,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_harmonic.txt b/doc/src/dihedral_harmonic.txt index c763dcce22..d9a48ff384 100644 --- a/doc/src/dihedral_harmonic.txt +++ b/doc/src/dihedral_harmonic.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_helix.txt b/doc/src/dihedral_helix.txt index fced983db0..1e907557b2 100644 --- a/doc/src/dihedral_helix.txt +++ b/doc/src/dihedral_helix.txt @@ -58,7 +58,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_multi_harmonic.txt b/doc/src/dihedral_multi_harmonic.txt index 5774a67685..7d3c2ea083 100644 --- a/doc/src/dihedral_multi_harmonic.txt +++ b/doc/src/dihedral_multi_harmonic.txt @@ -52,7 +52,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_nharmonic.txt b/doc/src/dihedral_nharmonic.txt index 0df28a05d4..8392d83899 100644 --- a/doc/src/dihedral_nharmonic.txt +++ b/doc/src/dihedral_nharmonic.txt @@ -52,7 +52,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_opls.txt b/doc/src/dihedral_opls.txt index afcc5d3514..d1a6ba3ff2 100644 --- a/doc/src/dihedral_opls.txt +++ b/doc/src/dihedral_opls.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/dihedral_quadratic.txt b/doc/src/dihedral_quadratic.txt index 526b469f63..ca2f5aed40 100644 --- a/doc/src/dihedral_quadratic.txt +++ b/doc/src/dihedral_quadratic.txt @@ -53,7 +53,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/echo.txt b/doc/src/echo.txt index 8ef8ad05f8..3141c7a719 100644 --- a/doc/src/echo.txt +++ b/doc/src/echo.txt @@ -26,7 +26,7 @@ command to the screen and/or log file as it is read and processed. If an input script has errors, it can be useful to look at echoed output to see the last command processed. -The "command-line switch"_Section_start.html#start_5 -echo can be used +The "command-line switch"_Section_start.html#start_6 -echo can be used in place of this command. [Restrictions:] none diff --git a/doc/src/fix_addforce.txt b/doc/src/fix_addforce.txt index da9f98a6da..1cc0a15332 100644 --- a/doc/src/fix_addforce.txt +++ b/doc/src/fix_addforce.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_aveforce.txt b/doc/src/fix_aveforce.txt index d980e9a211..5d7dec3e6a 100644 --- a/doc/src/fix_aveforce.txt +++ b/doc/src/fix_aveforce.txt @@ -77,7 +77,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_deform.txt b/doc/src/fix_deform.txt index d3254eece6..63d872eded 100644 --- a/doc/src/fix_deform.txt +++ b/doc/src/fix_deform.txt @@ -557,7 +557,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_enforce2d.txt b/doc/src/fix_enforce2d.txt index 1dce620033..5d04e96677 100644 --- a/doc/src/fix_enforce2d.txt +++ b/doc/src/fix_enforce2d.txt @@ -41,7 +41,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_freeze.txt b/doc/src/fix_freeze.txt index 6a4f6c2fcf..a63ee4cb32 100644 --- a/doc/src/fix_freeze.txt +++ b/doc/src/fix_freeze.txt @@ -45,7 +45,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_gravity.txt b/doc/src/fix_gravity.txt index 2cf1665c30..dae8ac5ed0 100644 --- a/doc/src/fix_gravity.txt +++ b/doc/src/fix_gravity.txt @@ -102,7 +102,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_langevin.txt b/doc/src/fix_langevin.txt index 534d83f6a9..93c73f5a5d 100644 --- a/doc/src/fix_langevin.txt +++ b/doc/src/fix_langevin.txt @@ -276,7 +276,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_momentum.txt b/doc/src/fix_momentum.txt index 4f94e2a857..bcf4465fb8 100644 --- a/doc/src/fix_momentum.txt +++ b/doc/src/fix_momentum.txt @@ -73,7 +73,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nh.txt b/doc/src/fix_nh.txt index c1cc3e560a..8fa30ac222 100644 --- a/doc/src/fix_nh.txt +++ b/doc/src/fix_nh.txt @@ -492,7 +492,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_asphere.txt b/doc/src/fix_nph_asphere.txt index 3d151a724b..8c35b6a1a7 100644 --- a/doc/src/fix_nph_asphere.txt +++ b/doc/src/fix_nph_asphere.txt @@ -93,7 +93,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_body.txt b/doc/src/fix_nph_body.txt index 3a273be595..1e590f1cb3 100644 --- a/doc/src/fix_nph_body.txt +++ b/doc/src/fix_nph_body.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nph_sphere.txt b/doc/src/fix_nph_sphere.txt index 9258f40c76..62b45edfd7 100644 --- a/doc/src/fix_nph_sphere.txt +++ b/doc/src/fix_nph_sphere.txt @@ -102,7 +102,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nphug.txt b/doc/src/fix_nphug.txt index ef3ffc4955..292e46f94a 100644 --- a/doc/src/fix_nphug.txt +++ b/doc/src/fix_nphug.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_asphere.txt b/doc/src/fix_npt_asphere.txt index 8fe98f1818..5f3979e36e 100644 --- a/doc/src/fix_npt_asphere.txt +++ b/doc/src/fix_npt_asphere.txt @@ -117,7 +117,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_body.txt b/doc/src/fix_npt_body.txt index 772920df61..d89bf19db2 100644 --- a/doc/src/fix_npt_body.txt +++ b/doc/src/fix_npt_body.txt @@ -116,7 +116,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_npt_sphere.txt b/doc/src/fix_npt_sphere.txt index 24a8fede57..c4cf2cb08d 100644 --- a/doc/src/fix_npt_sphere.txt +++ b/doc/src/fix_npt_sphere.txt @@ -127,7 +127,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve.txt b/doc/src/fix_nve.txt index 7ad8301877..c04c17858e 100644 --- a/doc/src/fix_nve.txt +++ b/doc/src/fix_nve.txt @@ -46,7 +46,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve_asphere.txt b/doc/src/fix_nve_asphere.txt index 03846a2558..1f31fb9679 100644 --- a/doc/src/fix_nve_asphere.txt +++ b/doc/src/fix_nve_asphere.txt @@ -57,7 +57,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nve_sphere.txt b/doc/src/fix_nve_sphere.txt index f91a41f515..21dc6cba8a 100644 --- a/doc/src/fix_nve_sphere.txt +++ b/doc/src/fix_nve_sphere.txt @@ -77,7 +77,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_asphere.txt b/doc/src/fix_nvt_asphere.txt index 77de1dea40..21b900f16a 100644 --- a/doc/src/fix_nvt_asphere.txt +++ b/doc/src/fix_nvt_asphere.txt @@ -98,7 +98,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_body.txt b/doc/src/fix_nvt_body.txt index 1f04b85c8b..6a5e09ba7f 100644 --- a/doc/src/fix_nvt_body.txt +++ b/doc/src/fix_nvt_body.txt @@ -97,7 +97,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_sllod.txt b/doc/src/fix_nvt_sllod.txt index 82631f22e3..392dbc281c 100644 --- a/doc/src/fix_nvt_sllod.txt +++ b/doc/src/fix_nvt_sllod.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_nvt_sphere.txt b/doc/src/fix_nvt_sphere.txt index fa1c97bcce..ecf0922b79 100644 --- a/doc/src/fix_nvt_sphere.txt +++ b/doc/src/fix_nvt_sphere.txt @@ -108,7 +108,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_qeq_comb.txt b/doc/src/fix_qeq_comb.txt index 30c5003e72..7f82404127 100644 --- a/doc/src/fix_qeq_comb.txt +++ b/doc/src/fix_qeq_comb.txt @@ -74,7 +74,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_qeq_reax.txt b/doc/src/fix_qeq_reax.txt index a1a19b7368..18450c7cd5 100644 --- a/doc/src/fix_qeq_reax.txt +++ b/doc/src/fix_qeq_reax.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_reax_bonds.txt b/doc/src/fix_reax_bonds.txt index aadb0a9cbc..54aa7faef8 100644 --- a/doc/src/fix_reax_bonds.txt +++ b/doc/src/fix_reax_bonds.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section_accelerate"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_reaxc_species.txt b/doc/src/fix_reaxc_species.txt index 9a588356e0..7c920791f7 100644 --- a/doc/src/fix_reaxc_species.txt +++ b/doc/src/fix_reaxc_species.txt @@ -151,7 +151,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section_accelerate"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_rigid.txt b/doc/src/fix_rigid.txt index 87021b8551..62969112f7 100644 --- a/doc/src/fix_rigid.txt +++ b/doc/src/fix_rigid.txt @@ -676,7 +676,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_setforce.txt b/doc/src/fix_setforce.txt index 90766fc5bc..f5be0f93a5 100644 --- a/doc/src/fix_setforce.txt +++ b/doc/src/fix_setforce.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_shake.txt b/doc/src/fix_shake.txt index 8b26aaa874..c187b17c6c 100644 --- a/doc/src/fix_shake.txt +++ b/doc/src/fix_shake.txt @@ -159,7 +159,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/fix_wall_reflect.txt b/doc/src/fix_wall_reflect.txt index 5b425316e0..954ec65bf6 100644 --- a/doc/src/fix_wall_reflect.txt +++ b/doc/src/fix_wall_reflect.txt @@ -142,7 +142,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_class2.txt b/doc/src/improper_class2.txt index 0b41afe2db..14ec6258de 100644 --- a/doc/src/improper_class2.txt +++ b/doc/src/improper_class2.txt @@ -99,7 +99,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_cossq.txt b/doc/src/improper_cossq.txt index e238063a8f..138a6a1650 100644 --- a/doc/src/improper_cossq.txt +++ b/doc/src/improper_cossq.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_cvff.txt b/doc/src/improper_cvff.txt index 72f346ba04..5f69eccc60 100644 --- a/doc/src/improper_cvff.txt +++ b/doc/src/improper_cvff.txt @@ -66,7 +66,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_fourier.txt b/doc/src/improper_fourier.txt index 3a5354b1fe..f9062da207 100644 --- a/doc/src/improper_fourier.txt +++ b/doc/src/improper_fourier.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_harmonic.txt b/doc/src/improper_harmonic.txt index b47b0ca41f..bb17e5a641 100644 --- a/doc/src/improper_harmonic.txt +++ b/doc/src/improper_harmonic.txt @@ -70,7 +70,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_ring.txt b/doc/src/improper_ring.txt index cba59399e7..c02d392474 100644 --- a/doc/src/improper_ring.txt +++ b/doc/src/improper_ring.txt @@ -69,7 +69,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/improper_umbrella.txt b/doc/src/improper_umbrella.txt index fafa2e7e4c..d6df9ee6cc 100644 --- a/doc/src/improper_umbrella.txt +++ b/doc/src/improper_umbrella.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/jump.txt b/doc/src/jump.txt index 1b1a209511..4e3799f7b1 100644 --- a/doc/src/jump.txt +++ b/doc/src/jump.txt @@ -40,12 +40,12 @@ lmp_g++ < in.script :pre since the SELF option invokes the C-library rewind() call, which may not be supported for stdin on some systems or by some MPI implementations. This can be worked around by using the "-in -command-line argument"_Section_start.html#start_7, e.g. +command-line argument"_Section_start.html#start_6, e.g. lmp_g++ -in in.script :pre or by using the "-var command-line -argument"_Section_start.html#start_7 to pass the script name as a +argument"_Section_start.html#start_6 to pass the script name as a variable to the input script. In the latter case, a "variable"_variable.html called "fname" could be used in place of SELF, e.g. diff --git a/doc/src/log.txt b/doc/src/log.txt index 460482ea1e..92bb12e6db 100644 --- a/doc/src/log.txt +++ b/doc/src/log.txt @@ -34,7 +34,7 @@ the same log file. The file "log.lammps" is the default log file for a LAMMPS run. The name of the initial log file can also be set by the command-line -switch -log. See "Section 2.7"_Section_start.html#start_7 for +switch -log. See "Section 2.6"_Section_start.html#start_6 for details. [Restrictions:] none diff --git a/doc/src/neb.txt b/doc/src/neb.txt index d2e8be3f03..144fe8bdef 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -51,7 +51,7 @@ follows the discussion in these 4 papers: "(HenkelmanA)"_#HenkelmanA, Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the manual. +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on just one or two diff --git a/doc/src/neighbor.txt b/doc/src/neighbor.txt index 7b8f499ba8..062f79a5bb 100644 --- a/doc/src/neighbor.txt +++ b/doc/src/neighbor.txt @@ -66,7 +66,7 @@ stored in the list. When a run is finished, counts of the number of neighbors stored in the pairwise list and the number of times neighbor lists were built are printed to the screen and log file. See "this -section"_Section_start.html#start_8 for details. +section"_Section_start.html#start_7 for details. [Restrictions:] none diff --git a/doc/src/next.txt b/doc/src/next.txt index fe9dc97542..08f73b896c 100644 --- a/doc/src/next.txt +++ b/doc/src/next.txt @@ -71,7 +71,7 @@ next value (for each variable) is assigned to whichever processor partition executes the command first. All processors in the partition are assigned the same value(s). Running LAMMPS on multiple partitions of processors via the "-partition" command-line switch is described in -"this section"_Section_start.html#start_7 of the manual. {Universe}- +"this section"_Section_start.html#start_6 of the manual. {Universe}- and {uloop}-style variables are incremented using the files "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will see in your directory during and after such a LAMMPS run. diff --git a/doc/src/package.txt b/doc/src/package.txt index 18a26bd55c..1b9092644f 100644 --- a/doc/src/package.txt +++ b/doc/src/package.txt @@ -115,7 +115,7 @@ their initialization, before a simulation is defined. This command can also be specified from the command-line when launching LAMMPS, using the "-pk" "command-line -switch"_Section_start.html#start_7. The syntax is exactly the same as +switch"_Section_start.html#start_6. The syntax is exactly the same as when used in an input script. Note that all of the accelerator packages require the package command @@ -126,18 +126,18 @@ a default version of the command is typically invoked by other accelerator settings. The KOKKOS package requires a "-k on" "command-line -switch"_Section_start.html#start_7 respectively, which invokes a +switch"_Section_start.html#start_6 respectively, which invokes a "package kokkos" command with default settings. For the GPU, USER-INTEL, and USER-OMP packages, if a "-sf gpu" or "-sf -intel" or "-sf omp" "command-line switch"_Section_start.html#start_7 +intel" or "-sf omp" "command-line switch"_Section_start.html#start_6 is used to auto-append accelerator suffixes to various styles in the input script, then those switches also invoke a "package gpu", "package intel", or "package omp" command with default settings. NOTE: A package command for a particular style can be invoked multiple times when a simulation is setup, e.g. by the "-c on", "-k on", "-sf", -and "-pk" "command-line switches"_Section_start.html#start_7, and by +and "-pk" "command-line switches"_Section_start.html#start_6, and by using this command in an input script. Each time it is used all of the style options are set, either to default values or to specified settings. I.e. settings from previous invocations do not persist @@ -305,7 +305,7 @@ value via their package commands, but there is only a single global invoked, you should insure the two values are consistent. If they are not, the last one invoked will take precedence, for both packages. Also note that if the "-sf hybrid intel omp" "command-line -switch"_"_Section_start.html#start_7 is used, it invokes a "package +switch"_"_Section_start.html#start_6 is used, it invokes a "package intel" command, followed by a "package omp" command, both with a setting of {Nthreads} = 0. @@ -550,7 +550,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] "suffix"_suffix.html, "-pk" "command-line -setting"_Section_start.html#start_7 +setting"_Section_start.html#start_6 [Default:] @@ -558,9 +558,9 @@ For the GPU package, the default is Ngpu = 1 and the option defaults are neigh = yes, newton = off, binsize = 0.0, split = 1.0, gpuID = 0 to Ngpu-1, tpa = 1, and device = not used. These settings are made automatically if the "-sf gpu" "command-line -switch"_Section_start.html#start_7 is used. If it is not used, you +switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package gpu command in your input script or via the -"-pk gpu" "command-line switch"_Section_start.html#start_7. +"-pk gpu" "command-line switch"_Section_start.html#start_6. For the USER-INTEL package, the default is Nphi = 1 and the option defaults are omp = 0, mode = mixed, lrt = no, balance = -1, tpc = 4, @@ -569,21 +569,21 @@ style being used. This value is output to the screen in the offload report at the end of each run. Note that all of these settings, except "omp" and "mode", are ignored if LAMMPS was not built with Xeon Phi coprocessor support. These settings are made automatically -if the "-sf intel" "command-line switch"_Section_start.html#start_7 +if the "-sf intel" "command-line switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package intel command in your input script or or via the "-pk intel" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. For the KOKKOS package, the option defaults neigh = full, neigh/qeq = full, newton = off, binsize = 0.0, and comm = device. These settings are made automatically by the required "-k on" "command-line -switch"_Section_start.html#start_7. You can change them bu using the +switch"_Section_start.html#start_6. You can change them bu using the package kokkos command in your input script or via the "-pk kokkos" -"command-line switch"_Section_start.html#start_7. +"command-line switch"_Section_start.html#start_6. For the OMP package, the default is Nthreads = 0 and the option defaults are neigh = yes. These settings are made automatically if -the "-sf omp" "command-line switch"_Section_start.html#start_7 is +the "-sf omp" "command-line switch"_Section_start.html#start_6 is used. If it is not used, you must invoke the package omp command in your input script or via the "-pk omp" "command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. diff --git a/doc/src/pair_adp.txt b/doc/src/pair_adp.txt index 457a797d95..9d2a48dcbc 100644 --- a/doc/src/pair_adp.txt +++ b/doc/src/pair_adp.txt @@ -137,7 +137,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_agni.txt b/doc/src/pair_agni.txt index 06dcccb9d9..402e537dad 100644 --- a/doc/src/pair_agni.txt +++ b/doc/src/pair_agni.txt @@ -70,7 +70,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated style explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_airebo.txt b/doc/src/pair_airebo.txt index 0c03eb3267..e66ecb637f 100644 --- a/doc/src/pair_airebo.txt +++ b/doc/src/pair_airebo.txt @@ -185,7 +185,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_beck.txt b/doc/src/pair_beck.txt index 4e792754b8..e160f09b3d 100644 --- a/doc/src/pair_beck.txt +++ b/doc/src/pair_beck.txt @@ -63,7 +63,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_born.txt b/doc/src/pair_born.txt index d38d9e3191..a3cc744a22 100644 --- a/doc/src/pair_born.txt +++ b/doc/src/pair_born.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_brownian.txt b/doc/src/pair_brownian.txt index 33eed77629..79b71e91c7 100644 --- a/doc/src/pair_brownian.txt +++ b/doc/src/pair_brownian.txt @@ -85,7 +85,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "this section"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_buck.txt b/doc/src/pair_buck.txt index e705e735fb..d18b39d5d9 100644 --- a/doc/src/pair_buck.txt +++ b/doc/src/pair_buck.txt @@ -152,7 +152,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_buck_long.txt b/doc/src/pair_buck_long.txt index ba18738e4d..05e760e1b2 100644 --- a/doc/src/pair_buck_long.txt +++ b/doc/src/pair_buck_long.txt @@ -114,7 +114,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_charmm.txt b/doc/src/pair_charmm.txt index 1e78607c08..ef4ef41c95 100644 --- a/doc/src/pair_charmm.txt +++ b/doc/src/pair_charmm.txt @@ -195,7 +195,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_class2.txt b/doc/src/pair_class2.txt index 23b90aae2d..36fae5068b 100644 --- a/doc/src/pair_class2.txt +++ b/doc/src/pair_class2.txt @@ -114,7 +114,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_colloid.txt b/doc/src/pair_colloid.txt index a0df1d464e..83b15b358b 100644 --- a/doc/src/pair_colloid.txt +++ b/doc/src/pair_colloid.txt @@ -139,7 +139,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_comb.txt b/doc/src/pair_comb.txt index 3a2f380bfa..f5461b1cbc 100644 --- a/doc/src/pair_comb.txt +++ b/doc/src/pair_comb.txt @@ -124,7 +124,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_coul.txt b/doc/src/pair_coul.txt index 4a601e90c0..29e5beed3c 100644 --- a/doc/src/pair_coul.txt +++ b/doc/src/pair_coul.txt @@ -274,7 +274,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_dipole.txt b/doc/src/pair_dipole.txt index 985581cac8..2516e5eae4 100644 --- a/doc/src/pair_dipole.txt +++ b/doc/src/pair_dipole.txt @@ -198,7 +198,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_dpd.txt b/doc/src/pair_dpd.txt index 62a5faffed..9dd204ad2d 100644 --- a/doc/src/pair_dpd.txt +++ b/doc/src/pair_dpd.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_eam.txt b/doc/src/pair_eam.txt index 4d3c2b2dea..ce8495affd 100644 --- a/doc/src/pair_eam.txt +++ b/doc/src/pair_eam.txt @@ -381,7 +381,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_edip.txt b/doc/src/pair_edip.txt index 86453859d3..e5b1420b59 100644 --- a/doc/src/pair_edip.txt +++ b/doc/src/pair_edip.txt @@ -121,7 +121,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_eim.txt b/doc/src/pair_eim.txt index 3f068d4040..75ad2d4683 100644 --- a/doc/src/pair_eim.txt +++ b/doc/src/pair_eim.txt @@ -148,7 +148,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gayberne.txt b/doc/src/pair_gayberne.txt index 8639f220a4..c923578586 100644 --- a/doc/src/pair_gayberne.txt +++ b/doc/src/pair_gayberne.txt @@ -145,7 +145,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gran.txt b/doc/src/pair_gran.txt index 62a58b3504..d7e87af013 100644 --- a/doc/src/pair_gran.txt +++ b/doc/src/pair_gran.txt @@ -191,7 +191,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_gromacs.txt b/doc/src/pair_gromacs.txt index 3aca8c3cd3..ec84a2d57a 100644 --- a/doc/src/pair_gromacs.txt +++ b/doc/src/pair_gromacs.txt @@ -103,7 +103,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_hbond_dreiding.txt b/doc/src/pair_hbond_dreiding.txt index 9641e294fa..d3cf90ec14 100644 --- a/doc/src/pair_hbond_dreiding.txt +++ b/doc/src/pair_hbond_dreiding.txt @@ -178,7 +178,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_hybrid.txt b/doc/src/pair_hybrid.txt index 5166fe1f84..fc1824cf62 100644 --- a/doc/src/pair_hybrid.txt +++ b/doc/src/pair_hybrid.txt @@ -330,7 +330,7 @@ LAMMPS was built with those packages. See the You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj.txt b/doc/src/pair_lj.txt index 5c8e31ac42..058d54fb59 100644 --- a/doc/src/pair_lj.txt +++ b/doc/src/pair_lj.txt @@ -253,7 +253,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj96.txt b/doc/src/pair_lj96.txt index 6e7c3cbaec..83f6ec063d 100644 --- a/doc/src/pair_lj96.txt +++ b/doc/src/pair_lj96.txt @@ -61,7 +61,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_cubic.txt b/doc/src/pair_lj_cubic.txt index d33e3ec09b..4ca8c3c141 100644 --- a/doc/src/pair_lj_cubic.txt +++ b/doc/src/pair_lj_cubic.txt @@ -75,7 +75,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_expand.txt b/doc/src/pair_lj_expand.txt index c5f0c88a75..e0838426f6 100644 --- a/doc/src/pair_lj_expand.txt +++ b/doc/src/pair_lj_expand.txt @@ -65,7 +65,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_long.txt b/doc/src/pair_lj_long.txt index da9f37b9c3..6be4562d18 100644 --- a/doc/src/pair_lj_long.txt +++ b/doc/src/pair_lj_long.txt @@ -168,7 +168,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_smooth.txt b/doc/src/pair_lj_smooth.txt index 133773abd0..b1678cad58 100644 --- a/doc/src/pair_lj_smooth.txt +++ b/doc/src/pair_lj_smooth.txt @@ -74,7 +74,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_smooth_linear.txt b/doc/src/pair_lj_smooth_linear.txt index a48c441f54..5f7c226cee 100644 --- a/doc/src/pair_lj_smooth_linear.txt +++ b/doc/src/pair_lj_smooth_linear.txt @@ -61,7 +61,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lj_soft.txt b/doc/src/pair_lj_soft.txt index e372092cf0..2ef133da55 100644 --- a/doc/src/pair_lj_soft.txt +++ b/doc/src/pair_lj_soft.txt @@ -219,7 +219,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_lubricate.txt b/doc/src/pair_lubricate.txt index 501a043801..b39c7545c7 100644 --- a/doc/src/pair_lubricate.txt +++ b/doc/src/pair_lubricate.txt @@ -154,7 +154,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "this section"_Section_accelerate.html of the manual for more diff --git a/doc/src/pair_meam_spline.txt b/doc/src/pair_meam_spline.txt index 2295a6640b..6653b397a0 100644 --- a/doc/src/pair_meam_spline.txt +++ b/doc/src/pair_meam_spline.txt @@ -118,7 +118,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_morse.txt b/doc/src/pair_morse.txt index 5fbb6d5c0a..3eb5ac5afe 100644 --- a/doc/src/pair_morse.txt +++ b/doc/src/pair_morse.txt @@ -113,7 +113,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_nb3b_harmonic.txt b/doc/src/pair_nb3b_harmonic.txt index 3f7066c826..2395707fb4 100644 --- a/doc/src/pair_nb3b_harmonic.txt +++ b/doc/src/pair_nb3b_harmonic.txt @@ -104,7 +104,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_nm.txt b/doc/src/pair_nm.txt index 9096bdc523..81cea1a38d 100644 --- a/doc/src/pair_nm.txt +++ b/doc/src/pair_nm.txt @@ -145,7 +145,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_peri.txt b/doc/src/pair_peri.txt index 6ffd8122aa..6fef445595 100644 --- a/doc/src/pair_peri.txt +++ b/doc/src/pair_peri.txt @@ -151,7 +151,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_reaxc.txt b/doc/src/pair_reaxc.txt index cfa88673d7..b9dc6e0ed8 100644 --- a/doc/src/pair_reaxc.txt +++ b/doc/src/pair_reaxc.txt @@ -311,7 +311,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_resquared.txt b/doc/src/pair_resquared.txt index 2e0034ed3b..9ad95eb5fc 100644 --- a/doc/src/pair_resquared.txt +++ b/doc/src/pair_resquared.txt @@ -157,7 +157,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_sdk.txt b/doc/src/pair_sdk.txt index 1c348eaaf7..360136a4ea 100644 --- a/doc/src/pair_sdk.txt +++ b/doc/src/pair_sdk.txt @@ -97,7 +97,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_soft.txt b/doc/src/pair_soft.txt index ec1c06729a..08fa88c477 100644 --- a/doc/src/pair_soft.txt +++ b/doc/src/pair_soft.txt @@ -94,7 +94,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_sw.txt b/doc/src/pair_sw.txt index 6025b9b11b..6ed8f00236 100644 --- a/doc/src/pair_sw.txt +++ b/doc/src/pair_sw.txt @@ -156,7 +156,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. When using the USER-INTEL package with this style, there is an diff --git a/doc/src/pair_table.txt b/doc/src/pair_table.txt index 01c577cd98..b99491b477 100644 --- a/doc/src/pair_table.txt +++ b/doc/src/pair_table.txt @@ -229,7 +229,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff.txt b/doc/src/pair_tersoff.txt index 23a20ad0fd..918e889924 100644 --- a/doc/src/pair_tersoff.txt +++ b/doc/src/pair_tersoff.txt @@ -191,7 +191,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff_mod.txt b/doc/src/pair_tersoff_mod.txt index ff703063b3..e0c2b5a5cb 100644 --- a/doc/src/pair_tersoff_mod.txt +++ b/doc/src/pair_tersoff_mod.txt @@ -143,7 +143,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_tersoff_zbl.txt b/doc/src/pair_tersoff_zbl.txt index 18e54749aa..21d57e4e88 100644 --- a/doc/src/pair_tersoff_zbl.txt +++ b/doc/src/pair_tersoff_zbl.txt @@ -201,7 +201,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_thole.txt b/doc/src/pair_thole.txt index 61ca0b5c35..41a4059cee 100644 --- a/doc/src/pair_thole.txt +++ b/doc/src/pair_thole.txt @@ -142,7 +142,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_vashishta.txt b/doc/src/pair_vashishta.txt index 9c275a61d3..d9c66d45c0 100644 --- a/doc/src/pair_vashishta.txt +++ b/doc/src/pair_vashishta.txt @@ -183,7 +183,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_yukawa.txt b/doc/src/pair_yukawa.txt index 26acdb2ccb..61d6bde6a9 100644 --- a/doc/src/pair_yukawa.txt +++ b/doc/src/pair_yukawa.txt @@ -60,7 +60,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_yukawa_colloid.txt b/doc/src/pair_yukawa_colloid.txt index ecdc1496ab..2037a9451f 100644 --- a/doc/src/pair_yukawa_colloid.txt +++ b/doc/src/pair_yukawa_colloid.txt @@ -92,7 +92,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/pair_zbl.txt b/doc/src/pair_zbl.txt index 154fdc1c13..5ab672171b 100644 --- a/doc/src/pair_zbl.txt +++ b/doc/src/pair_zbl.txt @@ -82,7 +82,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/partition.txt b/doc/src/partition.txt index 9c1d560c83..610eee99b3 100644 --- a/doc/src/partition.txt +++ b/doc/src/partition.txt @@ -27,7 +27,7 @@ partition yes 6* fix all nvt temp 1.0 1.0 0.1 :pre This command invokes the specified command on a subset of the partitions of processors you have defined via the -partition -command-line switch. See "Section 2.6"_Section_start.html#start_7 +command-line switch. See "Section 2.6"_Section_start.html#start_6 for an explanation of the switch. Normally, every input script command in your script is invoked by @@ -49,7 +49,7 @@ argument. Partitions are numbered from 1 to Np, where Np is the number of partitions specified by the "-partition command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. {N} can be specified in one of two ways. An explicit numeric value can be used, as in the 1st example above. Or a wild-card asterisk can diff --git a/doc/src/prd.txt b/doc/src/prd.txt index 247d422b1c..3c0305e316 100644 --- a/doc/src/prd.txt +++ b/doc/src/prd.txt @@ -63,7 +63,7 @@ event to occur. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the manual. +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on one or two diff --git a/doc/src/processors.txt b/doc/src/processors.txt index 781049af9c..e54b2cede3 100644 --- a/doc/src/processors.txt +++ b/doc/src/processors.txt @@ -82,7 +82,7 @@ sub-domain. Also note that if multiple partitions are being used then P is the number of processors in this partition; see "this -section"_Section_start.html#start_7 for an explanation of the +section"_Section_start.html#start_6 for an explanation of the -partition command-line switch. Also note that you can prefix the processors command with the "partition"_partition.html command to easily specify different Px,Py,Pz values for different partitions. @@ -249,7 +249,7 @@ partition {Precv} which is enforced when each is setting up their own mapping of their processors to the simulation box. Each of {Psend} and {Precv} must be integers from 1 to Np, where Np is the number of partitions you have defined via the "-partition command-line -switch"_Section_start.html#start_7. +switch"_Section_start.html#start_6. A "dependency" means that the sending partition will create its regular 3d grid as Px by Py by Pz and after it has done this, it will @@ -286,7 +286,7 @@ processors and their mapping to the 3d grid to the specified file processors in the manner you desired, which can be tricky to figure out, especially when running on multiple partitions or on, a multicore machine or when the processor ranks were reordered by use of the -"-reorder command-line switch"_Section_start.html#start_7 or due to +"-reorder command-line switch"_Section_start.html#start_6 or due to use of MPI-specific launch options such as a config file. If you have multiple partitions you should insure that each one writes @@ -300,9 +300,9 @@ The IDs are the processor's rank in this simulation (the world), the universe (of multiple simulations), and the original MPI communicator used to instantiate LAMMPS, respectively. The world and universe IDs will only be different if you are running on more than one partition; -see the "-partition command-line switch"_Section_start.html#start_7. +see the "-partition command-line switch"_Section_start.html#start_6. The universe and original IDs will only be different if you used the -"-reorder command-line switch"_Section_start.html#start_7 to reorder +"-reorder command-line switch"_Section_start.html#start_6 to reorder the processors differently than their rank in the original communicator LAMMPS was instantiated with. @@ -332,7 +332,7 @@ The {part} keyword (for the receiving partition) only works with the [Related commands:] -"partition"_partition.html, "-reorder command-line switch"_Section_start.html#start_7 +"partition"_partition.html, "-reorder command-line switch"_Section_start.html#start_6 [Default:] diff --git a/doc/src/read_data.txt b/doc/src/read_data.txt index 6785eb1066..a8aca53693 100644 --- a/doc/src/read_data.txt +++ b/doc/src/read_data.txt @@ -62,7 +62,7 @@ simulation. The file can be ASCII text or a gzipped text file atom coordinates; see the "read_restart"_read_restart.html and "create_atoms"_create_atoms.html commands for alternative methods. Also see the explanation of the "-restart command-line -switch"_Section_start.html#start_7 which can convert a restart file to +switch"_Section_start.html#start_6 which can convert a restart file to a data file. This command can be used multiple times to add new atoms and their diff --git a/doc/src/read_restart.txt b/doc/src/read_restart.txt index d0f4b16175..d1091542b8 100644 --- a/doc/src/read_restart.txt +++ b/doc/src/read_restart.txt @@ -81,7 +81,7 @@ wrong. Because restart files are binary, they may not be portable to other machines. In this case, you can use the "-restart command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. Similar to how restart files are written (see the diff --git a/doc/src/region.txt b/doc/src/region.txt index 885e5e45f8..5039e4a516 100644 --- a/doc/src/region.txt +++ b/doc/src/region.txt @@ -375,7 +375,7 @@ LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line -switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can +switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section 5"_Section_accelerate.html of the manual for diff --git a/doc/src/restart.txt b/doc/src/restart.txt index 5e0c2a9ea5..7c39ae1404 100644 --- a/doc/src/restart.txt +++ b/doc/src/restart.txt @@ -125,7 +125,7 @@ Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on another machine. In this case, you can use the "-r command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. NOTE: Although the purpose of restart files is to enable restarting a diff --git a/doc/src/run_style.txt b/doc/src/run_style.txt index a67899420b..ba836a07dd 100644 --- a/doc/src/run_style.txt +++ b/doc/src/run_style.txt @@ -69,7 +69,7 @@ The {verlet} style is a standard velocity-Verlet integrator. The {verlet/split} style is also a velocity-Verlet integrator, but it splits the force calculation within each timestep over 2 partitions of -processors. See "Section 2.7"_Section_start.html#start_7 for an +processors. See "Section 2.6"_Section_start.html#start_6 for an explanation of the -partition command-line switch. Specifically, this style performs all computation except the @@ -115,7 +115,7 @@ When you run in 2-partition mode with the {verlet/split} style, the thermodynamic data for the entire simulation will be output to the log and screen file of the 1st partition, which are log.lammps.0 and screen.0 by default; see the "-plog and -pscreen command-line -switches"_Section_start.html#start_7 to change this. The log and +switches"_Section_start.html#start_6 to change this. The log and screen file for the 2nd partition will not contain thermodynamic output beyond the 1st timestep of the run. @@ -259,7 +259,7 @@ Accelerated styles take the same arguments and should produce the same results, except for round-off and precision issues. You can specify {respa/omp} explicitly in your input script, or -you can use the "-suffix command-line switch"_Section_start.html#start_7 +you can use the "-suffix command-line switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. diff --git a/doc/src/suffix.txt b/doc/src/suffix.txt index 127719cdb5..7a4adb50b6 100644 --- a/doc/src/suffix.txt +++ b/doc/src/suffix.txt @@ -28,7 +28,7 @@ suffix kk :pre 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"_Section_start.html#start_7. It also has options +command-line switch"_Section_start.html#start_6. It also has options to turn off or back on any suffix setting made via the command line. The specified style can be {gpu}, {intel}, {kk}, {omp}, {opt} or @@ -105,6 +105,6 @@ input script. [Related commands:] -"Command-line switch -suffix"_Section_start.html#start_7 +"Command-line switch -suffix"_Section_start.html#start_6 [Default:] none diff --git a/doc/src/temper.txt b/doc/src/temper.txt index be7edfba43..b1c47c8076 100644 --- a/doc/src/temper.txt +++ b/doc/src/temper.txt @@ -32,7 +32,7 @@ replicas (ensembles) of a system. Two or more replicas must be used. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line -switch; see "Section 2.7"_Section_start.html#start_7 of the +switch; see "Section 2.6"_Section_start.html#start_6 of the manual. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on one or @@ -70,7 +70,7 @@ As a tempering run proceeds, multiple log files and screen output files are created, one per replica. By default these files are named log.lammps.M and screen.M where M is the replica number from 0 to N-1, with N = # of replicas. See the "section on command-line -switches"_Section_start.html#start_7 for info on how to change these +switches"_Section_start.html#start_6 for info on how to change these names. The main screen and log file (log.lammps) will list information about diff --git a/doc/src/thermo_style.txt b/doc/src/thermo_style.txt index 36ec7bf12e..6102169ee3 100644 --- a/doc/src/thermo_style.txt +++ b/doc/src/thermo_style.txt @@ -255,7 +255,7 @@ The {part} keyword is useful for multi-replica or multi-partition simulations to indicate which partition this output and this file corresponds to, or for use in a "variable"_variable.html to append to a filename for output specific to this partition. See "Section -2.7"_Section_start.html#start_7 of the manual for details on running +2.6"_Section_start.html#start_6 of the manual for details on running in multi-partition mode. The {timeremain} keyword returns the remaining seconds when a diff --git a/doc/src/timer.txt b/doc/src/timer.txt index 39a6c542b7..768c3e1353 100644 --- a/doc/src/timer.txt +++ b/doc/src/timer.txt @@ -40,7 +40,7 @@ time is spent in different sections of the code and thus can provide information for determining performance and load imbalance problems. This can be done at different levels of detail and accuracy. For more information about the timing output, see this "discussion of screen -output in Section 2.8"_Section_start.html#start_8. +output in Section 2.7"_Section_start.html#start_7. The {off} setting will turn all time measurements off. The {loop} setting will only measure the total time for a run and not collect any diff --git a/doc/src/variable.txt b/doc/src/variable.txt index e32e82ef4d..e3b7c5de0d 100644 --- a/doc/src/variable.txt +++ b/doc/src/variable.txt @@ -178,7 +178,7 @@ This means variables can NOT be re-defined in an input script (with two exceptions, read further). This is to allow an input script to be processed multiple times without resetting the variables; see the "jump"_jump.html or "include"_include.html commands. It also means -that using the "command-line switch"_Section_start.html#start_7 -var +that using the "command-line switch"_Section_start.html#start_6 -var will override a corresponding index variable setting in the input script. @@ -248,7 +248,7 @@ variable. {Index} style variables with a single string value can also be set by using the command-line switch -var; see "this -section"_Section_start.html#start_7 for details. +section"_Section_start.html#start_6 for details. The {loop} style is identical to the {index} style except that the strings are the integers from 1 to N inclusive, if only one argument N @@ -264,7 +264,7 @@ N1 <= N2 and N2 >= 0 is required. For the {world} style, one or more strings are specified. There must be one string for each processor partition or "world". See "this -section"_Section_start.html#start_7 of the manual for information on +section"_Section_start.html#start_6 of the manual for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command assigns one string to each world. All processors in the world are assigned the same string. The @@ -277,7 +277,7 @@ different partitions. For the {universe} style, one or more strings are specified. There must be at least as many strings as there are processor partitions or -"worlds". See "this page"_Section_start.html#start_7 for information +"worlds". See "this page"_Section_start.html#start_6 for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command initially assigns one string to each world. When a "next"_next.html command is encountered diff --git a/doc/src/write_data.txt b/doc/src/write_data.txt index 033199e98b..39e5a7f811 100644 --- a/doc/src/write_data.txt +++ b/doc/src/write_data.txt @@ -59,7 +59,7 @@ If you want to do more exact restarts, using binary files, see the "restart"_restart.html, "write_restart"_write_restart.html, and "read_restart"_read_restart.html commands. You can also convert binary restart files to text data files, after a simulation has run, -using the "-r command-line switch"_Section_start.html#start_7. +using the "-r command-line switch"_Section_start.html#start_6. NOTE: Only limited information about a simulation is stored in a data file. For example, no information about atom "groups"_group.html and diff --git a/doc/src/write_restart.txt b/doc/src/write_restart.txt index 8160eec3df..ff3b652dba 100644 --- a/doc/src/write_restart.txt +++ b/doc/src/write_restart.txt @@ -66,7 +66,7 @@ Restart files can be read by a "read_restart"_read_restart.html command to restart a simulation from a particular state. Because the file is binary (to enable exact restarts), it may not be readable on another machine. In this case, you can use the "-r command-line -switch"_Section_start.html#start_7 to convert a restart file to a data +switch"_Section_start.html#start_6 to convert a restart file to a data file. NOTE: Although the purpose of restart files is to enable restarting a diff --git a/src/Make.py b/src/Make.py deleted file mode 100755 index 3030183e1a..0000000000 --- a/src/Make.py +++ /dev/null @@ -1,2378 +0,0 @@ -#!/usr/bin/env python2 - -# Make.py tool for managing packages and their auxiliary libs, -# auto-editing machine Makefiles, and building LAMMPS -# Syntax: Make.py -h (for help) -# Notes: should be compatible with python 2.7 and 3.x thanks to 'futurize' - -from __future__ import print_function -import sys,os,re,copy,subprocess,platform - -# switch abbrevs -# switch classes = created class for each switch -# lib classes = auxiliary package libs -# build classes = build options with defaults -# make classes = makefile options with no defaults -# setargs = makefile settings -# actionargs = allowed actions (also lib-dir and machine) -# lib build flags are set if lib is built, for use with zoutput - -abbrevs = "adhjmoprsvz" - -switchclasses = ("actions","dir","help","jmake","makefile", - "output","packages","redo","settings","verbose","zoutput") -libclasses = ("atc","awpmd","colvars","cuda","gpu","h5md", - "meam","poems","python","qmmm","reax","voronoi") -buildclasses = ("intel","kokkos") -makeclasses = ("cc","flags","mpi","fft","jpg","png") - -setargs = ("gzip","#gzip","ffmpeg","#ffmpeg","smallbig","bigbig", - "smallsmall","exceptions","#exceptions") -actionargs = ("lib-all","file","clean","exe") - -gpubuildflag = 0 - -# ---------------------------------------------------------------- -# functions -# ---------------------------------------------------------------- - -# if flag = 1, print txt and exit -# if flag = 0, print txt as warning and do not exit - -def error(txt,flag=1): - if flag: - print("ERROR:",txt) - sys.exit() - else: - print("WARNING:",txt) - -# store command-line args as sw = dict of key/value -# key = switch word, value = list of following args -# order = list of switches in order specified -# enforce no switch more than once - -def parse_args(args): - narg = len(args) - sw = {} - order = [] - iarg = 0 - while iarg < narg: - if args[iarg][0] != '-': error("Arg %s is not a switch" % args[iarg]) - switch = args[iarg][1:] - if switch in sw: error("Duplicate switch %s" % args[iarg]) - order.append(switch) - first = iarg+1 - last = first - while last < narg and args[last][0] != '-': last += 1 - sw[switch] = args[first:last] - iarg = last - return sw,order - -# convert info in switches dict back to a string, in switch_order - -def switch2str(switches,switch_order): - txt = "" - for switch in switch_order: - if txt: txt += ' ' - txt += "-%s" % switch - txt += ' ' + ' '.join(switches[switch]) - return txt - -# check if compiler works with ccflags on dummy one-line tmpauto.cpp file -# return 1 if successful, else 0 -# warn = 1 = print warning if not successful, warn = 0 = no warning -# NOTE: unrecognized -override-limits can leave verride-limits file - -def compile_check(compiler,ccflags,warn): - open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - tmp = "%s %s -c tmpauto.cpp" % (compiler,ccflags) - try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT, - shell=True).decode() - except subprocess.CalledProcessError as e: txt = e.output - flag = 1 - if txt or not os.path.isfile("tmpauto.o"): - flag = 0 - if warn: - print(tmp) - if txt: print(txt) - else: print("compile produced no output") - os.remove("tmpauto.cpp") - if os.path.isfile("tmpauto.o"): os.remove("tmpauto.o") - return flag - -# check if linker works with linkflags and libs on tmpauto.o file -# return 1 if successful, else 0 -# warn = 1 = print warning if not successful, warn = 0 = no warning - -def link_check(linker,linkflags,libs,warn): - open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - tmp = "%s %s -o tmpauto tmpauto.cpp %s" % (linker,linkflags,libs) - try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT, - shell=True).decode() - except subprocess.CalledProcessError as e: txt = e.output - flag = 1 - if txt or not os.path.isfile("tmpauto"): - flag = 0 - if warn: - print(tmp) - if txt: print(txt) - else: print("link produced no output") - os.remove("tmpauto.cpp") - if os.path.isfile("tmpauto"): os.remove("tmpauto") - return flag - -# ---------------------------------------------------------------- -# switch classes, one per single-letter switch -# ---------------------------------------------------------------- - -# actions - -class Actions(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --a action1 action2 ... - possible actions = lib-all, lib-dir, file, clean, exe or machine - machine is a Makefile.machine suffix - actions can be specified in any order - each action can appear only once - lib-dir can appear multiple times for different dirs - some actions depend on installed packages - installed packages = currently installed + result of -p switch - actions are invoked in this order, independent of specified order - (1) lib-all or lib-dir = build auxiliary libraries - lib-all builds all auxiliary libs needed by installed packages - lib-dir builds a specific lib whether package installed or not - dir is any dir in lib directory (atc, cuda, meam, etc) except linalg - (2) file = create a new src/MAKE/MINE/Makefile.auto - if file not specified, existing Makefile.auto is NOT changed - except by -m switch, which will copy Makefile.machine to Makefile.auto - note that exe action can add an -m switch, as described below - if file is specified, new Makefile.auto is created - if "-m machine" specified (or added by exe), - start with existing Makefile.machine, else existing Makefile.auto - if "-m none" specified, start Makefile.auto from scratch - must use -cc and -mpi switches to specify compiler and MPI - settings for these switches will alter Makefile.auto - -s, -intel, -kokkos, -cc, -mpi, -fft, -jpg, -png - if these accelerator packages are installed, they induce settings - that will alter Makefile.auto: opt, user-omp, user-intel, kokkos - use -z switch to copy final Makefile.auto to new filename - (3) clean = invoke "make clean-auto" to insure clean build on current files - useful if compiler flags have changed - (4) exe or machine = build LAMMPS - machine can be any existing Makefile.machine suffix - machine is converted to "exe" action, and additionally: - "-m machine" is added if -m switch is not specified - "-o machine" is added if -o switch is not specified - if either "-m" or "-o" are specified, they are not overridden - does not invoke any lib builds, since libs could be previously built - exe ALWAYS builds using src/MAKE/MINE/Makefile.auto - if file action also specified, it creates a new Makefile.auto - else if -m switch specified, - existing Makefile.machine is copied to create Makefile.auto - else Makefile.auto must already exist and is not changed - build produces src/lmp_auto, or error message if unsuccessful - use -o switch to copy src/lmp_auto to new filename - use -z switch to copy src/MAKE/MINE/Makefile.auto to new filename -""" - - def check(self): - if not self.inlist: error("-a args are invalid") - libs = [] - cleans = [] - files = [] - exes = [] - for one in self.inlist: - if one.startswith("lib-"): - lib = one[4:] - if lib != "all" and lib not in libclasses: error("Actions are invalid") - libs.append(one) - elif one == "file": - files.append(one) - elif one == "clean": - cleans.append(one) - elif one == "exe": - exes.append(one) - # one action can be unknown, must be a machine (checked in setup) - else: - exes.append(one) - if len(set(libs)) != len(libs) or \ - len(cleans) > 1 or len(files) > 1 or len(exes) > 1: - error("Actions are invalid") - self.alist = [action for actions in [libs,cleans,files,exes] \ - for action in actions] - - # dedup list of actions concatenated from two lists - # current self.inlist = specified -a switch + redo command -a switch - # specified exe/machine action replaces redo exe/machine action - # operates on and replaces self.inlist - - def dedup(self): - alist = [] - exemachine = 0 - for one in self.inlist: - if one == "exe" or (one not in actionargs and not one.startswith("lib-")): - if exemachine: continue - exemachine = 1 - if one not in alist: alist.append(one) - self.inlist = alist - - # if last action is unknown, assume machine and convert to exe - # only done if action is a suffix for an existing Makefile.machine - # return machine if conversion done, else None - - def setup(self): - machine = self.alist[-1] - if machine in actionargs or machine.startswith("lib-"): return None - make = MakeReader(machine,2) - self.alist[-1] = "exe" - return machine - - # build one or more auxiliary package libraries - - def lib(self,suffix): - if suffix != "all": - print("building",suffix,"library ...") - txt = "%s.build()" % suffix - exec(txt) - else: - final = packages.final - for one in packages.lib: - if final[one]: - if "user" in one: pkg = one[5:] - else: pkg = one - print("building",pkg,"library ...") - txt = "%s.build()" % pkg - exec(txt) - - # read Makefile.machine - # if caller = "file", edit via switches - # if caller = "exe", just read - # write out new Makefile.auto - - def file(self,caller): - - # if caller="file", create from mpi or read from Makefile.machine or auto - # if caller="exe" and "file" action already invoked, read from auto - # if caller="exe" and no "file" action, read from Makefile.machine or auto - - if caller == "file": - if makefile and makefile.machine == "none": - if cc and mpi: machine = "mpi" - else: error("Cannot create makefile unless -cc and -mpi are used") - elif makefile: machine = makefile.machine - else: machine = "auto" - elif caller == "exe" and "file" in self.alist: - machine = "auto" - elif caller == "exe" and "file" not in self.alist: - if makefile and makefile.machine == "none": - error("Cannot build with makefile = none") - elif makefile: machine = makefile.machine - else: machine = "auto" - - make = MakeReader(machine,1) - - # change makefile settings to user specifications - - precompiler = "" - if caller == "file": - - # add compiler/linker and default CCFLAGS,LINKFLAGS - # if cc.wrap, add wrapper setting for mpi = ompi/mpich - # precompiler = env variable setting for OpenMPI wrapper compiler - - if cc: - make.setvar("CC",cc.compiler) - make.setvar("LINK",cc.compiler) - if cc.wrap: - if cc.wrap == "nvcc": - wrapper = os.path.abspath("../lib/kokkos/config/nvcc_wrapper") - else: wrapper = cc.wrap - abbrev = cc.abbrev - if abbrev == "mpi": - if cc.parent == "mpich": - make.addvar("CC","-cxx=%s" % wrapper) - make.addvar("LINK","-cxx=%s" % wrapper) - elif cc.parent == "openmpi": - make.addvar("export OMPI_CXX",wrapper,"cc") - precompiler = "env OMPI_CXX=%s " % wrapper - else: error("Could not add MPI wrapper compiler, " + - "did not recognize OpenMPI or MPICH") - make.setvar("CCFLAGS","-g") - make.addvar("CCFLAGS","-O3") - make.setvar("LINKFLAGS","-g") - make.addvar("LINKFLAGS","-O") - - # add MPI settings - - if mpi: - make.delvar("MPI_INC","*") - make.delvar("MPI_PATH","*") - make.delvar("MPI_LIB","*") - if mpi.style == "mpi": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - elif mpi.style == "mpich": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - if mpi.dir: make.addvar("MPI_INC","-I%s/include" % mpi.dir) - if mpi.dir: make.addvar("MPI_PATH","-L%s/lib" % mpi.dir) - make.addvar("MPI_LIB","-lmpich") - make.addvar("MPI_LIB","-lmpl") - make.addvar("MPI_LIB","-lpthread") - elif mpi.style == "ompi": - make.addvar("MPI_INC","-DMPICH_SKIP_MPICXX") - make.addvar("MPI_INC","-DOMPI_SKIP_MPICXX=1") - if mpi.dir: make.addvar("MPI_INC","-I%s/include" % mpi.dir) - if mpi.dir: make.addvar("MPI_PATH","-L%s/lib" % mpi.dir) - make.addvar("MPI_LIB","-lmpi") - make.addvar("MPI_LIB","-lmpi_cxx") - elif mpi.style == "serial": - make.addvar("MPI_INC","-I../STUBS") - make.addvar("MPI_PATH","-L../STUBS") - make.addvar("MPI_LIB","-lmpi_stubs") - - # add accelerator package CCFLAGS and LINKFLAGS and variables - - compiler = precompiler + ' '.join(make.getvar("CC")) - linker = precompiler + ' '.join(make.getvar("LINK")) - - final = packages.final - if final["opt"]: - if compile_check(compiler,"-restrict",0): - make.addvar("CCFLAGS","-restrict") - - if final["user-omp"]: - if compile_check(compiler,"-fopenmp",1): - make.addvar("CCFLAGS","-fopenmp") - make.addvar("LINKFLAGS","-fopenmp") - if compile_check(compiler,"-restrict",0): - make.addvar("CCFLAGS","-restrict") - - if final["user-intel"]: - if intel.mode == "cpu": - make.delvar("CCFLAGS","-O*") - make.addvar("CCFLAGS","-O2") - if compile_check(compiler,"-openmp",1): - make.addvar("CCFLAGS","-openmp") - if compile_check(compiler,"-restrict",1): - make.addvar("CCFLAGS","-restrict") - if compile_check(compiler,"-no-offload",1): - make.addvar("CCFLAGS","-no-offload") - if compile_check(compiler,"-fno-alias",1): - make.addvar("CCFLAGS","-fno-alias") - if compile_check(compiler,"-ansi-alias",1): - make.addvar("CCFLAGS","-ansi-alias") - if compile_check(compiler,"-xAVX",1): - make.addvar("CCFLAGS","-xAVX") - if compile_check(compiler,"-fp-model fast=2",1): - make.addvar("CCFLAGS","-fp-model fast=2") - if compile_check(compiler,"-no-prec-div",1): - make.addvar("CCFLAGS","-no-prec-div") - if compile_check(compiler,"-override-limits",1): - make.addvar("CCFLAGS","-override-limits") - make.addvar("CCFLAGS","-DLAMMPS_MEMALIGN=64") - make.delvar("CCFLAGS","-DLMP_INTEL_OFFLOAD") - - make.delvar("LINKFLAGS","-O*") - make.addvar("LINKFLAGS","-O2") - if link_check(linker,"-openmp","",1): - make.addvar("LINKFLAGS","-openmp") - if link_check(linker,"-xAVX","",1): - make.addvar("LINKFLAGS","-xAVX") - if link_check(linker,"-fpmodel fast=2","",1): - make.addvar("LINKFLAGS","-fpmodel fast=2") - if link_check(linker,"-no-prec-div","",1): - make.addvar("LINKFLAGS","-no-prec-div") - if link_check(linker,"-override-limits","",1): - make.addvar("LINKFLAGS","-override-limits") - make.delvar("LINKFLAGS","-offload") - - if link_check(linker,"","-ltbbmalloc",1): - make.addvar("LIB","-ltbbmalloc") - if link_check(linker,"","-ltbbmalloc_proxy",1): - make.addvar("LIB","-ltbbmalloc_proxy") - - elif intel.mode == "phi": - if compile_check(compiler,"-fopenmp",1): - make.addvar("CCFLAGS","-fopenmp") - make.addvar("LINKFLAGS","-fopenmp") - make.addvar("CCFLAGS","-DLAMMPS_MEMALIGN=64") - if compile_check(compiler,"-restrict",1): - make.addvar("CCFLAGS","-restrict") - if compile_check(compiler,"-xHost",1): - make.addvar("CCFLAGS","-xHost") - make.addvar("CCFLAGS","-DLMP_INTEL_OFFLOAD") - if compile_check(compiler,"-fno-alias",1): - make.addvar("CCFLAGS","-fno-alias") - if compile_check(compiler,"-ansi-alias",1): - make.addvar("CCFLAGS","-ansi-alias") - if compile_check(compiler,"-override-limits",1): - make.addvar("CCFLAGS","-override-limits") - if compile_check(compiler,'-offload-option,mic,compiler,' + - '"-fp-model fast=2 -mGLOB_default_function_attrs=' + - '\\"gather_scatter_loop_unroll=4\\""',1): - make.addvar("CCFLAGS",'-offload-option,mic,compiler,' + - '"-fp-model fast=2 -mGLOB_default_function_attrs=' + - '\\"gather_scatter_loop_unroll=4\\""') - if link_check(linker,"-offload","",1): - make.addvar("LINKFLAGS","-offload") - - if final["kokkos"]: - if kokkos.mode == "omp": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","OpenMP","lmp") - if kokkos.archcpu: - make.addvar("KOKKOS_ARCH",kokkos.archcpu,"lmp") - elif kokkos.mode == "cuda": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","Cuda, OpenMP","lmp") - if kokkos.archgpu: - if kokkos.archgpu[0] == "3": value = "Kepler" + kokkos.archgpu - elif kokkos.archgpu[0] == "2": value = "Fermi" + kokkos.archgpu - else: error("Unrecognized Kokkos archgpu setting") - if kokkos.archcpu: value += ", %s" % kokkos.archcpu - make.addvar("KOKKOS_ARCH",value,"lmp") - elif kokkos.mode == "phi": - make.delvar("KOKKOS_DEVICES","*") - make.delvar("KOKKOS_ARCH","*") - make.addvar("KOKKOS_DEVICES","OpenMP","lmp") - make.addvar("KOKKOS_ARCH","KNC","lmp") - - # add LMP_INC ifdef settings - - if settings: - list = settings.inlist - for one in list: - if one == "gzip": make.addvar("LMP_INC","-DLAMMPS_GZIP") - elif one == "#gzip": make.delvar("LMP_INC","-DLAMMPS_GZIP") - elif one == "ffmpeg": make.addvar("LMP_INC","-DLAMMPS_FFMPEG") - elif one == "#ffmpeg": make.delvar("LMP_INC","-DLAMMPS_FFMPEG") - elif one == "smallbig": - make.delvar("LMP_INC","-DLAMMPS_BIGBIG") - make.delvar("LMP_INC","-DLAMMPS_SMALLSMALL") - elif one == "bigbig": - make.delvar("LMP_INC","-DLAMMPS_SMALLBIG") - make.delvar("LMP_INC","-DLAMMPS_SMALLSMALL") - make.addvar("LMP_INC","-DLAMMPS_BIGBIG") - elif one == "smallsmall": - make.delvar("LMP_INC","-DLAMMPS_SMALLBIG") - make.delvar("LMP_INC","-DLAMMPS_BIGBIG") - make.addvar("LMP_INC","-DLAMMPS_SMALLSMALL") - elif one == "exceptions": make.addvar("LMP_INC","-DLAMMPS_EXCEPTIONS") - elif one == "#exception": make.delvar("LMP_INC","-DLAMMPS_EXCEPTIONS") - - # add FFT, JPG, PNG settings - - if fft: - make.delvar("FFT_INC","*") - make.delvar("FFT_PATH","*") - make.delvar("FFT_LIB","*") - if fft.mode == "none": make.addvar("FFT_INC","-DFFT_NONE") - else: - make.addvar("FFT_INC","-DFFT_%s" % fft.mode.upper()) - make.addvar("FFT_LIB",fft.lib) - if fft.dir: - make.addvar("FFT_INC","-I%s/include" % fft.dir) - make.addvar("FFT_PATH","-L%s/lib" % fft.dir) - else: - if fft.incdir: make.addvar("FFT_INC","-I%s" % fft.incdir) - if fft.libdir: make.addvar("FFT_PATH","-L%s" % fft.libdir) - - if jpg: - if jpg.on == 0: - make.delvar("LMP_INC","-DLAMMPS_JPEG") - make.delvar("JPG_LIB","-ljpeg") - else: - make.addvar("LMP_INC","-DLAMMPS_JPEG") - make.addvar("JPG_LIB","-ljpeg") - if jpg.dir: - make.addvar("JPG_INC","-I%s/include" % jpg.dir) - make.addvar("JPG_PATH","-L%s/lib" % jpg.dir) - else: - if jpg.incdir: make.addvar("JPG_INC","-I%s" % jpg.incdir) - if jpg.libdir: make.addvar("JPG_PATH","-L%s" % jpg.libdir) - - if png: - if png.on == 0: - make.delvar("LMP_INC","-DLAMMPS_PNG") - make.delvar("JPG_LIB","-lpng") - else: - make.addvar("LMP_INC","-DLAMMPS_PNG") - make.addvar("JPG_LIB","-lpng") - if png.dir: - make.addvar("JPG_INC","-I%s/include" % png.dir) - make.addvar("JPG_PATH","-L%s/lib" % png.dir) - else: - if png.incdir: make.addvar("JPG_INC","-I%s" % png.incdir) - if png.libdir: make.addvar("JPG_PATH","-L%s" % png.libdir) - - # finally after all other settings, add explicit flags - - if flags: - for var,action,flist in flags.flags: - values = make.getvar(var) - if values == None: - error("Flags for a non-existent Makefile.auto variable") - for flag in flist: - flag = "-" + flag - if action == "add": make.addvar(var,flag) - elif action == "del": make.delvar(var,flag) - - # set self.stubs if Makefile.auto uses STUBS lib in MPI settings - - if make.getvar("MPI_LIB") and "-lmpi_stubs" in make.getvar("MPI_LIB"): - self.stubs = 1 - else: self.stubs = 0 - - # write out Makefile.auto - # unless caller = "exe" and "file" action already invoked - - if caller == "file" or "file" not in self.alist: - # make certain that 'MAKE/MINE' folder exists. - subprocess.check_output("mkdir -p %s/MAKE/MINE" % dir.src, - stderr=subprocess.STDOUT,shell=True) - make.write("%s/MAKE/MINE/Makefile.auto" % dir.src,1) - print("Created src/MAKE/MINE/Makefile.auto") - - # test full compile and link - # unless caller = "file" and "exe" action will be invoked later - - if caller == "file" and "exe" in self.alist: return - compiler = precompiler + ' '.join(make.getvar("CC")) - ccflags = ' '.join(make.getvar("CCFLAGS")) - linker = precompiler + ' '.join(make.getvar("LINK")) - linkflags = ' '.join(make.getvar("LINKFLAGS")) - libs = ' '.join(make.getvar("LIB")) - if not compile_check(compiler,ccflags,1): - error("Test of compilation failed") - if not link_check(linker,linkflags,libs,1): error("Test of link failed") - - # invoke "make clean-auto" to force clean before build - - def clean(self): - txt = "cd %s; make clean-auto" % dir.src - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Performed make clean-auto") - - # build LAMMPS using Makefile.auto and -j setting - # invoke self.file() first, to test makefile compile/link - # delete existing lmp_auto, so can detect if build fails - # build STUBS lib (if unbuilt) if Makefile.auto MPI settings need it - - def exe(self): - self.file("exe") - subprocess.check_output("cd %s; rm -f lmp_auto" % dir.src,stderr=subprocess.STDOUT,shell=True) - if self.stubs and not os.path.isfile("%s/STUBS/libmpi_stubs.a" % dir.src): - print("building serial STUBS library ...") - tmp = "cd %s/STUBS; make clean; make" % dir.src - txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() - if not os.path.isfile("%s/STUBS/libmpi_stubs.a" % dir.src): - print(txt) - error('Unsuccessful "make stubs"') - print("Created src/STUBS/libmpi_stubs.a") - - # special hack for shannon GPU cluster - # must use "srun make" if on it and building w/ GPU package, else just make - # this is b/c Cuda libs are not all available on host - - make = "make" - if "shannon" == platform.node() and packages.final["gpu"]: - make = "srun make" - - if jmake: tmp = "cd %s; %s -j %d auto" % (dir.src,make,jmake.n) - else: tmp = "cd %s; %s auto" % (dir.src,make) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(tmp,shell=True) - else: - print(tmp) - try: subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/lmp_auto" % dir.src): - error('Unsuccessful "make auto"') - elif not output: print("Created src/lmp_auto") - -# dir switch - -class Dir(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --d dir - dir = LAMMPS home dir - if -d not specified, working dir must be lammps/src -""" - - def check(self): - if self.inlist != None and len(self.inlist) != 1: - error("-d args are invalid") - - # if inlist = None, check that cwd = lammps/src - # store cwd and lammps dir - # derive src,make,lib dirs from lammps dir - # check that they all exist - - def setup(self): - self.cwd = os.getcwd() - if self.inlist == None: self.lammps = ".." - else: self.lammps = self.inlist[0] - self.lammps = os.path.realpath(self.lammps) - self.src = self.lammps + "/src" - self.make = self.lammps + "/src/MAKE" - self.lib = self.lammps + "/lib" - if not os.path.isdir(self.lammps): error("LAMMPS home dir is invalid") - if not os.path.isdir(self.src): error("LAMMPS src dir is invalid") - if not os.path.isdir(self.lib): error("LAMMPS lib dir is invalid") - -# help switch - -class Help(object): - def __init__(self,list): pass - - def help(self): - return """ -Syntax: Make.py switch args ... - switches can be listed in any order - help switch: - -h prints help and syntax for all other specified switches - switch for actions: - -a lib-all, lib-dir, clean, file, exe or machine - list one or more actions, in any order - machine is a Makefile.machine suffix - one-letter switches: - -d (dir), -j (jmake), -m (makefile), -o (output), -p (packages), - -r (redo), -s (settings), -v (verbose), -z (makefile output) - switches for libs: - -atc, -awpmd, -colvars, -cuda, -gpu, -h5md, - -meam, -poems, -python, -qmmm, -reax, -voronoi - switches for build and makefile options: - -intel, -kokkos, -cc, -flags, -mpi, -fft, -jpg, -png -""" - -# jmake switch - -class Jmake(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --j N - use N procs for performing parallel make commands - used when building a lib or LAMMPS itself - if -j not specified, serial make commands run on single core -""" - - def check(self): - if len(self.inlist) != 1: error("-j args are invalid") - if not self.inlist[0].isdigit(): error("-j args are invalid") - n = int(self.inlist[0]) - if n <= 0: error("-j args are invalid") - self.n = n - -# makefile switch - -class Makefile(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --m machine - use Makefile.machine under src/MAKE as starting point to create Makefile.auto - if machine = "none", file action will create Makefile.auto from scratch - must use -cc and -mpi switches to specify compiler and MPI - if -m not specified, file/exe actions alter existing Makefile.auto -""" - - def check(self): - if len(self.inlist) != 1: error("-m args are invalid") - self.machine = self.inlist[0] - -# output switch - -class Output(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --o machine - copy final src/lmp_auto to lmp_machine in working dir - if -o not specified, exe action only produces src/lmp_auto -""" - - def check(self): - if len(self.inlist) != 1: error("-o args are invalid") - self.machine = self.inlist[0] - -# packages switch - -class Packages(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --p = package1 package2 ... - list of packages to install or uninstall in order specified - operates on set of packages currently installed - valid package names: - any LAMMPS standard or user package (type "make package" to see list) - prefix by yes/no to install/uninstall (see abbrevs) - yes-molecule, yes-user-atc, no-molecule, no-user-atc - can use LAMMPS categories (type "make package" to see list) - all = all standard and user packages (also none = no-all) - std (or standard) = all standard packages - user = all user packages - lib = all standard and user packages with auxiliary libs - can abbreviate package names and yes/no - omp = user-omp = yes-user-omp - ^omp = ^user-omp = no-user-omp - user = yes-user, ^user = no-user - all = yes-all, ^all = none = no-all - when action performed, list is processed in order, - as if typed "make yes/no" for each - if "orig" or "original" is last package in list, - set of installed packages will be restored to original (current) list - after "build" action is performed - if -p not specified, currently installed packages are not changed -""" - - def check(self): - if self.inlist != None and not self.inlist: error("-p args are invalid") - - def setup(self): - - # extract package lists from src/Makefile - # remove names from lib that there are not Make.py lib-classes for - # most don't actually have libs, so nothing to control from Make.py - - make = MakeReader("%s/Makefile" % dir.src) - std = make.getvar("PACKAGE") - user = make.getvar("PACKUSER") - lib = make.getvar("PACKLIB") - lib.remove("kim") - lib.remove("kokkos") - lib.remove("user-molfile") - lib.remove("python") - lib.remove("user-quip") - all = std + user - - # plist = command line args expanded to yes-package or no-package - - plist = [] - if self.inlist: - for one in self.inlist: - if one in std: - plist.append("yes-%s" % one) - elif one in user: - plist.append("yes-%s" % one) - elif "user-"+one in user: - plist.append("yes-user-%s" % one) - elif one == "std" or one == "standard" or one == "user" or \ - one == "lib" or one == "all": plist.append("yes-%s" % one) - elif one.startswith("yes-"): - if one[4:] in std: plist.append("yes-%s" % one[4:]) - elif one[4:] in user: plist.append("yes-%s" % one[4:]) - elif "user-"+one[4:] in user: plist.append("yes-user-%s" % one[4:]) - elif one == "yes-std" or one == "yes-standard" or \ - one == "yes-user" or one == "yes-lib" or one == "yes-all": - plist.append("yes-%s" % one[4:]) - else: error("Invalid package name %s" % one) - elif one.startswith("no-"): - if one[3:] in std: plist.append("no-%s" % one[3:]) - elif one[3:] in user: plist.append("no-%s" % one[3:]) - elif "user-"+one[3:] in user: plist.append("no-user-%s" % one[3:]) - elif one == "no-std" or one == "no-standard" or one == "no-user" or \ - one == "no-lib" or one == "no-all": - plist.append("no-%s" % one[3:]) - else: error("Invalid package name %s" % one) - elif one.startswith('^'): - if one[1:] in std: plist.append("no-%s" % one[1:]) - elif one[1:] in user: plist.append("no-%s" % one[1:]) - elif "user-"+one[1:] in user: plist.append("no-user-%s" % one[1:]) - elif one == "^std" or one == "^standard" or one == "^user" or \ - one == "^lib" or one == "^all": plist.append("no-%s" % one[1:]) - else: error("Invalid package name %s" % one) - elif one == "none": plist.append("no-all") - elif one == "orig": plist.append(one) - else: error("Invalid package name %s" % one) - if "orig" in plist and plist.index("orig") != len(plist)-1: - error('-p orig arg must be last') - if plist.count("orig") > 1: error('-p orig arg must be last') - - # original = dict of all packages - # key = package name, value = 1 if currently installed, else 0 - - original = {} - tmp = "cd %s; make ps" % dir.src - output = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode().split('\n') - pattern = "Installed\s+(\w+): package (\S+)" - for line in output: - m = re.search(pattern,line) - if not m: continue - pkg = m.group(2).lower() - if pkg not in all: error('Package list does not match "make ps" results') - if m.group(1) == "NO": original[pkg] = 0 - elif m.group(1) == "YES": original[pkg] = 1 - - # final = dict of all packages after plist applied to original - # key = package name, value = 1 if installed, else 0 - - final = copy.deepcopy(original) - for i,one in enumerate(plist): - if "yes" in one: - pkg = one[4:] - yes = 1 - else: - pkg = one[3:] - yes = 0 - if pkg in all: - final[pkg] = yes - elif pkg == "std" or pkg == "standard": - for pkg in std: final[pkg] = yes - elif pkg == "user": - for pkg in user: final[pkg] = yes - elif pkg == "lib": - for pkg in lib: final[pkg] = yes - elif pkg == "all": - for pkg in all: final[pkg] = yes - - self.std = std - self.user = user - self.lib = lib - self.all = all - self.plist = plist - self.original = original - self.final = final - - # install packages in plist - - def install(self): - if self.plist: print("Installing packages ...") - for one in self.plist: - if one == "orig": continue - subprocess.check_output("cd %s; make %s" % (dir.src,one), - stderr=subprocess.STDOUT,shell=True) - if self.plist and verbose: - txt = subprocess.check_output("cd %s; make ps" % dir.src, - stderr=subprocess.STDOUT, - shell=True).decode() - print("Package status after installation:") - print(txt) - - # restore packages to original list if requested - # order of re-install should not matter matter b/c of Depend.sh - - def uninstall(self): - if not self.plist or self.plist[-1] != "orig": return - print("Restoring packages to original state ...") - subprocess.check_output("cd %s; make no-all" % dir.src, - stderr=subprocess.STDOUT,shell=True) - for one in self.all: - if self.original[one]: - subprocess.check_output("cd %s; make yes-%s" % (dir.src,one), - stderr=subprocess.STDOUT,shell=True) - if verbose: - txt = subprocess.check_output("cd %s; make ps" % dir.src, - stderr=subprocess.STDOUT, - shell=True).decode() - print("Restored package status:") - print(txt) - -# redo switch - -class Redo(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --r file label1 label2 ... - all args are optional - invoke Make.py commands from a file - other specified switches are merged with file commands (see below) - redo file format: - blank lines and lines starting with "#" are skipped - other lines are treated as commands - each command is a list of Make.py args, as if typed at command-line - commands can have leading label, followed by ":" - commands cannot contain a "-r" switch - if no args, execute previous command, which is stored in src/Make.py.last - if one arg, execute all commands from specified file - unlabeled or labeled commands are all executed - if multiple args, execute only matching labeled commands from file - if other switches are specified, - if file command does not have the switch, it is added - if file command has the switch, the specified switch replaces it - except if -a (action) switch is both specified and in the file command, - two sets of actions are merged and duplicates removed - if both switches have "exe or machine" action, - the specified exe/machine overrides the file exe/machine -""" - - def check(self): - if len(self.inlist) == 0: - self.dir = 1 - self.file = "Make.py.last" - self.labels = [] - else: - self.dir = 0 - self.file = self.inlist[0] - self.labels = self.inlist[1:] - - # read redo file - # self.commands = list of commands to execute - - def setup(self): - file = self.file - if not os.path.isfile(file): error("Redo file %s does not exist" % file) - lines = open(file,'r').readlines() - - cmdlines = [] - for line in lines: - line = line.strip() - if not line or line[0] == '#' : continue - cmdlines.append(line) - - # if no labels, add all file commands to command list - # if labels, make a dict with key = label, value = command - # and discard unlabeled commands - - dict = {} - commands = [] - for line in cmdlines: - words = line.split() - if "-r" in words: error("Redo command cannot contain -r switch") - if words[0][-1] == ':': label = words[0][:-1] - else: label = None - if not self.labels: - if label: subprocess.append(' '.join(words[1:])) - else: subprocess.append(line) - else: - if not label: continue - dict[label] = ' '.join(words[1:]) - - # extract labeled commands from dict and add to command list - - for label in self.labels: - if label not in dict: error("Redo label not in redo file") - subprocess.append(dict[label]) - - self.commands = commands - -# settings switch - -class Settings(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --s set1 set2 ... - possible settings = gzip #gzip ffmpeg #ffmpeg - smallbig bigbig smallsmall exceptions #exceptions - alter LAMMPS ifdef settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - gzip and #gzip turn on/off LAMMPS_GZIP setting - ffmpeg and #ffmpeg turn on/off LAMMPS_FFMPEG setting - smallbig, bigbig, smallsmall turn on LAMMPS_SMALLBIG, etc - and turn off other two - exceptions and #exceptions turn on/off LAMMPS_EXCEPTIONS setting -""" - - def check(self): - if not self.inlist: error("-s args are invalid") - for one in self.inlist: - if one not in setargs: error("-s args are invalid") - -# verbose switch - -class Verbose(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --v (no arguments) - produce verbose output as Make.py executes - if -v not specified, minimal output is produced -""" - - def check(self): - if len(self.inlist): error("-v args are invalid") - -# zoutput switch for making copy of final Makefile.auto - -class Zoutput(object): - def __init__(self,list): - self.inlist = copy.copy(list) - - def help(self): - return """ --z machine - copy created/used src/MAKE/MINE/Makefile.auto to Makefile.machine in same dir - copy created/used lib/*/Makefile.auto and lib/*/Makefile.lammps to - Makefile_lib.machine and Makefile_lib_lammps.machine in same dir - this can be used to preserve the machine Makefile and lib Makefiles -""" - - def check(self): - if len(self.inlist) != 1: error("-z args are invalid") - self.machine = self.inlist[0] - -# ---------------------------------------------------------------- -# lib classes, one per LAMMPS auxiliary lib -# ---------------------------------------------------------------- - -# ATC lib - -class ATC(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --atc make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-atc args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-atc args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-atc args are invalid") - - def build(self): - libdir = dir.lib + "/atc" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libatc.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/atc library") - else: print("Created lib/atc library") - -# AWPMD lib - -class AWPMD(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "mpicc" - self.lammpsflag = 0 - - def help(self): - return """ --awpmd make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = mpicc) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-awpmd args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-awpmd args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-awpmd args are invalid") - - def build(self): - libdir = dir.lib + "/awpmd" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libawpmd.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/awpmd library") - else: print("Created lib/awpmd library") - -# COLVARS lib - -class COLVARS(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --colvars make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-colvars args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-colvars args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-colvars args are invalid") - - def build(self): - libdir = dir.lib + "/colvars" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libcolvars.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/colvars library") - else: print("Created lib/colvars library") - -# CUDA lib - -class CUDA(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "double" - self.arch = "35" - - def help(self): - return """ --cuda mode=double arch=35 - all args are optional and can be in any order - mode = double or mixed or single (def = double) - arch = M (def = 35) - M = 31,35,37,etc for Kepler - M = 20 for CC2.0 (GF100/110, e.g. C2050,GTX580,GTX470) - M = 21 for CC2.1 (GF104/114, e.g. GTX560, GTX460, GTX450) - M = 13 for CC1.3 (GF200, e.g. C1060, GTX285) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-cuda args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-cuda args are invalid") - if words[0] == "mode": self.mode = words[1] - elif words[0] == "arch": self.arch = words[1] - else: error("-cuda args are invalid") - if self.mode != "double" and self.mode != "mixed" and \ - self.mode != "single": - error("-cuda args are invalid") - if not self.arch.isdigit(): error("-cuda args are invalid") - - def build(self): - libdir = dir.lib + "/cuda" - subprocess.check_output("cd %s; make clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - if self.mode == "double": n = 2 - elif self.mode == "mixed": n = 3 - elif self.mode == "single": n = 1 - if jmake: txt = "cd %s; make -j %d precision=%d arch=%s" % \ - (libdir,jmake.n,n,self.arch) - else: txt = "cd %s; make precision=%d arch=%s" % \ - (libdir,n,self.arch) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/liblammpscuda.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/cuda library") - else: print("Created lib/cuda library") - -# GPU lib - -class GPU(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "linux.double" - self.lammpsflag = self.modeflag = self.archflag = self.homeflag = 0 - - def help(self): - return """ --gpu make=suffix lammps=suffix2 mode=double arch=N home=path - all args are optional and can be in any order - make = use Makefile.suffix (def = linux.double) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) - mode = double or mixed or single (def = CUDA_PREC in makefile) - arch = 3x (x = digit for Kepler) or 2x (x = digit for Fermi) - (def = CUDA_ARCH in makefile) - home = path to Cuda, e.g. /usr/local/cuda (def = CUDA_HOME in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-gpu args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-gpu args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - elif words[0] == "mode": - self.mode = words[1] - self.modeflag = 1 - elif words[0] == "arch": - self.arch = words[1] - self.archflag = 1 - elif words[0] == "home": - self.home = words[1] - self.homeflag = 1 - else: error("-gpu args are invalid") - if self.modeflag and (self.mode != "double" and - self.mode != "mixed" and - self.mode != "single"): - error("-gpu args are invalid") - if self.archflag and not self.arch.isdigit(): - error("-gpu args are invalid") - - def build(self): - global gpubuildflag - gpubuildflag = 1 - libdir = dir.lib + "/gpu" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.modeflag: - if self.mode == "double": - make.setvar("CUDA_PRECISION","-D_DOUBLE_DOUBLE") - elif self.mode == "mixed": - make.setvar("CUDA_PRECISION","-D_SINGLE_DOUBLE") - elif self.mode == "single": - make.setvar("CUDA_PRECISION","-D_SINGLE_SINGLE") - if self.archflag: - make.setvar("CUDA_ARCH","-arch=sm_%s" % self.arch) - if self.homeflag: - make.setvar("CUDA_HOME",self.home) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - # special hack for shannon GPU cluster - # must use "srun make" if on it, else just make - # this is b/c Cuda libs are not all available on host - - make = "make" - if "shannon" == platform.node(): make = "srun make" - - subprocess.check_output("cd %s; %s -f Makefile.auto clean" % - (libdir,make),stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; %s -j %d -f Makefile.auto" % (libdir,make,jmake.n) - else: txt = "cd %s; %s -f Makefile.auto" % (libdir,make) - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libgpu.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/gpu library") - else: print("Created lib/gpu library") - -# H5MD lib - -class H5MD(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "h5cc" - self.lammpsflag = 0 - - def help(self): - return """ --h5md make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = h5cc) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-h5md args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-h5md args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-h5md args are invalid") - - def build(self): - libdir = dir.lib + "/h5md" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - txt = "cd %s; make" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libch5md.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/h5md library") - else: print("Created lib/h5md library") - -# MEAM lib - -class MEAM(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --meam make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-meam args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-meam args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-meam args are invalid") - - def build(self): - libdir = dir.lib + "/meam" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - # do not use -j for MEAM build, parallel build does not work - txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libmeam.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/meam library") - else: print("Created lib/meam library") - -# POEMS lib - -class POEMS(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --poems make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = g++) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-poems args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-poems args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-poems args are invalid") - - def build(self): - libdir = dir.lib + "/poems" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir, - stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libpoems.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/poems library") - else: print("Created lib/poems library") - -# PYTHON lib - -class PYTHON(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "g++" - self.lammpsflag = 0 - - def help(self): - return """ --python lammps=suffix - arg is optional, use Makefile.lammps if not specified - lammps = use Makefile.lammps.suffix -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-python args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-python args are invalid") - if words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-python args are invalid") - - def build(self): - libdir = dir.lib + "/python" - if self.lammpsflag: - subprocess.check_output("cd %s; cp Makefile.lammps.%s Makefile.lammps" % - (libdir,self.lammps)) - if not os.path.isfile("%s/Makefile.lammps.%s" % (libdir,self.lammps)): - error("Unsuccessful creation of lib/python/Makefile.lammps.%s file" % - self.lammps) - else: print("Created lib/python/Makefile.lammps file") - -# QMMM lib - -class QMMM(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --qmmm make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-qmmm args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-qmmm args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-qmmm args are invalid") - - def build(self): - libdir = dir.lib + "/qmmm" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - subprocess.check_output("cd %s; make -f Makefile.auto clean" % - libdir,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libqmmm.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/qmmm library") - else: print("Created lib/qmmm library") - -# REAX lib - -class REAX(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.make = "gfortran" - self.lammpsflag = 0 - - def help(self): - return """ --reax make=suffix lammps=suffix2 - all args are optional and can be in any order - make = use Makefile.suffix (def = gfortran) - lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-reax args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-reax args are invalid") - if words[0] == "make": self.make = words[1] - elif words[0] == "lammps": - self.lammps = words[1] - self.lammpsflag = 1 - else: error("-reax args are invalid") - - def build(self): - libdir = dir.lib + "/reax" - make = MakeReader("%s/Makefile.%s" % (libdir,self.make)) - if self.lammpsflag: - make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) - make.write("%s/Makefile.auto" % libdir) - - cmd = "cd %s; make -f Makefile.auto clean" % libdir - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: txt = "cd %s; make -f Makefile.auto" % libdir - - # if verbose, print output as build proceeds, else only print if fails - - if verbose: subprocess.call(txt,shell=True) - else: - try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - except subprocess.CalledProcessError as e: print(e.output) - - if not os.path.isfile("%s/libreax.a" % libdir) or \ - not os.path.isfile("%s/Makefile.lammps" % libdir): - error("Unsuccessful build of lib/reax library") - else: print("Created lib/reax library") - -# VORONOI lib - -class VORONOI(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.install = "" - - def help(self): - return """ --voronoi install="-d dir -v version -g -b -i installdir -l incdir libdir" - arg is optional, only needed if want to run install.py script - install = args to use with lib/voronoi/install.py script - must enclose in quotes since install.py args have switches - install.py can download, build, install, setup links to the Voro++ library - see lib/voronoi/README for details on Voro++ and using install.py -""" - - def check(self): - if self.inlist != None and len(self.inlist) == 0: - error("-voronoi args are invalid") - for one in self.inlist: - words = one.split('=') - if len(words) != 2: error("-voronoi args are invalid") - if words[0] == "install": self.install = words[1] - else: error("-voronoi args are invalid") - - def build(self): - if not self.install: return - libdir = dir.lib + "/voronoi" - cmd = "cd %s; python install.py %s" % (libdir,self.install) - txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT, - shell=True).decode() - if verbose: print(txt) - print("Created lib/voronoi library") - -# ---------------------------------------------------------------- -# build classes for intel, kokkos build options -# ---------------------------------------------------------------- - -# Intel class - -class Intel(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "cpu" - - def help(self): - return """ --intel mode - mode = cpu or phi (def = cpu) - build Intel package for CPU or Xeon Phi -""" - - def check(self): - if self.inlist == None: return - if len(self.inlist) != 1: error("-intel args are invalid") - self.mode = self.inlist[0] - if self.mode != "cpu" and self.mode != "phi": - error("-intel args are invalid") - -# Kokkos class - -class Kokkos(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.mode = "" - self.archgpu = None - self.archcpu = None - - def help(self): - return """ --kokkos mode archgpu=N archcpu=SNB - mode is not optional, arch is optional - mode = omp or cuda or phi (def = KOKKOS_DEVICES setting in Makefile ) - build Kokkos package for omp or cuda or phi - sets KOKKOS_DEVICES to "OpenMP" (omp, phi) or "Cuda, OpenMP" (cuda) - archgpu = number like 35 (Kepler) or 21 (Fermi) (def = none) - sets KOKKOS_ARCH for GPU to appropriate value - archcpu = SNB or HSW or BGQ or Power7 or Power8 (def = none) - for CPU = SandyBridge, Haswell, BGQ, Power7, Power8 - sets KOKKOS_ARCH for GPU to appropriate value -""" - - def check(self): - print(self.inlist) - if self.inlist != None and len(self.inlist) == 0: - error("-kokkos args are invalid") - - if self.inlist == None: return - if len(self.inlist) < 1: error("-kokkos args are invalid") - self.mode = self.inlist[0] - if self.mode != "omp" and self.mode != "cuda" and self.mode != "phi": - error("-kokkos args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-kokkos args are invalid") - if words[0] == "archgpu": self.archgpu = words[1] - elif words[0] == "archcpu": self.archcpu = words[1] - else: error("-kokkos args are invalid") - -# ---------------------------------------------------------------- -# makefile classes for CC, FLAGS, MPI, JPG, PNG, FFT settings -# ---------------------------------------------------------------- - -# Cc class - -class Cc(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.compiler = self.abbrev = "" - self.wrap = "" - self.parent = "" - - def help(self): - return """ --cc compiler wrap=wcompiler,parent - alter CC setting in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - compiler is required, all other args are optional - compiler = any string with g++ or icc or icpc - or mpi (or mpicxx, mpiCC, mpiicpc, etc) - can be compiler name or full path to compiler - mpi by itself is changed to mpicxx - wcompiler = compiler for mpi wrapper to use - use nvcc for building for Kokkos/cuda with provided nvcc_wrapper - parent = openmpi or mpich - parent style determines syntax for setting low-level compiler -""" - - def check(self): - if len(self.inlist) < 1: error("-cc args are invalid") - self.compiler = self.inlist[0] - if self.compiler == "mpi": - self.compiler = "mpicxx" - self.abbrev = "mpi" - elif self.compiler.startswith("mpi"): - self.abbrev = "mpi" - elif self.compiler == "g++" or self.compiler == "icc" or \ - self.compiler == "icpc": - self.abbrev = self.compiler - elif "mpi" in self.compiler: self.abbrev = "mpi" - elif "g++" in self.compiler: self.abbrev = "g++" - elif "icc" in self.compiler: self.abbrev = "icc" - elif "icpc" in self.compiler: self.abbrev = "icpc" - else: error("-cc args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-cc args are invalid") - args = words[1].split(',') - if len(args) != 2: error("-cc args are invalid") - if words[0] == "wrap": - if self.abbrev != "mpi": error("-cc compiler is not a wrapper") - self.wrap = args[0] - self.parent = args[1] - else: error("-cc args are invalid") - -# Flags class - -class Flags(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.flags = [] - - def help(self): - return """ --flags var action N f1 f2 ... var action N f1 f2 ... - alter variable settings (flags) in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - var = CCFLAGS, LINKFLAGS, LIB, etc - any variable in Makefile.auto, must already exist - action = add or del - N = # of flags to follow - f1,f2,etc = flag to add or delete - "-" char will be prepended to each flag - for example: add 4 g O3 xHost "fp-model fast=2" - will add: -g -O3 -xHost -fp-model fast=2 - for add: if flag already exists, no change is made - for delete: flag of form "-O*", will delete any wildcard match - for -O,-O2,-O3,etc: existing -O* will first be removed -""" - - def check(self): - if len(self.inlist) < 1: error("-flags args are invalid") - narg = len(self.inlist) - i = 0 - while i < narg: - if i+3 > narg: error("-flags args are invalid") - var = self.inlist[i] - action = self.inlist[i+1] - if action != "add" and action != "del": error("-flags args are invalid") - nflag = int(self.inlist[i+2]) - i += 3 - if i+nflag > narg: error("-flags args are invalid") - flags = self.inlist[i:i+nflag] - self.flags.append([var,action,flags]) - i += nflag - -# Mpi class - -class Mpi(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.style = self.dir = "" - - def help(self): - return """ --mpi style dir=path - alter MPI settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - style is required, all other args are optional - style = mpi or mpich or ompi or serial - mpi = no MPI settings (assume compiler is MPI wrapper) - mpich = use explicit settings for MPICH - ompi = use explicit settings for OpenMPI - serial = use settings for src/STUBS library - dir = path for MPICH or OpenMPI directory - add -I and -L settings for include and lib sub-dirs -""" - - def check(self): - if len(self.inlist) < 1: error("-mpi args are invalid") - self.style = self.inlist[0] - if self.style != "mpi" and self.style != "mpich" and \ - self.style != "ompi" and self.style != "serial": - error("-mpi args are invalid") - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-mpi args are invalid") - if words[0] == "dir": self.dir = words[1] - else: error("-mpi args are invalid") - -# Fft class - -class Fft(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --fft mode lib=libname dir=homedir idir=incdir ldir=libdir - alter FFT settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - mode is required, all other args are optional - first removes all current FFT variable settings - mode = none or fftw or fftw3 or ... - adds -DFFT_MODE setting - lib = name of FFT library to link with (def is libname = mode) - adds -llib{libname} setting, e.g. -llibfftw3 - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - if not len(self.inlist): error("-fft args are invalid") - self.mode = self.inlist[0] - self.lib = "-l%s" % self.mode - for one in self.inlist[1:]: - words = one.split('=') - if len(words) != 2: error("-fft args are invalid") - if words[0] == "lib": self.lib = "-l%s" % words[1] - elif words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-fft args are invalid") - -# Jpg class - -class Jpg(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.on = 1 - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --jpg flag dir=homedir idir=incdir ldir=libdir - alter JPG settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - change JPG settings in makefile - all args are optional, flag must come first if specified - flag = yes or no (def = yes) - include or exclude JPEG support - adds/removes -DLAMMPS_JPEG and -ljpeg settings - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - for i,one in enumerate(self.inlist): - if one == "no" and i == 0: self.on = 0 - elif one == "yes" and i == 0: self.on = 1 - else: - words = one.split('=') - if len(words) != 2: error("-jpeg args are invalid") - if words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-jpeg args are invalid") - -# Png class - -class Png(object): - def __init__(self,list): - self.inlist = copy.copy(list) - self.on = 1 - self.dir = self.incdir = self.libdir = "" - - def help(self): - return """ --png flag dir=homedir idir=incdir ldir=libdir - alter PNG settings in Makefile.auto - only happens if new Makefile.auto is created by use of "file" action - all args are optional, flag must come first if specified - flag = yes or no (def = yes) - include or exclude PNG support - adds/removes -DLAMMPS_PNG and -lpng settings - dir = home dir for include and library files (def = none) - adds -Idir/include and -Ldir/lib settings - if set, overrides idir and ldir args - idir = dir for include file (def = none) - adds -Iidir setting - ldir = dir for library file (def = none) - adds -Lldir setting -""" - - def check(self): - for i,one in enumerate(self.inlist): - if one == "no" and i == 0: self.on = 0 - elif one == "yes" and i == 0: self.on = 1 - else: - words = one.split('=') - if len(words) != 2: error("-png args are invalid") - if words[0] == "dir": self.dir = words[1] - elif words[0] == "idir": self.incdir = words[1] - elif words[0] == "ldir": self.libdir = words[1] - else: error("-png args are invalid") - -# ---------------------------------------------------------------- -# auxiliary classes -# ---------------------------------------------------------------- - -# read, tweak, and write a Makefile - -class MakeReader(object): - - # read a makefile - # flag = 0 if file is full path name - # flag = 1,2 if file is suffix for any Makefile.machine under src/MAKE - # look for this file in same order that src/Makefile does - # if flag = 1, read the file - # if flag = 2, just check if file exists - - def __init__(self,file,flag=0): - if flag == 0: - if not os.path.isfile(file): error("Makefile %s does not exist" % file) - lines = open(file,'r').readlines() - else: - mfile = "%s/MAKE/MINE/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/OPTIONS/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - mfile = "%s/MAKE/MACHINES/Makefile.%s" % (dir.src,file) - if not os.path.isfile(mfile): - error("Makefile.%s does not exist" % file) - if flag == 1: lines = open(mfile,'r').readlines() - else: return - - # scan lines of makefile - # if not a variable line, just copy to newlines - # if a variable line, concatenate any continuation lines - # convert variable to var dict entry: key = name, value = list of words - # discard any portion of value string with a comment char - # varinfo = list of variable info: (name, name with whitespace for print) - # add index into varinfo to newlines - # ccindex = index of "CC =" line, to add OMPI var before it - # lmpindex = index of "LAMMPS-specific settings" - # line to add KOKKOS vars before it - - var = {} - varinfo = [] - newlines = [] - pattern = "(\S+\s+=\s+)(.*)" - conditional = 0 - multiline = 0 - self.ccindex = self.lmpindex = 0 - - for line in lines: - line = line[:-1] - if "CC =" in line: self.ccindex = len(newlines) - if "LAMMPS-specific settings" in line: self.lmpindex = len(newlines) - if "ifeq" in line: - conditional = 1 - continue - if conditional: - if "endif" in line: - conditional = 0 - continue - if multiline: - if '#' in line: line = line[:line.find('#')] - morevalues = line.split() - values = values[:-1] + morevalues - if values[-1] != '\\': - var[name] = values - multiline = 0 - newlines.append(str(len(varinfo))) - varinfo.append((name,namewhite)) - continue - varflag = 1 - if len(line.strip()) == 0: varflag = 0 - elif line.lstrip()[0] == '#': varflag = 0 - else: - m = re.match(pattern,line) - if not m: varflag = 0 - if varflag: - namewhite = m.group(1) - name = namewhite.split()[0] - if name in var: - error("Makefile variable %s appears more than once" % name) - remainder = m.group(2) - if '#' in remainder: remainder = remainder[:remainder.find('#')] - values = remainder.split() - if values and values[-1] == '\\': multiline = 1 - else: - var[name] = values - newlines.append(str(len(varinfo))) - varinfo.append((name,namewhite)) - else: - newlines.append(line) - - self.var = var - self.varinfo = varinfo - self.lines = newlines - - # return list of values associated with var - # return None if var not defined - - def getvar(self,var): - if var in self.var: return self.var[var] - else: return None - - # set var to single value - # if var not defined, error - - def setvar(self,var,value): - if var not in self.var: error("Variable %s not in makefile" % var) - self.var[var] = [value] - - # add value to var - # do not add if value already defined by var - # if var not defined, - # create new variable using "where" - # where="cc", line before "CC =" line, use ":=" - # where="lmp", 2 lines before "LAMMPS-specific settings" line, use "=" - - def addvar(self,var,value,where=""): - if var in self.var: - if value not in self.var[var]: self.var[var].append(value) - else: - if not where: - error("Variable %s with value %s is not in makefile" % (var,value)) - if where == "cc": - if not self.ccindex: error("No 'CC =' line in makefile to add variable") - index = self.ccindex - varwhite = "%s :=\t\t" % var - elif where == "lmp": - if not self.lmpindex: error("No 'LAMMPS-specific settings line' " + - "in makefile to add variable") - index = self.lmpindex - 2 - varwhite = "%s =\t\t" % var - self.var[var] = [value] - varwhite = "%s =\t\t" % var - self.lines.insert(index,str(len(self.varinfo))) - self.varinfo.append((var,varwhite)) - - # if value = None, remove entire var - # no need to update lines or varinfo, write() will ignore deleted vars - # else remove value from var - # value can have trailing '*' to remove wildcard match - # if var or value not defined, ignore it - - def delvar(self,var,value=None): - #if var == "KOKKOS_DEVICES": - # print self.var,value - if var not in self.var: return - if not value: - del self.var[var] - #print "AGAIN",self.var - elif value and value[-1] != '*': - if value not in self.var[var]: return - self.var[var].remove(value) - else: - value = value[:-1] - values = self.var[var] - dellist = [] - for i,one in enumerate(values): - if one.startswith(value): dellist.append(i) - while dellist: values.pop(dellist.pop()) - self.var[var] = values - - # write stored makefile lines to file, using vars that may have been updated - # do not write var if not in dict, since has been deleted - # wrap var values into multiple lines if needed - # file = 1 if this is Makefile.auto, change 1st line to use "auto" - - def write(self,file,flag=0): - fp = open(file,'w') - for i,line in enumerate(self.lines): - if not line.isdigit(): - if flag and i == 0: - line = "# auto = makefile auto-generated by Make.py" - print(line, file=fp) - else: - index = int(line) - name = self.varinfo[index][0] - txt = self.varinfo[index][1] - if name not in self.var: continue - values = self.var[name] - print("%s%s" % (txt,' '.join(values)), file=fp) - -# ---------------------------------------------------------------- -# main program -# ---------------------------------------------------------------- - -# parse command-line args -# switches dict: key = switch letter, value = list of args -# switch_order = list of switches in order -# will possibly be merged with redo file args below - -cmd_switches,cmd_switch_order = parse_args(sys.argv[1:]) - -if "v" in cmd_switches: - # debug - #print "Command-line parsing:" - #for switch in cmd_switch_order: - # print " %s: %s" % (switch,' '.join(cmd_switches[switch])) - pass - -# check for redo switch, process redo file -# redolist = list of commands to execute - -redoflag = 0 -redolist = [] - -if 'r' in cmd_switches and 'h' not in cmd_switches: - redoflag = 1 - redo = Redo(cmd_switches['r']) - redo.check() - redo.setup() - redolist = redo.commands - redoindex = 0 - del redo - if not redolist: error("No commands to execute from redo file") - -# loop over Make.py commands -# if no redo switch, loop once for command-line command -# if redo, loop over one or more commands from redo file - -while 1: - - # if redo: - # parse next command from redo file - # use command-line switches to add/replace file command switches - # do not add -r, since already processed - # and don't want -r swtich to appear in Make.py.last file - # if -a in both: concatenate, de-dup, - # specified exe/machine action replaces file exe/machine action - # print resulting new command - # else just use command-line switches - - if redoflag: - if redoindex == len(redolist): break - args = redolist[redoindex].split() - switches,switch_order = parse_args(args) - redoindex += 1 - - for switch in cmd_switches: - if switch == 'r': continue - if switch == 'a' and switch in switches: - tmp = Actions(cmd_switches[switch] + switches[switch]) - tmp.dedup() - switches[switch] = tmp.inlist - continue - if switch not in switches: switch_order.append(switch) - switches[switch] = cmd_switches[switch] - - argstr = switch2str(switches,switch_order) - print("Redo command: Make.py",argstr) - else: - switches = cmd_switches - switch_order = cmd_switch_order - - # initialize all class variables to None - - for one in switchclasses: exec("%s = None" % one) - for one in libclasses: exec("%s = None" % one) - for one in buildclasses: exec("%s = None" % one) - for one in makeclasses: exec("%s = None" % one) - - # classes = dictionary of created classes - # key = switch, value = class instance - - classes = {} - for switch in switches: - if len(switch) == 1 and switch in abbrevs: - i = abbrevs.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (switchclasses[i],switch,switchclasses[i].capitalize(),switch) - exec(txt) - elif switch in libclasses: - i = libclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (libclasses[i],switch,libclasses[i].upper(),switch) - exec(txt) - elif switch in buildclasses: - i = buildclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (buildclasses[i],switch,buildclasses[i].capitalize(),switch) - exec(txt) - elif switch in makeclasses: - i = makeclasses.index(switch) - txt = '%s = classes["%s"] = %s(switches["%s"])' % \ - (makeclasses[i],switch,makeclasses[i].capitalize(),switch) - exec(txt) - else: error("Unknown command-line switch -%s" % switch) - - # print help messages and exit - - if help or (actions and "-h" in actions.inlist) or not switches: - if not help: help = Help(None) - print(help.help()) - for switch in switch_order: - if switch == "h": continue - print(classes[switch].help()[1:]) - sys.exit() - - # create needed default classes if not specified with switch - # dir and packages plus lib and build classes so defaults are set - - if not dir: dir = Dir(None) - if not packages: packages = Packages(None) - - for one in libclasses: - txt = "if not %s: %s = %s(None)" % (one,one,one.upper()) - exec(txt) - - for one in buildclasses: - txt = "if not %s: %s = %s(None)" % (one,one,one.capitalize()) - exec(txt) - - # error check on args for all classes - - for switch in classes: classes[switch].check() - - # prep for action - # actions.setup() detects if last action = machine - # if yes, induce addition of "-m" and "-o" switches - - dir.setup() - packages.setup() - - if actions: - machine = actions.setup() - if machine: - switches['a'][-1] = "exe" - if 'm' not in switches: - switches['m'] = [machine] - switch_order.insert(-1,'m') - makefile = classes['m'] = Makefile(switches['m']) - makefile.check() - if 'o' not in switches: - switches['o'] = [machine] - switch_order.insert(-1,'o') - output = classes['o'] = Output(switches['o']) - output.check() - - # perform actions - - packages.install() - - if actions: - for action in actions.alist: - print("Action %s ..." % action) - if action.startswith("lib-"): actions.lib(action[4:]) - elif action == "file": actions.file("file") - elif action == "clean": actions.clean() - elif action == "exe": actions.exe() - - packages.uninstall() - - # create copy of executable if requested, and exe action performed - - if output and actions and "exe" in actions.alist: - txt = "cp %s/lmp_auto %s/lmp_%s" % (dir.src,dir.cwd,output.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created lmp_%s in %s" % (output.machine,dir.cwd)) - - # create copy of Makefile.auto if requested, and file or exe action performed - # ditto for library Makefile.auto and Makefile.lammps files - - if zoutput and actions and \ - ("file" in actions.alist or "exe" in actions.alist): - txt = "cp %s/MAKE/MINE/Makefile.auto %s/MAKE/MINE/Makefile.%s" % \ - (dir.src,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile.%s in %s/MAKE/MINE" % (zoutput.machine,dir.src)) - if gpubuildflag: - txt = "cp %s/gpu/Makefile.auto %s/MAKE/MINE/Makefile_gpu.%s" % \ - (dir.lib,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile_gpu.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src)) - txt = "cp %s/gpu/Makefile.lammps %s/MAKE/MINE/Makefile_gpu_lammps.%s" % \ - (dir.lib,dir.src,zoutput.machine) - subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) - print("Created Makefile_gpu_lammps.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src)) - - # write current Make.py command to src/Make.py.last - - fp = open("%s/Make.py.last" % dir.src,'w') - print("# last invoked Make.py command", file=fp) - print(switch2str(switches,switch_order), file=fp) - fp.close() - - # if not redoflag, done - - if not redoflag: break From 49e6c2eb7d4a2a04f590b866e7fbb9e2c9cfe8cc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 13:14:03 -0400 Subject: [PATCH 04/11] remove references to Make.py from the manual and instead refer to section 4 --- doc/src/Section_accelerate.txt | 4 ++-- doc/src/accelerate_gpu.txt | 9 ++------- doc/src/accelerate_intel.txt | 11 ++++------- doc/src/accelerate_kokkos.txt | 15 ++++++--------- doc/src/accelerate_omp.txt | 10 +++------- doc/src/accelerate_opt.txt | 8 ++------ 6 files changed, 19 insertions(+), 38 deletions(-) diff --git a/doc/src/Section_accelerate.txt b/doc/src/Section_accelerate.txt index 8812358886..bb0c93b8aa 100644 --- a/doc/src/Section_accelerate.txt +++ b/doc/src/Section_accelerate.txt @@ -233,8 +233,8 @@ set any needed options for the package via "-pk" "command-line switch"_Section_s use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_6 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu :tb(c=2,s=|) -Note that the first 4 steps can be done as a single command, using the -src/Make.py tool. This tool is discussed in "Section +Note that the first 4 steps can be done as a single command with +suitable make command invocations. This is discussed in "Section 4"_Section_packages.html of the manual, and its use is illustrated in the individual accelerator sections. Typically these steps only need to be done once, to create an executable that uses one diff --git a/doc/src/accelerate_gpu.txt b/doc/src/accelerate_gpu.txt index 68e9fa477a..2723b6e971 100644 --- a/doc/src/accelerate_gpu.txt +++ b/doc/src/accelerate_gpu.txt @@ -74,13 +74,8 @@ Run lammps/lib/gpu/nvc_get_devices (after building the GPU library, see below) t This requires two steps (a,b): build the GPU library, then build LAMMPS with the GPU package. -You can do both these steps in one line, using the src/Make.py script, -described in "Section 4"_Section_packages.html of the manual. -Type "Make.py -h" for help. If run from the src directory, this -command will create src/lmp_gpu using src/MAKE/Makefile.mpi as the -starting Makefile.machine: - -Make.py -p gpu -gpu mode=single arch=31 -o gpu -a lib-gpu file mpi :pre +You can do both these steps in one line as described in +"Section 4"_Section_packages.html of the manual. Or you can follow these two (a,b) steps: diff --git a/doc/src/accelerate_intel.txt b/doc/src/accelerate_intel.txt index 74ae9d9a42..9eb295e0d0 100644 --- a/doc/src/accelerate_intel.txt +++ b/doc/src/accelerate_intel.txt @@ -225,11 +225,9 @@ source /opt/intel/parallel_studio_xe_2016.3.067/psxevars.sh # or psxevars.csh for C-shell make intel_cpu_intelmpi :pre -Alternatively, the build can be accomplished with the src/Make.py -script, described in "Section 4"_Section_packages.html of the -manual. Type "Make.py -h" for help. For an example: - -Make.py -v -p intel omp -intel cpu -a file intel_cpu_intelmpi :pre +Alternatively this can be done as a single command with +suitable make command invocations. This is discussed in "Section +4"_Section_packages.html of the manual. Note that if you build with support for a Phi coprocessor, the same binary can be used on nodes with or without coprocessors installed. @@ -244,8 +242,7 @@ highly recommended for CCFLAGS and LINKFLAGS. LIB should include is required for CCFLAGS and "-qoffload" is required for LINKFLAGS. Other recommended CCFLAG options for best performance are "-O2 -fno-alias -ansi-alias -qoverride-limits fp-model fast=2 --no-prec-div". The Make.py command will add all of these -automatically. +-no-prec-div". NOTE: The vectorization and math capabilities can differ depending on the CPU. For Intel compilers, the "-x" flag specifies the type of diff --git a/doc/src/accelerate_kokkos.txt b/doc/src/accelerate_kokkos.txt index 6ccd695841..712a05300c 100644 --- a/doc/src/accelerate_kokkos.txt +++ b/doc/src/accelerate_kokkos.txt @@ -60,8 +60,7 @@ More details follow. use a C++11 compatible compiler make yes-kokkos make mpi KOKKOS_DEVICES=OpenMP # build with the KOKKOS package -make kokkos_omp # or Makefile.kokkos_omp already has variable set -Make.py -v -p kokkos -kokkos omp -o mpi -a file mpi # or one-line build via Make.py :pre +make kokkos_omp # or Makefile.kokkos_omp already has variable set :pre mpirun -np 16 lmp_mpi -k on -sf kk -in in.lj # 1 node, 16 MPI tasks/node, no threads mpirun -np 2 -ppn 1 lmp_mpi -k on t 16 -sf kk -in in.lj # 2 nodes, 1 MPI task/node, 16 threads/task @@ -82,8 +81,7 @@ use a C++11 compatible compiler KOKKOS_DEVICES = Cuda, OpenMP KOKKOS_ARCH = Kepler35 make yes-kokkos -make machine -Make.py -p kokkos -kokkos cuda arch=31 -o kokkos_cuda -a file kokkos_cuda :pre +make machine :pre mpirun -np 1 lmp_cuda -k on t 6 -sf kk -in in.lj # one MPI task, 6 threads on CPU mpirun -np 4 -ppn 1 lmp_cuda -k on t 6 -sf kk -in in.lj # ditto on 4 nodes :pre @@ -98,8 +96,7 @@ use a C++11 compatible compiler KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = KNC make yes-kokkos -make machine -Make.py -p kokkos -kokkos phi -o kokkos_phi -a file mpi :pre +make machine :pre host=MIC, Intel Phi with 61 cores (240 threads/phi via 4x hardware threading): mpirun -np 1 lmp_g++ -k on t 240 -sf kk -in in.lj # 1 MPI task on 1 Phi, 1*240 = 240 @@ -135,9 +132,9 @@ mode like the USER-INTEL package supports. You must choose at build time whether to build for CPUs (OpenMP), GPUs, or Phi. -You can do any of these in one line, using the src/Make.py script, -described in "Section 4"_Section_packages.html of the manual. -Type "Make.py -h" for help. If run from the src directory, these +You can do any of these in one line, using the suitable make command +line flags as described in "Section 4"_Section_packages.html of the +manual. If run from the src directory, these commands will create src/lmp_kokkos_omp, lmp_kokkos_cuda, and lmp_kokkos_phi. Note that the OMP and PHI options use src/MAKE/Makefile.mpi as the starting Makefile.machine. The CUDA diff --git a/doc/src/accelerate_omp.txt b/doc/src/accelerate_omp.txt index 81b7a5adc2..fa7bef1a52 100644 --- a/doc/src/accelerate_omp.txt +++ b/doc/src/accelerate_omp.txt @@ -23,8 +23,7 @@ one or more 16-core nodes. More details follow. use -fopenmp with CCFLAGS and LINKFLAGS in Makefile.machine make yes-user-omp make mpi # build with USER-OMP package, if settings added to Makefile.mpi -make omp # or Makefile.omp already has settings -Make.py -v -p omp -o mpi -a file mpi # or one-line build via Make.py :pre +make omp # or Makefile.omp already has settings :pre lmp_mpi -sf omp -pk omp 16 < in.script # 1 MPI task, 16 threads mpirun -np 4 lmp_mpi -sf omp -pk omp 4 -in in.script # 4 MPI tasks, 4 threads/task @@ -40,14 +39,11 @@ each MPI task running on a CPU. The lines above illustrate how to include/build with the USER-OMP package in two steps, using the "make" command. Or how to do it with -one command via the src/Make.py script, described in "Section -4"_Section_packages.html of the manual. Type "Make.py -h" for -help. +one command as described in "Section 4"_Section_packages.html of the manual. Note that the CCFLAGS and LINKFLAGS settings in Makefile.machine must include "-fopenmp". Likewise, if you use an Intel compiler, the -CCFLAGS setting must include "-restrict". The Make.py command will -add these automatically. +CCFLAGS setting must include "-restrict". [Run with the USER-OMP package from the command line:] diff --git a/doc/src/accelerate_opt.txt b/doc/src/accelerate_opt.txt index 5a2a5eac0a..845264b522 100644 --- a/doc/src/accelerate_opt.txt +++ b/doc/src/accelerate_opt.txt @@ -21,8 +21,7 @@ Here is a quick overview of how to use the OPT package. More details follow. make yes-opt -make mpi # build with the OPT package -Make.py -v -p opt -o mpi -a file mpi # or one-line build via Make.py :pre +make mpi # build with the OPT package :pre lmp_mpi -sf opt -in in.script # run in serial mpirun -np 4 lmp_mpi -sf opt -in in.script # run in parallel :pre @@ -35,13 +34,10 @@ None. The lines above illustrate how to build LAMMPS with the OPT package in two steps, using the "make" command. Or how to do it with one command -via the src/Make.py script, described in "Section -4"_Section_packages.html of the manual. Type "Make.py -h" for -help. +as described in "Section 4"_Section_packages.html of the manual. Note that if you use an Intel compiler to build with the OPT package, the CCFLAGS setting in your Makefile.machine must include "-restrict". -The Make.py command will add this automatically. [Run with the OPT package from the command line:] From 49b4cf9a770cd407ff8c32426c537998bf9f1eb6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 13:24:32 -0400 Subject: [PATCH 05/11] remove references to Make.py and USER-CUDA --- bench/FERMI/README | 66 ++++---------------------------------- bench/README | 46 +++++++++----------------- examples/README | 11 +------ examples/accelerate/README | 64 ++++-------------------------------- 4 files changed, 29 insertions(+), 158 deletions(-) diff --git a/bench/FERMI/README b/bench/FERMI/README index db3f527bdc..b66e560775 100644 --- a/bench/FERMI/README +++ b/bench/FERMI/README @@ -1,55 +1,21 @@ These are input scripts used to run versions of several of the -benchmarks in the top-level bench directory using the GPU and -USER-CUDA accelerator packages. The results of running these scripts -on two different machines (a desktop with 2 Tesla GPUs and the ORNL -Titan supercomputer) are shown on the "GPU (Fermi)" section of the -Benchmark page of the LAMMPS WWW site: lammps.sandia.gov/bench. +benchmarks in the top-level bench directory using the GPU accelerator +package. The results of running these scripts on two different machines +(a desktop with 2 Tesla GPUs and the ORNL Titan supercomputer) are shown +on the "GPU (Fermi)" section of the Benchmark page of the LAMMPS WWW +site: lammps.sandia.gov/bench. Examples are shown below of how to run these scripts. This assumes -you have built 3 executables with both the GPU and USER-CUDA packages +you have built 3 executables with the GPU package installed, e.g. lmp_linux_single lmp_linux_mixed lmp_linux_double -The precision (single, mixed, double) refers to the GPU and USER-CUDA -package precision. See the README files in the lib/gpu and lib/cuda -directories for instructions on how to build the packages with -different precisions. The GPU and USER-CUDA sub-sections of the -doc/Section_accelerate.html file also describes this process. - -Make.py -d ~/lammps -j 16 -p #all orig -m linux -o cpu -a exe -Make.py -d ~/lammps -j 16 -p #all opt orig -m linux -o opt -a exe -Make.py -d ~/lammps -j 16 -p #all omp orig -m linux -o omp -a exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=double arch=20 -o gpu_double -a libs exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=mixed arch=20 -o gpu_mixed -a libs exe -Make.py -d ~/lammps -j 16 -p #all gpu orig -m linux \ - -gpu mode=single arch=20 -o gpu_single -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=double arch=20 -o cuda_double -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=mixed arch=20 -o cuda_mixed -a libs exe -Make.py -d ~/lammps -j 16 -p #all cuda orig -m linux \ - -cuda mode=single arch=20 -o cuda_single -a libs exe -Make.py -d ~/lammps -j 16 -p #all intel orig -m linux -o intel_cpu -a exe -Make.py -d ~/lammps -j 16 -p #all kokkos orig -m linux -o kokkos_omp -a exe -Make.py -d ~/lammps -j 16 -p #all kokkos orig -kokkos cuda arch=20 \ - -m cuda -o kokkos_cuda -a exe - -Make.py -d ~/lammps -j 16 -p #all opt omp gpu cuda intel kokkos orig \ - -gpu mode=double arch=20 -cuda mode=double arch=20 -m linux \ - -o all -a libs exe - -Make.py -d ~/lammps -j 16 -p #all opt omp gpu cuda intel kokkos orig \ - -kokkos cuda arch=20 -gpu mode=double arch=20 \ - -cuda mode=double arch=20 -m cuda -o all_cuda -a libs exe - ------------------------------------------------------------------------ -To run on just CPUs (without using the GPU or USER-CUDA styles), +To run on just CPUs (without using the GPU styles), do something like the following: mpirun -np 1 lmp_linux_double -v x 8 -v y 8 -v z 8 -v t 100 < in.lj @@ -81,23 +47,5 @@ node via a "-ppn" setting. ------------------------------------------------------------------------ -To run with the USER-CUDA package, do something like the following: - -mpirun -np 1 lmp_linux_single -c on -sf cuda -v x 16 -v y 16 -v z 16 -v t 100 < in.lj -mpirun -np 2 lmp_linux_double -c on -sf cuda -pk cuda 2 -v x 32 -v y 64 -v z 64 -v t 100 < in.eam - -The "xyz" settings determine the problem size. The "t" setting -determines the number of timesteps. The "np" setting determines how -many MPI tasks (per node) the problem will run on. The numeric -argument to the "-pk" setting is the number of GPUs (per node); 1 GPU -is the default. Note that the number of MPI tasks must equal the -number of GPUs (both per node) with the USER-CUDA package. - -These mpirun commands run on a single node. To run on multiple nodes, -scale up the "-np" setting, and control the number of MPI tasks per -node via a "-ppn" setting. - ------------------------------------------------------------------------- - If the script has "titan" in its name, it was run on the Titan supercomputer at ORNL. diff --git a/bench/README b/bench/README index 85d71cbb5d..0806fcded6 100644 --- a/bench/README +++ b/bench/README @@ -71,49 +71,33 @@ integration ---------------------------------------------------------------------- -Here is a src/Make.py command which will perform a parallel build of a -LAMMPS executable "lmp_mpi" with all the packages needed by all the -examples. This assumes you have an MPI installed on your machine so -that "mpicxx" can be used as the wrapper compiler. It also assumes -you have an Intel compiler to use as the base compiler. You can leave -off the "-cc mpi wrap=icc" switch if that is not the case. You can -also leave off the "-fft fftw3" switch if you do not have the FFTW -(v3) installed as an FFT package, in which case the default KISS FFT -library will be used. - -cd src -Make.py -j 16 -p none molecule manybody kspace granular rigid orig \ - -cc mpi wrap=icc -fft fftw3 -a file mpi - ----------------------------------------------------------------------- - Here is how to run each problem, assuming the LAMMPS executable is named lmp_mpi, and you are using the mpirun command to launch parallel runs: Serial (one processor runs): -lmp_mpi < in.lj -lmp_mpi < in.chain -lmp_mpi < in.eam -lmp_mpi < in.chute -lmp_mpi < in.rhodo +lmp_mpi -in in.lj +lmp_mpi -in in.chain +lmp_mpi -in in.eam +lmp_mpi -in in.chute +lmp_mpi -in in.rhodo Parallel fixed-size runs (on 8 procs in this case): -mpirun -np 8 lmp_mpi < in.lj -mpirun -np 8 lmp_mpi < in.chain -mpirun -np 8 lmp_mpi < in.eam -mpirun -np 8 lmp_mpi < in.chute -mpirun -np 8 lmp_mpi < in.rhodo +mpirun -np 8 lmp_mpi -in in.lj +mpirun -np 8 lmp_mpi -in in.chain +mpirun -np 8 lmp_mpi -in in.eam +mpirun -np 8 lmp_mpi -in in.chute +mpirun -np 8 lmp_mpi -in in.rhodo Parallel scaled-size runs (on 16 procs in this case): -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.lj -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.chain.scaled -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.eam -mpirun -np 16 lmp_mpi -var x 4 -var y 4 < in.chute.scaled -mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 < in.rhodo.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.lj +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.chain.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.eam +mpirun -np 16 lmp_mpi -var x 4 -var y 4 -in in.chute.scaled +mpirun -np 16 lmp_mpi -var x 2 -var y 2 -var z 4 -in in.rhodo.scaled For each of the scaled-size runs you must set 3 variables as -var command line switches. The variables x,y,z are used in the input diff --git a/examples/README b/examples/README index 0ec28aa2c2..dc622ef7c4 100644 --- a/examples/README +++ b/examples/README @@ -106,20 +106,11 @@ tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si vashishta: models using the Vashishta potential voronoi: Voronoi tesselation via compute voronoi/atom command -Here is a src/Make.py command which will perform a parallel build of a -LAMMPS executable "lmp_mpi" with all the packages needed by all the -examples, with the exception of the accelerate sub-directory. See the -accelerate/README for Make.py commands suitable for its example -scripts. - -cd src -Make.py -j 16 -p none std no-lib reax meam poems reaxc orig -a lib-all mpi - Here is how you might run and visualize one of the sample problems: cd indent cp ../../src/lmp_mpi . # copy LAMMPS executable to this dir -lmp_mpi < in.indent # run the problem +lmp_mpi -in in.indent # run the problem Running the simulation produces the files {dump.indent} and {log.lammps}. You can visualize the dump file as follows: diff --git a/examples/accelerate/README b/examples/accelerate/README index 1fab296a53..c4eb5dcc8d 100644 --- a/examples/accelerate/README +++ b/examples/accelerate/README @@ -1,14 +1,11 @@ These are example scripts that can be run with any of the acclerator packages in LAMMPS: -USER-CUDA, GPU, USER-INTEL, KOKKOS, USER-OMP, OPT +GPU, USER-INTEL, KOKKOS, USER-OMP, OPT The easiest way to build LAMMPS with these packages -is via the src/Make.py tool described in Section 2.4 -of the manual. You can also type "Make.py -h" to see -its options. The easiest way to run these scripts -is by using the appropriate - +is via the flags described in Section 4 of the manual. +The easiest way to run these scripts is by using the appropriate Details on the individual accelerator packages can be found in doc/Section_accelerate.html. @@ -16,21 +13,6 @@ can be found in doc/Section_accelerate.html. Build LAMMPS with one or more of the accelerator packages -The following command will invoke the src/Make.py tool with one of the -command-lines from the Make.list file: - -../../src/Make.py -r Make.list target - -target = one or more of the following: - cpu, omp, opt - cuda_double, cuda_mixed, cuda_single - gpu_double, gpu_mixed, gpu_single - intel_cpu, intel_phi - kokkos_omp, kokkos_cuda, kokkos_phi - -If successful, the build will produce the file lmp_target in this -directory. - Note that in addition to any accelerator packages, these packages also need to be installed to run all of the example scripts: ASPHERE, MOLECULE, KSPACE, RIGID. @@ -38,39 +20,11 @@ MOLECULE, KSPACE, RIGID. These two targets will build a single LAMMPS executable with all the CPU accelerator packages installed (USER-INTEL for CPU, KOKKOS for OMP, USER-OMP, OPT) or all the GPU accelerator packages installed -(USER-CUDA, GPU, KOKKOS for CUDA): +(GPU, KOKKOS for CUDA): -target = all_cpu, all_gpu - -Note that the Make.py commands in Make.list assume an MPI environment -exists on your machine and use mpicxx as the wrapper compiler with -whatever underlying compiler it wraps by default. If you add "-cc mpi -wrap=g++" or "-cc mpi wrap=icc" after the target, you can choose the -underlying compiler for mpicxx to invoke. E.g. - -../../src/Make.py -r Make.list intel_cpu -cc mpi wrap=icc - -You should do this for any build that includes the USER-INTEL -package, since it will perform best with the Intel compilers. - -Note that for kokkos_cuda, it needs to be "-cc nvcc" instead of "mpi", -since a KOKKOS for CUDA build requires NVIDIA nvcc as the wrapper -compiler. - -Also note that the Make.py commands in Make.list use the default -FFT support which is via the KISS library. If you want to -build with another FFT library, e.g. FFTW3, then you can add -"-fft fftw3" after the target, e.g. - -../../src/Make.py -r Make.list gpu -fft fftw3 - -For any build with USER-CUDA, GPU, or KOKKOS for CUDA, be sure to set +For any build with GPU, or KOKKOS for CUDA, be sure to set the arch=XX setting to the appropriate value for the GPUs and Cuda -environment on your system. What is defined in the Make.list file is -arch=21 for older Fermi GPUs. This can be overridden as follows, -e.g. for Kepler GPUs: - -../../src/Make.py -r Make.list gpu_double -gpu mode=double arch=35 +environment on your system. --------------------- @@ -118,12 +72,6 @@ Note that when running in.lj.5.0 (which has a long cutoff) with the GPU package, the "-pk tpa" setting should be > 1 (e.g. 8) for best performance. -** USER-CUDA package - -lmp_machine -c on -sf cuda < in.lj -mpirun -np 1 lmp_machine -c on -sf cuda < in.lj # 1 MPI, 1 MPI/GPU -mpirun -np 2 lmp_machine -c on -sf cuda -pk cuda 2 < in.lj # 2 MPI, 1 MPI/GPU - ** KOKKOS package for OMP lmp_kokkos_omp -k on t 1 -sf kk -pk kokkos neigh half < in.lj From 5cbaf7ca1d3218d6c0cbb9529ae7b0c01fd804ce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 14:47:54 -0400 Subject: [PATCH 06/11] correct commands table format issue --- doc/src/Section_commands.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 7dc3d27b6a..f1eb225fe5 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -734,8 +734,8 @@ package"_Section_start.html#start_3. "smd/wall/surface"_fix_smd_wall_surface.html, "temp/rescale/eff"_fix_temp_rescale_eff.html, "ti/spring"_fix_ti_spring.html, -"ttm/mod"_fix_ttm.html -"wall/ees"_fix_wall_ees.html +"ttm/mod"_fix_ttm.html, +"wall/ees"_fix_wall_ees.html, "wall/region/ees"_fix_wall_ees.html :tb(c=6,ea=c) :line From 03cd4c5255573463cfc5448a87cdc870364b5ed7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 17:16:10 -0400 Subject: [PATCH 07/11] ported lib/voronoi/Install.py to python 3.x and tested with 2.7 --- lib/voronoi/Install.py | 57 +++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 54246f113e..64122c9d5b 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -2,8 +2,10 @@ # Install.py tool to download, unpack, build, and link to the Voro++ library # used to automate the steps described in the README file in this dir - -import sys,os,re,urllib,commands +from __future__ import print_function +import sys,os,re,subprocess +try: from urllib.request import urlretrieve as geturl +except: from urllib import urlretrieve as geturl # help message @@ -39,8 +41,8 @@ url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version # print error message or help def error(str=None): - if not str: print help - else: print "ERROR",str + if not str: print(help) + else: print("ERROR",str) sys.exit() # expand to full path name @@ -58,9 +60,9 @@ if nargs == 0: error() homepath = "." homedir = version -grabflag = 0 -buildflag = 0 -linkflag = 0 +grabflag = False +buildflag = False +linkflag = False iarg = 0 while iarg < nargs: @@ -74,13 +76,13 @@ while iarg < nargs: homedir = args[iarg+2] iarg += 3 elif args[iarg] == "-g": - grabflag = 1 + grabflag = True iarg += 1 elif args[iarg] == "-b": - buildflag = 1 + buildflag = True iarg += 1 elif args[iarg] == "-l": - linkflag = 1 + linkflag = True iarg += 1 else: error() @@ -91,35 +93,38 @@ homedir = "%s/%s" % (homepath,homedir) # download and unpack Voro++ tarball if grabflag: - print "Downloading Voro++ ..." - urllib.urlretrieve(url,"%s/%s.tar.gz" % (homepath,version)) + print("Downloading Voro++ ...") + geturl(url,"%s/%s.tar.gz" % (homepath,version)) - print "Unpacking Voro++ tarball ..." + print("Unpacking Voro++ tarball ...") if os.path.exists("%s/%s" % (homepath,version)): - commands.getoutput("rm -rf %s/%s" % (homepath,version)) - cmd = "cd %s; tar zxvf %s.tar.gz" % (homepath,version) - commands.getoutput(cmd) + cmd = ['rm -rf "%s/%s"' % (homepath,version)] + subprocess.check_output(cmd,shell=True) + cmd = ['cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version)] + subprocess.check_output(cmd,shell=True) if os.path.basename(homedir) != version: - if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) + if os.path.exists(homedir): + cmd = ['rm -rf "%s"' % homedir] + subprocess.check_output(cmd,shell=True) os.rename("%s/%s" % (homepath,version),homedir) # build Voro++ if buildflag: - print "Building Voro++ ..." - cmd = "cd %s; make" % homedir - txt = commands.getoutput(cmd) - print txt + print("Building Voro++ ...") + cmd = ['cd "%s"; make' % homedir] + txt = subprocess.check_output(cmd,shell=True) + print(txt) # create 2 links in lib/voronoi to Voro++ src dir if linkflag: - print "Creating links to Voro++ include and lib files" + print("Creating links to Voro++ include and lib files") if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") if os.path.isfile("liblink") or os.path.islink("liblink"): os.remove("liblink") - cmd = "ln -s %s/src includelink" % homedir - commands.getoutput(cmd) - cmd = "ln -s %s/src liblink" % homedir - commands.getoutput(cmd) + cmd = ['ln -s "%s/src" includelink' % homedir, 'includelink'] + subprocess.check_output(cmd,shell=True) + cmd = ['ln -s "%s/src" liblink' % homedir] + subprocess.check_output(cmd,shell=True) From 7ccb0d37cdd65ad1c523a104a90aea69162f26a6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 17:37:48 -0400 Subject: [PATCH 08/11] port USER-SMD folder. make voronoi consistent with it --- lib/smd/Install.py | 34 +++++++++++++++++++--------------- lib/voronoi/Install.py | 8 ++++---- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/lib/smd/Install.py b/lib/smd/Install.py index e6fe8926a4..0fa05375db 100644 --- a/lib/smd/Install.py +++ b/lib/smd/Install.py @@ -3,7 +3,10 @@ # Install.py tool to download, unpack, and point to the Eigen library # used to automate the steps described in the README file in this dir -import sys,os,re,glob,commands +from __future__ import print_function +import sys,os,re,glob,subprocess +try: from urllib.request import urlretrieve as geturl +except: from urllib import urlretrieve as geturl # help message @@ -30,14 +33,15 @@ make lib-smd args="-g -l" # download/build in default lib/smd/eigen-eigen-* # settings -url = "http://bitbucket.org/eigen/eigen/get/3.3.3.tar.gz" +version = '3.3.4' +url = "http://bitbucket.org/eigen/eigen/get/%s.tar.gz" % version tarball = "eigen.tar.gz" # print error message or help def error(str=None): - if not str: print help - else: print "ERROR",str + if not str: print(help) + else: print("ERROR",str) sys.exit() # expand to full path name @@ -80,26 +84,26 @@ if not os.path.isdir(homepath): error("Eigen path does not exist") # glob to find name of dir it unpacks to if grabflag: - print "Downloading Eigen ..." - cmd = "curl -L %s > %s/%s" % (url,homepath,tarball) - print cmd - print commands.getoutput(cmd) + print("Downloading Eigen ...") + geturl(url,"%s/%s" % (homepath,tarball)) - print "Unpacking Eigen tarball ..." + print("Unpacking Eigen tarball ...") edir = glob.glob("%s/eigen-eigen-*" % homepath) for one in edir: - if os.path.isdir(one): commands.getoutput("rm -rf %s" % one) - cmd = "cd %s; tar zxvf %s" % (homepath,tarball) - commands.getoutput(cmd) + if os.path.isdir(one): + subprocess.check_output("rm -rf %s" % one,shell=True) + cmd = 'cd "%s"; tar -xzvf %s' % (homepath,tarball) + subprocess.check_output(cmd,shell=True) if homedir != "ee": - if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) + if os.path.exists(homedir): + subprocess.check_output("rm -rf %s" % homedir,shell=True) edir = glob.glob("%s/eigen-eigen-*" % homepath) os.rename(edir[0],"%s/%s" % (homepath,homedir)) # create link in lib/smd to Eigen src dir if linkflag: - print "Creating link to Eigen files" + print("Creating link to Eigen files") if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") if homedir == "ee": @@ -107,4 +111,4 @@ if linkflag: linkdir = edir[0] else: linkdir = "%s/%s" % (homepath,homedir) cmd = "ln -s %s includelink" % linkdir - commands.getoutput(cmd) + subprocess.check_output(cmd,shell=True) diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 64122c9d5b..1c4bc5cb6d 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -98,13 +98,13 @@ if grabflag: print("Unpacking Voro++ tarball ...") if os.path.exists("%s/%s" % (homepath,version)): - cmd = ['rm -rf "%s/%s"' % (homepath,version)] + cmd = 'rm -rf "%s/%s"' % (homepath,version) subprocess.check_output(cmd,shell=True) - cmd = ['cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version)] + cmd = 'cd "%s"; tar -xzvf %s.tar.gz' % (homepath,version) subprocess.check_output(cmd,shell=True) if os.path.basename(homedir) != version: if os.path.exists(homedir): - cmd = ['rm -rf "%s"' % homedir] + cmd = 'rm -rf "%s"' % homedir subprocess.check_output(cmd,shell=True) os.rename("%s/%s" % (homepath,version),homedir) @@ -112,7 +112,7 @@ if grabflag: if buildflag: print("Building Voro++ ...") - cmd = ['cd "%s"; make' % homedir] + cmd = 'cd "%s"; make' % homedir txt = subprocess.check_output(cmd,shell=True) print(txt) From 81f342aafa231587f748190b87423911eab9c1b0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2017 18:06:18 -0400 Subject: [PATCH 09/11] fix variable name bug and synchronize with other ported Install.py files --- lib/kim/Install.py | 70 +++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index cf1b254ecd..f9348a2696 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -3,7 +3,9 @@ # install.pa tool to setup the kim-api library # used to automate the steps described in the README file in this dir from __future__ import print_function -import sys,os,re,urllib,subprocess +import sys,os,re,subprocess +try: from urllib.request import urlretrieve as geturl +except: from urllib import urlretrieve as geturl help = """ Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" @@ -97,10 +99,10 @@ if buildflag: # configure LAMMPS to use kim-api to be installed with open("%s/Makefile.KIM_DIR" % thisdir, 'w') as mkfile: - mkfle.write("KIM_INSTALL_DIR=%s\n\n" % dir) - mkfle.write(".DUMMY: print_dir\n\n") - mkfle.write("print_dir:\n") - mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") + mkfile.write("KIM_INSTALL_DIR=%s\n\n" % dir) + mkfile.write(".DUMMY: print_dir\n\n") + mkfile.write("print_dir:\n") + mkfile.write(" @printf $(KIM_INSTALL_DIR)\n") with open("%s/Makefile.KIM_Config" % thisdir, 'w') as cfgfile: cfgfile.write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) @@ -113,27 +115,23 @@ if buildflag: print("Downloading kim-api tarball ...") - try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + try: geturl(url,"%s/%s.tgz" % (thisdir,version)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) + subprocess.check_output(cmd,shell=True) if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): - print("Both urllib.urlretrieve() and wget command failed to download") + print("Both urllib and wget command failed to download") sys.exit() print("Unpacking kim-api tarball ...") cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) - txt = subprocess.getstatusoutput(cmd) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # configure kim-api print("Configuring kim-api ...") cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # build kim-api @@ -145,36 +143,26 @@ if buildflag: print("configuring all OpenKIM models, this will take a while ...") cmd = "cd %s/%s; make add-examples; make add-%s" % \ (thisdir,version,modelname) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) print("Building kim-api ...") cmd = "cd %s/%s; make" % (thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # install kim-api print("Installing kim-api ...") cmd = "cd %s/%s; make install" % (thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # remove source files print("Removing kim-api source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) # add a single model (and possibly its driver) to existing KIM installation @@ -187,7 +175,7 @@ if addflag: error() else: cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir - dir = subprocess.getstatusoutput(cmd)[1] + dir = subprocess.check_output(cmd,shell=True)[1] # download single model # try first via urllib @@ -197,10 +185,10 @@ if addflag: url = "https://openkim.org/download/%s.tgz" % addmodelname - try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + try: geturl(url,"%s/%s.tgz" % (thisdir,addmodelname)) except: cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) print(txt[1]) if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): print("Both urllib.urlretrieve() and wget command failed to download") @@ -208,28 +196,27 @@ if addflag: print("Unpacking item tarball ...") cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) print("Building item ...") cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + subprocess.check_output(cmd,shell=True) firstRunOutput = txt[1] if txt[0] != 0: # Error: but first, check to see if it needs a driver cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) if txt[1] == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) adddrivername = txt[1] print("First Installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) if txt[0] != 0: print(firstRunOutput) print(txt[1]) @@ -237,7 +224,7 @@ if addflag: else: print(txt[1]) cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) - txt = subprocess.getstatusoutput(cmd) + txt = subprocess.check_output(cmd,shell=True) print(txt[1]) if txt[0] != 0: error() @@ -251,6 +238,5 @@ if addflag: print(firstRunOutput) print("Removing kim item source and build files ...") cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - txt = subprocess.getstatusoutput(cmd) - print(txt[1]) - if txt[0] != 0: error() + subprocess.check_output(cmd,shell=True) + From f181a0bfabbbdae09e440714b2e4a27c23f5efd4 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 19 Jul 2017 12:54:33 -0500 Subject: [PATCH 10/11] Update lib/kim/Install.py for phthon 2.7 conversion --- lib/kim/Install.py | 61 ++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index f9348a2696..cb089e41e2 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -200,43 +200,52 @@ if addflag: print("Building item ...") cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) - subprocess.check_output(cmd,shell=True) - firstRunOutput = txt[1] - if txt[0] != 0: + try: + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + except subprocess.CalledProcessError as e: + # Error: but first, check to see if it needs a driver + firstRunOutput = e.output + cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - if txt[1] == "ParameterizedModel": + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + if txt == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - adddrivername = txt[1] + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + adddrivername = txt print("First Installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) - txt = subprocess.check_output(cmd,shell=True) - if txt[0] != 0: - print(firstRunOutput) - print(txt[1]) - error() - else: - print(txt[1]) + try: + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + except subprocess.CalledProcessError as e: + print(e.output) + sys.exit() + + print(txt) + + # now install the model that needed the driver + cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - print(txt[1]) - if txt[0] != 0: - error() + try: + txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + except subprocess.CalledProcessError as e: + print(e.output) + sys.exit() + print(txt) + sys.exit() else: print(firstRunOutput) - error() - else: + print("Error, unable to build and install OpenKIM item: %s" \ + % addmodelname) + sys.exit() - # success - - print(firstRunOutput) - print("Removing kim item source and build files ...") - cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - subprocess.check_output(cmd,shell=True) + # success the first time + print(txt) + print("Removing kim item source and build files ...") + cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) + subprocess.check_output(cmd,shell=True) From 355aad96916697277b1b4adbfc293d6093021b0b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 19 Jul 2017 17:19:44 -0400 Subject: [PATCH 11/11] restore python3 support. this now can run with python 2.7.13 and 3.5.3. --- lib/kim/Install.py | 45 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index cb089e41e2..1405cc5fad 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -87,14 +87,15 @@ url = "https://s3.openkim.org/kim-api/%s.tgz" % version if buildflag: # set install directory + dir = os.path.join(os.path.abspath(dir), "installed-" + version) - # check to see if an installed kim-api already exists + # check to see if an installed kim-api already exists and wipe it out. if os.path.isdir(dir): - print("kim-api is already installed at %s" % dir) - print("Must remove this directory in order to resintall at this location") - sys.exit() + print("kim-api is already installed at %s.\nRemoving it for re-install" % dir) + cmd = "rm -rf %s" % dir + subprocess.check_output(cmd,shell=True) # configure LAMMPS to use kim-api to be installed @@ -110,19 +111,9 @@ if buildflag: print("Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir)) # download entire kim-api tarball - # try first via urllib - # if fails (probably due to no SSL support), use wget print("Downloading kim-api tarball ...") - - try: geturl(url,"%s/%s.tgz" % (thisdir,version)) - except: - cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) - subprocess.check_output(cmd,shell=True) - if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): - print("Both urllib and wget command failed to download") - sys.exit() - + geturl(url,"%s/%s.tgz" % (thisdir,version)) print("Unpacking kim-api tarball ...") cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) subprocess.check_output(cmd,shell=True) @@ -182,17 +173,8 @@ if addflag: # if fails (probably due to no SSL support), use wget print("Downloading item tarball ...") - url = "https://openkim.org/download/%s.tgz" % addmodelname - - try: geturl(url,"%s/%s.tgz" % (thisdir,addmodelname)) - except: - cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) - txt = subprocess.check_output(cmd,shell=True) - print(txt[1]) - if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): - print("Both urllib.urlretrieve() and wget command failed to download") - sys.exit() + geturl(url,"%s/%s.tgz" % (thisdir,addmodelname)) print("Unpacking item tarball ...") cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) @@ -205,19 +187,19 @@ if addflag: except subprocess.CalledProcessError as e: # Error: but first, check to see if it needs a driver - - firstRunOutput = e.output + firstRunOutput = e.output.decode() cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) + txt = txt.decode().strip() if txt == "ParameterizedModel": # Get and install driver cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - adddrivername = txt - print("First Installing model driver: %s" % adddrivername) + adddrivername = txt.decode().strip() + print("First installing model driver: %s" % adddrivername) cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) try: txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) @@ -225,17 +207,16 @@ if addflag: print(e.output) sys.exit() - print(txt) - # now install the model that needed the driver + print("Now installing model : %s" % addmodelname) cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) try: txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) except subprocess.CalledProcessError as e: print(e.output) sys.exit() - print(txt) + print(txt.decode()) sys.exit() else: print(firstRunOutput)