Functions

Simulation
[SURF]

Functions for creating the environment and launching the simulation. More...

Functions

void surf_init (int *argc, char **argv)
 Initialize SURF.
void surf_presolve (void)
 Finish simulation initializationThis function must be called before the first call to surf_solve().
double surf_solve (void)
 Performs a part of the simulation.
double surf_get_clock (void)
 Return the current timeReturn the current time in millisecond.
void surf_exit (void)
 Exit SURFClean everything.

Detailed Description

Functions for creating the environment and launching the simulation.

This section describes the functions for initialising SURF, performing the simulation and exiting SURF.


Function Documentation

void surf_init ( int *  argc,
char **  argv 
)

Initialize SURF.

Parameters:
argc argument number
argv arguments

This function has to be called to initialize the common structures. Then you will have to create the environment by calling surf_timer_model_init() and e.g. surf_workstation_model_init_CLM03() or surf_workstation_model_init_KCCFLN05().

See also:
surf_timer_model_init(), surf_workstation_model_init_CLM03(), surf_workstation_model_init_KCCFLN05(), surf_workstation_model_init_compound(), surf_exit()
double surf_solve ( void   ) 

Performs a part of the simulation.

Returns:
the elapsed time, or -1.0 if no event could be executed

This function execute all possible events, update the action states and returns the time elapsed. When you call execute or communicate on a model, the corresponding actions are not executed immediately but only when you call surf_solve. Note that the returned elapsed time can be zero.

void surf_exit ( void   ) 

Exit SURFClean everything.

See also:
surf_init()


Back to the main Simgrid Documentation page Generated for SimGridAPI by doxygen