change purge target in Makefile, also fixed one issue with Make.py

This commit is contained in:
Steve Plimpton 2016-09-30 09:17:55 -06:00
parent f7b5afee82
commit b9d0f96a19
9 changed files with 398 additions and 51 deletions

View File

@ -1,5 +1,5 @@
Run this example as: Run this example as:
mpirun -np 3 lmp_linux -partition 3x1 -in in.tad mpirun -np 3 lmp_g++ -partition 3x1 -in in.tad
You should be able to use any number of replicas >= 3. You should be able to use any number of replicas >= 3.

View File

@ -0,0 +1,266 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include <string.h>
#include "comm_tiled_kokkos.h"
#include "comm_brick.h"
#include "atom_kokkos.h"
#include "atom_vec.h"
#include "domain.h"
#include "force.h"
#include "pair.h"
#include "neighbor.h"
#include "modify.h"
#include "fix.h"
#include "compute.h"
#include "output.h"
#include "dump.h"
#include "memory.h"
#include "error.h"
#include "atom_masks.h"
using namespace LAMMPS_NS;
#define BUFFACTOR 1.5
#define BUFFACTOR 1.5
#define BUFMIN 1000
#define BUFEXTRA 1000
#define EPSILON 1.0e-6
#define DELTA_PROCS 16
enum{SINGLE,MULTI}; // same as in Comm
enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files
/* ---------------------------------------------------------------------- */
CommTiledKokkos::CommTiledKokkos(LAMMPS *lmp) : CommTiled(lmp)
{
}
/* ---------------------------------------------------------------------- */
//IMPORTANT: we *MUST* pass "*oldcomm" to the Comm initializer here, as
// the code below *requires* that the (implicit) copy constructor
// for Comm is run and thus creating a shallow copy of "oldcomm".
// The call to Comm::copy_arrays() then converts the shallow copy
// into a deep copy of the class with the new layout.
CommTiledKokkos::CommTiledKokkos(LAMMPS *lmp, Comm *oldcomm) : CommTiled(lmp,oldcomm)
{
}
/* ---------------------------------------------------------------------- */
CommTiledKokkos::~CommTiledKokkos()
{
}
/* ---------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
forward communication of atom coords every timestep
other per-atom attributes may also be sent via pack/unpack routines
------------------------------------------------------------------------- */
void CommTiledKokkos::forward_comm(int dummy)
{
if (comm_x_only) {
atomKK->sync(Host,X_MASK);
atomKK->modified(Host,X_MASK);
} else if (ghost_velocity) {
atomKK->sync(Host,X_MASK | V_MASK);
atomKK->modified(Host,X_MASK | V_MASK);
} else {
atomKK->sync(Host,ALL_MASK);
atomKK->modified(Host,ALL_MASK);
}
CommTiled::forward_comm(dummy);
}
/* ----------------------------------------------------------------------
reverse communication of forces on atoms every timestep
other per-atom attributes may also be sent via pack/unpack routines
------------------------------------------------------------------------- */
void CommTiledKokkos::reverse_comm()
{
if (comm_f_only)
atomKK->sync(Host,F_MASK);
else
atomKK->sync(Host,ALL_MASK);
CommTiled::reverse_comm();
if (comm_f_only)
atomKK->modified(Host,F_MASK);
else
atomKK->modified(Host,ALL_MASK);
atomKK->sync(Device,ALL_MASK);
}
/* ----------------------------------------------------------------------
exchange: move atoms to correct processors
atoms exchanged with procs that touch sub-box in each of 3 dims
send out atoms that have left my box, receive ones entering my box
atoms will be lost if not inside a touching proc's box
can happen if atom moves outside of non-periodic bounary
or if atom moves more than one proc away
this routine called before every reneighboring
for triclinic, atoms must be in lamda coords (0-1) before exchange is called
------------------------------------------------------------------------- */
void CommTiledKokkos::exchange()
{
atomKK->sync(Host,ALL_MASK);
CommTiled::exchange();
atomKK->modified(Host,ALL_MASK);
}
/* ----------------------------------------------------------------------
borders: list nearby atoms to send to neighboring procs at every timestep
one list is created per swap/proc that will be made
as list is made, actually do communication
this does equivalent of a forward_comm(), so don't need to explicitly
call forward_comm() on reneighboring timestep
this routine is called before every reneighboring
for triclinic, atoms must be in lamda coords (0-1) before borders is called
------------------------------------------------------------------------- */
void CommTiledKokkos::borders()
{
atomKK->sync(Host,ALL_MASK);
CommTiled::borders();
atomKK->modified(Host,ALL_MASK);
}
/* ----------------------------------------------------------------------
forward communication invoked by a Pair
nsize used only to set recv buffer limit
------------------------------------------------------------------------- */
void CommTiledKokkos::forward_comm_pair(Pair *pair)
{
CommTiled::forward_comm_pair(pair);
}
/* ----------------------------------------------------------------------
reverse communication invoked by a Pair
nsize used only to set recv buffer limit
------------------------------------------------------------------------- */
void CommTiledKokkos::reverse_comm_pair(Pair *pair)
{
CommTiled::reverse_comm_pair(pair);
}
/* ----------------------------------------------------------------------
forward communication invoked by a Fix
size/nsize used only to set recv buffer limit
size = 0 (default) -> use comm_forward from Fix
size > 0 -> Fix passes max size per atom
the latter is only useful if Fix does several comm modes,
some are smaller than max stored in its comm_forward
------------------------------------------------------------------------- */
void CommTiledKokkos::forward_comm_fix(Fix *fix, int size)
{
CommTiled::forward_comm_fix(fix,size);
}
/* ----------------------------------------------------------------------
reverse communication invoked by a Fix
size/nsize used only to set recv buffer limit
size = 0 (default) -> use comm_forward from Fix
size > 0 -> Fix passes max size per atom
the latter is only useful if Fix does several comm modes,
some are smaller than max stored in its comm_forward
------------------------------------------------------------------------- */
void CommTiledKokkos::reverse_comm_fix(Fix *fix, int size)
{
CommTiled::reverse_comm_fix(fix,size);
}
/* ----------------------------------------------------------------------
reverse communication invoked by a Fix with variable size data
query fix for all pack sizes to insure buf_send is big enough
handshake sizes before irregular comm to insure buf_recv is big enough
NOTE: how to setup one big buf recv with correct offsets ??
------------------------------------------------------------------------- */
void CommTiledKokkos::reverse_comm_fix_variable(Fix *fix)
{
CommTiled::reverse_comm_fix_variable(fix);
}
/* ----------------------------------------------------------------------
forward communication invoked by a Compute
nsize used only to set recv buffer limit
------------------------------------------------------------------------- */
void CommTiledKokkos::forward_comm_compute(Compute *compute)
{
CommTiled::forward_comm_compute(compute);
}
/* ----------------------------------------------------------------------
reverse communication invoked by a Compute
nsize used only to set recv buffer limit
------------------------------------------------------------------------- */
void CommTiledKokkos::reverse_comm_compute(Compute *compute)
{
CommTiled::reverse_comm_compute(compute);
}
/* ----------------------------------------------------------------------
forward communication invoked by a Dump
nsize used only to set recv buffer limit
------------------------------------------------------------------------- */
void CommTiledKokkos::forward_comm_dump(Dump *dump)
{
CommTiled::forward_comm_dump(dump);
}
/* ----------------------------------------------------------------------
reverse communication invoked by a Dump
nsize used only to set recv buffer limit
------------------------------------------------------------------------- */
void CommTiledKokkos::reverse_comm_dump(Dump *dump)
{
CommTiled::reverse_comm_dump(dump);
}
/* ----------------------------------------------------------------------
forward communication of Nsize values in per-atom array
------------------------------------------------------------------------- */
void CommTiledKokkos::forward_comm_array(int nsize, double **array)
{
CommTiled::forward_comm_array(nsize,array);
}
/* ----------------------------------------------------------------------
exchange info provided with all 6 stencil neighbors
NOTE: this method is currently not used
------------------------------------------------------------------------- */
int CommTiledKokkos::exchange_variable(int n, double *inbuf, double *&outbuf)
{
CommTiled::exchange_variable(n,inbuf,outbuf);
}

