Skip to content

Instantly share code, notes, and snippets.

@nickloman
Created November 18, 2011 14:25
Show Gist options
  • Save nickloman/1376578 to your computer and use it in GitHub Desktop.
Save nickloman/1376578 to your computer and use it in GitHub Desktop.
dodir_pyrom.py
import os
import sys
import glob
def system(cmd):
print >>sys.stderr, cmd
os.system(cmd)
# dodir_pyro.py directory
directory = sys.argv[1]
owd = os.getcwd()
os.chdir(directory)
for ln in sys.stdin:
cols = ln.split("\t")
stub = cols[0]
cmd = "mpirun PyroDist -in %s_20000.dat -out %s >%s.pdout" % (stub, stub, stub)
print cmd
system(cmd)
cmd = "FCluster -in %s.fdist -out %s > %s.fcout" % (stub, stub, stub)
print cmd
system(cmd)
cmd = "mpirun -np 8 PyroNoiseM -din %s.dat -out %s_s60_c01 -lin %s.list -s 60.0 -c 0.01 > %s_s60_c01.pnout" % (stub, stub, stub, stub)
print cmd
system(cmd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment