Page MenuHomec4science

show
No OneTemporary

File Metadata

Created
Fri, Nov 22, 21:01
#!/usr/bin/env python
#csh
#mpiexec -n 1 src/Gadget2 params > snap/out.dat < /dev/null&
import sys,os,shutil
from optparse import OptionParser
import nodes
def parse_options():
usage = "usage: %prog [options] file"
parser = OptionParser(usage=usage)
parser.add_option("-n","--np",
action="store",
type="int",
dest="np",
default = 1,
help="number of processors")
parser.add_option("--snapdir",
action="store",
type="string",
dest="snapdir",
default = 'snap',
help="output snap directory")
(options, args) = parser.parse_args()
files = args
return files,options
files,opt = parse_options()
cdir = os.getcwd()
sname = os.path.basename(cdir)
localdir = os.getcwd()
blocaldir = os.path.basename(localdir)
outputfile = "%s/out.dat"%opt.snapdir
if nodes.nodes!=None:
node = nodes.nodes[0]
outputfile = "/net/%s/scratch/revaz/%s/%s"%(node,blocaldir,outputfile)
os.system("tail -f %s"%outputfile)

Event Timeline