1 /** \addtogroup SURF_API
3 \section SURF_doc Surf documentation
4 Surf is composed several components:
9 - \ref SURF_routing_interface
10 - \ref SURF_cpu_interface
11 - \ref SURF_network_interface
12 - \ref SURF_storage_interface
13 - \ref SURF_workstation_interface
14 - \ref SURF_vm_workstation_interface
17 - \ref SURF_plugin_energy
22 /** \defgroup SURF_simulation Simulation
24 \brief Functions for creating the environment and launching the simulation
26 This section describes the functions for initializing SURF, performing
27 the simulation and exiting SURF.
30 /** \defgroup SURF_build_api Create a new API
32 \brief How to build a new API on top of SURF
34 SURF provides the functionalities to simulate the platform. There are two main data types in SURF:
35 the actions and the resources. Several types of resources exist:
36 - the workstation resource,
37 - the network resource,
41 The implementation of these resources depends on the platform model you choose. There are several
42 platform models. You can select your model by calling surf_workstation_resource_init_CLM03()
43 or surf_workstation_resource_init_KCCFLN05(). See the documentation of these functions to have
44 more details about the models. Remember that the model KCCFLN05 is an implementation of both the
45 workstation resource and the network.
47 Typically, your functions should call the SURF functions provided by the structures
48 \a surf_workstation_resource->common_public and \a surf_workstation_resource->extension_public.
49 See surf_resource_public and surf_workstation_resource_extension_public to know the available functions.
51 To initialize SURF, call surf_init(). Then call surf_timer_resource_init() and
52 surf_workstation_resource_init_CLM03() or surf_workstation_resource_init_KCCFLN05()
53 to create the platform.
55 Then you can access the workstations and the network links with
56 the global variables \ref host_lib
57 and \ref link_lib. Some functions in \a surf_workstation_resource->extension_public can give
58 you some information about:
59 - a workstation: get_speed(), get_available_speed();
60 - a network link: get_link_name(), get_link_latency(), get_link_bandwith();
61 - a route: get_route(), get_route_size().
63 During the simulation, call \a surf_workstation_resource->extension_public->execute() to schedule a
64 computation task on a workstation, or \a surf_workstation_resource->extension_public->communicate()
65 to schedule a communication task between two workstations. You can also create parallel task
66 with \a surf_workstation_resource->extension_public->execute_parallel_task(). These functions return
67 a new action that represents the task you have just created.
69 To execute the actions created with \a execute(), \a communicate() or \a execute_parallel_task(), call
70 surf_solve(). The function surf_solve() is where the simulation takes place. It returns the
71 time elapsed to execute the actions. You can know what actions have changed their state thanks
72 to the states sets. For example, if your want to know what actions are finished,
73 extract them from \a surf_workstation_resource->common_public->states.done_action_set.
74 Depending on these results, you can schedule other tasks and call surf_solve() again.
76 When the simulation is over, just call surf_exit() to clean the memory.
78 Have a look at the implementation of \ref MSG_API "MSG" and \ref SD_API "Simdag" to see how these module
79 interact with SURF. But if you want to create a new API on top of SURF,
80 we strongly recommend you to contact us before anyway.
85 @defgroup SURF_c_bindings SURF C bindings
87 @brief Describes the c bindings of SURF
89 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Surf C bindings" --> @endhtmlonly
93 @defgroup SURF_interface SURF Interface
95 @brief Describes the general interface for all components (Cpu, Network, Storage, Workstation, WorkstationVM)
97 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Surf Interface" --> @endhtmlonly
101 @defgroup SURF_routing_interface SURF Routing Interface
103 @brief Describes the routing interface
105 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Surf Routing" --> @endhtmlonly
109 @defgroup SURF_cpu_interface SURF Cpu Interface
111 @brief Describes the general Cpu interface for all Cpu implementations
113 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Cpu Interface" --> @endhtmlonly
117 @defgroup SURF_network_interface SURF Network Interface
119 @brief Describes the general Network interface for all Network implementations
121 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Network Interface" --> @endhtmlonly
125 @defgroup SURF_storage_interface SURF Storage Interface
127 @brief Describes the general interface for all Storage implementations
129 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Storage Interface" --> @endhtmlonly
133 @defgroup SURF_workstation_interface SURF Workstation Interface
135 @brief Describes the general interface for all Workstation implementations
137 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Workstation Interface" --> @endhtmlonly
141 @defgroup SURF_vm_workstation_interface SURF VM Workstation Interface
143 @brief Describes the general interface for all VM Workstation implementations
145 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="VM Workstation Interface" --> @endhtmlonly
149 @defgroup SURF_lmm SURF Linear MaxMin
151 @brief Describes how the linear MaxMin system work
153 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="SURF Linear MaxMin" --> @endhtmlonly
157 @defgroup SURF_callbacks SURF callbacks
159 @brief Describes how to use the SURF callbacks
161 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="SURF callbacks" --> @endhtmlonly
165 @defgroup SURF_plugin_energy SURF Energy Plugin
167 @brief Describes how to use the energy plugin.
169 @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Energy plugin" --> @endhtmlonly