Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Apply the default settings of 'smpi/buffering' too
[simgrid.git] / src / simdag / sd_daxloader.cpp
index 07a3919..0c59e70 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2018. The SimGrid Team.
+/* Copyright (c) 2009-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <algorithm>
 #include <map>
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_daxparse, sd, "Parsing DAX files");
-
 #include "dax_dtd.h"
 #include "dax_dtd.c"
 
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_daxparse, sd, "Parsing DAX files");
+
 /* Ensure that transfer tasks have unique names even though a file is used several times */
 void uniq_transfer_task_name(SD_task_t task)
 {
@@ -222,7 +222,7 @@ xbt_dynar_t SD_daxload(const char *filename)
 
   if (not acyclic_graph_detail(result)) {
     XBT_ERROR("The DAX described in %s is not a DAG. It contains a cycle.",
-              simgrid::xbt::Path(filename).getBasename().c_str());
+              simgrid::xbt::Path(filename).get_base_name().c_str());
     xbt_dynar_foreach(result, cpt, file)
       SD_task_destroy(file);
     xbt_dynar_free_container(&result);
@@ -237,7 +237,7 @@ void STag_dax__adag()
   try {
     double version = std::stod(std::string(A_dax__adag_version));
     xbt_assert(version == 2.1, "Expected version 2.1 in <adag> tag, got %f. Fix the parser or your file", version);
-  } catch (std::invalid_argument& ia) {
+  } catch (const std::invalid_argument&) {
     throw std::invalid_argument(std::string("Parse error: ") + A_dax__adag_version + " is not a double");
   }
 }
@@ -253,7 +253,7 @@ void STag_dax__job()
     current_job = SD_task_create_comp_seq(name.c_str(), nullptr, runtime);
     jobs.insert({A_dax__job_id, current_job});
     xbt_dynar_push(result, &current_job);
-  } catch (std::invalid_argument& ia) {
+  } catch (const std::invalid_argument&) {
     throw std::invalid_argument(std::string("Parse error: ") + A_dax__job_runtime + " is not a double");
   }
 }
@@ -263,7 +263,7 @@ void STag_dax__uses()
   double size;
   try {
     size = std::stod(std::string(A_dax__uses_size));
-  } catch (std::invalid_argument& ia) {
+  } catch (const std::invalid_argument&) {
     throw std::invalid_argument(std::string("Parse error: ") + A_dax__uses_size + " is not a double");
   }
   bool is_input = (A_dax__uses_link == A_dax__uses_link_input);
@@ -273,7 +273,7 @@ void STag_dax__uses()
   SD_task_t file;
   if (it == files.end()) {
     file = SD_task_create_comm_e2e(A_dax__uses_file, nullptr, size);
-    sd_global->initial_tasks->erase(file);
+    sd_global->initial_tasks.erase(file);
     files[A_dax__uses_file] = file;
   } else {
     file = it->second;