SimGrid
3.13
Versatile Simulation of Distributed Systems
|
#include "src/surf/HostImpl.hpp"
#include "surf_interface.hpp"
#include "network_interface.hpp"
#include "src/instr/instr_private.h"
#include "plugins/energy.hpp"
#include "virtual_machine.hpp"
Functions | |
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY (surf_kernel) | |
static simgrid::surf::HostImpl * | get_casted_host (sg_host_t host) |
static simgrid::surf::VirtualMachine * | get_casted_vm (sg_host_t host) |
void | surf_presolve (void) |
Finish simulation initialization. More... | |
double | surf_solve (double max_date) |
Performs a part of the simulation. More... | |
surf_action_t | surf_model_extract_done_action_set (surf_model_t model) |
Pop an action from the done actions set. More... | |
surf_action_t | surf_model_extract_failed_action_set (surf_model_t model) |
Pop an action from the failed actions set. More... | |
int | surf_model_running_action_set_size (surf_model_t model) |
Get the size of the running action set of a model. More... | |
void | surf_vm_model_create (const char *name, sg_host_t ind_phys_host) |
Create a new VM on the specified host. More... | |
surf_action_t | surf_network_model_communicate (surf_network_model_t model, sg_host_t src, sg_host_t dst, double size, double rate) |
Create a communication between two hosts. More... | |
surf_action_t | surf_host_sleep (sg_host_t host, double duration) |
Create a sleep action on the given host. More... | |
surf_action_t | surf_host_open (sg_host_t host, const char *fullpath) |
Create a file opening action on the given host. More... | |
surf_action_t | surf_host_close (sg_host_t host, surf_file_t fd) |
Create a file closing action on the given host. More... | |
int | surf_host_unlink (sg_host_t host, surf_file_t fd) |
Unlink a file descriptor. More... | |
size_t | surf_host_get_size (sg_host_t host, surf_file_t fd) |
Get the size of a file on a host. More... | |
surf_action_t | surf_host_read (sg_host_t host, surf_file_t fd, sg_size_t size) |
Create a file reading action on the given host. More... | |
surf_action_t | surf_host_write (sg_host_t host, surf_file_t fd, sg_size_t size) |
Create a file writing action on the given host. More... | |
xbt_dynar_t | surf_host_get_info (sg_host_t host, surf_file_t fd) |
Get the informations of a file descriptor. More... | |
size_t | surf_host_file_tell (sg_host_t host, surf_file_t fd) |
Get the current position of the file descriptor. More... | |
int | surf_host_file_seek (sg_host_t host, surf_file_t fd, sg_offset_t offset, int origin) |
Set the position indictator assiociated with the file descriptor to a new position. More... | |
int | surf_host_file_move (sg_host_t host, surf_file_t fd, const char *fullpath) |
Move a file to another location on the same mount point. More... | |
void | surf_vm_destroy (sg_host_t vm) |
Destroy a VM. More... | |
void | surf_vm_suspend (sg_host_t vm) |
Suspend a VM. More... | |
void | surf_vm_resume (sg_host_t vm) |
Resume a VM. More... | |
void | surf_vm_save (sg_host_t vm) |
Save the VM (Not yet implemented) More... | |
void | surf_vm_restore (sg_host_t vm) |
Restore the VM (Not yet implemented) More... | |
void | surf_vm_migrate (sg_host_t vm, sg_host_t ind_vm_ws_dest) |
Migrate the VM to the destination host. More... | |
sg_host_t | surf_vm_get_pm (sg_host_t vm) |
Get the physical machine hosting the VM. More... | |
void | surf_vm_set_bound (sg_host_t vm, double bound) |
[brief description] More... | |
void | surf_vm_set_affinity (sg_host_t vm, sg_host_t host, unsigned long mask) |
[brief description] More... | |
xbt_dict_t | surf_storage_get_content (surf_resource_t resource) |
Get the content of a storage. More... | |
sg_size_t | surf_storage_get_size (surf_resource_t resource) |
Get the size in bytes of a storage. More... | |
sg_size_t | surf_storage_get_free_size (surf_resource_t resource) |
Get the available size in bytes of a storage. More... | |
sg_size_t | surf_storage_get_used_size (surf_resource_t resource) |
Get the size in bytes of a storage. More... | |
xbt_dict_t | surf_storage_get_properties (surf_resource_t resource) |
return the properties set associated to that storage More... | |
const char * | surf_storage_get_host (surf_resource_t resource) |
Get the host the storage is attached to. More... | |
void | surf_cpu_action_set_bound (surf_action_t action, double bound) |
[brief description] More... | |
surf_file_t | surf_storage_action_get_file (surf_action_t action) |
Get the file associated to a storage action. More... | |
Variables | |
double | NOW |
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY | ( | surf_kernel | ) |
|
static |
|
static |
surf_action_t surf_model_extract_failed_action_set | ( | surf_model_t | model | ) |
Pop an action from the failed actions set.
model | The model from which the action is extracted |
int surf_model_running_action_set_size | ( | surf_model_t | model | ) |
Get the size of the running action set of a model.
model | The model |
Create a new VM on the specified host.
surf_action_t surf_network_model_communicate | ( | surf_network_model_t | model, |
sg_host_t | src, | ||
sg_host_t | dst, | ||
double | size, | ||
double | rate | ||
) |
Create a communication between two hosts.
model | The model which handle the communication |
src | The source host |
dst | The destination host |
size | The amount of data (in bytes) needed to transfer |
rate | [description] |
surf_action_t surf_host_sleep | ( | sg_host_t | host, |
double | duration | ||
) |
Create a sleep action on the given host.
surf_action_t surf_host_open | ( | sg_host_t | host, |
const char * | fullpath | ||
) |
Create a file opening action on the given host.
surf_action_t surf_host_close | ( | sg_host_t | host, |
surf_file_t | fd | ||
) |
Create a file closing action on the given host.
int surf_host_unlink | ( | sg_host_t | host, |
surf_file_t | fd | ||
) |
Unlink a file descriptor.
host | The surf host |
fd | The file descriptor |
size_t surf_host_get_size | ( | sg_host_t | host, |
surf_file_t | fd | ||
) |
Get the size of a file on a host.
host | The surf host |
fd | The file descriptor |
surf_action_t surf_host_read | ( | sg_host_t | host, |
surf_file_t | fd, | ||
sg_size_t | size | ||
) |
Create a file reading action on the given host.
surf_action_t surf_host_write | ( | sg_host_t | host, |
surf_file_t | fd, | ||
sg_size_t | size | ||
) |
Create a file writing action on the given host.
xbt_dynar_t surf_host_get_info | ( | sg_host_t | host, |
surf_file_t | fd | ||
) |
Get the informations of a file descriptor.
The returned xbt_dynar_t contains:
host | The surf host |
fd | The file descriptor |
size_t surf_host_file_tell | ( | sg_host_t | host, |
surf_file_t | fd | ||
) |
Get the current position of the file descriptor.
host | The surf host |
fd | The file descriptor |
int surf_host_file_seek | ( | sg_host_t | host, |
surf_file_t | fd, | ||
sg_offset_t | offset, | ||
int | origin | ||
) |
Set the position indictator assiociated with the file descriptor to a new position.
[long description]
host | The surf host |
fd | The file descriptor |
offset | The offset from the origin |
origin | Position used as a reference for the offset
|
int surf_host_file_move | ( | sg_host_t | host, |
surf_file_t | fd, | ||
const char * | fullpath | ||
) |
Move a file to another location on the same mount point.
[long description]
host | The surf host |
fd | The file descriptor |
fullpath | The new full path |
Save the VM (Not yet implemented)
resource | The surf vm |
Restore the VM (Not yet implemented)
resource | The surf vm |
Migrate the VM to the destination host.
resource | The surf vm |
ind_vm_ws_dest | The destination host |
Get the physical machine hosting the VM.
resource | The surf vm |
[brief description]
[long description]
resource | [description] |
bound | [description] |
[brief description]
[long description]
resource | [description] |
cpu | [description] |
mask | [description] |
xbt_dict_t surf_storage_get_content | ( | surf_resource_t | resource | ) |
Get the content of a storage.
resource | The surf storage |
sg_size_t surf_storage_get_size | ( | surf_resource_t | resource | ) |
Get the size in bytes of a storage.
resource | The surf storage |
sg_size_t surf_storage_get_free_size | ( | surf_resource_t | resource | ) |
Get the available size in bytes of a storage.
resource | The surf storage |
sg_size_t surf_storage_get_used_size | ( | surf_resource_t | resource | ) |
Get the size in bytes of a storage.
resource | The surf storage |
xbt_dict_t surf_storage_get_properties | ( | surf_resource_t | resource | ) |
return the properties set associated to that storage
const char* surf_storage_get_host | ( | surf_resource_t | resource | ) |
Get the host the storage is attached to.
resource | The surf storage |
void surf_cpu_action_set_bound | ( | surf_action_t | action, |
double | bound | ||
) |
[brief description]
[long description]
action | The surf cpu action |
bound | [description] |
surf_file_t surf_storage_action_get_file | ( | surf_action_t | action | ) |
Get the file associated to a storage action.
action | The surf storage action |
double NOW |