View File

@ -0,0 +1,59 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifndef LMP_COMM_TILED_KOKKOS_H
#define LMP_COMM_TILED_KOKKOS_H
#include "comm_tiled.h"
#include "kokkos_type.h"
namespace LAMMPS_NS {
class CommTiledKokkos : public CommTiled {
public:
CommTiledKokkos(class LAMMPS *);
CommTiledKokkos(class LAMMPS *, class Comm *);
virtual ~CommTiledKokkos();
void forward_comm(int dummy = 0); // forward comm of atom coords
void reverse_comm(); // reverse comm of forces
void exchange(); // move atoms to new procs
void borders(); // setup list of atoms to comm
void forward_comm_pair(class Pair *); // forward comm from a Pair
void reverse_comm_pair(class Pair *); // reverse comm from a Pair
void forward_comm_fix(class Fix *, int size=0);
// forward comm from a Fix
void reverse_comm_fix(class Fix *, int size=0);
// reverse comm from a Fix
void reverse_comm_fix_variable(class Fix *);
// variable size reverse comm from a Fix
void forward_comm_compute(class Compute *); // forward from a Compute
void reverse_comm_compute(class Compute *); // reverse from a Compute
void forward_comm_dump(class Dump *); // forward comm from a Dump
void reverse_comm_dump(class Dump *); // reverse comm from a Dump
void forward_comm_array(int, double **); // forward comm of array
int exchange_variable(int, double *, double *&); // exchange on neigh stencil
private:
};
}
#endif
/* ERROR/WARNING messages:
*/

