XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy");
static int platform_created = 0; /* indicate whether the platform file has been traced */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy");
static int platform_created = 0; /* indicate whether the platform file has been traced */
int i = xbt_dynar_length (ancestors_a1) - 1;
int j = xbt_dynar_length (ancestors_a2) - 1;
while (i >= 0 && j >= 0){
int i = xbt_dynar_length (ancestors_a1) - 1;
int j = xbt_dynar_length (ancestors_a2) - 1;
while (i >= 0 && j >= 0){
//check if we already register this pair (we only need one direction)
char aux1[INSTR_DEFAULT_STR_SIZE], aux2[INSTR_DEFAULT_STR_SIZE];
snprintf (aux1, INSTR_DEFAULT_STR_SIZE, "%s%s", src->name, dst->name);
//check if we already register this pair (we only need one direction)
char aux1[INSTR_DEFAULT_STR_SIZE], aux2[INSTR_DEFAULT_STR_SIZE];
snprintf (aux1, INSTR_DEFAULT_STR_SIZE, "%s%s", src->name, dst->name);
- xbt_dict_set (filter, aux1, xbt_strdup ("1"), NULL);
- xbt_dict_set (filter, aux2, xbt_strdup ("1"), NULL);
+ xbt_dict_set (filter, aux1, xbt_strdup ("1"), nullptr);
+ xbt_dict_set (filter, aux2, xbt_strdup ("1"), nullptr);
src->type->name, src->type->id,
dst->type->name, dst->type->id);
type_t link_type = PJ_type_get_or_null (link_typename, father->type);
src->type->name, src->type->id,
dst->type->name, dst->type->id);
type_t link_type = PJ_type_get_or_null (link_typename, father->type);
link_type = PJ_type_link_new (link_typename, father->type, src->type, dst->type);
}
//register EDGE types for triva configuration
link_type = PJ_type_link_new (link_typename, father->type, src->type, dst->type);
}
//register EDGE types for triva configuration
- xbt_dict_set (trivaEdgeTypes, link_type->name, xbt_strdup("1"), NULL);
+ xbt_dict_set (trivaEdgeTypes, link_type->name, xbt_strdup("1"), nullptr);
}
XBT_DEBUG ("Graph extraction for routing_component = %s", as->name());
if (!xbt_dict_is_empty(as->children())){
}
XBT_DEBUG ("Graph extraction for routing_component = %s", as->name());
if (!xbt_dict_is_empty(as->children())){
- xbt_graph_t graph = xbt_graph_new_graph (0, NULL);
- xbt_dict_t nodes = xbt_dict_new_homogeneous(NULL);
- xbt_dict_t edges = xbt_dict_new_homogeneous(NULL);
- xbt_edge_t edge = NULL;
+ xbt_graph_t graph = xbt_graph_new_graph (0, nullptr);
+ xbt_dict_t nodes = xbt_dict_new_homogeneous(nullptr);
+ xbt_dict_t edges = xbt_dict_new_homogeneous(nullptr);
+ xbt_edge_t edge = nullptr;
- xbt_graph_free_graph(graph, xbt_free_f, xbt_free_f, NULL);
+ xbt_graph_free_graph(graph, xbt_free_f, xbt_free_f, nullptr);
PJ_container_set_root (root);
if (TRACE_smpi_is_enabled()) {
if (!TRACE_smpi_is_grouped()){
type_t mpi = PJ_type_get_or_null ("MPI", root->type);
PJ_container_set_root (root);
if (TRACE_smpi_is_enabled()) {
if (!TRACE_smpi_is_grouped()){
type_t mpi = PJ_type_get_or_null ("MPI", root->type);
mpi = PJ_type_container_new("MPI", root->type);
PJ_type_state_new ("MPI_STATE", mpi);
PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
mpi = PJ_type_container_new("MPI", root->type);
PJ_type_state_new ("MPI_STATE", mpi);
PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_link())) {
type_t bandwidth = PJ_type_get_or_null ("bandwidth", container->type);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_link())) {
type_t bandwidth = PJ_type_get_or_null ("bandwidth", container->type);
- if (bandwidth == NULL){
- bandwidth = PJ_type_variable_new ("bandwidth", NULL, container->type);
+ if (bandwidth == nullptr){
+ bandwidth = PJ_type_variable_new ("bandwidth", nullptr, container->type);
- if (latency == NULL){
- latency = PJ_type_variable_new ("latency", NULL, container->type);
+ if (latency == nullptr){
+ latency = PJ_type_variable_new ("latency", nullptr, container->type);
}
new_pajeSetVariable (0, container, bandwidth, bandwidth_value);
new_pajeSetVariable (0, container, latency, latency_value);
}
if (TRACE_uncategorized()){
type_t bandwidth_used = PJ_type_get_or_null ("bandwidth_used", container->type);
}
new_pajeSetVariable (0, container, bandwidth, bandwidth_value);
new_pajeSetVariable (0, container, latency, latency_value);
}
if (TRACE_uncategorized()){
type_t bandwidth_used = PJ_type_get_or_null ("bandwidth_used", container->type);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_speed())) {
type_t speed = PJ_type_get_or_null ("power", container->type);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_speed())) {
type_t speed = PJ_type_get_or_null ("power", container->type);
}
if (TRACE_uncategorized()){
type_t speed_used = PJ_type_get_or_null ("power_used", container->type);
}
if (TRACE_uncategorized()){
type_t speed_used = PJ_type_get_or_null ("power_used", container->type);
PJ_type_variable_new ("power_used", "0.5 0.5 0.5", container->type);
}
}
if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped()){
type_t mpi = PJ_type_get_or_null ("MPI", container->type);
PJ_type_variable_new ("power_used", "0.5 0.5 0.5", container->type);
}
}
if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped()){
type_t mpi = PJ_type_get_or_null ("MPI", container->type);
mpi = PJ_type_container_new("MPI", container->type);
PJ_type_state_new ("MPI_STATE", mpi);
PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
mpi = PJ_type_container_new("MPI", container->type);
PJ_type_state_new ("MPI_STATE", mpi);
PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
if (TRACE_msg_process_is_enabled()) {
type_t msg_process = PJ_type_get_or_null ("MSG_PROCESS", container->type);
if (TRACE_msg_process_is_enabled()) {
type_t msg_process = PJ_type_get_or_null ("MSG_PROCESS", container->type);
msg_process = PJ_type_container_new("MSG_PROCESS", container->type);
type_t state = PJ_type_state_new ("MSG_PROCESS_STATE", msg_process);
PJ_value_new ("suspend", "1 0 1", state);
msg_process = PJ_type_container_new("MSG_PROCESS", container->type);
type_t state = PJ_type_state_new ("MSG_PROCESS_STATE", msg_process);
PJ_value_new ("suspend", "1 0 1", state);
if (TRACE_msg_vm_is_enabled()) {
type_t msg_vm = PJ_type_get_or_null ("MSG_VM", container->type);
if (TRACE_msg_vm_is_enabled()) {
type_t msg_vm = PJ_type_get_or_null ("MSG_VM", container->type);
msg_vm = PJ_type_container_new("MSG_VM", container->type);
type_t state = PJ_type_state_new ("MSG_VM_STATE", msg_vm);
PJ_value_new ("suspend", "1 0 1", state);
msg_vm = PJ_type_container_new("MSG_VM", container->type);
type_t state = PJ_type_state_new ("MSG_VM_STATE", msg_vm);
PJ_value_new ("suspend", "1 0 1", state);
xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free_f);
XBT_DEBUG ("Starting graph extraction.");
recursiveGraphExtraction (simgrid::s4u::Engine::instance()->rootAs(), PJ_container_get_root(), filter);
xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free_f);
XBT_DEBUG ("Starting graph extraction.");
recursiveGraphExtraction (simgrid::s4u::Engine::instance()->rootAs(), PJ_container_get_root(), filter);
snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "b%s", new_typename);
PJ_type_variable_new (tnstr, color, root);
}
snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "b%s", new_typename);
PJ_type_variable_new (tnstr, color, root);
}
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
if (!strcmp (root->name, father_type)){
PJ_type_variable_new (new_typename, color, root);
}
if (!strcmp (root->name, father_type)){
PJ_type_variable_new (new_typename, color, root);
}
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
if (!strcmp (root->name, father_type)){
PJ_type_state_new (new_typename, root);
}
if (!strcmp (root->name, father_type)){
PJ_type_state_new (new_typename, root);
}
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
if (!strcmp (root->name, type_name)){
PJ_value_new (value, color, root);
}
if (!strcmp (root->name, type_name)){
PJ_value_new (value, color, root);
}
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
type_t child_type;
char *name;
xbt_dict_foreach(root->children, cursor, name, child_type) {
AS_t as, container_t container)
{
if (!xbt_dict_is_empty(as->children())){
AS_t as, container_t container)
{
if (!xbt_dict_is_empty(as->children())){
- xbt_graph_t ret = xbt_graph_new_graph (0, NULL);
- xbt_dict_t nodes = xbt_dict_new_homogeneous(NULL);
- xbt_dict_t edges = xbt_dict_new_homogeneous(NULL);
+ xbt_graph_t ret = xbt_graph_new_graph (0, nullptr);
+ xbt_dict_t nodes = xbt_dict_new_homogeneous(nullptr);
+ xbt_dict_t edges = xbt_dict_new_homogeneous(nullptr);
recursiveXBTGraphExtraction (ret, nodes, edges, simgrid::s4u::Engine::instance()->rootAs(), PJ_container_get_root());
xbt_dict_free (&nodes);
xbt_dict_free (&edges);
recursiveXBTGraphExtraction (ret, nodes, edges, simgrid::s4u::Engine::instance()->rootAs(), PJ_container_get_root());
xbt_dict_free (&nodes);
xbt_dict_free (&edges);
file = fopen(filename, "w");
xbt_assert(file, "Failed to open %s \n", filename);
file = fopen(filename, "w");
xbt_assert(file, "Failed to open %s \n", filename);