Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:simgrid/simgrid into dev_11
authorEhsan Azimi <eazimi@ehsan.irisa.fr>
Fri, 27 Nov 2020 07:40:25 +0000 (08:40 +0100)
committerEhsan Azimi <eazimi@ehsan.irisa.fr>
Fri, 27 Nov 2020 07:40:25 +0000 (08:40 +0100)
12 files changed:
docs/source/community.rst
include/simgrid/kernel/routing/DragonflyZone.hpp
src/kernel/activity/CommImpl.cpp
src/smpi/bindings/smpi_pmpi.cpp
src/smpi/bindings/smpi_pmpi_win.cpp
src/smpi/include/private.hpp
src/smpi/mpi/smpi_op.cpp
src/xbt/mmalloc/mrealloc.c
teshsuite/smpi/privatization/privatization.c
teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c
teshsuite/smpi/type-struct/type-struct.c
tools/jenkins/Coverage.sh

index c662790..39715a8 100644 (file)
@@ -29,23 +29,19 @@ to us and say hello! We love earing about how people use SimGrid.
    framework, and you never know who have the time and knowledge to
    answer your question, so please keep messages on the public mailing
    list.
- - Join us on IRC and ask your question directly on the channel \#simgrid at
-   ``irc.debian.org``
-   (or use the ugly `web interface <https://webchat.oftc.net/?channels=%23simgrid>`__
-   if you don't have a
-   `real client <https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients>`_
-   installed). When no non-french speaker are connected, we usually
-   chat in french on this channel, but we do switch back to english
-   when we have a guest.
    
-   Be warned that even if many people are connected to
-   the channel, they may not be staring at their IRC windows.
-   So don't be surprised if you don't get an answer in the 
-   second, and turn to the mailing lists if nobody seems to be there.
-   The logs of this channel are publicly
-   `available online <http://colabti.org/irclogger/irclogger_logs/simgrid>`_,
-   so may also want to check in a few hours if someone answered after
-   you left. 
+ - If you want to chat with the community, join us on `Mattermost
+   <https://framateam.org/simgrid/channels/town-square>`_. Be warned
+   that even if many people are connected to the channel, they may not
+   be staring at their chat windows. So don't be surprised if you
+   don't get an answer in the second, and please be patient.
+
+   If you prefer, you can reach us on IRC on \#simgrid at
+   ``irc.debian.org`` (the `logs are available
+   <http://colabti.org/irclogger/irclogger_logs/simgrid>`_). When no
+   non-french speaker are connected, we usually chat in french on
+   these channel, but we do switch back to english when we have a
+   guest.
    
  - Asking your question on
    `StackOverflow <http://stackoverflow.com/questions/tagged/simgrid>`_
index b5e2884..8a81417 100644 (file)
@@ -82,7 +82,7 @@ private:
   void generate_link(const std::string& id, int numlinks, resource::LinkImpl** linkup,
                      resource::LinkImpl** linkdown) const;
 
-  simgrid::s4u::Link::SharingPolicy sharing_policy_;
+  simgrid::s4u::Link::SharingPolicy sharing_policy_ = simgrid::s4u::Link::SharingPolicy::SHARED;
   double bw_  = 0;
   double lat_ = 0;
 
index c10e7b2..914ce4f 100644 (file)
@@ -480,12 +480,12 @@ void CommImpl::copy_data()
             dst_actor_ ? dst_actor_->get_host()->get_cname() : "a finished process", dst_buff_, buff_size);
 
   /* Copy at most dst_buff_size bytes of the message to receiver's buffer */
