Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
merge with framagit/master
authoreazimi <azimi.ehsan@outlook.com>
Tue, 12 Jan 2021 16:53:35 +0000 (17:53 +0100)
committereazimi <azimi.ehsan@outlook.com>
Tue, 12 Jan 2021 16:53:35 +0000 (17:53 +0100)
12 files changed:
COPYRIGHT.template
docs/source/conf.py
examples/c/dht-kademlia/node.c
examples/s4u/network-ns3-wifi/s4u-network-ns3-wifi.cpp
include/simgrid/disk.h
src/bindings/java/jmsg_storage.cpp
src/kernel/routing/TorusZone.cpp
src/mc/checker/UdporChecker.hpp
src/mc/udpor_global.hpp
src/smpi/internals/smpi_global.cpp
teshsuite/s4u/actor-suspend/actor-suspend.cpp
tools/cmake/test_prog/prog_tsan.cpp

index f9e03f6..91d9e68 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2021. The SimGrid Team. All rights reserved.               */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
index 9386f7b..ddeb2b1 100644 (file)
@@ -32,7 +32,7 @@ if read_the_docs_build:
 # -- Project information -----------------------------------------------------
 
 project = u'SimGrid'
-copyright = u'2002-2020, The SimGrid Team'
+copyright = u'2002-2021, The SimGrid Team'
 author = u'The SimGrid Team'
 
 # The short X.Y version
