Ignore:
Timestamp:
Aug 27, 2014, 6:13:01 PM (10 years ago)
Author:
cfuguet
Message:

reconfiguration/tsar_generic_iob: fixing python version incompatibility issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/run.py

    r776 r778  
    2424# translate the relative path (if needed) into an absolute path
    2525basedir = os.path.abspath(sys.argv[1])
    26 print "[ run.py ] platform base directory: {}".format(basedir)
     26print "[ run.py ] platform base directory: {0}".format(basedir)
    2727
    2828# repeat while configurations is not empty
    2929for faulty in faultylist:
    3030    for x,y in configs:
    31         confdir = "{}/conf/config_{}c".format(basedir, x*y)
    32         print "[ run.py ] generating files for {}".format(confdir)
     31        confdir = "{0}/conf/config_{1}c".format(basedir, x*y)
     32        print "[ run.py ] generating files for {0}".format(confdir)
    3333
    3434        # 1. generate configuration and ouput directories
     
    6464        os.environ["DISTRIBUTED_BOOT"] = "1"
    6565        os.environ["SOCLIB_TTY"] = "FILES"
    66         with open(confdir + "/log", "w") as log_file:
     66
     67        if x*y <= 4: ompthreads = x*y
     68        else:        ompthreads = 4
     69        with open(confdir + "/log", "w") as logfile:
     70            print "executing simul.x"
    6771            subprocess.call([basedir + "/simul.x",
    6872                "-SOFT"   , basedir + "/soft/build/soft.elf",
    6973                "-DISK"   , "/dev/null",
    70                 "-NCYCLES", "10000000"],
    71                 stdout=log_file,
    72                 stderr=log_file,
     74                "-THREADS", str(ompthreads),
     75                "-NCYCLES", "1000000"],
     76                stdout=logfile,
     77                stderr=logfile,
    7378                )
    7479
Note: See TracChangeset for help on using the changeset viewer.