diff --git a/doc/Makefile b/doc/Makefile index 198fffda22..8ee8379c58 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,5 @@ # Makefile for LAMMPS documentation -SHA1 = $(shell echo $USER-$PWD | sha1sum | cut -f1 -d" ") +SHA1 = $(shell echo $USER-$PWD | python utils/sha1sum.py) BUILDDIR = /tmp/lammps-docs-$(SHA1) RSTDIR = $(BUILDDIR)/rst VENV = $(BUILDDIR)/docenv diff --git a/doc/README.md b/doc/README.md index fb130b35b9..26a51c13ab 100644 --- a/doc/README.md +++ b/doc/README.md @@ -15,18 +15,28 @@ make clean-all # remove entire build folder and any cached data ## Installing prerequisites To run the documention build toolchain Python 3 and virtualenv have to be -installed. The following are instructions for common Linux distributions: +installed. Here are instructions for common setups: -### virtualenv - -#### Ubuntu +### Ubuntu ```bash sudo apt-get install python-virtualenv ``` -#### Fedora +### Fedora ``` sudo yum install python-virtualenv ``` + +### MacOS X + +## Python 3 + +Download the latest Python 3 MacOS X package from https://www.python.org and install it. +This will install both Python 3 and pip3. + +## virtualenv + +Once Python 3 is installed, open a Terminal and type `pip3 install virtualenv`. This will +install virtualenv from the Python Package Index. diff --git a/doc/html/fix_nve_manifold_rattle.html b/doc/html/fix_nve_manifold_rattle.html index 3f7633ded4..dbcf0a2488 100644 --- a/doc/html/fix_nve_manifold_rattle.html +++ b/doc/html/fix_nve_manifold_rattle.html @@ -158,7 +158,7 @@ keyword = every

Perform constant NVE integration to update position and velocity for atoms constrained to a curved surface (manifold) in the group each timestep. The constraint is handled by RATTLE (Andersen) written out for the special case of -single-particle constraints as explained in (Paquay). +single-particle constraints as explained in (Paquay). V is volume; E is energy. This way, the dynamics of particles constrained to curved surfaces can be studied. If combined with fix langevin, this generates Brownian motion of particles constrained to a curved surface. For a list of currently supported @@ -191,6 +191,9 @@ This fix is not invoked during Making LAMMPS section for more info.

+

Only use this with min_style hftn or min_style quickmin. If not, the constraints +will not be satisfied very well at all. A warning is generated if the min_style is +incompatible but no error.


diff --git a/doc/html/fix_nvt_manifold_rattle.html b/doc/html/fix_nvt_manifold_rattle.html index 35e6ea6135..98dd612247 100644 --- a/doc/html/fix_nvt_manifold_rattle.html +++ b/doc/html/fix_nvt_manifold_rattle.html @@ -157,7 +157,7 @@ keyword = temp or tchain or every

Description

-

This fix combines the RATTLE-based (Andersen) time integrator of fix nve/manifold/rattle (Paquay) with a Nose-Hoover-chain thermostat to sample the +

This fix combines the RATTLE-based (Andersen) time integrator of fix nve/manifold/rattle (Paquay) with a Nose-Hoover-chain thermostat to sample the canonical ensemble of particles constrained to a curved surface (manifold). This sampling does suffer from discretization bias of O(dt). For a list of currently supported manifolds and their parameters, see manifolds

@@ -176,6 +176,9 @@ This fix is not invoked during Making LAMMPS section for more info.

+

Only use this with min_style hftn or min_style quickmin. If not, the constraints +will not be satisfied very well at all. A warning is generated if the min_style is +incompatible but no error.


