#include "simgrid/host.h"
#include "src/simdag/simdag_private.h"
#include "src/surf/surf_interface.hpp"
+#include "simgrid/s4u/engine.hpp"
#ifdef HAVE_JEDULE
#include "simgrid/jedule/jedule_sd_binding.h"
*/
void SD_create_environment(const char *platform_file)
{
- parse_platform_file(platform_file);
+ simgrid::s4u::Engine::instance()->loadPlatform(platform_file);
XBT_DEBUG("Workstation number: %zu, link number: %d", sg_host_count(), sg_link_count());
#ifdef HAVE_JEDULE
*/
void SIMIX_create_environment(const char *file)
{
+ xbt_ex_t e;
double start = 0, end = 0;
if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
start = xbt_os_time();
- parse_platform_file(file);
+ TRY {
+ parse_platform_file(file);
+ } CATCH (e) {
+ xbt_die("Error while loading %s: %s", file, e.msg);
+ }
if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
end = xbt_os_time();
XBT_DEBUG("PARSE TIME: %g", (end - start));
SIMIX_storage_create_(s);
});
-
+ SIMIX_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, SIMIX_storage_destroy);
}
if (!simix_timers) {
simix_timers = xbt_heap_new(8, &free);
}
- SIMIX_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, SIMIX_storage_destroy);
-
if (sg_cfg_get_boolean("clean_atexit"))
atexit(SIMIX_clean);
storage->type_id,
storage->content);
- xbt_lib_set(storage_lib,
- storage->id,
- ROUTING_STORAGE_LEVEL,
- (void *) xbt_strdup(storage->type_id));
+ xbt_lib_set(storage_lib, storage->id, ROUTING_STORAGE_LEVEL, (void *) xbt_strdup(storage->type_id));
// if storage content is not specified use the content of storage_type if any
if(!strcmp(storage->content,"") && strcmp(((storage_type_t) stype)->content,"")){