View File

@ -280,15 +280,19 @@ void NeighborKokkos::choose_build(int index, NeighRequest *rq)
if (rq->kokkos_host != 0) { if (rq->kokkos_host != 0) {
PairPtrHost pb = NULL; PairPtrHost pb = NULL;
if (rq->ghost) { if (rq->ghost) {
if (rq->full) pb = &NeighborKokkos::full_bin_kokkos<LMPHostType,0,1>; if (rq->full) {
else if (rq->half) &NeighborKokkos::full_bin_kokkos<LMPHostType,1,1>; if (rq->full_cluster) pb = &NeighborKokkos::full_bin_cluster_kokkos<LMPHostType>;
pair_build_host[index] = pb; else pb = &NeighborKokkos::full_bin_kokkos<LMPHostType,0,1>;
}
else if (rq->half) pb = &NeighborKokkos::full_bin_kokkos<LMPHostType,1,1>;
} else { } else {
if (rq->full) pb = &NeighborKokkos::full_bin_kokkos<LMPHostType,0,0>; if (rq->full) {
if (rq->full_cluster) pb = &NeighborKokkos::full_bin_cluster_kokkos<LMPHostType>;
else pb = &NeighborKokkos::full_bin_kokkos<LMPHostType,0,0>;
}
else if (rq->half) pb = &NeighborKokkos::full_bin_kokkos<LMPHostType,1,0>; else if (rq->half) pb = &NeighborKokkos::full_bin_kokkos<LMPHostType,1,0>;
pair_build_host[index] = pb;
} }
return; pair_build_host[index] = pb;
} }
if (rq->kokkos_device != 0) { if (rq->kokkos_device != 0) {
PairPtrDevice pb = NULL; PairPtrDevice pb = NULL;

View File

@ -26,7 +26,8 @@ libclasses = ("atc","awpmd","colvars","cuda","gpu","h5md",
buildclasses = ("intel","kokkos") buildclasses = ("intel","kokkos")
makeclasses = ("cc","flags","mpi","fft","jpg","png") makeclasses = ("cc","flags","mpi","fft","jpg","png")
setargs = ("gzip","#gzip","ffmpeg","#ffmpeg","smallbig","bigbig","smallsmall","exceptions","#exceptions") setargs = ("gzip","#gzip","ffmpeg","#ffmpeg","smallbig","bigbig",
"smallsmall","exceptions","#exceptions")
actionargs = ("lib-all","file","clean","exe") actionargs = ("lib-all","file","clean","exe")
gpubuildflag = 0 gpubuildflag = 0
@ -85,7 +86,8 @@ def switch2str(switches,switch_order):
def compile_check(compiler,ccflags,warn): def compile_check(compiler,ccflags,warn):
open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") open("tmpauto.cpp",'w').write("int main(int, char **) {}\n")
tmp = "%s %s -c tmpauto.cpp" % (compiler,ccflags) tmp = "%s %s -c tmpauto.cpp" % (compiler,ccflags)
try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,
shell=True).decode()
except subprocess.CalledProcessError as e: txt = e.output except subprocess.CalledProcessError as e: txt = e.output
flag = 1 flag = 1
if txt or not os.path.isfile("tmpauto.o"): if txt or not os.path.isfile("tmpauto.o"):
@ -105,7 +107,8 @@ def compile_check(compiler,ccflags,warn):
def link_check(linker,linkflags,libs,warn): def link_check(linker,linkflags,libs,warn):
open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") open("tmpauto.cpp",'w').write("int main(int, char **) {}\n")
tmp = "%s %s -o tmpauto tmpauto.cpp %s" % (linker,linkflags,libs) tmp = "%s %s -o tmpauto tmpauto.cpp %s" % (linker,linkflags,libs)
try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() try: txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,
shell=True).decode()
except subprocess.CalledProcessError as e: txt = e.output except subprocess.CalledProcessError as e: txt = e.output
flag = 1 flag = 1
if txt or not os.path.isfile("tmpauto"): if txt or not os.path.isfile("tmpauto"):
@ -532,7 +535,8 @@ class Actions(object):
if caller == "file" or "file" not in self.alist: if caller == "file" or "file" not in self.alist:
# make certain that 'MAKE/MINE' folder exists. # make certain that 'MAKE/MINE' folder exists.
subprocess.check_output("mkdir -p %s/MAKE/MINE" % dir.src,stderr=subprocess.STDOUT,shell=True) 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) make.write("%s/MAKE/MINE/Makefile.auto" % dir.src,1)
print("Created src/MAKE/MINE/Makefile.auto") print("Created src/MAKE/MINE/Makefile.auto")
@ -859,9 +863,12 @@ class Packages(object):
if self.plist: print("Installing packages ...") if self.plist: print("Installing packages ...")
for one in self.plist: for one in self.plist:
if one == "orig": continue if one == "orig": continue
subprocess.check_output("cd %s; make %s" % (dir.src,one),stderr=subprocess.STDOUT,shell=True) subprocess.check_output("cd %s; make %s" % (dir.src,one),
stderr=subprocess.STDOUT,shell=True)
if self.plist and verbose: if self.plist and verbose:
txt = subprocess.check_output("cd %s; make ps" % dir.src,stderr=subprocess.STDOUT,shell=True).decode() txt = subprocess.check_output("cd %s; make ps" % dir.src,
stderr=subprocess.STDOUT,
shell=True).decode()
print("Package status after installation:") print("Package status after installation:")
print(txt) print(txt)
@ -871,12 +878,16 @@ class Packages(object):
def uninstall(self): def uninstall(self):
if not self.plist or self.plist[-1] != "orig": return if not self.plist or self.plist[-1] != "orig": return
print("Restoring packages to original state ...") print("Restoring packages to original state ...")
subprocess.check_output("cd %s; make no-all" % dir.src,stderr=subprocess.STDOUT,shell=True) subprocess.check_output("cd %s; make no-all" % dir.src,
stderr=subprocess.STDOUT,shell=True)
for one in self.all: for one in self.all:
if self.original[one]: if self.original[one]:
subprocess.check_output("cd %s; make yes-%s" % (dir.src,one),stderr=subprocess.STDOUT,shell=True) subprocess.check_output("cd %s; make yes-%s" % (dir.src,one),
stderr=subprocess.STDOUT,shell=True)
if verbose: if verbose:
txt = subprocess.check_output("cd %s; make ps" % dir.src,stderr=subprocess.STDOUT,shell=True).decode() txt = subprocess.check_output("cd %s; make ps" % dir.src,
stderr=subprocess.STDOUT,
shell=True).decode()
print("Restored package status:") print("Restored package status:")
print(txt) print(txt)
@ -970,7 +981,8 @@ class Settings(object):
def help(self): def help(self):
return """ return """
-s set1 set2 ... -s set1 set2 ...
possible settings = gzip #gzip ffmpeg #ffmpeg smallbig bigbig smallsmall exceptions #exceptions possible settings = gzip #gzip ffmpeg #ffmpeg
smallbig bigbig smallsmall exceptions #exceptions
alter LAMMPS ifdef settings in Makefile.auto alter LAMMPS ifdef settings in Makefile.auto
only happens if new Makefile.auto is created by use of "file" action only happens if new Makefile.auto is created by use of "file" action
gzip and #gzip turn on/off LAMMPS_GZIP setting gzip and #gzip turn on/off LAMMPS_GZIP setting
@ -1059,7 +1071,8 @@ class ATC(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir,stderr=subprocess.STDOUT,shell=True) 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) if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n)
else: txt = "cd %s; make -f Makefile.auto" % libdir else: txt = "cd %s; make -f Makefile.auto" % libdir
@ -1110,7 +1123,8 @@ class AWPMD(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir,stderr=subprocess.STDOUT,shell=True) 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) if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n)
else: txt = "cd %s; make -f Makefile.auto" % libdir else: txt = "cd %s; make -f Makefile.auto" % libdir
@ -1161,7 +1175,8 @@ class COLVARS(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir,stderr=subprocess.STDOUT,shell=True) 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) if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n)
else: txt = "cd %s; make -f Makefile.auto" % libdir else: txt = "cd %s; make -f Makefile.auto" % libdir
@ -1213,7 +1228,8 @@ class CUDA(object):
def build(self): def build(self):
libdir = dir.lib + "/cuda" libdir = dir.lib + "/cuda"
subprocess.check_output("cd %s; make clean" % libdir,stderr=subprocess.STDOUT,shell=True) subprocess.check_output("cd %s; make clean" % libdir,
stderr=subprocess.STDOUT,shell=True)
if self.mode == "double": n = 2 if self.mode == "double": n = 2
elif self.mode == "mixed": n = 3 elif self.mode == "mixed": n = 3
elif self.mode == "single": n = 1 elif self.mode == "single": n = 1
@ -1308,7 +1324,8 @@ class GPU(object):
make = "make" make = "make"
if "shannon" == platform.node(): make = "srun 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) 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) 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) else: txt = "cd %s; %s -f Makefile.auto" % (libdir,make)
@ -1359,7 +1376,8 @@ class H5MD(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
subprocess.check_output("cd %s; make clean" % libdir,stderr=subprocess.STDOUT,shell=True) subprocess.check_output("cd %s; make clean" % libdir,
stderr=subprocess.STDOUT,shell=True)
txt = "cd %s; make" % libdir txt = "cd %s; make" % libdir
# if verbose, print output as build proceeds, else only print if fails # if verbose, print output as build proceeds, else only print if fails
@ -1409,7 +1427,8 @@ class MEAM(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir,stderr=subprocess.STDOUT,shell=True) 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 # do not use -j for MEAM build, parallel build does not work
txt = "cd %s; make -f Makefile.auto" % libdir txt = "cd %s; make -f Makefile.auto" % libdir
@ -1460,7 +1479,8 @@ class POEMS(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir,stderr=subprocess.STDOUT,shell=True) 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) if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n)
else: txt = "cd %s; make -f Makefile.auto" % libdir else: txt = "cd %s; make -f Makefile.auto" % libdir
@ -1506,9 +1526,10 @@ class PYTHON(object):
libdir = dir.lib + "/python" libdir = dir.lib + "/python"
if self.lammpsflag: if self.lammpsflag:
subprocess.check_output("cd %s; cp Makefile.lammps.%s Makefile.lammps" % subprocess.check_output("cd %s; cp Makefile.lammps.%s Makefile.lammps" %
(libdir,self.lammps)) (libdir,self.lammps))
if not os.path.isfile("%s/Makefile.lammps.%s" % (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) error("Unsuccessful creation of lib/python/Makefile.lammps.%s file" %
self.lammps)
else: print("Created lib/python/Makefile.lammps file") else: print("Created lib/python/Makefile.lammps file")
# QMMM lib # QMMM lib
@ -1546,7 +1567,8 @@ class QMMM(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
subprocess.check_output("cd %s; make -f Makefile.auto clean" % libdir,stderr=subprocess.STDOUT,shell=True) 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) if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n)
else: txt = "cd %s; make -f Makefile.auto" % libdir else: txt = "cd %s; make -f Makefile.auto" % libdir
@ -1597,7 +1619,8 @@ class REAX(object):
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
make.write("%s/Makefile.auto" % libdir) make.write("%s/Makefile.auto" % libdir)
commands.getoutput("cd %s; make -f Makefile.auto clean" % 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) if jmake: txt = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n)
else: txt = "cd %s; make -f Makefile.auto" % libdir else: txt = "cd %s; make -f Makefile.auto" % libdir
@ -1643,7 +1666,8 @@ class VORONOI(object):
if not self.install: return if not self.install: return
libdir = dir.lib + "/voronoi" libdir = dir.lib + "/voronoi"
cmd = "cd %s; python install.py %s" % (libdir,self.install) cmd = "cd %s; python install.py %s" % (libdir,self.install)
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True).decode() txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,
shell=True).decode()
if verbose: print(txt) if verbose: print(txt)
print("Created lib/voronoi library") print("Created lib/voronoi library")

