{
if (!TRACE_is_active())
return;
-//
-// {
-// //check if hosts have been created
-// xbt_assert1 (allHostTypes != NULL && xbt_dict_length(allHostTypes) != 0,
-// "%s must be called after environment creation", __FUNCTION__);
-// }
+
+ xbt_assert1 (instr_platform_traced(),
+ "%s must be called after environment creation", __FUNCTION__);
//check if category is already created
char *created = xbt_dict_get_or_null(created_categories, category);
void instr_new_user_variable_type (const char *new_typename, const char *color);
void instr_new_user_link_variable_type (const char *new_typename, const char *color);
void instr_new_user_host_variable_type (const char *new_typename, const char *color);
+int instr_platform_traced (void);
#endif /* HAVE_TRACING */
#endif /* INSTR_PRIVATE_H_ */
xbt_dict_t children;
}s_container_t;
+static int platform_created = 0; /* indicate whether the platform file has been traced */
static type_t rootType = NULL; /* the root type */
static container_t rootContainer = NULL; /* the root container */
static xbt_dynar_t currentContainer = NULL; /* push and pop, used only in creation */
{
currentContainer = NULL;
recursiveGraphExtraction (rootContainer);
+ platform_created = 1;
}
/*
recursiveNewUserHostVariableType (new_typename, color, rootType);
}
+int instr_platform_traced ()
+{
+ return platform_created;
+}
+
#endif /* HAVE_TRACING */
if (!TRACE_is_active())
return;
+ xbt_assert1 (instr_platform_traced(),
+ "%s must be called after environment creation", __FUNCTION__);
+
char valuestr[100];
snprintf(valuestr, 100, "%g", value);
if (!TRACE_is_active())
return;
+ xbt_assert1 (instr_platform_traced(),
+ "%s must be called after environment creation", __FUNCTION__);
+
char valuestr[100];
snprintf(valuestr, 100, "%g", value);