Merge pull request #611 from akohlmey/final-tweaks

More tweaks for stable release
This commit is contained in:
Steve Plimpton
2017-08-10 08:02:55 -06:00
committed by GitHub
8 changed files with 114 additions and 13 deletions

View File

@ -587,8 +587,7 @@ Typing "make clean-all" or "make clean-machine" will delete *.o object
files created when LAMMPS is built, for either all builds or for a
particular machine.
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
As explained above, any of these 3 settings can be specified on the
LMP_INC line in your low-level src/MAKE/Makefile.foo.
@ -659,7 +658,16 @@ utilities.
For Cygwin and the MinGW cross-compilers, suitable makefiles are
provided in src/MAKE/MACHINES. When using other compilers, like
Visual C++ or Intel compilers for Windows, you may have to implement
your own build system. Since none of the current LAMMPS core developers
your own build system. Due to differences between the Windows OS
and Windows system libraries to Unix-like environments like Linux
or MacOS, when compiling for Windows a few adjustments may be needed:
Do not set the -DLAMMPS_MEMALIGN define (see LMP_INC makefile variable)
Add -lwsock32 -lpsapi to the linker flags (see LIB makefile variable)
Try adding -static-libgcc or -static or both to the linker flags when your
LAMMPS executable complains about missing .dll files :ul
Since none of the current LAMMPS core developers
has significant experience building executables on Windows, we are
happy to distribute contributed instructions and modifications, but
we cannot provide support for those.

View File

@ -60,8 +60,29 @@ def error(str=None):
def fullpath(path):
return os.path.abspath(os.path.expanduser(path))
def which(program):
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
return None
def geturl(url,fname):
cmd = 'curl -L -o "%s" %s' % (fname,url)
if which('curl') != None:
cmd = 'curl -L -o "%s" %s' % (fname,url)
elif which('wget') != None:
cmd = 'wget -O "%s" %s' % (fname,url)
else: error("cannot find 'wget' or 'curl' to download source code")
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
return txt

View File

@ -47,8 +47,29 @@ def error(str=None):
def fullpath(path):
return os.path.abspath(os.path.expanduser(path))
def which(program):
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
return None
def geturl(url,fname):
cmd = 'curl -L -o "%s" %s' % (fname,url)
if which('curl') != None:
cmd = 'curl -L -o "%s" %s' % (fname,url)
elif which('wget') != None:
cmd = 'wget -O "%s" %s' % (fname,url)
else: error("cannot find 'wget' or 'curl' to download source code")
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
return txt

View File

@ -21,7 +21,7 @@
POEMSObject::POEMSObject(){
name = 0;
ChangeName("unnamed");
ChangeName((const char*)"unnamed");
ID = -1;
}
@ -29,7 +29,7 @@ POEMSObject::~POEMSObject(){
delete [] name;
}
void POEMSObject::ChangeName(char* newname){
void POEMSObject::ChangeName(const char* newname){
delete [] name;
name = new char[strlen(newname)+1];
strcpy(name,newname);

View File

@ -26,7 +26,7 @@ class POEMSObject {
public:
POEMSObject();
virtual ~POEMSObject();
void ChangeName(char* newname);
void ChangeName(const char* newname);
char* GetName();
int GetID();
void SetID(int id);

View File

@ -47,8 +47,29 @@ def error(str=None):
def fullpath(path):
return os.path.abspath(os.path.expanduser(path))
def which(program):
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
return None
def geturl(url,fname):
cmd = 'curl -L -o "%s" %s' % (fname,url)
if which('curl') != None:
cmd = 'curl -L -o "%s" %s' % (fname,url)
elif which('wget') != None:
cmd = 'wget -O "%s" %s' % (fname,url)
else: error("cannot find 'wget' or 'curl' to download source code")
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
return txt

View File

@ -46,8 +46,29 @@ def error(str=None):
def fullpath(path):
return os.path.abspath(os.path.expanduser(path))
def which(program):
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
return None
def geturl(url,fname):
cmd = 'curl -L -o "%s" %s' % (fname,url)
if which('curl') != None:
cmd = 'curl -L -o "%s" %s' % (fname,url)
elif which('wget') != None:
cmd = 'wget -O "%s" %s' % (fname,url)
else: error("cannot find 'wget' or 'curl' to download source code")
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
return txt
@ -116,7 +137,7 @@ if buildflag:
if buildflag:
print("Building Voro++ ...")
cmd = 'cd "%s"; make' % homedir
cmd = 'cd "%s"; make CXX=g++ CFLAGS="-fPIC -O3"' % homedir
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
print(txt.decode('UTF-8'))

View File

@ -561,7 +561,13 @@ void Special::combine()
for (j = 0; j < nspecial[i][2]; j++) atom->map_one(onefour[i][j],-1);
}
// compute global maxspecial, must be at least 1
// if atom->maxspecial has been updated before, make certain
// we do not reset it to a smaller value. Since atom->maxspecial
// is initialized to 1, this ensures that it is larger than zero.
maxspecial = MAX(atom->maxspecial,maxspecial);
// compute global maxspecial
// add in extra factor from special_bonds command
// allocate correct special array with same nmax, new maxspecial
// previously allocated one must be destroyed
@ -569,7 +575,10 @@ void Special::combine()
MPI_Allreduce(&maxspecial,&atom->maxspecial,1,MPI_INT,MPI_MAX,world);
atom->maxspecial += force->special_extra;
atom->maxspecial = MAX(atom->maxspecial,1);
// add force->special_extra only once
force->special_extra = 0;
if (me == 0) {
if (screen)