View File

@ -92,7 +92,7 @@ help:
@echo 'make package-update (pu) replace src files with updated package files' @echo 'make package-update (pu) replace src files with updated package files'
@echo 'make package-overwrite replace package files with src files' @echo 'make package-overwrite replace package files with src files'
@echo 'make package-diff (pd) diff src files against package files' @echo 'make package-diff (pd) diff src files against package files'
@echo 'make package-purge purge obsolete copies of package sources' @echo 'make purge purge obsolete copies of source files'
@echo '' @echo ''
@echo 'make machine build LAMMPS for machine' @echo 'make machine build LAMMPS for machine'
@echo 'make mode=lib machine build LAMMPS as static lib for machine' @echo 'make mode=lib machine build LAMMPS as static lib for machine'
@ -314,7 +314,7 @@ package-diff pd:
@echo '' @echo ''
@for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p diff; done @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p diff; done
package-purge: Purge.list purge: Purge.list
@echo 'Purging obsolete and auto-generated source files' @echo 'Purging obsolete and auto-generated source files'
@for f in `grep -v '#' Purge.list` ; \ @for f in `grep -v '#' Purge.list` ; \
do test -f $$f && rm $$f && echo $$f || : ; \ do test -f $$f && rm $$f && echo $$f || : ; \

View File

