User Tools

Site Tools


pads:gaia-apis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
pads:gaia-apis [2010/11/10 13:04] gdangelopads:gaia-apis [2010/11/10 13:15] gdangelo
Line 27: Line 27:
 </code> </code>
  
-====  GAIA_Initialize()  ====+ 
 +==== Simulation Management ==== 
 + 
 + 
 +===  GAIA_Initialize()  ===
 <code java> <code java>
 int     GAIA_Initialize (int max_objs_count, int nlp, String RandFile, String cname, String sima_host_name, int sima_port); int     GAIA_Initialize (int max_objs_count, int nlp, String RandFile, String cname, String sima_host_name, int sima_port);
Line 53: Line 57:
  
  
-====  GAIA_Finalize()  ====+===  GAIA_Finalize()  ===
 <code java> <code java>
 void    GAIA_Finalize ( ); void    GAIA_Finalize ( );
Line 75: Line 79:
  
  
-====  GAIA_SetFstID()  ====+===  GAIA_SetFstID()  ===
 <code java> <code java>
 void    GAIA_SetFstID (int first_id); void    GAIA_SetFstID (int first_id);
Line 97: Line 101:
  
  
-====  GAIA_SetCountDown()  ====+===  GAIA_GetStep()  === 
 +<code java> 
 +double  GAIA_GetStep ( ); 
 +</code> 
 + 
 +**Parameters**: 
 + 
 +//none// 
 + 
 +**Description**: 
 + 
 +Returns the length of the time-step used in the simulation. This parameter is initialized using the **GLOBAL_LA** parameters as defined in the file "**channels.txt**". For example, GLOBAL_LA=1 defines a global lookahead (timestep) of 1 time-unit, and GLOBAL_LA=0.01 is to define timesteps with a length of 1/100 of time-unit. 
 + 
 +**Notes**: 
 + 
 +//none// 
 + 
 +**Return value:** 
 + 
 +The time-step length (double). 
 + 
 + 
 +===  GAIA_Register()  === 
 +<code java> 
 +int     GAIA_Register (int migrable); 
 +</code> 
 + 
 +**Parameters**: 
 + 
 +   * int **migrable**: MIGRABLE if the SE can be migrated, NOT_MIGRABLE if the SE can not be relocated; 
 + 
 +**Description**: 
 + 
 +This API is used to register a SE, the runtime returns a descriptor that will be used to identify the SE. The registration of a SE is required to extend the scope of the SE outside the local LP (to the whole simulation). Only after the registration the SE will be able to send and receive messages, furthermore it could be involved in the migration and load balancing mechanisms. 
 + 
 +**Notes**: 
 + 
 +The registration of a SE is an event that has to be propagated to the whole simulator. Therefore, if the registration of a SE happens at timestep **t**, only starting from timestep **t+1** will be possible to send or receive messages regarding such SE. For example, it is NOT possible to register a new SE at timestep **t** and to immediately send a message from this SE in the same timestep. 
 + 
 +**Return value:** 
 + 
 +The descriptor (integer) of the SE. 
 + 
 + 
 +===  GAIA_TimeAdvance()  === 
 +<code java> 
 +double  GAIA_TimeAdvance (); 
 +</code> 
 + 
 +**Parameters**: 
 + 
 +//none// 
 + 
 +**Description**: 
 + 
 +It is used by the LP to notify to the runtime that the current timestep is ended, and therefore, the local LP is ready to start the next timestep. The LP will remain blocked until the runtime will enable the transition to the next timestep. 
 + 
 +**Notes**: 
 + 
 +//none// 
 + 
 +**Return value:** 
 + 
 +Returns the next timestep value (double). 
 + 
 + 
 +==== Migration ==== 
 + 
 +===  GAIA_SetCountDown()  ===
 <code java> <code java>
 void    GAIA_SetCountDown (int events); void    GAIA_SetCountDown (int events);
