diff --git a/python/examples/plot.py b/python/examples/plot.py index e831535e2c..6645a72404 100755 --- a/python/examples/plot.py +++ b/python/examples/plot.py @@ -28,10 +28,10 @@ nsteps = int(sys.argv[3]) compute = sys.argv[4] me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() +# uncomment this if running in parallel via mpi4py +#from mpi4py import MPI +#me = MPI.COMM_WORLD.Get_rank() +#nprocs = MPI.COMM_WORLD.Get_size() from lammps import lammps lmp = lammps() @@ -71,6 +71,5 @@ while ntimestep < nsteps: lmp.command("run 0 pre no post yes") -# uncomment if running in parallel via Pypar +# uncomment if running in parallel via mpi4py #print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/viz_atomeye.py b/python/examples/viz_atomeye.py index d7f83f274d..c7c83e3d36 100755 --- a/python/examples/viz_atomeye.py +++ b/python/examples/viz_atomeye.py @@ -28,10 +28,10 @@ nfreq = int(sys.argv[2]) nsteps = int(sys.argv[3]) me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() +# uncomment this if running in parallel via mpi4py +#from mpi4py import MPI +#me = MPI.COMM_WORLD.Get_rank() +#nprocs = MPI.COMM_WORLD.Get_size() from lammps import lammps lmp = lammps() @@ -68,6 +68,5 @@ while ntimestep < nsteps: lmp.command("run 0 pre no post yes") -# uncomment if running in parallel via Pypar +# uncomment if running in parallel via mpi4py #print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/viz_gl.py b/python/examples/viz_gl.py index 5878b68502..6266682b9c 100755 --- a/python/examples/viz_gl.py +++ b/python/examples/viz_gl.py @@ -24,10 +24,10 @@ nfreq = int(sys.argv[2]) nsteps = int(sys.argv[3]) me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() +# uncomment this if running in parallel via mpi4py +#from mpi4py import MPI +#me = MPI.COMM_WORLD.Get_rank() +#nprocs = MPI.COMM_WORLD.Get_size() from lammps import lammps lmp = lammps() @@ -83,6 +83,5 @@ while ntimestep < nsteps: lmp.command("run 0 pre no post yes") -# uncomment if running in parallel via Pypar +# uncomment if running in parallel via mpi4py #print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/viz_pymol.py b/python/examples/viz_pymol.py index 0950b3668b..b5061d4c20 100755 --- a/python/examples/viz_pymol.py +++ b/python/examples/viz_pymol.py @@ -24,10 +24,10 @@ nfreq = int(sys.argv[2]) nsteps = int(sys.argv[3]) me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() +# uncomment this if running in parallel via mpi4py +#from mpi4py import MPI +#me = MPI.COMM_WORLD.Get_rank() +#nprocs = MPI.COMM_WORLD.Get_size() from lammps import lammps lmp = lammps() @@ -78,6 +78,5 @@ while ntimestep < nsteps: lmp.command("run 0 pre no post yes") -# uncomment if running in parallel via Pypar +# uncomment if running in parallel via mpi4py #print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/viz_vmd.py b/python/examples/viz_vmd.py index f592857566..5c06697378 100755 --- a/python/examples/viz_vmd.py +++ b/python/examples/viz_vmd.py @@ -24,10 +24,10 @@ nfreq = int(sys.argv[2]) nsteps = int(sys.argv[3]) me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() +# uncomment this if running in parallel via mpi4py +#from mpi4py import MPI +#me = MPI.COMM_WORLD.Get_rank() +#nprocs = MPI.COMM_WORLD.Get_size() from lammps import lammps lmp = lammps() @@ -87,6 +87,5 @@ if me == 0: #v.enter() #v.stop() -# uncomment if running in parallel via Pypar +# uncomment if running in parallel via mpi4py #print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/vizplotgui_atomeye.py b/python/examples/vizplotgui_atomeye.py index 8f5f4e3dff..f5b4481f60 100755 --- a/python/examples/vizplotgui_atomeye.py +++ b/python/examples/vizplotgui_atomeye.py @@ -9,9 +9,6 @@ # compute-ID = ID of compute that calculates temperature # (or any other scalar quantity) -# IMPORTANT: this script cannot yet be run in parallel via Pypar, -# because I can't seem to do a MPI-style broadcast in Pypar - from __future__ import print_function import sys,os,time sys.path.append("./pizza") @@ -59,10 +56,6 @@ nfreq = int(sys.argv[2]) compute = sys.argv[3] me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() from lammps import lammps lmp = lammps() @@ -163,7 +156,3 @@ while 1: time.sleep(0.01) lmp.command("run 0 pre no post yes") - -# uncomment if running in parallel via Pypar -#print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/vizplotgui_gl.py b/python/examples/vizplotgui_gl.py index c4847667fd..e137a42e29 100755 --- a/python/examples/vizplotgui_gl.py +++ b/python/examples/vizplotgui_gl.py @@ -9,9 +9,6 @@ # compute-ID = ID of compute that calculates temperature # (or any other scalar quantity) -# IMPORTANT: this script cannot yet be run in parallel via Pypar, -# because I can't seem to do a MPI-style broadcast in Pypar - from __future__ import print_function import sys,time sys.path.append("./pizza") @@ -55,10 +52,6 @@ nfreq = int(sys.argv[2]) compute = sys.argv[3] me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() from lammps import lammps lmp = lammps() @@ -176,7 +169,3 @@ while 1: time.sleep(0.01) lmp.command("run 0 pre no post yes") - -# uncomment if running in parallel via Pypar -#print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/vizplotgui_pymol.py b/python/examples/vizplotgui_pymol.py index 11be498741..543b707478 100755 --- a/python/examples/vizplotgui_pymol.py +++ b/python/examples/vizplotgui_pymol.py @@ -9,9 +9,6 @@ # compute-ID = ID of compute that calculates temperature # (or any other scalar quantity) -# IMPORTANT: this script cannot yet be run in parallel via Pypar, -# because I can't seem to do a MPI-style broadcast in Pypar - from __future__ import print_function import sys,time sys.path.append("./pizza") @@ -57,10 +54,6 @@ nfreq = int(sys.argv[2]) compute = sys.argv[3] me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() from lammps import lammps lmp = lammps() @@ -172,7 +165,3 @@ while 1: time.sleep(0.01) lmp.command("run 0 pre no post yes") - -# uncomment if running in parallel via Pypar -#print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize() diff --git a/python/examples/vizplotgui_vmd.py b/python/examples/vizplotgui_vmd.py index 0003ebc929..10129c7285 100755 --- a/python/examples/vizplotgui_vmd.py +++ b/python/examples/vizplotgui_vmd.py @@ -9,9 +9,6 @@ # compute-ID = ID of compute that calculates temperature # (or any other scalar quantity) -# IMPORTANT: this script cannot yet be run in parallel via Pypar, -# because I can't seem to do a MPI-style broadcast in Pypar - from __future__ import print_function import sys,time sys.path.append("./pizza") @@ -56,10 +53,6 @@ nfreq = int(sys.argv[2]) compute = sys.argv[3] me = 0 -# uncomment if running in parallel via Pypar -#import pypar -#me = pypar.rank() -#nprocs = pypar.size() from lammps import lammps lmp = lammps() @@ -171,7 +164,3 @@ while 1: time.sleep(0.01) lmp.command("run 0 pre no post yes") - -# uncomment if running in parallel via Pypar -#print("Proc %d out of %d procs has" % (me,nprocs), lmp) -#pypar.finalize()