if (created != filter->end()) { // declared, let's work
char valuestr[100];
snprintf(valuestr, 100, "%g", value);
- container_t container = PJ_container_get(resource);
+ container_t container = simgrid::instr::Container::byName(resource);
simgrid::instr::Type* type = container->type_->getChild(variable);
switch (what){
case INSTR_US_SET:
*/
void TRACE_host_set_state(const char* host, const char* state, const char* value_str)
{
- container_t container = PJ_container_get(host);
+ container_t container = simgrid::instr::Container::byName(host);
simgrid::instr::Type* type = container->type_->getChild(state);
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(
value_str, "", type); /* if user didn't declare a value with a color, use no color */
*/
void TRACE_host_push_state(const char* host, const char* state, const char* value_str)
{
- container_t container = PJ_container_get(host);
+ container_t container = simgrid::instr::Container::byName(host);
simgrid::instr::Type* type = container->type_->getChild(state);
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(
value_str, "", type); /* if user didn't declare a value with a color, use no color */
*/
void TRACE_host_pop_state (const char *host, const char *state)
{
- container_t container = PJ_container_get(host);
+ container_t container = simgrid::instr::Container::byName(host);
simgrid::instr::Type* type = container->type_->getChild(state);
new simgrid::instr::PopStateEvent(MSG_get_clock(), container, type);
}
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
static container_t rootContainer = nullptr; /* the root container */
-static std::unordered_map<std::string, simgrid::instr::Container*>
- allContainers; /* all created containers indexed by name */
+static std::unordered_map<std::string, container_t> allContainers; /* all created containers indexed by name */
std::set<std::string> trivaNodeTypes; /* all host types defined */
std::set<std::string> trivaEdgeTypes; /* all link types defined */
allContainers.erase(name_);
}
-simgrid::instr::Container* PJ_container_get(const char* name)
+simgrid::instr::Container* simgrid::instr::Container::byNameOrNull(std::string name)
{
- container_t ret = PJ_container_get_or_null (name);
- if (ret == nullptr){
- THROWF(tracing_error, 1, "container with name %s not found", name);
- }
- return ret;
+ auto cont = allContainers.find(name);
+ return cont == allContainers.end() ? nullptr : cont->second;
}
-simgrid::instr::Container* PJ_container_get_or_null(const char* name)
+simgrid::instr::Container* simgrid::instr::Container::byName(std::string name)
{
- auto cont = allContainers.find(name);
- return cont == allContainers.end() ? nullptr : cont->second;
+ container_t ret = simgrid::instr::Container::byNameOrNull(name);
+ if (ret == nullptr)
+ THROWF(tracing_error, 1, "container with name %s not found", name.c_str());
+
+ return ret;
}
simgrid::instr::Container* PJ_container_get_root()
e_container_types kind_; /* This container is of what kind */
Container* father_;
std::map<std::string, Container*> children_;
+ static simgrid::instr::Container* byNameOrNull(std::string name);
+ static simgrid::instr::Container* byName(std::string name);
};
//--------------------------------------------------
extern XBT_PRIVATE std::set<std::string> trivaNodeTypes;
extern XBT_PRIVATE std::set<std::string> trivaEdgeTypes;
XBT_PRIVATE long long int instr_new_paje_id();
-XBT_PUBLIC(container_t) PJ_container_get(const char* name);
-XBT_PUBLIC(simgrid::instr::Container*) PJ_container_get_or_null(const char* name);
XBT_PUBLIC(container_t) PJ_container_get_root ();
XBT_PUBLIC(void) PJ_container_set_root (container_t root);
XBT_PUBLIC(void) PJ_container_remove_from_parent (container_t container);
// check if key exists: if it doesn't, set the variable to zero and mark this in the dict
if (platform_variables.find(key) == platform_variables.end()) {
- container_t container = PJ_container_get(resource.c_str());
+ container_t container = simgrid::instr::Container::byName(resource);
simgrid::instr::Type* type = container->type_->getChild(variable);
new simgrid::instr::SetVariableEvent(now, container, type, 0);
platform_variables[key] = std::string("");
void TRACE_surf_link_set_utilization(const char *resource, const char *category, double value, double now, double delta)
{
//only trace link utilization if link is known by tracing mechanism
- if (not PJ_container_get_or_null(resource))
+ if (not simgrid::instr::Container::byNameOrNull(resource))
return;
if (not value)
return;
//trace uncategorized link utilization
if (TRACE_uncategorized()){
XBT_DEBUG("UNCAT LINK [%f - %f] %s bandwidth_used %f", now, now+delta, resource, value);
- container_t container = PJ_container_get (resource);
+ container_t container = simgrid::instr::Container::byName(resource);
simgrid::instr::Type* type = container->type_->getChild("bandwidth_used");
instr_event (now, delta, type, container, value);
}
char category_type[INSTR_DEFAULT_STR_SIZE];
snprintf (category_type, INSTR_DEFAULT_STR_SIZE, "b%s", category);
XBT_DEBUG("CAT LINK [%f - %f] %s %s %f", now, now+delta, resource, category_type, value);
- container_t container = PJ_container_get (resource);
+ container_t container = simgrid::instr::Container::byName(resource);
simgrid::instr::Type* type = container->type_->getChild(category_type);
instr_event (now, delta, type, container, value);
}
void TRACE_surf_host_set_utilization(const char *resource, const char *category, double value, double now, double delta)
{
//only trace host utilization if host is known by tracing mechanism
- container_t container = PJ_container_get_or_null(resource);
+ container_t container = simgrid::instr::Container::byNameOrNull(resource);
if (not container || not value)
return;
char str[INSTR_DEFAULT_STR_SIZE];
//start link
- container_t msg = PJ_container_get (instr_process_id(process, str, len));
+ container_t msg = simgrid::instr::Container::byName(instr_process_id(process, str, len));
simgrid::instr::Type* type = PJ_type_get_root()->getChild("MSG_PROCESS_LINK");
new simgrid::instr::StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
TRACE_msg_process_create (MSG_process_get_name (process), MSG_process_get_PID (process), new_host);
//end link
- msg = PJ_container_get(instr_process_id(process, str, len));
+ msg = simgrid::instr::Container::byName(instr_process_id(process, str, len));
type = PJ_type_get_root()->getChild("MSG_PROCESS_LINK");
new simgrid::instr::EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t host_container = PJ_container_get(host->getCname());
+ container_t host_container = simgrid::instr::Container::byName(host->getName());
new simgrid::instr::Container(instr_process_id_2(process_name, process_pid, str, len),
simgrid::instr::INSTR_MSG_PROCESS, host_container);
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process = PJ_container_get_or_null(instr_process_id_2(process_name, process_pid, str, len));
+ container_t process =
+ simgrid::instr::Container::byNameOrNull(instr_process_id_2(process_name, process_pid, str, len));
if (process) {
PJ_container_remove_from_parent (process);
delete process;
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byName("suspend", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byName("sleep", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byName("task_execute", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byName("receive", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byName("send", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
simgrid::simix::kernelImmediate([vm]() { vm->destroy(); });
if (TRACE_msg_vm_is_enabled()) {
- container_t container = PJ_container_get(vm->getCname());
+ container_t container = simgrid::instr::Container::byName(vm->getName());
PJ_container_remove_from_parent(container);
delete container;
}
{
vm->start();
if (TRACE_msg_vm_is_enabled()) {
- container_t vm_container = PJ_container_get(vm->getCname());
+ container_t vm_container = simgrid::instr::Container::byName(vm->getName());
simgrid::instr::Type* type = vm_container->type_->getChild("MSG_VM_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("start", "0 0 1", type); // start is blue
new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, type, val);
counter++;
// start link
- container_t msg = PJ_container_get(vm->getCname());
+ container_t msg = simgrid::instr::Container::byName(vm->getName());
simgrid::instr::Type* type = PJ_type_get_root()->getChild("MSG_VM_LINK");
new simgrid::instr::StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
// destroy existing container of this vm
- container_t existing_container = PJ_container_get(vm->getCname());
+ container_t existing_container = simgrid::instr::Container::byName(vm->getName());
PJ_container_remove_from_parent(existing_container);
delete existing_container;
// create new container on the new_host location
new simgrid::instr::Container(vm->getCname(), simgrid::instr::INSTR_MSG_VM,
- PJ_container_get(ms->dst_pm->getCname()));
+ simgrid::instr::Container::byName(ms->dst_pm->getName()));
// end link
- msg = PJ_container_get(vm->getCname());
+ msg = simgrid::instr::Container::byName(vm->getName());
type = PJ_type_get_root()->getChild("MSG_VM_LINK");
new simgrid::instr::EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
}
XBT_DEBUG("vm_suspend done");
if (TRACE_msg_vm_is_enabled()) {
- container_t vm_container = PJ_container_get(vm->getCname());
+ container_t vm_container = simgrid::instr::Container::byName(vm->getName());
simgrid::instr::Type* type = vm_container->type_->getChild("MSG_VM_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("suspend", "1 0 0", type); // suspend is red
new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, type, val);
vm->pimpl_vm_->resume();
if (TRACE_msg_vm_is_enabled()) {
- container_t vm_container = PJ_container_get(vm->getCname());
+ container_t vm_container = simgrid::instr::Container::byName(vm->getName());
simgrid::instr::Type* type = vm_container->type_->getChild("MSG_VM_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), vm_container, type);
}
extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
if (TRACE_msg_vm_is_enabled()) {
- container_t host_container = PJ_container_get(pm->getCname());
+ container_t host_container = simgrid::instr::Container::byName(pm->getName());
new simgrid::instr::Container(name, simgrid::instr::INSTR_MSG_VM, host_container);
}
}
snprintf(cont_name, 25, "rank-%d", smpi_process()->index()); \
simgrid::instr::Value* val = \
simgrid::instr::Value::byNameOrCreate(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0", type); \
- new simgrid::instr::NewEvent(SIMIX_get_clock(), PJ_container_get(cont_name), type, val); \
+ new simgrid::instr::NewEvent(SIMIX_get_clock(), simgrid::instr::Container::byName(cont_name), type, val); \
}
#define AUTOMATIC_COLL_BENCH(cat, ret, args, args2) \
container_t father;
if (TRACE_smpi_is_grouped()){
- father = PJ_container_get(sg_host_self_get_name());
+ father = simgrid::instr::Container::byName(sg_host_self_get_name());
}else{
father = PJ_container_get_root ();
}
return;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t container = PJ_container_get(smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE));
+ container_t container = simgrid::instr::Container::byName(smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE));
PJ_container_remove_from_parent (container);
delete container;
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
const char *color = instr_find_color (operation);
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(operation, color, type);
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get(str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
const char* color = instr_find_color("computing");
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type,
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("computing", "", type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
return;
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
const char *color = instr_find_color ("sleeping");
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("sleeping", color, type);
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("sleeping", "", type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
return;
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("test", "", type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
return;
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
const char *color = instr_find_color (operation);
simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(operation, color, type);
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(src, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = PJ_type_get_root()->getChild("MPI_LINK");
XBT_DEBUG("Send tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
new simgrid::instr::StartLinkEvent(SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key, size);
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(dst, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
+ container_t container = simgrid::instr::Container::byName(str);
simgrid::instr::Type* type = PJ_type_get_root()->getChild("MPI_LINK");
XBT_DEBUG("Recv tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
new simgrid::instr::EndLinkEvent(SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
static_cast<simgrid::kernel::routing::NetZoneImpl*>(netzone)->getGraph(graph, nodes, edges);
xbt_dict_foreach(edges,cursor,edge_name,edge) {
- linkContainers(
- PJ_container_get(static_cast<const char*>(edge->src->data)),
- PJ_container_get(static_cast<const char*>(edge->dst->data)), filter);
+ linkContainers(simgrid::instr::Container::byName(static_cast<const char*>(edge->src->data)),
+ simgrid::instr::Container::byName(static_cast<const char*>(edge->dst->data)), filter);
}
xbt_dict_free (&nodes);
xbt_dict_free (&edges);
void TRACE_surf_host_set_speed(double date, const char *resource, double speed)
{
if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
- container_t container = PJ_container_get(resource);
+ container_t container = simgrid::instr::Container::byName(resource);
simgrid::instr::Type* type = container->type_->getChild("power");
new simgrid::instr::SetVariableEvent(date, container, type, speed);
}
void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth)
{
if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
- container_t container = PJ_container_get(resource);
+ container_t container = simgrid::instr::Container::byName(resource);
simgrid::instr::Type* type = container->type_->getChild("bandwidth");
new simgrid::instr::SetVariableEvent(date, container, type, bandwidth);
}