added some flexibility (and bug-fixing) to the pre/post processing. the file 'MSCpath' contains the LOCAL path to the MSC installation (/msc in our case)
This commit is contained in:
parent
f78b07448f
commit
3b671faae7
|
@ -0,0 +1 @@
|
||||||
|
/msc
|
|
@ -1,15 +1,28 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
releases = ['2010b3','2008r1','2007r1','2005r3']
|
|
||||||
|
|
||||||
|
|
||||||
import os, sys, math, re, threading, time
|
import os, sys, math, re, threading, time
|
||||||
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
|
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
|
||||||
for release in releases:
|
|
||||||
libPath = '/msc/mentat%s/shlib/'%release
|
releases = {'2010':['linux64',''],
|
||||||
|
'2008r1':[''],
|
||||||
|
'2007r1':[''],
|
||||||
|
'2005r3':[''],
|
||||||
|
}
|
||||||
|
|
||||||
|
file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0]))
|
||||||
|
MSCpath = os.path.normpath(file.readline().strip())
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
for release,subdirs in sorted(releases.items(),reverse=True):
|
||||||
|
for subdir in subdirs:
|
||||||
|
libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir)
|
||||||
if os.path.exists(libPath):
|
if os.path.exists(libPath):
|
||||||
sys.path.append(libPath)
|
sys.path.append(libPath)
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
break
|
||||||
|
|
||||||
from py_post import *
|
from py_post import *
|
||||||
|
|
||||||
|
|
||||||
|
@ -368,7 +381,7 @@ Example:
|
||||||
2) global sum of squared data falling into first quadrant arc between R1 and R2
|
2) global sum of squared data falling into first quadrant arc between R1 and R2
|
||||||
--filter 'x*x + y*y >= R1*R1 and x*x + y*y <= R2*R2' --map 'lambda list: sum([item*item for item in list])'
|
--filter 'x*x + y*y >= R1*R1 and x*x + y*y <= R2*R2' --map 'lambda list: sum([item*item for item in list])'
|
||||||
|
|
||||||
$Id: postResults 205 2010-06-08 15:23:31Z MPIE\p.eisenlohr $
|
$Id$
|
||||||
""")
|
""")
|
||||||
|
|
||||||
parser.add_option('-i','--info', action='store_true', dest='info', \
|
parser.add_option('-i','--info', action='store_true', dest='info', \
|
||||||
|
@ -685,7 +698,7 @@ for increment in increments:
|
||||||
file = open(outFilename,'w')
|
file = open(outFilename,'w')
|
||||||
fileOpen = True
|
fileOpen = True
|
||||||
file.write('2\theader\n')
|
file.write('2\theader\n')
|
||||||
file.write('$Id: postResults 205 2010-06-08 15:23:31Z MPIE\p.eisenlohr $\n')
|
file.write('$Id$\n')
|
||||||
if options.time:
|
if options.time:
|
||||||
basic = ['inc','time']
|
basic = ['inc','time']
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,21 +1,29 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
from colorsys import *
|
from colorsys import *
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
releases = ['2010','2008r1','2007r1','2005r3']
|
releases = {'2010':['linux64',''],
|
||||||
|
'2008r1':[''],
|
||||||
|
'2007r1':[''],
|
||||||
|
'2005r3':[''],
|
||||||
|
}
|
||||||
|
|
||||||
for release in releases:
|
file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0]))
|
||||||
libPath = '/msc/mentat%s/shlib/'%release
|
MSCpath = os.path.normpath(file.readline().strip())
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
for release,subdirs in sorted(releases.items(),reverse=True):
|
||||||
|
for subdir in subdirs:
|
||||||
|
libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir)
|
||||||
if os.path.exists(libPath):
|
if os.path.exists(libPath):
|
||||||
sys.path.append(libPath)
|
sys.path.append(libPath)
|
||||||
for subdir in [os.path.join(libPath,file)
|
|
||||||
for file in os.listdir(libPath)
|
|
||||||
if os.path.isdir(os.path.join(libPath,file))]:
|
|
||||||
sys.path.append(subdir)
|
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
break
|
||||||
|
|
||||||
from py_mentat import *
|
from py_mentat import *
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,29 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
releases = ['2010r1','2008r1','2007r1','2005r3']
|
|
||||||
|
|
||||||
|
|
||||||
import sys,os,pwd,math,re
|
import sys,os,pwd,math,re
|
||||||
#import Image,ImageDraw
|
#import Image,ImageDraw
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
for release in releases:
|
releases = {'2010':['linux64',''],
|
||||||
libPath = '/msc/mentat%s/shlib/'%release
|
'2008r1':[''],
|
||||||
|
'2007r1':[''],
|
||||||
|
'2005r3':[''],
|
||||||
|
}
|
||||||
|
|
||||||
|
file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0]))
|
||||||
|
MSCpath = os.path.normpath(file.readline().strip())
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
for release,subdirs in sorted(releases.items(),reverse=True):
|
||||||
|
for subdir in subdirs:
|
||||||
|
libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir)
|
||||||
if os.path.exists(libPath):
|
if os.path.exists(libPath):
|
||||||
sys.path.append(libPath)
|
sys.path.append(libPath)
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
break
|
||||||
|
|
||||||
from py_mentat import *
|
from py_mentat import *
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,29 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
releases = ['2010','2008r1','2007r1','2005r3']
|
|
||||||
|
|
||||||
|
|
||||||
import sys,os,pwd,math,re
|
import sys,os,pwd,math,re
|
||||||
#import Image,ImageDraw
|
#import Image,ImageDraw
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
for release in releases:
|
releases = {'2010':['linux64',''],
|
||||||
libPath = '/msc/mentat%s/shlib/'%release
|
'2008r1':[''],
|
||||||
|
'2007r1':[''],
|
||||||
|
'2005r3':[''],
|
||||||
|
}
|
||||||
|
|
||||||
|
file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0]))
|
||||||
|
MSCpath = os.path.normpath(file.readline().strip())
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
for release,subdirs in sorted(releases.items(),reverse=True):
|
||||||
|
for subdir in subdirs:
|
||||||
|
libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir)
|
||||||
if os.path.exists(libPath):
|
if os.path.exists(libPath):
|
||||||
sys.path.append(libPath)
|
sys.path.append(libPath)
|
||||||
for subdir in [os.path.join(libPath,file)
|
|
||||||
for file in os.listdir(libPath)
|
|
||||||
if os.path.isdir(os.path.join(libPath,file))]:
|
|
||||||
sys.path.append(subdir)
|
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
break
|
||||||
|
|
||||||
from py_mentat import *
|
from py_mentat import *
|
||||||
|
|
||||||
def outMentat(cmd,locals):
|
def outMentat(cmd,locals):
|
||||||
|
|
Loading…
Reference in New Issue