Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 7 Feb 2018 10:24:51 +0000 (11:24 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 7 Feb 2018 10:24:51 +0000 (11:24 +0100)
12 files changed:
doc/doxygen/inside_tests.doc
examples/s4u/app-bittorrent/s4u-tracker.cpp
examples/s4u/dht-kademlia/node.cpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/surf/plugins/host_dvfs.cpp
teshsuite/smpi/coll-allgather/coll-allgather.c
teshsuite/smpi/coll-allgatherv/coll-allgatherv.c
teshsuite/smpi/coll-allreduce/coll-allreduce.c
teshsuite/smpi/coll-alltoall/coll-alltoall.c
teshsuite/smpi/coll-gather/coll-gather.c
teshsuite/smpi/coll-reduce/coll-reduce.c
teshsuite/smpi/mpich3-test/coll/coll13.c

index 38732f6..21d187f 100644 (file)
@@ -353,7 +353,7 @@ code scanners are provided as plugin. The one for C++ is not free, but
 open-source project can use it at no cost. That is what we are doing.
 
 Don't miss the great looking dashboard here: 
-https://nemo.sonarqube.org/overview?id=simgrid
+https://sonarcloud.io/dashboard?id=simgrid
 
 This tool is enriched by the script @c tools/internal/travis-sonarqube.sh 
 that is run from @c .travis.yml
index 1296679..b3f29a0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017. The SimGrid Team.
+/* Copyright (c) 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -32,12 +32,13 @@ Tracker::Tracker(std::vector<std::string> args)
 void Tracker::operator()()
 {
   simgrid::s4u::CommPtr comm = nullptr;
-  void* received;
+  void* received             = nullptr;
   while (simgrid::s4u::Engine::getClock() < deadline) {
     if (comm == nullptr)
       comm = mailbox->get_async(&received);
     if (comm->test()) {
       // Retrieve the data sent by the peer.
+      xbt_assert(received != nullptr);
       TrackerQuery* tq = static_cast<TrackerQuery*>(received);
 
       // Add the peer to our peer list, if not already known.
index 2bdd570..b5e10fe 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -59,6 +59,7 @@ bool Node::join(unsigned int known_id)
 
   /* Second step: Send a FIND_NODE to a a random node in buckets */
   unsigned int bucket_id = table->findBucket(known_id)->getId();
+  xbt_assert(bucket_id <= identifier_size);
   for (i = 0; ((bucket_id > i) || (bucket_id + i) <= identifier_size) && i < JOIN_BUCKETS_QUERIES; i++) {
     if (bucket_id > i) {
       unsigned int id_in_bucket = get_id_in_prefix(id_, bucket_id - i);
index 21eaa19..6690dfc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -288,7 +288,6 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI
     retval = MPI_ERR_TAG;
   } else {
     int my_proc_id         = simgrid::s4u::Actor::self()->getPid();
-    int src_traced         = getPid(comm, src);
     TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
                        new simgrid::instr::Pt2PtTIData("recv", src,
                                                        datatype->is_replayable() ? count : count * datatype->size(),
@@ -299,7 +298,7 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI
 
     // the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
     if (status != MPI_STATUS_IGNORE) {
-      src_traced = getPid(comm, status->MPI_SOURCE);
+      int src_traced = getPid(comm, status->MPI_SOURCE);
       if (not TRACE_smpi_view_internals()) {
         TRACE_smpi_recv(src_traced, my_proc_id, tag);
       }
index 2f6a718..985d0d8 100644 (file)
@@ -40,6 +40,7 @@ public:
   double sampling_rate;
 
   explicit Governor(simgrid::s4u::Host* ptr) : host(ptr) { init(); }
+  virtual ~Governor() = default;
 
   void init()
   {
@@ -89,7 +90,7 @@ public:
        *    freq_next = min_f + load * (max_f - min_f) / 100
        *
        * So they assume that frequency increases by 100 MHz. We will just use
-       * lowest_pstate - load*pstatesCount();
+       * lowest_pstate - load*pstatesCount()
        */
       int max_pstate = host->getPstatesCount() - 1;
 
index 83ba94a..e5bdc6f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <errno.h>
 #include "mpi.h"
 
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
 int main(int argc, char *argv[])
 {
   int rank;
index 7e2f35e..5bef95a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <errno.h>
 #include "mpi.h"
 
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
 int main(int argc, char *argv[])
 {
   int i;
index c35732f..a15eb60 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <errno.h>
 #include "mpi.h"
 
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
 int main(int argc, char *argv[])
 {
   int rank;
@@ -42,7 +37,6 @@ int main(int argc, char *argv[])
   for (i = 0; i < size *mult; i++)
     printf("%d ", sb[i]);
   printf("]\n");
-
   status = MPI_Allreduce(sb, rb, size *maxlen, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
 
   printf("[%d] rcvbuf=[", rank);
index da76146..85c5904 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <errno.h>
 #include "mpi.h"
 
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
 int main(int argc, char *argv[])
 {
   int rank;
index 6c593da..4d4b8df 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <errno.h>
 #include "mpi.h"
 
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
 int main(int argc, char *argv[])
 {
   int rank;
index f1e99c7..3cc84b8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <errno.h>
 #include "mpi.h"
 
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
 int main(int argc, char *argv[])
 {
   int rank;
index 63c36aa..c3c39f3 100644 (file)
@@ -16,10 +16,6 @@ From: hook@nas.nasa.gov (Edward C. Hook)
 
 #include <string.h>
 #include <errno.h>
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
 
 int main(int argc, char *argv[])
 {