Revision fbe00e73 PORTING

View differences:

PORTING
1 1
 Porting an OMNeT++ model to Horizon
2
 =================================== 
2
 ===================================
3 3

  
4 4
 Porting a given model to run on top of Horizon is relatively straightforward.
5 5

  
6
  * New base class for modules
7
    In order to enable parallel execution in Horizon, modules need to inherit 
8
    from cAsyncModule instead of cSimpleModule. Simply replace the base class
9
    in all modules of the model. Additionally, remove the Module_Class_Members()
10
    macro if it is used in the module. This macro is not compatible with Horizon
11
    and also not needed. 
12
    
6
  * New base class for modules (OBSOLETE!!!)
7
	We used to have a separate base class for asynchronous modules. If you are
8
	still using this class (cAsyncModule), please go back to cSimpleModule.
9
	cAsyncModule is no longer required nor included.
10

  
11
  * No Module_Class_Members() macro
12
    Remove the Module_Class_Members() macro if it is used in your modules.
13
	This macro is not compatible with Horizon and also not needed.
14

  
13 15
  * No findObject
14 16
    In Horizon, the ownership handling of OMNeT++ is partly disabled to allow for
15 17
    an efficient parallel execution: Child modules still know their parent, but the
......
20 22
     - findObjectByName(const char* name)
21 23
     - removeByName(const char* name)
22 24
     - containsByName(const char* name)
23
     
24
  * Random number generation
25
    Since the global random number generator of OMNeT++ is not thread-safe,
26
    every cAsyncModule contains a local random number generator. To use this,
27
    simply prefix every call to a random number generation method with the local
28
    object numGen:
29
     - uniform(a,b)  ==>  numGen->uniform(a,b)
30
    Seeding of these local random number generators is done by means of a global
31
    seed generator RNG. During the sequential initialization phase of the model,
32
    every model requests a seed for its local RNGs from the central seed generator. 
33 25

  
26
  * Random number generation (OBSOLETE!!!)
27
    We used to require the use of numGen->uniform(a,b) instead of uniform(a,b)
28
	for using local RNGs instead of a global, not-thread-safe RNG. We changed
29
	the default behavior. The numGen object no longer exists, you automatically
30
	use local RNGs when you run uniform(a,b).
31
	If you are still using numGen->uniform(a,b), please go back to uniform(a,b).
32
    Seeding of the local random number generators is done by means of a global
33
    seed generator RNG. During the sequential initialization phase of the model,
34
    every model requests a seed for its local RNGs from the central seed generator.
34 35

  
35 36
 Performance optimization
36 37
 ========================

Also available in: Unified diff