Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
small sonar-inspired cleanups
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 17 Apr 2017 07:25:10 +0000 (09:25 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 17 Apr 2017 07:25:10 +0000 (09:25 +0200)
src/smpi/smpi_global.cpp
src/smpi/smpi_request.cpp

index f7df869..a47b7e9 100644 (file)
@@ -440,7 +440,7 @@ static void smpi_init_logs(){
 
 static void smpi_init_options(){
     //return if already called
-    if(smpi_cpu_threshold!=-1)
+    if (smpi_cpu_threshold > -1)
       return;
     simgrid::smpi::Colls::set_collectives();
     simgrid::smpi::Colls::smpi_coll_cleanup_callback=nullptr;
index 29661e8..40ae6cd 100644 (file)
@@ -33,7 +33,7 @@ Request::Request(void *buf, int count, MPI_Datatype datatype, int src, int dst,
 {
   void *old_buf = nullptr;
 // FIXME Handle the case of a partial shared malloc.
-  if(((((flags & RECV) != 0) && ((flags & ACCUMULATE) !=0)) || (datatype->flags() & DT_FLAG_DERIVED))) { // && (!smpi_is_shared(buf_))){
+  if ((((flags & RECV) != 0) && ((flags & ACCUMULATE) != 0)) || (datatype->flags() & DT_FLAG_DERIVED)) {
     // This part handles the problem of non-contiguous memory
     old_buf = buf;
     if (count==0){
@@ -691,7 +691,8 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status)
     MPI_Datatype datatype = req->old_type_;
 
 // FIXME Handle the case of a partial shared malloc.
-    if((((req->flags_ & ACCUMULATE) != 0) || (datatype->flags() & DT_FLAG_DERIVED))){// && (!smpi_is_shared(req->old_buf_))){
+    if (((req->flags_ & ACCUMULATE) != 0) ||
+        (datatype->flags() & DT_FLAG_DERIVED)) { // && (!smpi_is_shared(req->old_buf_))){
 
       if (!smpi_process()->replaying()){
         if( smpi_privatize_global_variables != 0 && (static_cast<char*>(req->old_buf_) >= smpi_start_data_exe)