diff --git a/doc/src/fix_nve_manifold_rattle.txt b/doc/src/fix_nve_manifold_rattle.txt index a35c234e63..8d0eb8e57c 100644 --- a/doc/src/fix_nve_manifold_rattle.txt +++ b/doc/src/fix_nve_manifold_rattle.txt @@ -76,6 +76,10 @@ This fix is part of the USER-MANIFOLD package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. +Only use this with {min_style hftn} or {min_style quickmin}. If not, the constraints +will not be satisfied very well at all. A warning is generated if the {min_style} is +incompatible but no error. + :line [Related commands:] @@ -90,7 +94,7 @@ section for more info. [(Andersen)] Andersen, J. Comp. Phys. 52, 24, (1983). :link(Paquay) -[(Paquay)] Paquay and Kusters, Biophys. J., 110, 6, (2016). +[(Paquay)] Paquay and Kusters, Biophys. J., 110, ???, (2016), to be published, preprint available at "arXiv:1411.3019"_http://arxiv.org/abs/1411.3019/. diff --git a/doc/src/fix_nvt_manifold_rattle.txt b/doc/src/fix_nvt_manifold_rattle.txt index 42a06d4ed7..f117d10eb9 100644 --- a/doc/src/fix_nvt_manifold_rattle.txt +++ b/doc/src/fix_nvt_manifold_rattle.txt @@ -62,6 +62,10 @@ This fix is part of the USER-MANIFOLD package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. +Only use this with {min_style hftn} or {min_style quickmin}. If not, the constraints +will not be satisfied very well at all. A warning is generated if the {min_style} is +incompatible but no error. + :line @@ -76,6 +80,6 @@ section for more info. [(Andersen)] Andersen, J. Comp. Phys. 52, 24, (1983). :link(Paquay) -[(Paquay)] Paquay and Kusters, Biophys. J., 110, 6, (2016). +[(Paquay)] Paquay and Kusters, Biophys. J., 110, ???, (2016), to be published, preprint available at "arXiv:1411.3019"_http://arxiv.org/abs/1411.3019/. diff --git a/doc/utils/sha1sum.py b/doc/utils/sha1sum.py new file mode 100755 index 0000000000..d4842ecf1a --- /dev/null +++ b/doc/utils/sha1sum.py @@ -0,0 +1,7 @@ +#!/bin/env python +# simple utility which reimplements sha1sum using Python +import hashlib +import sys +s = hashlib.sha1() +s.update(sys.stdin.read().encode()) +print(s.hexdigest()) diff --git a/src/COMPRESS/Install.sh b/src/COMPRESS/Install.sh index 49bc09f709..ef1c8920c8 100644 --- a/src/COMPRESS/Install.sh +++ b/src/COMPRESS/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/CORESHELL/Install.sh b/src/CORESHELL/Install.sh index 871a78ca88..f5ea54ac86 100644 --- a/src/CORESHELL/Install.sh +++ b/src/CORESHELL/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/Depend.sh b/src/Depend.sh index 698c165233..7eb485cb1d 100644 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -1,6 +1,10 @@ # Depend.sh = Install/unInstall files due to package dependencies # this script is invoked after any package is installed/uninstalled +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # all parent/child package dependencies should be listed below # parent package = has files that files in another package derive from # child package = has files that derive from files in another package diff --git a/src/GPU/Install.sh b/src/GPU/Install.sh index 0ff436e95d..ca73adbf82 100644 --- a/src/GPU/Install.sh +++ b/src/GPU/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/Install.sh b/src/Install.sh index 322631fce9..307188a09f 100644 --- a/src/Install.sh +++ b/src/Install.sh @@ -7,6 +7,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/KIM/Install.sh b/src/KIM/Install.sh index 128cf1585a..bac9d97cc6 100644 --- a/src/KIM/Install.sh +++ b/src/KIM/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index 80a1bb8df0..c269de41d3 100644 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/MEAM/Install.sh b/src/MEAM/Install.sh index acf4c90910..1825d4327f 100644 --- a/src/MEAM/Install.sh +++ b/src/MEAM/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/MPIIO/Install.sh b/src/MPIIO/Install.sh index 08d284dd2e..3834aea5c5 100644 --- a/src/MPIIO/Install.sh +++ b/src/MPIIO/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/Make.py b/src/Make.py index 81f3060c21..0fb2980823 100755 --- a/src/Make.py +++ b/src/Make.py @@ -3,9 +3,10 @@ # Make.py tool for managing packages and their auxiliary libs, # auto-editing machine Makefiles, and building LAMMPS # Syntax: Make.py -h (for help) -# Notes: needs python 2.7 (not Python 3) +# Notes: should be compatible with python 2.7 and 3.x thanks to 'futurize' -import sys,os,commands,re,copy,subprocess,platform +from __future__ import print_function +import sys,os,re,copy,subprocess,platform # switch abbrevs # switch classes = created class for each switch @@ -34,15 +35,15 @@ gpubuildflag = 0 # functions # ---------------------------------------------------------------- -# if flag = 1, print str and exit -# if flag = 0, print str as warning and do not exit +# if flag = 1, print txt and exit +# if flag = 0, print txt as warning and do not exit -def error(str,flag=1): +def error(txt,flag=1): if flag: - print "ERROR:",str + print("ERROR:",txt) sys.exit() else: - print "WARNING:",str + print("WARNING:",txt) # store command-line args as sw = dict of key/value # key = switch word, value = list of following args @@ -83,15 +84,15 @@ def switch2str(switches,switch_order): def compile_check(compiler,ccflags,warn): open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - str = "%s %s -c tmpauto.cpp" % (compiler,ccflags) - txt = commands.getoutput(str) + tmp = "%s %s -c tmpauto.cpp" % (compiler,ccflags) + txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() flag = 1 if txt or not os.path.isfile("tmpauto.o"): flag = 0 if warn: - print str - if txt: print txt - else: print "compile produced no output" + 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 @@ -102,15 +103,15 @@ def compile_check(compiler,ccflags,warn): def link_check(linker,linkflags,libs,warn): open("tmpauto.cpp",'w').write("int main(int, char **) {}\n") - str = "%s %s -o tmpauto tmpauto.cpp %s" % (linker,linkflags,libs) - txt = commands.getoutput(str) + tmp = "%s %s -o tmpauto tmpauto.cpp %s" % (linker,linkflags,libs) + txt = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() flag = 1 if txt or not os.path.isfile("tmpauto"): flag = 0 if warn: - print str - if txt: print txt - else: print "link produced no output" + 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 @@ -121,7 +122,7 @@ def link_check(linker,linkflags,libs,warn): # actions -class Actions: +class Actions(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -229,18 +230,18 @@ class Actions: def lib(self,suffix): if suffix != "all": - print "building",suffix,"library ..." - str = "%s.build()" % suffix - exec(str) + 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 ..." - str = "%s.build()" % pkg - exec(str) + print("building",pkg,"library ...") + txt = "%s.build()" % pkg + exec(txt) # read Makefile.machine # if caller = "file", edit via switches @@ -526,8 +527,10 @@ class Actions: # 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" + print("Created src/MAKE/MINE/Makefile.auto") # test full compile and link # unless caller = "file" and "exe" action will be invoked later @@ -545,9 +548,9 @@ class Actions: # invoke "make clean-auto" to force clean before build def clean(self): - str = "cd %s; make clean-auto" % dir.src - commands.getoutput(str) - print "Performed make clean-auto" + 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 @@ -556,15 +559,15 @@ class Actions: def exe(self): self.file("exe") - commands.getoutput("cd %s; rm -f lmp_auto" % dir.src) + 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 ..." - str = "cd %s/STUBS; make clean; make" % dir.src - txt = commands.getoutput(str) + 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 + print(txt) error('Unsuccessful "make stubs"') - print "Created src/STUBS/libmpi_stubs.a" + 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 @@ -574,24 +577,24 @@ class Actions: if "shannon" == platform.node() and packages.final["gpu"]: make = "srun make" - if jmake: str = "cd %s; %s -j %d auto" % (dir.src,make,jmake.n) - else: str = "cd %s; %s auto" % (dir.src,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(str,shell=True) + if verbose: subprocess.call(tmp,shell=True) else: - print str - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + print(tmp) + try: subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + elif not output: print("Created src/lmp_auto") # dir switch -class Dir: +class Dir(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -625,7 +628,7 @@ class Dir: # help switch -class Help: +class Help(object): def __init__(self,list): pass def help(self): @@ -650,7 +653,7 @@ Syntax: Make.py switch args ... # jmake switch -class Jmake: +class Jmake(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -671,7 +674,7 @@ class Jmake: # makefile switch -class Makefile: +class Makefile(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -690,7 +693,7 @@ class Makefile: # output switch -class Output: +class Output(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -707,7 +710,7 @@ class Output: # packages switch -class Packages: +class Packages(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -805,14 +808,14 @@ class Packages: # key = package name, value = 1 if currently installed, else 0 original = {} - str = "cd %s; make ps" % dir.src - output = commands.getoutput(str).split('\n') + tmp = "cd %s; make ps" % dir.src + output = subprocess.check_output(tmp,stderr=subprocess.STDOUT,shell=True).decode() 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 math "make ps" results') + 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 @@ -849,33 +852,33 @@ class Packages: # install packages in plist def install(self): - if self.plist: print "Installing packages ..." + if self.plist: print("Installing packages ...") for one in self.plist: if one == "orig": continue - commands.getoutput("cd %s; make %s" % (dir.src,one)) + subprocess.check_output("cd %s; make %s" % (dir.src,one),stderr=subprocess.STDOUT,shell=True) if self.plist and verbose: - txt = commands.getoutput("cd %s; make ps" % dir.src) - print "Package status after installation:" - print txt + 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 ..." - commands.getoutput("cd %s; make no-all" % dir.src) + 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]: - commands.getoutput("cd %s; make yes-%s" % (dir.src,one)) + subprocess.check_output("cd %s; make yes-%s" % (dir.src,one),stderr=subprocess.STDOUT,shell=True) if verbose: - txt = commands.getoutput("cd %s; make ps" % dir.src) - print "Restored package status:" - print txt + 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: +class Redo(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -940,8 +943,8 @@ class Redo: if words[0][-1] == ':': label = words[0][:-1] else: label = None if not self.labels: - if label: commands.append(' '.join(words[1:])) - else: commands.append(line) + if label: subprocess.append(' '.join(words[1:])) + else: subprocess.append(line) else: if not label: continue dict[label] = ' '.join(words[1:]) @@ -950,13 +953,13 @@ class Redo: for label in self.labels: if label not in dict: error("Redo label not in redo file") - commands.append(dict[label]) + subprocess.append(dict[label]) self.commands = commands # settings switch -class Settings: +class Settings(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -979,7 +982,7 @@ class Settings: # verbose switch -class Verbose: +class Verbose(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -995,7 +998,7 @@ class Verbose: # zoutput switch for making copy of final Makefile.auto -class Zoutput: +class Zoutput(object): def __init__(self,list): self.inlist = copy.copy(list) @@ -1018,7 +1021,7 @@ class Zoutput: # ATC lib -class ATC: +class ATC(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "g++" @@ -1051,25 +1054,25 @@ class ATC: make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.write("%s/Makefile.auto" % libdir) - commands.getoutput("cd %s; make -f Makefile.auto clean" % libdir) - if jmake: str = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: str = "cd %s; make -f 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/atc library") # AWPMD lib -class AWPMD: +class AWPMD(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "mpicc" @@ -1102,25 +1105,25 @@ class AWPMD: make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.write("%s/Makefile.auto" % libdir) - commands.getoutput("cd %s; make -f Makefile.auto clean" % libdir) - if jmake: str = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: str = "cd %s; make -f 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/awpmd library") # COLVARS lib -class COLVARS: +class COLVARS(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "g++" @@ -1153,25 +1156,25 @@ class COLVARS: make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.write("%s/Makefile.auto" % libdir) - commands.getoutput("cd %s; make -f Makefile.auto clean" % libdir) - if jmake: str = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: str = "cd %s; make -f 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/colvars library") # CUDA lib -class CUDA: +class CUDA(object): def __init__(self,list): self.inlist = copy.copy(list) self.mode = "double" @@ -1205,30 +1208,30 @@ class CUDA: def build(self): libdir = dir.lib + "/cuda" - commands.getoutput("cd %s; make clean" % libdir) + 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: str = "cd %s; make -j %d precision=%d arch=%s" % \ + if jmake: txt = "cd %s; make -j %d precision=%d arch=%s" % \ (libdir,jmake.n,n,self.arch) - else: str = str = "cd %s; make precision=%d arch=%s" % \ + 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/cuda library") # GPU lib -class GPU: +class GPU(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "linux.double" @@ -1300,25 +1303,25 @@ class GPU: make = "make" if "shannon" == platform.node(): make = "srun make" - commands.getoutput("cd %s; %s -f Makefile.auto clean" % (libdir,make)) - if jmake: str = "cd %s; %s -j %d -f Makefile.auto" % (libdir,make,jmake.n) - else: str = "cd %s; %s -f Makefile.auto" % (libdir,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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/gpu library") # H5MD lib -class H5MD: +class H5MD(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "h5cc" @@ -1351,24 +1354,24 @@ class H5MD: make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.write("%s/Makefile.auto" % libdir) - commands.getoutput("cd %s; make clean" % libdir) - str = "cd %s; make" % 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/h5md library") # MEAM lib -class MEAM: +class MEAM(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "gfortran" @@ -1401,25 +1404,25 @@ class MEAM: make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.write("%s/Makefile.auto" % libdir) - commands.getoutput("cd %s; make -f Makefile.auto clean" % 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 - str = "cd %s; make -f Makefile.auto" % libdir + txt = "cd %s; make -f Makefile.auto" % libdir # if verbose, print output as build proceeds, else only print if fails - if verbose: subprocess.call(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/meam library") # POEMS lib -class POEMS: +class POEMS(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "g++" @@ -1452,25 +1455,25 @@ class POEMS: make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.write("%s/Makefile.auto" % libdir) - commands.getoutput("cd %s; make -f Makefile.auto clean" % libdir) - if jmake: str = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: str = "cd %s; make -f 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/poems library") # PYTHON lib -class PYTHON: +class PYTHON(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "g++" @@ -1497,15 +1500,15 @@ class PYTHON: def build(self): libdir = dir.lib + "/python" if self.lammpsflag: - commands.getoutput("cd %s; cp Makefile.lammps.%s Makefile.lammps" % + 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" + else: print("Created lib/python/Makefile.lammps file") # QMMM lib -class QMMM: +class QMMM(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "gfortran" @@ -1538,25 +1541,25 @@ class QMMM: make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps) make.write("%s/Makefile.auto" % libdir) - commands.getoutput("cd %s; make -f Makefile.auto clean" % libdir) - if jmake: str = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: str = "cd %s; make -f 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/qmmm library") # REAX lib -class REAX: +class REAX(object): def __init__(self,list): self.inlist = copy.copy(list) self.make = "gfortran" @@ -1590,24 +1593,24 @@ class REAX: make.write("%s/Makefile.auto" % libdir) commands.getoutput("cd %s; make -f Makefile.auto clean" % libdir) - if jmake: str = "cd %s; make -j %d -f Makefile.auto" % (libdir,jmake.n) - else: str = "cd %s; make -f Makefile.auto" % libdir + 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(str,shell=True) + if verbose: subprocess.call(txt,shell=True) else: - try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True) - except Exception as e: print e.output + try: subprocess.check_output(txt,stderr=subprocess.STDOUT,shell=True) + except Exception 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" + else: print("Created lib/reax library") # VORONOI lib -class VORONOI: +class VORONOI(object): def __init__(self,list): self.inlist = copy.copy(list) self.install = "" @@ -1635,9 +1638,9 @@ class VORONOI: if not self.install: return libdir = dir.lib + "/voronoi" cmd = "cd %s; python install.py %s" % (libdir,self.install) - txt = commands.getoutput(cmd) - if verbose: print txt - print "Created lib/voronoi library" + 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 @@ -1645,7 +1648,7 @@ class VORONOI: # Intel class -class Intel: +class Intel(object): def __init__(self,list): self.inlist = copy.copy(list) self.mode = "cpu" @@ -1666,7 +1669,7 @@ class Intel: # Kokkos class -class Kokkos: +class Kokkos(object): def __init__(self,list): self.inlist = copy.copy(list) self.mode = "" @@ -1688,7 +1691,7 @@ class Kokkos: """ def check(self): - print self.inlist + print(self.inlist) if self.inlist != None and len(self.inlist) == 0: error("-kokkos args are invalid") @@ -1710,7 +1713,7 @@ class Kokkos: # Cc class -class Cc: +class Cc(object): def __init__(self,list): self.inlist = copy.copy(list) self.compiler = self.abbrev = "" @@ -1762,7 +1765,7 @@ class Cc: # Flags class -class Flags: +class Flags(object): def __init__(self,list): self.inlist = copy.copy(list) self.flags = [] @@ -1803,7 +1806,7 @@ class Flags: # Mpi class -class Mpi: +class Mpi(object): def __init__(self,list): self.inlist = copy.copy(list) self.style = self.dir = "" @@ -1837,7 +1840,7 @@ class Mpi: # Fft class -class Fft: +class Fft(object): def __init__(self,list): self.inlist = copy.copy(list) self.dir = self.incdir = self.libdir = "" @@ -1877,7 +1880,7 @@ class Fft: # Jpg class -class Jpg: +class Jpg(object): def __init__(self,list): self.inlist = copy.copy(list) self.on = 1 @@ -1916,7 +1919,7 @@ class Jpg: # Png class -class Png: +class Png(object): def __init__(self,list): self.inlist = copy.copy(list) self.on = 1 @@ -1958,7 +1961,7 @@ class Png: # read, tweak, and write a Makefile -class MakeReader: +class MakeReader(object): # read a makefile # flag = 0 if file is full path name @@ -2127,14 +2130,14 @@ class MakeReader: if not line.isdigit(): if flag and i == 0: line = "# auto = makefile auto-generated by Make.py" - print >>fp,line + 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 >>fp,"%s%s" % (txt,' '.join(values)) + print("%s%s" % (txt,' '.join(values)), file=fp) # ---------------------------------------------------------------- # main program @@ -2203,7 +2206,7 @@ while 1: switches[switch] = cmd_switches[switch] argstr = switch2str(switches,switch_order) - print "Redo command: Make.py",argstr + print("Redo command: Make.py",argstr) else: switches = cmd_switches switch_order = cmd_switch_order @@ -2246,10 +2249,10 @@ while 1: if help or (actions and "-h" in actions.inlist) or not switches: if not help: help = Help(None) - print help.help() + print(help.help()) for switch in switch_order: if switch == "h": continue - print classes[switch].help()[1:] + print(classes[switch].help()[1:]) sys.exit() # create needed default classes if not specified with switch @@ -2298,7 +2301,7 @@ while 1: if actions: for action in actions.alist: - print "Action %s ..." % action + print("Action %s ..." % action) if action.startswith("lib-"): actions.lib(action[4:]) elif action == "file": actions.file("file") elif action == "clean": actions.clean() @@ -2310,35 +2313,35 @@ while 1: if output and actions and "exe" in actions.alist: txt = "cp %s/lmp_auto %s/lmp_%s" % (dir.src,dir.cwd,output.machine) - commands.getoutput(txt) - print "Created lmp_%s in %s" % (output.machine,dir.cwd) + 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) - commands.getoutput(txt) - print "Created Makefile.%s in %s/MAKE/MINE" % (zoutput.machine,dir.src) + 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) - commands.getoutput(txt) - print "Created Makefile_gpu.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src) + 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) - commands.getoutput(txt) - print "Created Makefile_gpu_lammps.%s in %s/MAKE/MINE" % \ - (zoutput.machine,dir.src) + 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 >>fp,"# last invoked Make.py command" - print >>fp,switch2str(switches,switch_order) + print("# last invoked Make.py command", file=fp) + print(switch2str(switches,switch_order), file=fp) fp.close() # if not redoflag, done diff --git a/src/Make.sh b/src/Make.sh index 3332be92c4..fbed1a8bcd 100644 --- a/src/Make.sh +++ b/src/Make.sh @@ -5,6 +5,12 @@ # sh Make.sh Makefile.shlib # sh Make.sh Makefile.list +# turn off enforced customizations +GREP_OPTIONS= +# enforce using portable C locale +LC_ALL=C +export LC_ALL GREP_OPTIONS + # function to create one style_*.h file # must whack *.d files that depend on style_*.h file, # else Make will not recreate them diff --git a/src/OPT/Install.sh b/src/OPT/Install.sh index 2374072a69..ca1231c615 100644 --- a/src/OPT/Install.sh +++ b/src/OPT/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/POEMS/Install.sh b/src/POEMS/Install.sh index b03792e4f1..7996f542be 100644 --- a/src/POEMS/Install.sh +++ b/src/POEMS/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/PYTHON/Install.sh b/src/PYTHON/Install.sh index 02c7acc812..3d6f71958a 100755 --- a/src/PYTHON/Install.sh +++ b/src/PYTHON/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/Package.sh b/src/Package.sh index 80677665eb..ce3819b590 100644 --- a/src/Package.sh +++ b/src/Package.sh @@ -1,6 +1,10 @@ # Package.sh = package management, called from Makefile # Syntax: sh Package.sh DIR status/update/overwrite/diff +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # package is already installed if any package *.cpp or *.h file is in src # else not installed diff --git a/src/REAX/Install.sh b/src/REAX/Install.sh index af0f1e2436..f0083810e9 100644 --- a/src/REAX/Install.sh +++ b/src/REAX/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/USER-ATC/Install.sh b/src/USER-ATC/Install.sh index 03ec562a6a..1137389018 100755 --- a/src/USER-ATC/Install.sh +++ b/src/USER-ATC/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/USER-AWPMD/Install.sh b/src/USER-AWPMD/Install.sh index 6fd0718b71..7922c53395 100644 --- a/src/USER-AWPMD/Install.sh +++ b/src/USER-AWPMD/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/USER-CG-CMM/Install.sh b/src/USER-CG-CMM/Install.sh index 8e4376e961..00f515b794 100644 --- a/src/USER-CG-CMM/Install.sh +++ b/src/USER-CG-CMM/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/USER-COLVARS/Install.sh b/src/USER-COLVARS/Install.sh index d4e252c223..c01719e766 100755 --- a/src/USER-COLVARS/Install.sh +++ b/src/USER-COLVARS/Install.sh @@ -5,6 +5,10 @@ mode=$1 # arg1 = file, arg2 = file it depends on +# enforce using portable C locale +LC_ALL=C +export LC_ALL + action () { if (test $mode = 0) then rm -f ../$1 diff --git a/src/USER-FEP/Install.sh b/src/USER-FEP/Install.sh index 695d2baf69..09c2024ad2 100644 --- a/src/USER-FEP/Install.sh +++ b/src/USER-FEP/Install.sh @@ -1,12 +1,12 @@ # Install/unInstall package files in LAMMPS # mode = 0/1/2 for uninstall/install/update -# this is default Install.sh for all packages -# if package has an auxiliary library or a file with a dependency, -# then package dir has its own customized Install.sh - mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-H5MD/Install.sh b/src/USER-H5MD/Install.sh index 32bd9d1931..bdda732807 100644 --- a/src/USER-H5MD/Install.sh +++ b/src/USER-H5MD/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-INTEL/Install.sh b/src/USER-INTEL/Install.sh index 5b7e9e40b3..79cc1158e9 100644 --- a/src/USER-INTEL/Install.sh +++ b/src/USER-INTEL/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-MISC/Install.sh b/src/USER-MISC/Install.sh index 8b2e864787..203d923164 100644 --- a/src/USER-MISC/Install.sh +++ b/src/USER-MISC/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-MOLFILE/Install.sh b/src/USER-MOLFILE/Install.sh index df193a6f44..19fd3bd361 100644 --- a/src/USER-MOLFILE/Install.sh +++ b/src/USER-MOLFILE/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-OMP/Install.sh b/src/USER-OMP/Install.sh index 85b44f1bee..bb4ef6c3aa 100644 --- a/src/USER-OMP/Install.sh +++ b/src/USER-OMP/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-PHONON/Install.sh b/src/USER-PHONON/Install.sh index 36cd17daae..cfa369bb05 100644 --- a/src/USER-PHONON/Install.sh +++ b/src/USER-PHONON/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-QMMM/Install.sh b/src/USER-QMMM/Install.sh index 02efdf2d7e..089b880a77 100755 --- a/src/USER-QMMM/Install.sh +++ b/src/USER-QMMM/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-QUIP/Install.sh b/src/USER-QUIP/Install.sh index 9cc672aefa..ee7faaf62a 100644 --- a/src/USER-QUIP/Install.sh +++ b/src/USER-QUIP/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-SMD/Install.sh b/src/USER-SMD/Install.sh index 4cc736e96d..c0f48c5460 100644 --- a/src/USER-SMD/Install.sh +++ b/src/USER-SMD/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/USER-VTK/Install.sh b/src/USER-VTK/Install.sh index d61e0640f9..d02dc87772 100644 --- a/src/USER-VTK/Install.sh +++ b/src/USER-VTK/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () { diff --git a/src/VORONOI/Install.sh b/src/VORONOI/Install.sh index a93b2cab7e..f21e9404eb 100755 --- a/src/VORONOI/Install.sh +++ b/src/VORONOI/Install.sh @@ -3,6 +3,10 @@ mode=$1 +# enforce using portable C locale +LC_ALL=C +export LC_ALL + # arg1 = file, arg2 = file it depends on action () {