Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further useless cleanups
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 26 May 2017 14:09:04 +0000 (16:09 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 26 May 2017 14:09:04 +0000 (16:09 +0200)
14 files changed:
src/mc/checker/LivenessChecker.hpp
src/mc/checker/SafetyChecker.hpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/simcalls.py
src/simix/smx_global.cpp
src/smpi/smpi_coll.cpp
src/smpi/smpi_group.cpp
src/smpi/smpi_pmpi.cpp
teshsuite/s4u/listen_async/listen_async.cpp
tools/sg_xml_unit_converter.py
tools/tesh/tesh.py

index e7a6dee..f57a1ff 100644 (file)
@@ -62,7 +62,7 @@ struct XBT_PRIVATE VisitedPair {
 
 class XBT_PRIVATE LivenessChecker : public Checker {
 public:
-  LivenessChecker(Session& session);
+  explicit LivenessChecker(Session& session);
   ~LivenessChecker() = default;
   void run() override;
   RecordTrace getRecordTrace() override;
index 640d30a..ffc27f1 100644 (file)
@@ -23,7 +23,7 @@ namespace mc {
 class XBT_PRIVATE SafetyChecker : public Checker {
   simgrid::mc::ReductionMode reductionMode_ = simgrid::mc::ReductionMode::unset;
 public:
-  SafetyChecker(Session& session);
+  explicit SafetyChecker(Session& session);
   ~SafetyChecker() = default;
   void run() override;
   RecordTrace getRecordTrace() override;
index 343b8a1..8ce7f9f 100644 (file)
@@ -4,6 +4,7 @@
 /*                    DO NOT EVER CHANGE THIS FILE                    */
 /*                                                                    */
 /* change simcalls specification in src/simix/simcalls.in             */
+/* Copyright (c) 2014-2017. The SimGrid Team. All rights reserved.    */
 /**********************************************************************/
 
 /*
index 0268240..758d874 100644 (file)
@@ -4,6 +4,7 @@
 /*                    DO NOT EVER CHANGE THIS FILE                    */
 /*                                                                    */
 /* change simcalls specification in src/simix/simcalls.in             */
+/* Copyright (c) 2014-2017. The SimGrid Team. All rights reserved.    */
 /**********************************************************************/
 
 /*
index 205d92b..e533a24 100644 (file)
@@ -4,6 +4,7 @@
 /*                    DO NOT EVER CHANGE THIS FILE                    */
 /*                                                                    */
 /* change simcalls specification in src/simix/simcalls.in             */
+/* Copyright (c) 2014-2017. The SimGrid Team. All rights reserved.    */
 /**********************************************************************/
 
 /*
index 968e7bc..45bd19d 100644 (file)
@@ -4,6 +4,7 @@
 /*                    DO NOT EVER CHANGE THIS FILE                    */
 /*                                                                    */
 /* change simcalls specification in src/simix/simcalls.in             */
+/* Copyright (c) 2014-2017. The SimGrid Team. All rights reserved.    */
 /**********************************************************************/
 
 /*
index 7474d22..68635e5 100755 (executable)
@@ -11,9 +11,9 @@ import glob
 
 class Arg(object):
 
-    def __init__(self, name, type):
+    def __init__(self, name, thetype):
         self.name = name
-        self.type = type
+        self.type = thetype
 
     def field(self):
         return self.simcall_types[self.type]
@@ -218,6 +218,8 @@ def header(name):
         '/*                                                                    */\n')
     fd.write(
         '/* change simcalls specification in src/simix/simcalls.in             */\n')
+    fd.write(
+        '/* Copyright (c) 2014-2017. The SimGrid Team. All rights reserved.    */\n')
     fd.write(
         '/**********************************************************************/\n\n')
     fd.write('/*\n')
index 8fc4bca..47184cb 100644 (file)
@@ -126,7 +126,7 @@ static void install_segvhandler()
     XBT_WARN("Failed to register alternate signal stack: %s", strerror(errno));
     return;
   }
-  if (!(old_stack.ss_flags & SS_DISABLE)) {
+  if (not(old_stack.ss_flags & SS_DISABLE)) {
     XBT_DEBUG("An alternate stack was already installed (sp=%p, size=%zd, flags=%x). Restore it.",
               old_stack.ss_sp, old_stack.ss_size, old_stack.ss_flags);
     sigaltstack(&old_stack, nullptr);
index e8995a6..bb7d606 100644 (file)
@@ -338,4 +338,3 @@ int Colls::exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype
 
 }
 }
-
index f12c5cf..4c4cd35 100644 (file)
@@ -126,7 +126,6 @@ int Group::compare(MPI_Group group2)
   int result;
   int i;
   int index;
-  int rank;
 
   result = MPI_IDENT;
   if (size_ != group2->size()) {
@@ -135,7 +134,7 @@ int Group::compare(MPI_Group group2)
     int sz = group2->size();
     for (i = 0; i < sz; i++) {
       index = this->index(i);
-      rank = group2->rank(index);
+      int rank = group2->rank(index);
       if (rank == MPI_UNDEFINED) {
         result = MPI_UNEQUAL;
         break;
index 523d8e6..7e9d901 100644 (file)
@@ -2099,9 +2099,8 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
     extra->recvcounts      = xbt_new(int, size);
     extra->sendcounts      = xbt_new(int, size);
     int known              = 0;
-    int dt_size_recv       = 1;
     extra->datatype2       = encode_datatype(recvtype, &known);
-    dt_size_recv           = recvtype->size();
+    int dt_size_recv       = recvtype->size();
 
     void* sendtmpbuf         = static_cast<char*>(sendbuf);
     int* sendtmpcounts       = sendcounts;
index c01368f..9cae4a2 100644 (file)
@@ -1,3 +1,8 @@
+/* Copyright (c) 2017. 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. */
+
 /* Bug report: https://github.com/simgrid/simgrid/issues/40
  *
  * Task.listen used to be on async mailboxes as it always returned false.
index 8f6c631..ff81d66 100644 (file)
@@ -46,8 +46,8 @@ def format(xml, formats, attrib):
     return "".join(res)
 
 
-def formats(list):
-    return sorted(((Decimal(i), j) for i, j in list), key=lambda x: x[0], reverse=True)
+def formats(ll):
+    return sorted(((Decimal(i), j) for i, j in ll), key=lambda x: x[0], reverse=True)
 
 for root, dirnames, filenames in os.walk(sys.argv[1]):
     for filename in fnmatch.filter(filenames, '*.xml'):
@@ -90,6 +90,6 @@ for root, dirnames, filenames in os.walk(sys.argv[1]):
         xml = format(xml, time_formats, "bb_lat")
 
         # print xml
-        file = open(path, "w")
-        file.write(xml)
-        file.close()
+        outfile = open(path, "w")
+        outfile.write(xml)
+        outfile.close()
index 52729f4..a7a760a 100755 (executable)
@@ -129,7 +129,7 @@ class FileReader(Singleton):
             self.filename = os.path.basename(filename)
             self.abspath = os.path.abspath(filename)
             self.f = open(self.filename_raw)
-        
+
         self.linenumber = 0
 
     def linenumber(self):
@@ -348,7 +348,7 @@ class Cmd(object):
                 self.output_pipe_stdout.sort(key=lambda x: x[:self.sort].lower())
             
             diff = list(difflib.unified_diff(self.output_pipe_stdout, stdouta,lineterm="",fromfile='expected', tofile='obtained'))
-            if len(diff) > 0: 
+            if len(diff) > 0:
                 print("Output of <"+cmdName+"> mismatch:")
                 if self.sort >= 0: # If sorted, truncate the diff output and show the unsorted version
                     difflen = 0;