index 5565884..7e2ff56 100644 (file)
@@ -203,7 +203,6 @@ answer_t find_closest(const_node_t node, unsigned int destination_id)
 
 unsigned int find_node(node_t node, unsigned int id_to_find, unsigned int count_in_stats)
 {
-  unsigned int i = 0;
   unsigned int queries;
   unsigned int answers;
   unsigned int destination_found = 0;
@@ -240,6 +239,7 @@ unsigned int find_node(node_t node, unsigned int id_to_find, unsigned int count_
           // Handle the answer
           routing_table_update(node, msg->sender_id);
           node_contact_t contact;
+          unsigned int i;
           xbt_dynar_foreach (node_list->nodes, i, contact)
             routing_table_update(node, contact->id);
 
index e1f1580..bd47083 100644 (file)
@@ -15,7 +15,7 @@ public:
   std::string sender;
   int size;
 
-  Message(std::string sender_, int size_) : sender(sender_), size(size_) {}
+  Message(const std::string& sender_, int size_) : sender(sender_), size(size_) {}
 };
 
 static void sender(std::string mailbox, double msg_size, unsigned sleep_time)
index ef71b3f..e115609 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2020-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
index ebffb32..f1f0ebb 100644 (file)
@@ -195,7 +195,6 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Storage_all(JNIEnv * env, jc
   jobjectArray jtable;
   jobject jstorage;
   jstring jname;
-  sg_storage_t storage;
 
   xbt_dynar_t table = sg_storages_as_dynar();
   int count = xbt_dynar_length(table);
@@ -214,7 +213,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Storage_all(JNIEnv * env, jc
   }
 
   for (index = 0; index < count; index++) {
-    storage = xbt_dynar_get_as(table, index, sg_storage_t);
+    sg_storage_t storage = xbt_dynar_get_as(table, index, sg_storage_t);
     if (java_storage_map.find(storage) != java_storage_map.end()) {
       jstorage = java_storage_map.at(storage);
     } else {
index 248c5ad..0c7b0bc 100644 (file)
@@ -61,7 +61,6 @@ void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int
     private_links_.insert({position + j, {linkUp, linkDown}});
     dim_product *= current_dimension;
   }
-  rank++;
 }
 
 void TorusZone::parse_specific_arguments(ClusterCreationArgs* cluster)
index 1b61be7..d6541c1 100644 (file)
@@ -14,7 +14,6 @@ namespace simgrid {
 namespace mc {
 
 class XBT_PRIVATE UdporChecker : public Checker {
-
 public:
   explicit UdporChecker();
   ~UdporChecker() override = default;
@@ -22,11 +21,9 @@ public:
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
   void log_state() override;
-
-  
 };
 
 } // namespace mc
 } // namespace simgrid
 
-#endif
\ No newline at end of file
+#endif
index e166ada..bb56103 100644 (file)
@@ -3,13 +3,97 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef SIMGRID_MC_UDPOR_GLOBAL_HPP 
+#ifndef SIMGRID_MC_UDPOR_GLOBAL_HPP
 #define SIMGRID_MC_UDPOR_GLOBAL_HPP
 
+#include <iostream>
+#include <queue>
+
 namespace simgrid {
 namespace mc {
 
+class UnfoldingEvent;
+using EventSet = std::deque<UnfoldingEvent*>;
+
+class EvtSetTools {
+public:
+  static bool contains(const EventSet events, const UnfoldingEvent* e);
+  static UnfoldingEvent* find(const EventSet events, const UnfoldingEvent* e);
+  static void subtract(EventSet& events, EventSet const& otherSet);
+  static bool depends(EventSet const& events, EventSet const& otherSet);
+  static bool isEmptyIntersection(EventSet evtS1, EventSet evtS2);
+  static EventSet makeUnion(EventSet s1, EventSet s2);
+  static void pushBack(EventSet& events, UnfoldingEvent* e);
+  static void remove(EventSet& events, UnfoldingEvent* e);
+  static EventSet minus(EventSet events, UnfoldingEvent* e);
+  static EventSet plus(EventSet events, UnfoldingEvent* e);
+};
+
+typedef struct s_evset_in {
+  EventSet causuality_events;
+  EventSet cause;
+  EventSet ancestorSet;
+} s_evset_in_t;
+
+class Configuration {
+public:
+  EventSet events_;
+  EventSet maxEvent;         // Events recently added to events_
+  EventSet actorMaxEvent;    // maximal events of the actors in current configuration
+  UnfoldingEvent* lastEvent; // The last added event
+
+  Configuration plus_config(UnfoldingEvent*) const;
+  void createEvts(Configuration C, EventSet& result, const std::string& trans_tag, s_evset_in_t ev_sets, bool chk,
+                  UnfoldingEvent* immPreEvt);
+  void updateMaxEvent(UnfoldingEvent*);         // update maximal events of the configuration and actors
+  UnfoldingEvent* findActorMaxEvt(int actorId); // find maximal event of a Actor whose id = actorId
+
+  UnfoldingEvent* findTestedComm(const UnfoldingEvent* testEvt); // find comm tested by action testTrans
+
+  Configuration()                     = default;
+  Configuration(const Configuration&) = default;
+  Configuration& operator=(Configuration const&) = default;
+  Configuration(Configuration&&) noexcept        = default;
+  ~Configuration()                               = default;
+};
+
+class UnfoldingEvent {
+public:
+  int id = -1;
+  EventSet causes; // used to store directed ancestors of event e
+  UnfoldingEvent(unsigned int nb_events, std::string const& trans_tag, EventSet const& causes, int sid = -1);
+  UnfoldingEvent(const UnfoldingEvent&) = default;
+  UnfoldingEvent& operator=(UnfoldingEvent const&) = default;
+  UnfoldingEvent(UnfoldingEvent&&)                 = default;
+  ~UnfoldingEvent()                                = default;
+
+  EventSet getHistory() const;
+
+  bool isConflict(UnfoldingEvent* event, UnfoldingEvent* otherEvent) const;
+  bool concernSameComm(const UnfoldingEvent* event, const UnfoldingEvent* otherEvent) const;
+
+  // check otherEvent is in my history ?
+  bool inHistory(UnfoldingEvent* otherEvent) const;
+
+  bool isImmediateConflict1(UnfoldingEvent* evt, UnfoldingEvent* otherEvt) const;
+
+  bool conflictWithConfig(UnfoldingEvent* event, Configuration const& config) const;
+  bool operator==(const UnfoldingEvent& other) const;
+  void print() const;
+
+  inline int get_state_id() const { return state_id; }
+  inline void set_state_id(int sid) { state_id = sid; }
+
+  inline std::string get_transition_tag() const { return transition_tag; }
+  inline void set_transition_tag(std::string const& tr_tag) { transition_tag = tr_tag; }
 
+private:
+  int state_id{-1};
+  std::string transition_tag{""}; // The tag of the last transition that lead to creating the event
+  bool transition_is_IReceive(const UnfoldingEvent* testedEvt, const UnfoldingEvent* SdRcEvt) const;
+  bool transition_is_ISend(const UnfoldingEvent* testedEvt, const UnfoldingEvent* SdRcEvt) const;
+  bool check_tr_concern_same_comm(bool& chk1, bool& chk2, UnfoldingEvent* evt1, UnfoldingEvent* evt2) const;
+};
 } // namespace mc
 } // namespace simgrid
 #endif
\ No newline at end of file
index 34f2b68..749fd2f 100644 (file)
@@ -497,8 +497,10 @@ static void smpi_init_privatization_dlopen(const std::string& executable)
         for (const std::string& target_lib : target_libs)
           unlink(target_lib.c_str());
       }
-      xbt_assert(handle != nullptr, "dlopen failed: %s (errno: %d -- %s)", dlerror(), saved_errno,
-                 strerror(saved_errno));
+      xbt_assert(handle != nullptr,
+                 "dlopen failed: %s (errno: %d -- %s).\nError: Did you compile the program with a SMPI-specific "
+                 "compiler (spmicc or friends)?",
+                 dlerror(), saved_errno, strerror(saved_errno));
 
       smpi_entry_point_type entry_point = smpi_resolve_function(handle);
       xbt_assert(entry_point, "Could not resolve entry point");
index 73b5336..167313e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2020-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
index 41ef8ba..6b379a7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020. The SimGrid Team.
+/* Copyright (c) 2020-2021. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it