Changeset 906 for branches


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

reconf: improve platform configuration scripts for OpenMP

Location:
branches/reconfiguration/platforms/tsar_generic_iob
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/platforms/tsar_generic_iob/Makefile

    r904 r906  
    11TAGS := cscope.out
    2 
    32SOCLIB_CC_ARGS :=
    4 SOCLIB_CC_ARGS += "-b caba:reconf:vci_xicu"
    53
    64all: simul.x
     
    86
    97simul.x: top.cpp top.desc
    10         soclib-cc $(SOCLIB_CC_ARGS) -p top.desc -I. -o simul.x
     8        soclib-cc $(SOCLIB_CC_ARGS) -P -p top.desc -I. -o simul.x
    119
    1210$(TAGS): top.desc
  • 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"
  • branches/reconfiguration/platforms/tsar_generic_iob/soclib.conf

    r865 r906  
    11# append compilation flags
    22cflags = config.default.toolchain.cflags
    3 cflags.extend(['-DUSE_OPENMP=0'])
     3if config.default == config.envsystemcassomp:
     4        cflags.extend(['-DUSE_OPENMP=1'])
     5else:
     6        cflags.extend(['-DUSE_OPENMP=0'])
    47#cflags.extend(['-ggdb'])
    58config.default.toolchain.set("cflags", cflags)
  • branches/reconfiguration/platforms/tsar_generic_iob/top.cpp

    r904 r906  
    513513   omp_set_dynamic(false);
    514514   omp_set_num_threads(threads_nr);
    515    std::cerr << "Built with openmp version " << _OPENMP << std::endl;
     515   std::cerr << "Built with openmp version " << _OPENMP
     516             << " / numthreads = " << threads_nr << std::endl;
    516517#endif
    517518
     
    15031504
    15041505   // cycles between stats
    1505    const size_t stats_period = 100000;
     1506   const size_t stats_period = 150000;
    15061507   const size_t simul_period = debug_ok ? debug_period : stats_period;
    15071508
Note: See TracChangeset for help on using the changeset viewer.