@ -348,7 +348,7 @@ void PairReaxC::init_style( )
int iqeq; int iqeq;
for (iqeq = 0; iqeq < modify->nfix; iqeq++) for (iqeq = 0; iqeq < modify->nfix; iqeq++)
if (strcmp(modify->fix[iqeq]->style,"qeq/reax") == 0) break; if (strstr(modify->fix[iqeq]->style,"qeq/reax")) break;
if (iqeq == modify->nfix && qeqflag == 1) if (iqeq == modify->nfix && qeqflag == 1)
error->all(FLERR,"Pair reax/c requires use of fix qeq/reax"); error->all(FLERR,"Pair reax/c requires use of fix qeq/reax");

View File

@ -45,9 +45,6 @@ enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files
CommTiled::CommTiled(LAMMPS *lmp) : Comm(lmp) CommTiled::CommTiled(LAMMPS *lmp) : Comm(lmp)
{ {
if (lmp->kokkos)
error->all(FLERR,"KOKKOS package does not yet support comm_style tiled");
style = 1; style = 1;
layout = LAYOUT_UNIFORM; layout = LAYOUT_UNIFORM;
pbc_flag = NULL; pbc_flag = NULL;
@ -63,9 +60,6 @@ CommTiled::CommTiled(LAMMPS *lmp) : Comm(lmp)
CommTiled::CommTiled(LAMMPS *lmp, Comm *oldcomm) : Comm(*oldcomm) CommTiled::CommTiled(LAMMPS *lmp, Comm *oldcomm) : Comm(*oldcomm)
{ {
if (lmp->kokkos)
error->all(FLERR,"KOKKOS package does not yet support comm_style tiled");
style = 1; style = 1;
layout = oldcomm->layout; layout = oldcomm->layout;
Comm::copy_arrays(oldcomm); Comm::copy_arrays(oldcomm);

View File

@ -26,26 +26,26 @@ class CommTiled : public Comm {
void init(); void init();
void setup(); // setup comm pattern void setup(); // setup comm pattern
void forward_comm(int dummy = 0); // forward comm of atom coords virtual void forward_comm(int dummy = 0); // forward comm of atom coords
void reverse_comm(); // reverse comm of forces virtual void reverse_comm(); // reverse comm of forces
void exchange(); // move atoms to new procs virtual void exchange(); // move atoms to new procs
void borders(); // setup list of atoms to comm virtual void borders(); // setup list of atoms to comm
void forward_comm_pair(class Pair *); // forward comm from a Pair virtual void forward_comm_pair(class Pair *); // forward comm from a Pair
void reverse_comm_pair(class Pair *); // reverse comm from a Pair virtual void reverse_comm_pair(class Pair *); // reverse comm from a Pair
virtual void forward_comm_fix(class Fix *, int size=0); virtual void forward_comm_fix(class Fix *, int size=0);
// forward comm from a Fix // forward comm from a Fix
virtual void reverse_comm_fix(class Fix *, int size=0); virtual void reverse_comm_fix(class Fix *, int size=0);
// reverse comm from a Fix // reverse comm from a Fix
virtual void reverse_comm_fix_variable(class Fix *); virtual void reverse_comm_fix_variable(class Fix *);
// variable size reverse comm from a Fix // variable size reverse comm from a Fix
void forward_comm_compute(class Compute *); // forward from a Compute virtual void forward_comm_compute(class Compute *); // forward from a Compute
void reverse_comm_compute(class Compute *); // reverse from a Compute virtual void reverse_comm_compute(class Compute *); // reverse from a Compute
void forward_comm_dump(class Dump *); // forward comm from a Dump virtual void forward_comm_dump(class Dump *); // forward comm from a Dump
void reverse_comm_dump(class Dump *); // reverse comm from a Dump virtual void reverse_comm_dump(class Dump *); // reverse comm from a Dump
void forward_comm_array(int, double **); // forward comm of array virtual void forward_comm_array(int, double **); // forward comm of array
int exchange_variable(int, double *, double *&); // exchange on neigh stencil virtual int exchange_variable(int, double *, double *&); // exchange on neigh stencil
void coord2proc_setup(); void coord2proc_setup();
int coord2proc(double *, int &, int &, int &); int coord2proc(double *, int &, int &, int &);