-  if (dst_buff_size_)
+  if (dst_buff_size_) {
     buff_size = std::min(buff_size, *(dst_buff_size_));
 
-  /* Update the receiver's buffer size to the copied amount */
-  if (dst_buff_size_)
+    /* Update the receiver's buffer size to the copied amount */
     *dst_buff_size_ = buff_size;
+  }
 
   if (buff_size > 0) {
     if (copy_data_fun)
index 090f52a..df6c613 100644 (file)
@@ -188,12 +188,8 @@ int PMPI_Initialized(int* flag) {
 int PMPI_Alloc_mem(MPI_Aint size, MPI_Info /*info*/, void* baseptr)
 {
   void *ptr = xbt_malloc(size);
-  if(ptr==nullptr)
-    return MPI_ERR_NO_MEM;
-  else {
-    *static_cast<void**>(baseptr) = ptr;
-    return MPI_SUCCESS;
-  }
+  *static_cast<void**>(baseptr) = ptr;
+  return MPI_SUCCESS;
 }
 
 int PMPI_Free_mem(void *baseptr){
index 42f1b92..db15610 100644 (file)
@@ -44,8 +44,6 @@ int PMPI_Win_allocate( MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm com
   CHECK_NEGATIVE(2, MPI_ERR_OTHER, size)
   CHECK_NEGATIVE(3, MPI_ERR_OTHER, disp_unit)
   void* ptr = xbt_malloc(size);
-  if(ptr==nullptr)
-    return MPI_ERR_NO_MEM;
   smpi_bench_end();
   *static_cast<void**>(base) = ptr;
   *win = new simgrid::smpi::Win( ptr, size, disp_unit, info, comm,1);
@@ -61,8 +59,6 @@ int PMPI_Win_allocate_shared( MPI_Aint size, int disp_unit, MPI_Info info, MPI_C
   int rank = comm->rank();
   if(rank==0){
      ptr = xbt_malloc(size*comm->size());
-     if(ptr==nullptr)
-       return MPI_ERR_NO_MEM;
   }
   smpi_bench_end();
   simgrid::smpi::colls::bcast(&ptr, sizeof(void*), MPI_BYTE, 0, comm);
index c2bc108..c9635c4 100644 (file)
@@ -515,12 +515,12 @@ XBT_PUBLIC smpi_trace_call_location_t* smpi_trace_get_call_location();
 
 XBT_PRIVATE void private_execute_flops(double flops);
 
-
 #define CHECK_ARGS(test, errcode, ...)                                                                                 \
   if (test) {                                                                                                          \
-    if((errcode) != MPI_SUCCESS)                                                                                       \
+    int error_code_ = (errcode);                                                                                       \
+    if (error_code_ != MPI_SUCCESS)                                                                                    \
       XBT_WARN(__VA_ARGS__);                                                                                           \
-    return (errcode);                                                                                                  \
+    return error_code_;                                                                                                \
   }
 
 #define CHECK_MPI_NULL(num, val, err, ptr)                                                                             \
index a94b2ff..c6ee507 100644 (file)
@@ -26,7 +26,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_op, smpi, "Logging specific to SMPI (op)");
   }
 #define LAND_OP(a, b) (b) = (a) && (b)
 #define LOR_OP(a, b)  (b) = (a) || (b)
-#define LXOR_OP(a, b) (b) = (not(a) && (b)) || ((a) && not(b))
+#define LXOR_OP(a, b) (b) = bool(a) != bool(b)
 #define BAND_OP(a, b) (b) &= (a)
 #define BOR_OP(a, b)  (b) |= (a)
 #define BXOR_OP(a, b) (b) ^= (a)
index 9e9a877..1bdd724 100644 (file)
@@ -129,7 +129,7 @@ void *mrealloc(xbt_mheap_t mdp, void *ptr, size_t size)
       abort();
     }
 
-    if (size > (size_t) (1 << (type - 1)) && size <= (size_t) (1 << type)) {
+    if (size > ((size_t)1 << (type - 1)) && size <= ((size_t)1 << type)) {
       /* The new size is the same kind of fragment.  */
 
       result = ptr;
index 7a79bb3..ec4509a 100644 (file)
@@ -19,8 +19,6 @@ static void test_opts(int argc, char* const argv[])
 
     switch (ret) {
       case 0:
-        found++;
-      break;
       case 's':
         found ++;
       break;
index fe36b7c..4e17c66 100644 (file)
@@ -26,8 +26,6 @@ static void test_opts(int argc, char* const argv[])
 
     switch (ret) {
       case 0:
-        found++;
-      break;
       case 's':
         found ++;
       break;
index 4256885..2a4b38d 100644 (file)
 int main(int argc, char **argv)
 {
     int          rank;
-    struct { int a;int c; double b;int tab[2][3];} value;
+    struct {
+      int a;
+      int c;
+      double b;
+      int tab[2][3];
+    } value = {0};
     MPI_Datatype mystruct;
     int          blocklens[3];
     MPI_Aint     indices[3];
index 6d58fb7..823a946 100755 (executable)
@@ -106,7 +106,10 @@ if [ -f Testing/TAG ] ; then
   #generate PVS-studio report
   EXCLUDEDPATH="-e $WORKSPACE/src/include/catch.hpp -e $WORKSPACE/src/include/xxhash.hpp -e $WORKSPACE/teshsuite/smpi/mpich3-test/ -e $WORKSPACE/teshsuite/smpi/isp/ -e *_dtd.c -e *_dtd.h -e *yy.c -e  $WORKSPACE/src/xbt/automaton/ -e $WORKSPACE/src/smpi/colls/ -e $WORKSPACE/examples/smpi/NAS/ -e $WORKSPACE/examples/smpi/gemm/gemm.c -e $WORKSPACE/src/msg/ -e $WORKSPACE/include/msg/ -e $WORKSPACE/examples/deprecated/ -e $WORKSPACE/teshsuite/msg/"
   pvs-studio-analyzer analyze -f "$BUILDFOLDER"/compile_commands.json -o "$WORKSPACE"/pvs.log $EXCLUDEDPATH -j$NUMPROC
-  #disable V1042 (copyleft), V521 (commas in catch.hpp)
-  plog-converter -t xml -o "$WORKSPACE"/pvs.plog -d V1042,V521 "$WORKSPACE"/pvs.log
+  # Disable:
+  # V521 Such expressions using the ',' operator are dangerous. (-> commas in catch.hpp),
+  # V1042 This file is marked with copyleft license, which requires you to open the derived source code.
+  # V1056 The predefined identifier '__func__' always contains the string 'operator()' inside function body of the overloaded 'operator()'.
+  plog-converter -t xml -o "$WORKSPACE"/pvs.plog -d V521,V1042,V1056 "$WORKSPACE"/pvs.log
 
 fi || exit 42