}
void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post)
}
void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post)
std::vector<simgrid::kernel::routing::NetPoint*> netpoints =
simgrid::s4u::Engine::get_instance()->get_all_netpoints();
std::sort(netpoints.begin(), netpoints.end(),
std::vector<simgrid::kernel::routing::NetPoint*> netpoints =
simgrid::s4u::Engine::get_instance()->get_all_netpoints();
std::sort(netpoints.begin(), netpoints.end(),
static std::vector<double> surf_parse_get_all_speeds(char* speeds, const char* entity_kind, const std::string& id)
{
static std::vector<double> surf_parse_get_all_speeds(char* speeds, const char* entity_kind, const std::string& id)
{
std::vector<double> speed_per_pstate;
if (strchr(speeds, ',') == nullptr){
std::vector<double> speed_per_pstate;
if (strchr(speeds, ',') == nullptr){
switch (A_surfxml_actor_on___failure) {
case AU_surfxml_actor_on___failure:
case A_surfxml_actor_on___failure_DIE:
switch (A_surfxml_actor_on___failure) {
case AU_surfxml_actor_on___failure:
case A_surfxml_actor_on___failure_DIE:
surf_path.push_back(dir);
surf_file_to_parse = surf_fopen(file, "r");
surf_path.push_back(dir);
surf_file_to_parse = surf_fopen(file, "r");
- if (surf_file_to_parse == nullptr) {
- std::string cwd = simgrid::xbt::Path().get_name();
- xbt_die("Unable to open '%s' from '%s'\n", file.c_str(), cwd.c_str());
- }
+ if (surf_file_to_parse == nullptr)
+ throw std::invalid_argument(std::string("Unable to open ')") + file + "' from '" + simgrid::xbt::Path().get_name() +
+ "'. Does this file exist?");
surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE);
surf_parse__switch_to_buffer(surf_input_buffer);
surf_parse_lineno = 1;
surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE);
surf_parse__switch_to_buffer(surf_input_buffer);
surf_parse_lineno = 1;