Home
        Multicube Explorer User Manual Version 0.5
         Contents
1.              Arguments      Options      Description  Shows the variable in the current m3explorer environment and reports basic infor   mation about available Databases    Example usage   gt  show_vars          Shell Command name    help                   Arguments  5   Options   long request a list of the available options and arguments for each command   Description  Reports general help on m3explorer commands    Example usage   gt  help  long                8 2 Plugins Commands    M3Explorer is organized in modular structure and enables the user to dynamically load precompiled plugins within the  environment    These plugins are DoE modules adopted for initial experimental design and optimization modules for the definition of opti   mization algorithm to be adopted    Shell variables can be used for passing additional parameters to the modules        Shell Command name    doe  define doe                   Arguments  Name of the Design Of Experiments to be loaded   string   Options  2   Description  Instantiates the Design of Experiments module to be used during the optimization   Example usage   gt  doe define doe  m3 random doe           Shell Command name    doe show  info                            Arguments  E   Options      Description  Displays info message from the DoE module currently loaded in the m3explorer en   vironment  if any  If no doe module is defined  then an error message is shown    Example usage   gt  doe_show_info       25    Multicube Explorer User 
2.   opt define optimizer  m3 nsga II     14    Multicube Explorer User Manual Version 0 5       6 Interfaces for the integration of new simulators    This section describe how it is possible to integrate M3Explorer with a system simulator and how to define to M3Explorer  the design space to explore     6 1 Design Space Definition    The definition of the design space is done by using an XML file that is composed of a preamble  which defines the namespace  and a version  which  in this document  is 1 3      lt  xml version  1 0  encoding  UTF 8   gt    lt design_space xmlns  http   www multicube eu   version  1 3  gt    lt simulator gt       lt  simulator gt    lt parameters gt       lt  parameters gt    lt system_metrics gt       lt  system_metrics gt    lt rules gt       lt  rules gt    lt  design_space gt     The remaining part of the file describes the simulator invocation method   lt simulator gt       lt  simulator gt    the set of pa   rameters of the simulator which can be configured   lt parameters gt       lt  parameters gt    the system metrics which can be  estimated by the simulator   lt system_metrics gt       lt  system_metrics gt   and the rules which have to be taken into account  by M3Explorer in order to generate feasible configurations     6 1 1 Simulator Invocation    The   simulator executable   marker is used for specifying the complete path name of the executable       simulator       simulator executable path   path my simulator executable    gt    lt  s
3.  compiled with a standard GNU C   compiler  version 4 0 1 or higher    The following libraries and programs are needed for correctly compiling the software       The Bison YACC parser generator  http   www gnu org software bison bison html       The Flex Lex lexical analyzer  http   flex sourceforge net        The libxml2 library and libxml2 devel  The latest versions of libxml2 can be found on the xmlsoft org server       The Gnuplot software     In most cases  including common Linux distributions   these tools are already available on the system     3 2    Installation Procedure    M3Explorer is distributed in source form  In order to be executed  it must be compiled and installed into a standard directory     Download the compressed file containing the release of M3Explorer   tar gz   The current release of the tool is 0 5     Uncompress the downloaded archive    gt  tar zxvf m3explorer release O 5 tgz    This will create a directory m3explorer  the complete path name to this directory will be referred to as sourcedir     Create a build dir  and run the configure command into it    gt  mkdir build   gt  cd build     gt   lt sourcedir gt  configure   image  lt installdir gt     where installdir is the final installation directory of the software  If installdir is not specified  the software will  be installed in    image    Runmake and make install to finish the installation      gt  make   gt  make install     Optional  To delete all the temporary files generated during th
4.  derived minimal size   gt      lt greater equal gt    lt parameter name  12_cache_size   gt    lt constant value  2048   gt    lt  greater equal gt    lt  rule gt    lt  rules gt     Describes the rule    12_cache_block_size  gt  11_dcache_block_size  AND  12_cache_size  gt   2048     Available operators  The following operators markers can be used      lt greater gt    lt greater equal gt    lt less gt    lt less equal gt    lt equal gt    lt not equal gt    lt expr gt     The  lt expr gt  marker can be used for introducing generic expressions e g        rule     lt greater equal gt    lt parameter name  12_cache_size   gt    lt expr operator  x   gt    lt constant value  2   gt    lt parameter name  11_cache_size   gt    lt  expr  gt    lt  greater equal gt    lt  rule gt     The previous set of rules is represents  12_cache_size  gt   2 11_cache_size   The operators supported by M3Explorer are                  Combining rules  For combining complex expressions the following markers operators can be used      lt and gt    lt or gt    lt not gt     For example  the following rules are AND   ed together      lt rules gt    lt rule name  overall memory subsystem integrity  gt    lt and gt    lt greater equal  gt    lt parameter name  12 cache block size       lt parameter name  l11 dcache block size       lt  greater equal gt    lt greater equal gt    lt parameter name  12_cache_size   gt    lt constant value  2048   gt    lt  greater equal gt    lt  and gt    lt  rule gt    
5.  m n3 a  613 System Metrics Definition  ea  eroac ca x  614 Feasibility rules 42229 siria a XU  6 2 M3Explorer Simulator Interface             o    o          624 Simulator ipt ile   oe vee eee ae eee ne o ee ee ees  823 Simulator Oa DUE PIS  lt  lt  issue kde e ees  6 23 Simulator Error Management                         7 Example of exploration with a simple simulator    8 Shell Command List    Bi Basie Commands  suo c memi trum eee eS eR  lj  ws  ek de Sw a a A ok a Sak a fa  GU PDC wet gegeae e eat ee kn  E eel oe oe a ee ek eas el ne Voce a cele  Bek ou oz bored ded qe EA ee eo Se eis Ce OE ee ae we       Or FW W A W      o coco NNN    Multicube Explorer User Manual    Version 0 5       8 2    8 3    show vars         BB e   Aw a ha uev  Plugins Commands     doe_define_doe      doe_show_info      drv_define_driver      drv_show_info      opt_define_optimizer  opt_show_info       opt tune 2 24 ses a  Database Commands    db change current    db export          db write          db report  co        db_filter_pareto      db  plot objectives      db show optimum    db compute ADRS        9 Authors    10 Acknowledgments    Multicube Explorer User Manual Version 0 5       1 Overview of Multicube Explorer    Multicube explorer is an interactive program that lets the designer explore a design space of configurations for a param   eterized architecture for which an executable model  use case simulator  exists  Multicube explorer is an advanced multi   objective optimization fram
6.  or generated by means of the doxygen  document production system  use make doc to generate the guide in the installation image   lt installdir gt       Multicube Explorer User Manual Version 0 5       4 The Shell of Multicube Explorer    To run M3Explorer you need to launch the following command      gt   lt installdir gt  bin m3explorer    a liga el e bless         NJ M EDNA aN NZ A   LUE NS INM    ___  _  NL LLLI       Multicube Explorer   Version release O 5  Send bug reports to zaccariaQelet polimi it  gpalermo elet polimi it    m3 shell      and the M3Explorer Shell for the user interaction starts  To exit the program  just type exit followed by a return     Typing the help command all the available M3Explorer commands with short descriptions are shown     m3 shell   help   db change current change the current database   db export exports the db into a csv file   db filter pareto filters the current database for pareto points  db insert point insert a point in the current database   db read reads a database from disk   db report reports the contents of a database    db show optimum  db write   doe define doe  drv define driver  drv show info  exit   help   opt define optimizer  opt show info   opt tune   quit   read script   set   show_vars   m3 shell      Shows the optimal point of a database  writes a database on disk   define the doe module   define the driver module   shows information about current driver  quit the current m3explorer session  general help on m3expl
7.  simulator_input_interface xmlns  http   ww multicube eu   version  1 3  gt    lt parameter name  seed  value  1    gt      lt  simulator_input_interface gt     The number of  lt parameter gt  sections and the name of the parameters should be the same as defined in the XML Design Space  description file  The value of the each parameter section should correspond to one of the possible values as defined in the  XML Design Space description file  Concerning variable vector parameters  the actual parameter instances are specified with  an itemized list  For example  an on  off mask instance value for the  active processors  parameter is described in the sim   ulator input file as the following list     19    Multicube Explorer User Manual Version 0 5        lt parameter name  active processors   gt    lt item index  1  value  0    gt    lt item index  2  value  1    gt    lt item index  3  value  0    gt    lt item index  4  value  1    gt    lt  parameter gt     In the case of a permutation vector  the index attribute is substituted with the position attribute      lt parameter name  thread_assignment   gt    lt item position  1  value  2    gt    lt item position  2  value  3    gt    lt item position  3  value  1    gt    lt  parameter gt     Index and position attributes start from 1 up to the dimension associated to the variable vector     6 2 2 Simulator Output File  The simulator output file contains a preamble and a sequence of  lt system_metric gt  sections where  for ea
8.  small   big  value of a specific system metric  This  attribute is optional and may be taken into account by M3Explorer in the formalization of the optimization problem which   however  it is not part of this specification  M3Explorer expects to find the system metrics defined in this section in the  output file ofthe simulator  The output file name of the simulator is the second argument passed to the simulator executable  file     6 1 4 Feasibility rules    The  lt rules gt  section is used by M3Explorer in order to not generate invalid or not feasible solutions during the automated  exploration process  The behavior of the simulator when these rules are not met is undefined  Each rule is a boolean expres   sion which should evaluate to true for a feasible configuration of the design space  It is up to M3Explorer tool to check for  the rules and generate feasible configurations  Each boolean expression can be an operator acting on either a   parameter    or   constant   leafs or other boolean expressions  This allows creating complex expression trees of rules  Rules are    AND   ed  by default by M3Explorer  Each rule is identified by a  lt rule gt  marker and it has an optional  name  attribute  As an example       rules       rule     lt greater equal gt    lt parameter name  12_cache_block_size   gt     17    Multicube Explorer User Manual Version 0 5        lt parameter name  l11 dcache block size       lt  greater equal gt      lt  rule gt    lt rule name  application
9.  whatever dimension of the objective space  thus it can  be used even when graphical investigation towards db  plot objectives cannot  be performed    ADRS computation needs a reference set that is provided to the command by passing  a db name parameters where the reference set is stored  ADRS result is stored in a  variable called last_ADRS        Example usage            gt  set objectives  energy   cycles        performing a full search exploration  doe define doe  m3 full doe    db change current  full DB    opt define optimizer  m3 pareto doe   opt tune    VV VV Vv       performing a APRS exploration  db_change_current  aprs_DB    doe define doe  m3 random doe   opt define optimizer  m3 aprs   opt tune    V VM MM    Vv       computing aprs quality  db compute adrs  full DB     Vv          29    Multicube Explorer User Manual Version 0 5       9 Authors      Vittorio Zaccaria  Politecnico di Milano    Gianluca Palermo  Politecnico di Milano      Giovanni Mariani  ALaRI   Universit   della Svizzera italiana    10 Acknowledgments    Much of what M3Explorer is today was also defined by the users of the tool  We would like to acknowledge the contributions of  the following people  for their early adoption ofthe tool  their feedback on the tool and on the interfaces  their contributions  to the tool and their comments on the manual       Cristina Silvano  Politecnico di Milano     William Fornaciari  Politecnico di Milano     Alessandro Sivieri  Politecnico di Milano     Al Hi
10. Manual    Version 0 5          Shell Command name     drv  define driver                Arguments  Name of the driver to be loaded   string  Options     Description  Load a driver module into the m3explorer environment  On doing so  design space    is defined and parameters representing design parameter boundaries are organized  into the m3explorer environment as shell variables        Example usage      gt  set xml design space file  m3 mpeg use case xml    gt  drv define driver m3 xml driver    gt  show vars   Shell variables    Name Value    cbs    16   128      dcs    2048   65536      dcw    1   16      ds parameters    ics       pn     ics    2048   65536      icw    1   16      iwidth    1   8      12cs    32768   1048576      12cw    1   16      pn    1   16       Databases in memory  Name size    root  available  O          Shell Command name     drv  show  info          Arguments        Options        Description     Shows information about the current driver loaded        Example usage      gt  drv show info          Shell Command name     opt define optimizer                Arguments  Name of the optimizer to be loaded   string  Options  E  Description  Loads the optimizer plug in        Example usage      gt  opt_define_optimizer  m3_aprs           Shell Command name     opt_show_info          Arguments        Options        Description     Shows information about the current optimizer           Example usage         gt  opt_show_info          26    Multicube Exp
11. Multicube Explorer User Manual  Version 0 5    Politecnico di Milano  Italy  and Universit   della Svizzera italiana  Switzerland     January 12  2009    Multicube Explorer User Manual    Version 0 5       Contents  1 Overview of Multicube Explorer  11 GoalsofMulticubeExplorer              llle  11  Automatic design space exploration                    Li POI  a s Ego RR NEL ue  1 1 3 Modular composition    4  ose o ee ok mo  12 Jnhitectureofthet  ol     0 0 4 bb oor Rr eee ee i  13 Interaction with the simulator                eee eee eee  2 License    3 Installation Requirements and Procedure    31 Installation Requirements               o                  2 3  Installation Procedure    o A AS eS  33 Testingthe installation                                 34 Uninstall procedure     loce rh rm Rr iw eee  35 DOcwmentaon   osc bce kb Rd go kem ER y Ew Re UR s    4 The Shell of Multicube Explorer    5 Available Plugins    nl Ge uc eleme exe ea E RUPEE RR  SO O E A  ues AY BOR Wl a  SUR Tondon uod cuim Gk a PS REG 6 X  513 TwolevelsFullFactorial                          S OODUMEUEOES ina ii da Eq  5 41 Pareto DoE  22999 a om   ox dre  3 24 APRS uu QAO 4 X XA XR op e URS UE AN S  Ban MODE ga aa ae A AR A e ea  Aulo MOPSO oor aaie dq Re Rex EO e oS os rw BAe dog  Dog IO  sai AR RR    6 Interfaces for the integration of new simulators     amp l Design space Definifiofi          b ee o m dne eee n  6 1 1 Simulator Invocation os co sooo o o ro gn  6 12 ParametersDefinition     o 0  o
12. Redistributions in binary form must reproduce the above copyright notice  this list of conditions and the following  disclaimer in the documentation and or other materials provided with the distribution     Neither the name of the Politecnico di Milano and Universit   della Svizzera italiana nor the names of its contributors may be  used to endorse or promote products derived from this software without specific prior written permission     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  AS IS  AND ANY EXPRESS OR IMPLIED  WARRANTIES  INCLUDING  BUT NOT LIMITED TO  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A  PARTICULAR PURPOSE ARE DISCLAIMED  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR  ANY DIRECT  INDIRECT  INCIDENTAL  SPECIAL  EXEMPLARY  OR CONSEQUENTIAL DAMAGES  INCLUDING  BUT NOT LIMITED  TO  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES  LOSS OF USE  DATA  OR PROFITS  OR BUSINESS INTERRUPTION   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY  WHETHER IN CONTRACT  STRICT LIABILITY  OR TORT  INCLUD   ING NEGLIGENCE OR OTHERWISE  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE  EVEN IF ADVISED OF THE  POSSIBILITY OF SUCH DAMAGE     Multicube Explorer User Manual Version 0 5       3    3 1    Installation Requirements and Procedure    Installation Requirements    Multicube Explorer  m3explorer in short  has been designed to be compatible with LINUX and BSD  MAC OSX  platforms   M3Explorer is written in C   and can be
13. ar structure of M3Explorer       Database commands  used to handle one or more database where visited design points are stored     8 1 Basic Commands    These commands support the user on performing simple operations as load scripts  display help messages and set variables    value and close m3explorer                                         Shell Command name    exit   Arguments  n   Options      Description  Exits from the m3explorer shell   Example usage   gt  exit   Shell Command name    quit   Arguments      Options      Description  Same as exit command        Example usage      gt  quit          Shell Command name     read_script                Arguments  Name of the script to be read   string  Options     Description  All commands within the given script are sequentially executed in the m3explorer    environment        Example usage      gt  read_script  my_script scr           Shell Command name     set                         Arguments  Name of the variable to be set   identifier   Value to be inserted into the variable   object   Options  2   Description  Set an environment variable  Set command cares about definition of the variable  if  this was never used before  or modification of variable content if variable was exist   ing    Example usage   gt  set my_string    I   m a string      gt  set my_number   13   gt  set my_list     my_string  my_number 0 9233         24       Multicube Explorer User Manual Version 0 5          Shell Command name    show  vars      
14. cessor system       Permutation  Variable size permutations are used  for example  in the case of thread to processor mapping problems   In this case a task identifier should be generated for each active processor      lt parameter type  permutation  name  thread assignment  dimension  Onumber of threads         A permutation contains a non repeatable sequence of values from 1 to the actual dimension of the vector  For example   the variable vector parameter      lt parameter type  permutation  name  example  dimension  2       P yp P P    can assume the following values  1 2  or  2 1      6 1 3 System Metrics Definition    The  lt system_metrics gt  section is used by the use case and simulator provider to specify the names  the types and the units  of the system metrics that can be estimated by the simulator      lt system_metrics gt    lt system_metric name  cycles  type  integer  unit  cycles  desired  small   gt     system metric name  instructions  type  integer  unit  insts  description        gt     system metric name  powerconsumption  type  float  unit  W  description              system metric name  area  type  float  unit  mm2  desired  small    gt    lt  system_metrics gt     Feasible system metric  name  attributes are identified by the following regular expression    A Za z    A Za z0 9_      The optional  description  attribute is a generic string describing the nature of the system metric    The  desired  attribute indicates whether it is desirable to have a 
15. ch metric  the name  and the value is specified      lt  xml version  1 0  encoding  UTF 8   gt    lt simulator_output_interface xmlns  http   www multicube eu   version  1 3  gt    lt system_metric name  cycles  value  3000    gt    lt system_metric name  instructions  value  1500    gt    lt system_metric name  power _consumption  value  2 5    gt    lt system_metric name  area  value  25    gt    lt  simulator_output_interface gt     The number of  lt system_metric gt  sections and the name of the system metrics should be the same as defined in the XML  Design Space description file     6 2 3 Simulator Error Management    In the case of errors during the simulator execution  the simulator output file should contain a single  lt error gt  marker indi   cating the error reason      lt  xml version  1 0  encoding  UTF 8   gt     lt simulator_output_interface xmlns  http   www multicube eu   version  1 3  gt    lt error reason  memory full  kind  fatal   gt     lt  simulator_output_interface gt     The attribute reason is a generic string that can contain a report about the error cause  Overall  the error strings of the  simulator are meant to be related to       memory full or disk full problems     file system permissions problems      license problems      internal exceptions      other      consistency or feasibility violation  if checked by the simulator     The kind can be  fatal    non fatal   Fatal errors should block the overall exploration process while non fatal err
16. db  change current   Arguments  Name of the db to be set as current   string   Options  5   Description  The current db is the one actually used for storing exploration results and it is the    target of the commands of the shell  All operations performed in m3explorer which  act on database has the current db as target  db_change_current allow to define  which database have to be used as current  taking its name as parameter  In the  case no database with the specified name exists in the m3eplorer environment  such  database is automatically generated and set as current        Example usage      gt  db change current  MY EXPLORATION DB           Shell Command name     db  export                Arguments  File name into which the current database should be exported   string  Options     Description  This command can be used to export the current database in CSV format to the file    specified as parameter        Example usage      gt  db export  MY EXPLORATION DB csv           Shell Command name     db write                Arguments  File name into which the current database should be written   string  Options     Description  Writes the current db on the disk to a specified file in a format readable from    m3explorer           Example usage         gt  db write  MY EXPLORATION DB db           27    Multicube Explorer User Manual    Version 0 5                      Shell Command name    db  report   Arguments      Options      Description  Reports all the architectural confi
17. e    Start the exploration    m3 shell    opt tune   Write the results of the exploration in an internal M3Explorer  db format and in a standard csv format     m3 shell    db write  my full db   m3 shell   db write  my full csv     Set up the objective functions of the problem  to enable Pareto filtering of visited points   perform Pareto filtering of  the current database  by eliminating dominated points  and report the results     m3 shell   set objectives      sum   difference   product     m3 shell   db filter pareto  m3 shell    db report    Write the Pareto points in internal and csv format     m3 shell   db write  my full db   m3 shell   db write  my full csv     Exit from the shell     m3 shell    exit    The example can be automated by using an M3Explorer script  simple sim scr scr       gt   lt installdir gt  bin m3explorer  x simple sim ds xml  f simple sim scr scr    Figure 5 shows the output of such script     22    Multicube Explorer User Manual    Version 0 5               bin m3explorer  x simple sim ds xml  f simple sim scr scr    Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   Information   In
18. e compilation  use the following command    gt  make dist clean    This command deletes everything that has been built with configure and make     Multicube Explorer User Manual Version 0 5       3 3 Testing the installation    To test that the installation has been performed correctly  first run the application executable m3explorer which is present  in the installation dir      gt   lt installdir gt  bin m3explorer    Multicube Explorer   Version release_0_5  Send bug reports to zaccariaQelet polimi it  gpalermo elet polimi it    m3 shell      To exit the program  just type exit followed by a return   A more comprehensive test can be run with the do  test script which is present in the test directory of the installation  image   lt installdir gt    A succesfull execution produces the following output         installdir   tests do tests  1  Tested XML design space construction  PASSED    2  Tested XML rules   PASSED  3  Tested XML error reporting   PASSED  4  Tested XML input output interface   PASSED  5  Tested full factorial features   PASSED    3 4 Uninstall procedure  If you installed m3explorer into a dedicated directory  it can be removed by simply deleting the directory  Otherwise  the  specific executable and the associated installation files should be removed manually   3 5 Documentation  The documentation of M3Explorer is mainly composed by two documents     The present User Guide       The Developer Guide  This guide can be browsed either on the M3Explorer website
19. e functions  The term simulated annealing derives  from the analogy with the physical process of heating and then slowly cooling a substance to obtain a strong crystalline  structure  In the Simulated Annealing algorithm a new configuration is constructed by imposing a random displacement   If the cost function of this new state is less than the previous one  the change is accepted unconditionally and the system  is updated  If the cost function is greater  the new configuration is accepted probabilistically  the acceptance possibility  decreases with the temperature  optimization time   This procedure allows the system to move consistently towards lower  cost function states  thus  jumping  out of local minima due to the probabilistic acceptance of some upward moves    This optimizers implemented in M3Explorer is called Multi Objective Simulated Annealing  MOSA  and it is derived by  Smith   K  I  Everson  R  M   Fieldsend  J  E   Murphy  C   Misra  R    Dominance Based Multiobjective Simulated Annealing    IEEE Transaction on  Evolutionary Computation  12 3   323 342   2008    m3 shell   opt define optimizer  m3 mosa     5 2 4 MOPSO    More in general  Particle Swarm Optimization  PSO  is a heuristic search methodology that tries to mimic the movements of  a flock of birds aiming at finding food  PSO is based on a population of particles flying through an hyper dimensional search  space  Each particle possesses a position and a velocity  both variables are changed to emulat
20. e the social psychological  tendency to mimic the success of other individuals in the population  also called swarm     This optimizers implemented in M3Explorer is called Multi Objective Particle Swarm Optimization  MOPSO  and it is derived  by  G  Palermo  C  Silvano  V  Zaccaria   Discrete Particle Swarm Optimization for Multi objective Design Space Exploration     In Euromicro  Proceedings of DSD 08   Conference on Digital System Design  September 2008    m3 shell   opt define optimizer  m3 mopso     13    Multicube Explorer User Manual Version 0 5       5 2 5 NSGA II    In a Genetic Algorithm  many design alternatives belonging to design space are seen like individuals in a stored population   The exploration procedure consists of the simulation of the evolution process of generation of individuals and the improve   ment of solutions belonging to next generations is explained by Darwinian theory  The evolutionary operators describe  how individuals are selected to reproduce  how a new generation of individuals is generated from parents by crossover and  mutation and how new generation of individuals is inserted into population replacing or not the parents    The implemented approach for Multiobjective optimization is the non dominated sorting genetic algorithm  NSGA II  de   scribed in  Kalyanmoy Deb  Amrit Pratap  Sameer Agarwal  T  Meyarivan   A fast and elitist multiobjective genetic algorithm  NSGA II    IEEE Transactions on Evolutionary Computation  2002    m3 shell
21. ework which is entirely command line script driven and can be retargeted to any configurable  platform by writing a suitable XML design space definition file and providing a configurable simulator  Multicube Explorer is  supported by the EC under grant FP7 216693 MULTICUBE  http   www multicube eu   The tool and the documentation can  be currently found at the following address  http    home dei polimi it zaccaria multicube explorer                                                                      gt  Response  Surface  Design Modeling  y of  Experiments  M3Explorer Shell 3 3   gt  S  E  g  o Optimization  x Algorithm    go Architecture  o  z database  XML XML  Design Space     Simulator  NERY          Figure 1  Structure of Multicube Explorer    1 1 Goals of Multicube Explorer    The overall goal of the open source design space exploration framework aims at providing a retargetable tool to drive the  designer towards near optimal solutions to the architectural exploration problem  with the given multiple constraints  The  final product of the framework is a Pareto curve of configurations within the design evaluation space of the given architec   ture     1 1 1 Automatic design space exploration    One of the goals of the open source tool is to provide a command line interface to the exploration kernel that allows the con   struction of automated exploration strategies  Those strategies are implemented by means of command scripts interpreted  by the tool without the need o
22. f manual intervention  This structure can easily support the batch execution of complex  strategies that are less prone to human intervention  due to their execution time     1 1 2 Portability    Another goal of the open source tool is to be portable across a wide range of systems  This goal will be achieved by not  sacrificing the efficiency of the overall exploration engine  The standard ANSI C   programming language will be used for  developing the open source framework  The Standard Template Library as well as other open source libraries will be used  during the development process     Multicube Explorer User Manual Version 0 5       1 1 3 Modular composition    One of the strength of the open source tool is the modularity of its components  Simulator  optimization algorithms and other  design space exploration components are dynamically linked at run time  without the need of recompiling the entire code  base  This will be supported by well defined interfaces between the drivers supporting the simulation and the optimization  algorithm  This will strongly enable the introduction of new modules for both academic and industrial purposes  Given the  modular decomposition  a single optimization algorithm can used for every use case simulator  Moreover  a single use case  architecture can be optimized with a wide range of optimization algorithms     1 2 Architecture of the tool    The tool  Figure 2  is basically composed by an exploration kernel which orchestrates the functi
23. formation     Creating the xml driver  Loading the xml driver  Assigned value  true  to clean directory on exit    Changing current    DB to  full db    Database not existing  Creating a new one     Loading the full    Current doe has been set to  Current optimizer has been set to    search doe     Full search doe    Pareto doe optimizer     Starting with the pareto doe optimization process    Evaluating point  Evaluating point  Evaluating point  Skipping point   Skipping point   Skipping point     Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point   Evaluating point        5 parl exp2   E parl exp2 2048 par2 ste  H parl exp2 4    024 par2 ste    096 par2 ste    p  p  p     1 par3 step2 1   1 par3 step2 1   1 par3 step2 1      parl exp2 1024 par2 stepl 2 par3 step2 1    8 par2 stepl 2 par3 step2 1      parl exp2 4096 par2 stepl 2 par3 step2 1        parl exp2 204  parl exp2     parl exp2 4  parl exp2     parl exp2 4  parl exp2     parl exp2 4  parl exp2              parl exp2 4    Writing the database to disk  Database correctly written  Saving the database in CSV format      Assigned value          sum   difference     024 par2 ste    parl exp2 2048 par2 ste    096 par2 ste  024 par2 ste    parl exp2 2048 par2 ste    096 par2 ste    024 par2 step  parl exp2 2048 par2 ste    096 par2 ste  024 par2 ste       parl exp2 2048 
24. ger  unit  mm2  desired  small    gt     system metric name  product  type  integer  unit  mW  desired  small    gt      system metrics     rules       rule     lt greater equal gt    lt parameter name  par3_step2   gt    lt parameter name  par2_step1   gt    lt  greater equal gt    lt  rule gt    lt  rules gt    lt  design_space gt     Figure 4  simple_sim_ds xml    In this example  we perform a full search exploration of the design space shown in Figure 4 by filtering the final results for  the pareto set  To start with the exploration  we invoke m3explorer with its target design space      gt   lt installdir gt  bin m3explorer  x simple_sim_ds xml    The target design space is now loaded  Now  m3explorer knows where the simulator is and which are the parameters asso   ciated with it  Once in the m3explorer shell  we perform the following steps       Configure the optimizer to clean the directory at the end of the exploration   m3 shell    set clean directory on exit    true       Change the current database to a new database called fu11 db  it will be filled by optimizer module with the explo   ration results      21    Multicube Explorer User Manual Version 0 5       m3 shell   db change current  full db    Load the m3  full  doe DoE  Full search considers all the possible combination of the parameters    m3 shell  doe define doe  m3 full doe    Load m3 pareto  doe optimizer  it visits only the solutions defined by the DoE     m3 shell   opt define optimizer  m3 pareto do
25. gurations stored into the current db        Example usage      gt  db_report          Shell Command name     db_filter_pareto          Arguments        Options        Description     Filter the current database keeping only the Pareto points  The Pareto concept is  defined once a special variable with the name objectives is declared in the environ   ment as a list of objective metrics    Commands in the example filter the database my_exploration keeping only design  points such as no other point is better in terms of energy and delay        Example usage      gt  db_change_current  my_exploration    gt  set objectives   energy   delay     gt  db_filter_pareto          Shell Command name     db_plot_objectives                Arguments  Databases to be plotted  Options  5  Description  Graphical investigation of solutions quality  Plotting functionalities are available    only in 2D  thus to use db_plot_objectives a special variable with the name ob   jectives must be declared as a list of two objective metrics    If no parameters are passed  the current database only is investigated and objective  metrics of stored points are plotted  If one database name parameter is passed  the  graphical investigation is performed over such db  In the case two database name  parameters are passed  graphical investigation is performed on the same plot for the  two databases allowing graphical comparison of solution qualities        Example usage            gt  set objectives    energy   dela
26. imulator gt     The path is specified by using Unix conventions  The simulator executable is invoked with three arguments     my simulator executable      xml system configuration sc path name      xml system metrics sm path name      reference xsd xsd file name    where sc  path  name is the path name of XML file describing the system configuration to be passed to the simulator  The  sm path name is the path name of the output XML file which should be used by the simulator for producing the sys   tem metrics output  The argument  reference xsd xsd file name is used for specifying the position of the reference  M3Explorer simulator interface XSD file in the file system  This argument can be used by the simulator for validating the  input and output files exchanged with M3Explorer     6 1 2  Parameters Definition    The   parameters        lt  parameters gt  is used by the use case and simulator provider to specify the names  the types and  the ranges of the parameters that can be explored by the DSE tool  The section contains a list of   parameter   markers       parameter    lt parameter name  seed  description  RNG seed  type  integer  min  0  max  10   gt    lt parameter name  fetch queue size   description  instruction fetch queue size   type  integer  min  1  max  8  step  2   gt     15    Multicube Explorer User Manual Version 0 5        lt  parameters gt     For each parameter a unique name must be provided  This name will be used for generating configurations at the i
27. lorer User Manual Version 0 5                         Shell Command name    opt tune   Arguments      Options  2   Description  Launch the exploration process defined in the optimizer  also called optimization or  tuning operation   During optimization  all modules  optimizer  driver  doe  inter   acts  thus they should be all loaded into the environment when opt  tune is called   With commands in the following example  the aprs optimization process is launched  over the mpeg usecase  available in the example subdirectory of the installation di   rectory  The DoE adopted as initial experimental design is a random one  Results of  optimization process are placed into the current database  root database when the  shell is just opened     Example usage   gt  set xml design space file  m3 mpeg use case xml    gt  drv define driver  m3 xml driver    gt  doe define doe  m3 random doe    gt  opt define optimizer  m3 aprs    gt  opt tune                8 3 Database Commands    Simulation results are stored into database  db  in memory  Databases can be loaded stored from to the hard disk  in such a  way that is easy to handle simulation data obtained in different working sessions    Operations that can be performed on databases are various and allow to extrapolate and visualize some fundamental high  levelinformation needed to investigate solution quality of multiobjective optimization  Following are m3explorer commands  for database handling                    Shell Command name    
28. lt  rules gt     This corresponds to the following expression      12_cache_block_size  gt   l1  dcache  block  size  AND  12_cache_size  gt   2048     18    Multicube Explorer User Manual Version 0 5       If then else rule  An    if E  then A  predicate is introduced and it is evaluated as     TRUE if E is FALSE    AifEis TRUE    An example for this rule is the following      lt rule name  branch prediction design space reduction  gt       if     lt not equal gt    lt parameter name  bpred   gt    lt constant value  bimod   gt    lt  not equal  gt    lt then gt    lt equal  gt    lt parameter name  bpred_bmod_size   gt    lt constant value  0   gt    lt  equal gt    lt  then gt    lt  if gt      lt  rule gt   This associated predicate expression is   if bpred  bmod  then bpred_bmod_size 0    This rule forces to generate configurations where if bpred  bmod then bpred_bmod_size 0  These rules can effectively re   duce the overall design space  An  if E  then A else B  predicate is introduced and it is evaluated as       BifEis FALSE      AifEis TRUE    6 2 M3Explorer Simulator Interface    The M3Explorer Simulator interface is composed by 2 files one in output from M3Explorer to the simulator the other one in  the opposite direction     6 2 1 Simulator input file    The simulator input file should contain a preamble and a sequence of  lt parameter gt  sections where  for each parameter  the  name and the value is specified      lt  xml version  1 0  encoding  UTF 8   gt    lt
29. nput of  the simulator  Feasible parameter names are identified by the following regular expression      A Za z   A Za zo 9     The parameters types can be divided into two categories     Scalar types      Variable vector types    Scalar parameter types  The scalar parameter type can be       integer and boolean  The integer type specifies a simple sequential integer progression associated that specific  parameter  The min and max attributes  which are mandatory  specify the boundaries of the progression  The step  attribute can be used to produce non unitary progressions  The Boolean type is an integer progression with min 0 and  max 1       exp2 The values associated with an  exp2  parameter type should be computed by M3Explorer by using a power of  two progression  For example      lt parameter name  ili1 cache block size bytes   description       type  exp2  min  8  max  64   gt     should be interpreted by M3Explorer as a parameter with range values      8    16    32    64         string Inthe case of string parameters  a list of possible string values shouldbe used instead of the min max attributes      lt parameter name  bpred  description  branch predictor type  type  string  gt    lt item value  nottaken   gt    lt item value  taken   gt    lt item value  perfect   gt    lt item value  bimod   gt    lt item value  2lev   gt    lt item value  comb   gt    lt  parameter gt     Variable vector types  The following types are introduced for producing variable vector type
30. o identify the planning of an information gathering experimentation cam   paign where a set of variable parameters can be tuned  The reason for DoEs is that very often the designer is interested in the  effects of some parameter s tuning on the system response  Design of experiments is a discipline that has very broad appli   cation across natural and social sciences and encompasses a set of techniques whose main goal is the screening and analysis  ofthe system behavior with a small number of simulations  Each DoE plan differs in terms ofthe layout of the selected design  points in the design space    The available DoEs in the M3Explorer framework are       Full Search    Random      Two Levels Full Factorial    5 1 1 Full Search    It is the simplest DoE in the discrete world  It consider all the possible configuration of the design space     m3 shell   doe define doe  m3 full doe     5 1 2  Random    The design space configurations are picked up randomly by following a Probability Density Function  PDF   In the imple   mented plugin uses a uniformly distributed PDF     m3 shell    doe define doe  m3 random doe     The variable solutions number can be used to define the number of points of the random DoE  e g  for a random doe  with 15 points    m3 shell  set solutions number   15    5 1 3 Two levels Full Factorial    In statistics  a factorial experiment is an experiment whose design consists of two or more parameters  each with discrete  possible values or  levels   and wh
31. onal behavior of the design  of experiments and optimization algorithms     M3explorer          XML  DoE Lin al Design    i ERN   Space  Plug in im Definition    Core  Design  Space    Representation  Optimizer     Use  Plug in an Case  Simulator    Figure 2  Architecture of the tool          The kernel module is responsible for reading in the design space definition file  in XML format  and accepting commands  from the shell interface  or the corresponding script   It then exposes the parameters of the design space to all the modules  involved in the optimization process  DoE  Optimization Algorithms  by means of a core design space representation    The core design space representation provides a set of abstract operations that are mapped on the specific use case under  analysis  The abstract operations are represented by iterators over the feasible design space  among which we can find       Full search iterators     Random search iterators   global and neighborhood      Factorial iterators  two level  two level   center point      The core design space representation provides also services for validating architectural choices at the optimizer level and  evaluating the associated objective functions  The objective functions are defined as a subset of the use case system level  metrics and can be manipulated by the user by interacting with M3explorer     Multicube Explorer User Manual Version 0 5       1 3 Interaction with the simulator    The design space exploration is pe
32. orer commands  define the optimizer module   shows information about current optimizer  Start the exploration process   quit the current m3explorer session  read script from file   set a variable to a specific value   Shows the variables in the current shell    The design space exploration problem within M3Explorer  is defined by a driver  An XML driver  m3  xml  driver is provided  in M3Explorer  Such driver allow the integration of M3Explorer with other performance estimation tools by exploiting well  defined XML interfaces that will be described later in section 6    Other two drivers  m3 dtlz driver and m3 test driver are distributed in the purpose of methodological test of new  design space exploration techniques    To load the description of the design space for the following exploration process  M3Explorer should be lauched with the  x    design space file   xml flag     10    Multicube Explorer User Manual Version 0 5       E g     lt installdir gt  bin m3explorer  x simple sim ds xml  The use of M3Explorer can be both in interaction mode through the shell or in a script mode   This second mode can be enabled by writing all the M3Explorer commands into a script file and then launching M3Explorer    with the  f   M3Explorer commands file    scr flag        lt installdir gt  bin m3explorer  x simple sim ds xml  f simple sim scr scr    11    Multicube Explorer User Manual Version 0 5       5 Available Plugins    5 1 DOoEs    The term Design of Experiments  DoE  is used t
33. ors force  M3Explorer to skip to the next configuration  If an   error   marker is present in the output file    system metric   markers  are ignored by M3Explorer     20    Multicube Explorer User Manual Version 0 5       7 Example of exploration with a simple simulator    In this section we report a simple example usage of m3explorer  The example consists of the exploration of the parameter  space of a simple simulator  The files associated with this example can be located in  lt installdir gt  examples simple_sim  directory  namely  they correspond to       simple sim py  Python script representing the simulator of the target architecture to be explored     simple sim ds xml  Design space to be explored  see Figure 4       simple sim scr scr  m3explorer script file which automates the steps of the exploration      lt  xml version  1 0  encoding  UTF 8   gt    lt design_space xmlns  http   www multicube eu   version  1 3  gt    lt simulator gt    lt simulator_executable  path   usr bin python  image  examples simple_sim simple_sim py    gt    lt  simulator gt    lt parameters gt    lt parameter name  pari_exp2  type  exp2  min  1024  max  4096    gt    lt parameter name  par2_stepi  type  integer  min  1  max  2  step  1   gt    lt parameter name  par3_step2  type  integer  min  1  max  5  step  2   gt    lt  parameters gt    lt system_metrics gt    lt system_metric name  sum  type  integer  unit  cycles  desired  small    gt    lt system_metric name  difference  type  inte
34. ose experimental units take on all possible combinations of these levels across all such pa   rameters  Such an experiment allows studying the effects of each parameter on the response variable  as well as the effects  of interactions between parameters on the response variable  In this plugin  we consider a 2 level full factorial DoE  where  the only levels considered are the minimum and maximum for each parameter     m3 shell   doe define doe  m3 two level ff     5 2 Optimizers  The available optimizer plugins in M3Explorer are       Pareto DoE    12    Multicube Explorer User Manual Version 0 5         APRS  Adaptive windows Pareto Random Search    MOSA  Multi Objective Simulated Annealing    MOPSO  Multi Objective Particle Swarm Optimizer      NSGA II  Non dominated Sorting Genetic Algorithm    5 2 1 Pareto DoE    This is not a real optimizer but it is only a simple method used to evaluate the point selected by the DoE     m3 shell   opt define optimizer  m3 pareto doe     5 2 2 APRS    This algorithm called Adaptive windows Pareto Random Search is an algorithm that has a dynamic windows size which are  reduced with the time spent in the exploration and with the goodness of the point found in the current windows  The win   dows are centered on the current pareto solutions and the new configurations are randomly selected within the windows     m3 shell   opt define optimizer  m3 aprs     5 2 3 MOSA    Simulated annealing is a Monte Carlo approach for minimizing multivariat
35. par2 ste    096 par2 ste    Filtering the database for pareto points      p    O io io Mo uo     p       p  p  p  p     product         1 par3 step2 3   1 par3 step2 3   1 par3 step2 3   2 par3 step2 3   2 par3 step2 3   2 par3 step2 3   1 par3 step2 5   1 par3 step2 5   1 par3 step2 5   2 par3 step2 5   2 par3 step2 5   2 par3 step2 5      to objectives       full db  Current  parl exp2 1024  parl exp2 1024  parl exp2 1024  parl exp2 1024    parl exp2 1024  Number of points  Information   Information   Information   Information   Information                   Figure 5  M3Explorer output while it is running simple sim scr scr    database contents    par2 stepl 1  par2 stepl 1  par2 stepl 2  par2 stepl 1  par2 stepl 2  in the DB  5    par3 step2 1  par3 step2 3  par3 step2 3  par3 step2 5  par3 step2 5    Writing the database to disk  Database correctly written   Saving the database in CSV format    Removing xml driver  Exiting from Multicube Explorer shell    23    1026 1022 1024  1028 1020 3072  1029 1019 6144  1030 1018 5120  1031 1017 10240    Multicube Explorer User Manual       8 Shell Command List    This section reports a brief survey of commands available in the Multicube Explorer optimization tool   The commands are organized in three main classes       Basic commands  adopted to control the m3explorer environment in terms of defined variables and other basic func     tionalities      Plugins commands  which give powerful flexibility to the user on handling the modul
36. rformed by using the simulation abstraction layer exported by the XML driver to the  optimizer plug ins  In principle  the optimizer instantiates a set of architectural configurations by means of the design space  iterators  and passes the corresponding representation to the XML driver which will execute the simulator  see Figure 3    Information about simulator runs will be displayed directly on the M3explorer shell         XML System  Metrics             Use  Case  Simulator    Multicube  Explorer              XML  System  Configuration               Figure 3  Interaction of Multicube Explorer with the Use Case Simulator    M3Explorer creates a specific directory to execute each instance ofthe simulator  In this directory  a valid system parameters  file is created before starting the simulator  A system metrics file is expected to be obtained as the output of the simulator  execution     Multicube Explorer User Manual Version 0 5       2 License    Multicube explorer is open source and it is released under the BSD license     Authors  Vittorio Zaccaria  Gianluca Palermo  Giovanni Mariani  Copyright  c  2008  Politecnico di Milano and Universit   della Svizzera italiana  All rights reserved     Redistribution and use in source and binary forms  with or without modification  are permitted provided that the follow   ing conditions are met       Redistributions of source code must retain the above copyright notice  this list of conditions and the following dis   claimer       
37. s with specific constraints  on the possible combinations of the components       on off mask  The on off mask is essentially a vector combination of boolean values with a specific dimension  We  use the on  set size attribute to specify the amount of elements which should be  on  in the resulting vector    lt parameter type  on off mask    name  active processors   dimension  7   on set size  Onumber of threads    gt     The on  set size can be a fixed value or a reference to a variable value  In the case of reference to variable values  the  notation  parameter should be used  For example the notation 9number  of threads indicates that the  on set size   should be equal to the  number of threads  parameter of the configuration under evaluation  In this example we  assume that the  number of threads  parameter type is an integer progression without explicit steps  as a matter of    16    Multicube Explorer User Manual Version 0 5       fact the notation  9  parameter can refer only to integer parameters with a step 1  When the on  set size attribute is  not specified  all the possible combinations of the Boolean vector are considered in the generation of the associated  progression  The dimension of the on  off mask can be variable as well      lt parameter type  on off mask  name  Qo8 priorities  dimension  Onumber of threads    gt     The previous parameter specification contains  as an example  the Boolean QoS priorities for each of the active nodes  of a target multi pro
38. ssi Mohammad  ALaRI   Universit   della Svizzera italiana    Carlos Kavka  ESTECO     Sara Bocchio  STMicroelectonics      Hector Posadas  University of Cantabria    This work is supported by the EC under grant FP7 216693 MULTICUBE  http    www multicube eu   The Multicube Explorer  tool and the documentation can be found at the following address  http    home dei polimi it zaccaria multicube explorer     30    
39. y     db change current  first exploration   db read  first exploration db    db change current  second exploration     V MM M    db read  second exploration db      gt     plot objectives in the second database loaded  the current  db    gt  db plot objectives     gt     plot objectives in the first database loaded   gt  db plot objectives  first exploration      gt     plot objectives in the from both databases   gt  db plot objectives  first exploration   second exploration           28    Multicube Explorer User Manual    Version 0 5          Shell Command name     db show  optimum          Arguments        Options        Description     Displays the optimal point stored in the current db  The optimum point is consid   ered the one with minimum product of objective metrics    Usage example  refers to use case example provided with the distribution of  m3explorer        Example usage      gt  db_read  full_mpeg4 db      gt  set_objectives   energy   cycles     gt  db_show_optimum  Information  Computing optimum point  please note that the    cost function is the product of all the metrics  Optimum point    ics 16384 dcs 8192 12cs 131072 icw 1 dcw 8 12cw 2  iwidth 2 cbs 16 pn 8   cost 2 92596e 07          Shell Command name     db compute ADRS          Arguments        Options        Description     Computes the Average Distance from Reference Set  ADRS     Such distance is a quantitative measure of solution qualities of a multiobjective ex   ploration that is available for
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
ハートスタート HS1  USER'S GUIDE - Teletechnika  V3/0512 - Bartscher GmbH      Copyright © All rights reserved. 
   Failed to retrieve file