Skip to content
Snippets Groups Projects
Commit a6b1fede authored by Yngve Levinsen's avatar Yngve Levinsen
Browse files

added setup of exec folder

some minor fixes
parent d04a9f5b
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,6 @@ transfer_input_files = {input_files}
log = condor.log
executable = TraceWin_exe/tracelx.$$(OpSys).$$(Arch)
executable = TraceWin_exe/tracewin.$$(OpSys).$$(Arch)
priority = -5
......@@ -8,11 +8,25 @@ def define_and_handle_args():
parser.add_argument("-s", dest="seed", default=None, type=int, help="Define seed")
parser.add_argument("-c", dest="calc_dir", default='', type=str, help="Path to calculation folder")
parser.add_argument("-c", dest="calc_dir", default='.', type=str, help="Path to calculation folder")
return parser.parse_args()
def setup_exec_folder():
import os,shutil
orig_path=os.path.join(os.environ.get("HOME"),"TraceWin_exe")
if not os.path.isdir(orig_path):
raise ValueError("Cannot find tracewin executables in "+orig_path+" yet")
os.makedirs("TraceWin_exe")
o=dict(LINUX="lx",OSX="mac")
a=dict(INTEL="",X86_64="64")
for OpSys in ["LINUX", "OSX"]:
for Arch in ["INTEL", "X86_64"]:
shutil.copy(os.path.join(orig_path,"trace"+o[OpSys]+a[Arch]),
os.path.join("TraceWin_exe","tracewin.%s.%s" % (OpSys,Arch)))
def setup(args):
import os,random
......@@ -24,6 +38,9 @@ def setup(args):
if num_jobs==0:
raise ValueError("Could not find any simulation folders in "+args.calc_dir)
if not os.path.isdir("TraceWin_exe"):
setup_exec_folder()
if args.seed!=None:
random.seed(args.seed)
rand_lst=[random.randint(1e5,1e9) for i in xrange(num_jobs)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment