Ignore:
Timestamp:
Dec 12, 2014, 4:52:47 PM (10 years ago)
Author:
cfuguet
Message:

reconf: improve platform configuration scripts for OpenMP

File:
1 edited

Legend:

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

    r904 r906  
    88import faultyprocs
    99import argparse
     10import multiprocessing
    1011
    1112def run(args):
     
    8687        os.environ["SOCLIB_TTY"] = "FILES"
    8788
    88     if (args.x * args.y) <= 4:
    89         ompthreads = args.x * args.y
    90     elif (args.x * args.y) <= 16:
    91         ompthreads = 4
    92     else:
    93         ompthreads = 8
     89    ompthreads = (args.x * args.y) / 4
     90    cpucount = multiprocessing.cpu_count()
     91    if ompthreads > cpucount: ompthreads = cpucount
    9492
    9593    print "[ run.py ] starting simulation"
Note: See TracChangeset for help on using the changeset viewer.