Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92696017
show
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 22, 21:01
Size
1 KB
Mime Type
text/x-python
Expires
Sun, Nov 24, 21:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22488701
Attached To
rPNBODY pNbody
show
View Options
#!/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
Log In to Comment