void StateEvent::print() { if (trace_format == simgrid::instr::TraceFormat::Paje) { if (value != nullptr) // PAJE_PopState Event does not need to have a value stream_ << " " << value->get_id(); if (TRACE_display_sizes()) stream_ << " " << ((extra_ != nullptr) ? extra_->display_size() : ""); #if HAVE_SMPI if (simgrid::config::get_value<bool>("smpi/trace-call-location")) { stream_ << " \"" << filename << "\" " << linenumber; } #endif XBT_DEBUG("Dump %s", stream_.str().c_str()); tracing_file << stream_.str() << std::endl; } else if (trace_format == simgrid::instr::TraceFormat::Ti) { if (extra_ == nullptr) return; /* Unimplemented calls are: WAITANY, SENDRECV, SCAN, EXSCAN, SSEND, and ISSEND. */ // FIXME: dirty extract "rank-" from the name, as we want the bare process id here if (get_container()->get_name().find("rank-") != 0) { stream_ << get_container()->get_name() << " " << extra_->print(); } else { /* Subtract -1 because this is the process id and we transform it to the rank id */ std::string container_name(get_container()->get_name()); stream_ << stoi(container_name.erase(0, 5)) - 1 << " " << extra_->print(); } *tracing_files.at(get_container()) << stream_.str() << std::endl; } else { THROW_IMPOSSIBLE; } }
// // generate_impl_project // void CUTS_BE_Project_Write_T <CUTS_CHAOS::Context, CUTS_BE_Impl_Node>:: generate_impl_project (const CUTS_BE_Impl_Node & node) { std::string impl_basename = node.exec_artifact_.name (); std::string container_name (node.container_.name ()); // Create the export name for the project. std::string impl_export (impl_basename); std::transform (impl_export.begin (), impl_export.end (), impl_export.begin (), &::toupper); // Generate the executor project. this->ctx_.project_ << "project (" << impl_basename << ") : cuts_coworker_exec {" << std::endl << " sharedname = " << impl_basename << std::endl << std::endl << " dynamicflags += " << impl_export << "_BUILD_DLL" << std::endl << std::endl << " prebuild = perl -- $(ACE_ROOT)/bin/generate_export_file.pl " << impl_export << " > $(PROJECT_ROOT)/" << impl_basename << "_export.h" << std::endl; if (!node.references_.empty ()) { visited_nodes_.clear (); this->ctx_.project_ << " after += " << container_name << "_exec"; this->ctx_.project_ << std::endl << std::endl; // Clear the visited nodes so we can iterate over them once // more. This time we are generating the libs declaration. visited_nodes_.clear (); this->ctx_.project_ << " libs += " << container_name << "_exec"; for (auto ref : node.references_) this->generate_listing (ref, "", "_stub"); this->ctx_.project_ << std::endl << std::endl; } generate_mpc_i (node); this->ctx_.project_ // Generate the source files. << " Source_Files {" << std::endl << " " << node.name_ << ".cpp" << std::endl << " }" << std::endl << std::endl // Generate the header files. << " Header_Files {" << std::endl << std::endl << " }" << std::endl << std::endl << " Inline_Files {" << std::endl << std::endl << " }" << std::endl << std::endl << " IDL_Files {" << std::endl << std::endl << " }" << std::endl << "}" << std::endl << std::endl; }
static /*constexpr*/ component_return_const_type maximum( ) { static const component_instance_type component = ((( container_type(1) << (width_size-1)) - container_name(1) ) << 1) + container_type(1); return component; }