1 /* Copyright (c) 2007-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "smx_private.h"
8 #include "xbt/sysdep.h"
13 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix,
16 static void SIMIX_execution_finish(smx_synchro_t synchro);
19 * \brief Internal function to create a SIMIX host.
20 * \param name name of the host to create
21 * \param workstation the SURF workstation to encapsulate
22 * \param data some user data (may be NULL)
24 smx_host_t SIMIX_host_create(const char *name,
25 void *workstation, void *data)
27 smx_host_priv_t smx_host = xbt_new0(s_smx_host_priv_t, 1);
31 smx_host->process_list =
32 xbt_swag_new(xbt_swag_offset(proc, host_proc_hookup));
34 /* Update global variables */
35 xbt_lib_set(host_lib,name,SIMIX_HOST_LEVEL,smx_host);
37 return xbt_lib_get_elm_or_null(host_lib, name);
40 void simcall_HANDLER_host_on(smx_simcall_t simcall, smx_host_t h)
46 * \brief Start the host if it is off
49 void SIMIX_host_on(smx_host_t h)
51 smx_host_priv_t host = SIMIX_host_priv(h);
53 xbt_assert((host != NULL), "Invalid parameters");
55 if (surf_resource_get_state(surf_workstation_resource_priv(h))==SURF_RESOURCE_OFF) {
56 surf_resource_set_state(surf_workstation_resource_priv(h), SURF_RESOURCE_ON);
59 smx_process_arg_t arg;
60 xbt_dynar_foreach(host->boot_processes,cpt,arg) {
61 smx_process_t process;
63 char** argv = xbt_new(char*, arg->argc);
64 for (int i=0; i<arg->argc; i++)
65 argv[i] = xbt_strdup(arg->argv[i]);
67 XBT_DEBUG("Booting Process %s(%s) right now", arg->argv[0], arg->hostname);
68 if (simix_global->create_process_function) {
69 simix_global->create_process_function(&process,
81 simcall_process_create(&process,
96 void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t h)
98 SIMIX_host_off(h, simcall->issuer);
102 * \brief Stop the host if it is on
105 void SIMIX_host_off(smx_host_t h, smx_process_t issuer)
107 smx_host_priv_t host = SIMIX_host_priv(h);
109 xbt_assert((host != NULL), "Invalid parameters");
111 if (surf_resource_get_state(surf_workstation_resource_priv(h))==SURF_RESOURCE_ON) {
112 surf_resource_set_state(surf_workstation_resource_priv(h), SURF_RESOURCE_OFF);
114 /* Clean Simulator data */
115 if (xbt_swag_size(host->process_list) != 0) {
116 smx_process_t process = NULL;
117 xbt_swag_foreach(process, host->process_list) {
118 SIMIX_process_kill(process, issuer);
119 XBT_DEBUG("Killing %s on %s by %s", process->name, sg_host_name(process->smx_host), issuer->name);
123 /*xbt_dynar_t vms = surf_workstation_get_vms(h);
126 xbt_dynar_foreach(vms, cpt, vm) {
127 SIMIX_vm_shutdown(vm, issuer);
128 SIMIX_vm_destroy(vm);
130 xbt_dynar_free(&vms);*/
134 * \brief Internal function to destroy a SIMIX host.
136 * \param h the host to destroy (a smx_host_t)
138 void SIMIX_host_destroy(void *h)
140 smx_host_priv_t host = (smx_host_priv_t) h;
142 xbt_assert((host != NULL), "Invalid parameters");
144 /* Clean Simulator data */
145 if (xbt_swag_size(host->process_list) != 0) {
146 char *msg = xbt_strdup("Shutting down host, but it's not empty:");
148 smx_process_t process = NULL;
150 xbt_swag_foreach(process, host->process_list) {
151 tmp = bprintf("%s\n\t%s", msg, process->name);
155 SIMIX_display_process_status();
156 THROWF(arg_error, 0, "%s", msg);
158 xbt_dynar_free(&host->auto_restart_processes);
159 xbt_dynar_free(&host->boot_processes);
160 xbt_swag_free(host->process_list);
162 /* Clean host structure */
167 smx_host_t simcall_HANDLER_host_get_by_name(smx_simcall_t simcall, const char *name){
168 return SIMIX_host_get_by_name(name);
170 smx_host_t SIMIX_host_get_by_name(const char *name){
171 xbt_assert(((simix_global != NULL)
172 && (host_lib != NULL)),
173 "Environment not set yet");
175 return xbt_lib_get_elm_or_null(host_lib, name);
178 smx_host_t SIMIX_host_self(void)
180 smx_process_t process = SIMIX_process_self();
181 return (process == NULL) ? NULL : SIMIX_process_get_host(process);
184 /* needs to be public and without simcall because it is called
185 by exceptions and logging events */
186 const char* SIMIX_host_self_get_name(void)
188 smx_host_t host = SIMIX_host_self();
189 if (host == NULL || SIMIX_process_self() == simix_global->maestro_process)
192 return SIMIX_host_get_name(host);
195 const char* simcall_HANDLER_host_get_name(smx_simcall_t simcall, smx_host_t host){
196 return SIMIX_host_get_name(host);
198 const char* SIMIX_host_get_name(smx_host_t host){
199 xbt_assert((host != NULL), "Invalid parameters");
201 return sg_host_name(host);
204 xbt_dict_t simcall_HANDLER_host_get_properties(smx_simcall_t simcall, smx_host_t host){
205 return SIMIX_host_get_properties(host);
207 xbt_dict_t SIMIX_host_get_properties(smx_host_t host){
208 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
210 return surf_resource_get_properties(surf_workstation_resource_priv(host));
213 double simcall_HANDLER_host_get_speed(smx_simcall_t simcall, smx_host_t host){
214 return SIMIX_host_get_speed(host);
216 double SIMIX_host_get_speed(smx_host_t host){
217 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
218 return surf_workstation_get_speed(host, 1.0);
221 int simcall_HANDLER_host_get_core(smx_simcall_t simcall, smx_host_t host){
222 return SIMIX_host_get_core(host);
224 int SIMIX_host_get_core(smx_host_t host){
225 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
227 return surf_workstation_get_core(host);
230 xbt_swag_t simcall_HANDLER_host_get_process_list(smx_simcall_t simcall, smx_host_t host){
231 return SIMIX_host_get_process_list(host);
234 xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){
235 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
236 smx_host_priv_t host_priv = SIMIX_host_priv(host);
238 return host_priv->process_list;
242 double simcall_HANDLER_host_get_available_speed(smx_simcall_t simcall, smx_host_t host){
243 return SIMIX_host_get_available_speed(host);
245 double SIMIX_host_get_available_speed(smx_host_t host){
246 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
248 return surf_workstation_get_available_speed(host);
251 double simcall_HANDLER_host_get_current_power_peak(smx_simcall_t simcall, smx_host_t host){
252 return SIMIX_host_get_current_power_peak(host);
254 double SIMIX_host_get_current_power_peak(smx_host_t host) {
255 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
256 return surf_workstation_get_current_power_peak(host);
259 double simcall_HANDLER_host_get_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){
260 return SIMIX_host_get_power_peak_at(host, pstate_index);
262 double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index) {
263 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
265 return surf_workstation_get_power_peak_at(host, pstate_index);
268 int simcall_HANDLER_host_get_nb_pstates(smx_simcall_t simcall, smx_host_t host){
269 return SIMIX_host_get_nb_pstates(host);
271 int SIMIX_host_get_nb_pstates(smx_host_t host) {
272 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
274 return surf_workstation_get_nb_pstates(host);
278 void simcall_HANDLER_host_set_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){
279 SIMIX_host_set_power_peak_at(host, pstate_index);
281 void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index) {
282 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
284 surf_workstation_set_power_peak_at(host, pstate_index);
287 double simcall_HANDLER_host_get_consumed_energy(smx_simcall_t simcall, smx_host_t host){
288 return SIMIX_host_get_consumed_energy(host);
290 double SIMIX_host_get_consumed_energy(smx_host_t host) {
291 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
292 return surf_workstation_get_consumed_energy(host);
295 int simcall_HANDLER_host_get_state(smx_simcall_t simcall, smx_host_t host){
296 return SIMIX_host_get_state(host);
298 int SIMIX_host_get_state(smx_host_t host){
299 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
301 return surf_resource_get_state(surf_workstation_resource_priv(host));
304 void _SIMIX_host_free_process_arg(void *data)
306 smx_process_arg_t arg = *(void**)data;
308 for (i = 0; i < arg->argc; i++)
309 xbt_free(arg->argv[i]);
315 * \brief Add a process to the list of the processes that the host will restart when it comes back
316 * This function add a process to the list of the processes that will be restarted when the host comes
317 * back. It is expected that this function is called when the host is down.
318 * The processes will only be restarted once, meaning that you will have to register the process
319 * again to restart the process again.
321 void SIMIX_host_add_auto_restart_process(smx_host_t host,
323 xbt_main_func_t code,
325 const char *hostname,
327 int argc, char **argv,
328 xbt_dict_t properties,
331 if (!SIMIX_host_priv(host)->auto_restart_processes) {
332 SIMIX_host_priv(host)->auto_restart_processes = xbt_dynar_new(sizeof(smx_process_arg_t),_SIMIX_host_free_process_arg);
334 smx_process_arg_t arg = xbt_new(s_smx_process_arg_t,1);
335 arg->name = xbt_strdup(name);
338 arg->hostname = hostname;
339 arg->kill_time = kill_time;
342 arg->argv = xbt_new(char*,argc + 1);
345 for (i = 0; i < argc; i++) {
346 arg->argv[i] = xbt_strdup(argv[i]);
348 arg->argv[argc] = NULL;
350 arg->properties = properties;
351 arg->auto_restart = auto_restart;
353 if( SIMIX_host_get_state(host) == SURF_RESOURCE_OFF
354 && !xbt_dict_get_or_null(watched_hosts_lib,sg_host_name(host))){
355 xbt_dict_set(watched_hosts_lib,sg_host_name(host),host,NULL);
356 XBT_DEBUG("Have pushed host %s to watched_hosts_lib because state == SURF_RESOURCE_OFF",sg_host_name(host));
358 xbt_dynar_push_as(SIMIX_host_priv(host)->auto_restart_processes,smx_process_arg_t,arg);
361 * \brief Restart the list of processes that have been registered to the host
363 void SIMIX_host_restart_processes(smx_host_t host)
366 smx_process_arg_t arg;
367 xbt_dynar_t process_list = SIMIX_host_priv(host)->auto_restart_processes;
371 xbt_dynar_foreach (process_list, cpt, arg) {
373 smx_process_t process;
375 XBT_DEBUG("Restarting Process %s(%s) right now", arg->argv[0], arg->hostname);
376 if (simix_global->create_process_function) {
377 simix_global->create_process_function(&process,
389 simcall_process_create(&process,
401 /* arg->argv is used by the process created above. Hide it to
402 * _SIMIX_host_free_process_arg() which is called by xbt_dynar_reset()
407 xbt_dynar_reset(process_list);
410 void SIMIX_host_autorestart(smx_host_t host)
412 if(simix_global->autorestart)
413 simix_global->autorestart(host);
415 xbt_die("No function for simix_global->autorestart");
418 smx_synchro_t simcall_HANDLER_host_execute(smx_simcall_t simcall,const char *name,
419 smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
420 return SIMIX_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
422 smx_synchro_t SIMIX_host_execute(const char *name,
423 smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
425 /* alloc structures and initialize */
426 smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
427 synchro->type = SIMIX_SYNC_EXECUTE;
428 synchro->name = xbt_strdup(name);
429 synchro->state = SIMIX_RUNNING;
430 synchro->execution.host = host;
433 synchro->category = NULL;
436 /* set surf's action */
437 if (!MC_is_active()) {
439 synchro->execution.surf_exec = surf_workstation_execute(host, computation_amount);
440 surf_action_set_data(synchro->execution.surf_exec, synchro);
441 surf_action_set_priority(synchro->execution.surf_exec, priority);
443 /* Note (hypervisor): for multicore, the bound value being passed to the
444 * surf layer should not be zero (i.e., unlimited). It should be the
445 * capacity of a CPU core. */
447 surf_cpu_action_set_bound(synchro->execution.surf_exec, SIMIX_host_get_speed(host));
449 surf_cpu_action_set_bound(synchro->execution.surf_exec, bound);
451 if (affinity_mask != 0) {
452 /* just a double check to confirm that this host is the host where this task is running. */
453 xbt_assert(synchro->execution.host == host);
454 surf_cpu_action_set_affinity(synchro->execution.surf_exec, host, affinity_mask);
458 XBT_DEBUG("Create execute synchro %p: %s", synchro, synchro->name);
463 smx_synchro_t simcall_HANDLER_host_parallel_execute(smx_simcall_t simcall, const char *name,
464 int host_nb, smx_host_t *host_list,
465 double *computation_amount, double *communication_amount,
466 double amount, double rate){
467 return SIMIX_host_parallel_execute(name, host_nb, host_list, computation_amount,
468 communication_amount, amount, rate);
470 smx_synchro_t SIMIX_host_parallel_execute(const char *name,
471 int host_nb, smx_host_t *host_list,
472 double *computation_amount, double *communication_amount,
473 double amount, double rate){
475 void **workstation_list = NULL;
478 /* alloc structures and initialize */
479 smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
480 synchro->type = SIMIX_SYNC_PARALLEL_EXECUTE;
481 synchro->name = xbt_strdup(name);
482 synchro->state = SIMIX_RUNNING;
483 synchro->execution.host = NULL; /* FIXME: do we need the list of hosts? */
486 synchro->category = NULL;
489 /* set surf's synchro */
490 workstation_list = xbt_new0(void *, host_nb);
491 for (i = 0; i < host_nb; i++)
492 workstation_list[i] = surf_workstation_resource_priv(host_list[i]);
495 /* FIXME: what happens if host_list contains VMs and PMs. If
496 * execute_parallel_task() does not change the state of the model, we can mix
498 surf_model_t ws_model = surf_resource_model(host_list[0], SURF_WKS_LEVEL);
499 for (i = 1; i < host_nb; i++) {
500 surf_model_t ws_model_tmp = surf_resource_model(host_list[i], SURF_WKS_LEVEL);
501 if (ws_model_tmp != ws_model) {
502 XBT_CRITICAL("mixing VMs and PMs is not supported");
507 /* set surf's synchro */
508 if (!MC_is_active()) {
509 synchro->execution.surf_exec =
510 surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
511 host_nb, workstation_list, computation_amount, communication_amount, rate);
513 surf_action_set_data(synchro->execution.surf_exec, synchro);
515 XBT_DEBUG("Create parallel execute synchro %p", synchro);
520 void simcall_HANDLER_host_execution_destroy(smx_simcall_t simcall, smx_synchro_t synchro){
521 SIMIX_host_execution_destroy(synchro);
523 void SIMIX_host_execution_destroy(smx_synchro_t synchro){
524 XBT_DEBUG("Destroy synchro %p", synchro);
526 if (synchro->execution.surf_exec) {
527 surf_action_unref(synchro->execution.surf_exec);
528 synchro->execution.surf_exec = NULL;
530 xbt_free(synchro->name);
531 xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
534 void simcall_HANDLER_host_execution_cancel(smx_simcall_t simcall, smx_synchro_t synchro){
535 SIMIX_host_execution_cancel(synchro);
537 void SIMIX_host_execution_cancel(smx_synchro_t synchro){
538 XBT_DEBUG("Cancel synchro %p", synchro);
540 if (synchro->execution.surf_exec)
541 surf_action_cancel(synchro->execution.surf_exec);
544 double simcall_HANDLER_host_execution_get_remains(smx_simcall_t simcall, smx_synchro_t synchro){
545 return SIMIX_host_execution_get_remains(synchro);
547 double SIMIX_host_execution_get_remains(smx_synchro_t synchro){
550 if (synchro->state == SIMIX_RUNNING)
551 result = surf_action_get_remains(synchro->execution.surf_exec);
556 e_smx_state_t simcall_HANDLER_host_execution_get_state(smx_simcall_t simcall, smx_synchro_t synchro){
557 return SIMIX_host_execution_get_state(synchro);
559 e_smx_state_t SIMIX_host_execution_get_state(smx_synchro_t synchro){
560 return synchro->state;
563 void simcall_HANDLER_host_execution_set_priority(smx_simcall_t simcall, smx_synchro_t synchro,
565 SIMIX_host_execution_set_priority(synchro, priority);
567 void SIMIX_host_execution_set_priority(smx_synchro_t synchro, double priority){
569 if(synchro->execution.surf_exec)
570 surf_action_set_priority(synchro->execution.surf_exec, priority);
573 void simcall_HANDLER_host_execution_set_bound(smx_simcall_t simcall, smx_synchro_t synchro,
575 SIMIX_host_execution_set_bound(synchro, bound);
577 void SIMIX_host_execution_set_bound(smx_synchro_t synchro, double bound){
579 if(synchro->execution.surf_exec)
580 surf_cpu_action_set_bound(synchro->execution.surf_exec, bound);
583 void simcall_HANDLER_host_execution_set_affinity(smx_simcall_t simcall,
584 smx_synchro_t synchro, smx_host_t host, unsigned long mask){
585 SIMIX_host_execution_set_affinity(synchro, host, mask);
587 void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, smx_host_t host, unsigned long mask){
588 xbt_assert(synchro->type == SIMIX_SYNC_EXECUTE);
590 if (synchro->execution.surf_exec) {
591 /* just a double check to confirm that this host is the host where this task is running. */
592 xbt_assert(synchro->execution.host == host);
593 surf_cpu_action_set_affinity(synchro->execution.surf_exec, host, mask);
597 void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro){
599 XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state);
601 /* Associate this simcall to the synchro */
602 xbt_fifo_push(synchro->simcalls, simcall);
603 simcall->issuer->waiting_synchro = synchro;
605 /* set surf's synchro */
606 if (MC_is_active()) {
607 synchro->state = SIMIX_DONE;
608 SIMIX_execution_finish(synchro);
612 /* If the synchro is already finished then perform the error handling */
613 if (synchro->state != SIMIX_RUNNING)
614 SIMIX_execution_finish(synchro);
617 void SIMIX_host_execution_suspend(smx_synchro_t synchro)
619 if(synchro->execution.surf_exec)
620 surf_action_suspend(synchro->execution.surf_exec);
623 void SIMIX_host_execution_resume(smx_synchro_t synchro)
625 if(synchro->execution.surf_exec)
626 surf_action_resume(synchro->execution.surf_exec);
629 void SIMIX_execution_finish(smx_synchro_t synchro)
631 xbt_fifo_item_t item;
632 smx_simcall_t simcall;
634 xbt_fifo_foreach(synchro->simcalls, item, simcall, smx_simcall_t) {
636 switch (synchro->state) {
639 /* do nothing, synchro done */
640 XBT_DEBUG("SIMIX_execution_finished: execution successful");
644 XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", sg_host_name(simcall->issuer->smx_host));
645 simcall->issuer->context->iwannadie = 1;
646 SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
650 XBT_DEBUG("SIMIX_execution_finished: execution canceled");
651 SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Canceled");
655 xbt_die("Internal error in SIMIX_execution_finish: unexpected synchro state %d",
656 (int)synchro->state);
658 /* check if the host is down */
659 if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
660 simcall->issuer->context->iwannadie = 1;
663 simcall->issuer->waiting_synchro = NULL;
664 simcall_host_execution_wait__set__result(simcall, synchro->state);
665 SIMIX_simcall_answer(simcall);
668 /* We no longer need it */
669 SIMIX_host_execution_destroy(synchro);
673 void SIMIX_post_host_execute(smx_synchro_t synchro)
675 if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
676 * for parallel tasks too */
677 surf_resource_get_state(surf_workstation_resource_priv(synchro->execution.host)) == SURF_RESOURCE_OFF) {
678 /* If the host running the synchro failed, notice it so that the asking
679 * process can be killed if it runs on that host itself */
680 synchro->state = SIMIX_FAILED;
681 } else if (surf_action_get_state(synchro->execution.surf_exec) == SURF_ACTION_FAILED) {
682 /* If the host running the synchro didn't fail, then the synchro was
684 synchro->state = SIMIX_CANCELED;
686 synchro->state = SIMIX_DONE;
689 if (synchro->execution.surf_exec) {
690 surf_action_unref(synchro->execution.surf_exec);
691 synchro->execution.surf_exec = NULL;
694 /* If there are simcalls associated with the synchro, then answer them */
695 if (xbt_fifo_size(synchro->simcalls)) {
696 SIMIX_execution_finish(synchro);
702 void simcall_HANDLER_set_category(smx_simcall_t simcall, smx_synchro_t synchro,
703 const char *category){
704 SIMIX_set_category(synchro, category);
706 void SIMIX_set_category(smx_synchro_t synchro, const char *category)
708 if (synchro->state != SIMIX_RUNNING) return;
709 if (synchro->type == SIMIX_SYNC_EXECUTE){
710 surf_action_set_category(synchro->execution.surf_exec, category);
711 }else if (synchro->type == SIMIX_SYNC_COMMUNICATE){
712 surf_action_set_category(synchro->comm.surf_comm, category);
718 * \brief Function to get the parameters of the given the SIMIX host.
720 * \param host the host to get_phys_host (a smx_host_t)
721 * \param param the parameter object space to be overwritten (a ws_params_t)
723 void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params)
725 /* jump to ws_get_params(). */
726 surf_workstation_get_params(ind_vm, params);
729 void simcall_HANDLER_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params)
731 SIMIX_host_get_params(ind_vm, params);
734 void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params)
736 /* jump to ws_set_params(). */
737 surf_workstation_set_params(ind_vm, params);
740 void simcall_HANDLER_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params)
742 SIMIX_host_set_params(ind_vm, params);
745 xbt_dict_t simcall_HANDLER_host_get_mounted_storage_list(smx_simcall_t simcall, smx_host_t host){
746 return SIMIX_host_get_mounted_storage_list(host);
749 xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host){
750 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
752 return surf_workstation_get_mounted_storage_list(host);
755 xbt_dynar_t simcall_HANDLER_host_get_attached_storage_list(smx_simcall_t simcall, smx_host_t host){
756 return SIMIX_host_get_attached_storage_list(host);
759 xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host){
760 xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
762 return surf_workstation_get_attached_storage_list(host);