Ignore:
Timestamp:
Jan 23, 2015, 11:16:08 AM (10 years ago)
Author:
cfuguet
Message:

reconf: improve test scripts for tsar_generic_iob platform

  • Now it is possible to pass the number of OpenMP threads as a parameter
Location:
branches/reconfiguration/platforms/tsar_generic_iob/scripts
Files:
2 edited

Legend:

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

    r926 r927  
    8989    # define physical segments
    9090    ram_base = 0x0000000000
    91     if 1: ram_size = 0x4000000            # 64 Mbytes
    92     else: ram_size = 0x0040000            # 256 Kbytes
     91    ram_size = 0x10000000 / (x_size * y_size)
    9392
    9493    xcu_base = 0x00B0000000
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py

    r926 r927  
    8484    # 5. execute simulator
    8585    os.environ["DISTRIBUTED_BOOT"] = "1"
     86    os.environ["SOCLIB_FB"] = "HEADLESS"
    8687    if args.batchmode:
    87         os.environ["SOCLIB_FB"] = "HEADLESS"
    8888        os.environ["SOCLIB_TTY"] = "FILES"
    8989
     
    101101            command.extend(["-FAULTY_ROUTER", str(f[0]), str(f[1]), str(f[2])])
    102102
    103     ompthreads = 1
    104103    if args.debug != None:
    105104        command.extend(["-DEBUG", str(args.debug[0])]);
     
    109108
    110109    elif os.environ.get('SOCLIB_GDB') == None:
    111         ompthreads = (args.x * args.y) / 4
    112         cpucount = multiprocessing.cpu_count()
    113         if ompthreads > cpucount:
    114             ompthreads = cpucount
    115 
    116110        # the procedure grows linearly with the diameter of the mesh.
    117111        maxcycles = 1500000 + (args.x + args.y) * 20000
    118112        command.extend(["-NCYCLES", str(maxcycles)])
    119113
     114    # OpenMP number of threads definition
     115    ompthreads = args.threads
     116    if ompthreads < 0:
     117        if os.environ.get('SOCLIB_GDB') != None:
     118            ompthreads = 1
     119
     120        elif args.debug != None:
     121            ompthreads = 1
     122
     123        else:
     124            ompthreads = (args.x * args.y) / 4
     125            cpucount = multiprocessing.cpu_count()
     126            if ompthreads > cpucount: ompthreads = cpucount
     127
    120128    command.extend(["-THREADS", str(ompthreads)])
     129
    121130
    122131    logfile.write("Execute: {0}\n".format(" ".join(command)))
     
    178187        help='needs four arguments: from, to, procid, memcid')
    179188
     189    parser.add_argument(
     190        '--threads', '-t', dest='threads', default=-1,
     191        help='number of OpenMP threads')
     192
    180193    run(parser.parse_args())
    181194
Note: See TracChangeset for help on using the changeset viewer.