Line 119: Line 191:
  
  
-====  GAIA_SetMT()  ====+===  GAIA_SetMT()  ===
 <code java> <code java>
 void    GAIA_SetMT (int new_size); void    GAIA_SetMT (int new_size);
Line 149: Line 221:
  
  
-====  GAIA_SetMF()  ====+===  GAIA_SetMF()  ===
 <code java> <code java>
 void    GAIA_SetMF (float migr_factor); void    GAIA_SetMF (float migr_factor);
Line 170: Line 242:
  
  
-====  GAIA_SetHistorySlots()  ====+===  GAIA_SetHistorySlots()  ===
 <code java> <code java>
 void    GAIA_SetHistorySlots (int history_slots); void    GAIA_SetHistorySlots (int history_slots);
Line 191: Line 263:
  
  
-====  GAIA_SetEventHistorySize()  ====+===  GAIA_SetEventHistorySize()  ===
 <code java> <code java>
 void    GAIA_SetEventHistorySize (int size); void    GAIA_SetEventHistorySize (int size);
Line 211: Line 283:
 //none// //none//
  
-====  GAIA_SetMigration()  ====+===  GAIA_SetMigration()  ===
 <code java> <code java>
 void    GAIA_SetMigration (int state); void    GAIA_SetMigration (int state);
Line 245: Line 317:
 //none// //none//
  
-====  GAIA_SetLoadBalancing()  ====+==== Load Balancing ==== 
 + 
 +===  GAIA_SetLoadBalancing()  ===
 <code java> <code java>
 void    GAIA_SetLoadBalancing (int state); void    GAIA_SetLoadBalancing (int state);
Line 264: Line 338:
  
 //none// //none//
- 
- 
-====  GAIA_GetStep()  ==== 
-<code java> 
-double  GAIA_GetStep ( ); 
-</code> 
- 
-**Parameters**: 
- 
-//none// 
- 
-**Description**: 
- 
-Returns the length of the time-step used in the simulation. This parameter is initialized using the **GLOBAL_LA** parameters as defined in the file "**channels.txt**". For example, GLOBAL_LA=1 defines a global lookahead (timestep) of 1 time-unit, and GLOBAL_LA=0.01 is to define timesteps with a length of 1/100 of time-unit. 
- 
-**Notes**: 
- 
-//none// 
- 
-**Return value:** 
- 
-The time-step length (double). 
- 
- 
-====  GAIA_Register()  ==== 
-<code java> 
-int     GAIA_Register (int migrable); 
-</code> 
- 
-**Parameters**: 
- 
-   * int **migrable**: MIGRABLE if the SE can be migrated, NOT_MIGRABLE if the SE can not be relocated; 
- 
-**Description**: 
- 
-This API is used to register a SE, the runtime returns a descriptor that will be used to identify the SE. The registration of a SE is required to extend the scope of the SE outside the local LP (to the whole simulation). Only after the registration the SE will be able to send and receive messages, furthermore it could be involved in the migration and load balancing mechanisms. 
- 
-**Notes**: 
- 
-The registration of a SE is an event that has to be propagated to the whole simulator. Therefore, if the registration of a SE happens at timestep **t**, only starting from timestep **t+1** will be possible to send or receive messages regarding such SE. For example, it is NOT possible to register a new SE at timestep **t** and to immediately send a message from this SE in the same timestep. 
- 
-**Return value:** 
- 
-The descriptor (integer) of the SE. 
- 
- 
-====  GAIA_TimeAdvance()  ==== 
-<code java> 
-double  GAIA_TimeAdvance (); 
-</code> 
- 
-**Parameters**: 
- 
-//none// 
- 
-**Description**: 
- 
-It is used by the LP to notify to the runtime that the current timestep is ended, and therefore, the local LP is ready to start the next timestep. The LP will remain blocked until the runtime will enable the transition to the next timestep. 
- 
-**Notes**: 
- 
-//none// 
- 
-**Return value:** 
- 
-Returns the next timestep value (double). 
  
  
pads/gaia-apis.txt · Last modified: 2017/12/20 07:48 by gdangelo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki