Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add the option to print origin of a failing handle.
authorAugustin Degomme <adegomme@users.noreply.github.com>
Tue, 6 Apr 2021 15:43:28 +0000 (17:43 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Tue, 6 Apr 2021 18:07:17 +0000 (20:07 +0200)
This uses trace-call-location flag for smpicc, store the value at handle creation, and tries to return the most relevant one on a crash (that's actually a pain and will have to be checked)

12 files changed:
src/instr/instr_smpi.hpp
src/smpi/bindings/smpi_mpi.cpp
src/smpi/bindings/smpi_pmpi.cpp
src/smpi/bindings/smpi_pmpi_comm.cpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/bindings/smpi_pmpi_topo.cpp
src/smpi/include/private.hpp
src/smpi/include/smpi_f2c.hpp
src/smpi/include/smpi_utils.hpp
src/smpi/internals/smpi_utils.cpp
src/smpi/mpi/smpi_f2c.cpp
src/smpi/mpi/smpi_win.cpp

index 71cb360..d541ed9 100644 (file)
@@ -25,10 +25,10 @@ XBT_PRIVATE void TRACE_smpi_init(int rank, const std::string& calling_func);
 class smpi_trace_call_location_t {
 public:
   std::string filename;
-  int linenumber;
+  int linenumber = 0;
 
   std::string previous_filename;
-  int previous_linenumber;
+  int previous_linenumber = 0;
 
   std::string get_composed_key() const
   {
index 012c7d1..ca63a1a 100644 (file)
@@ -55,6 +55,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)
           XBT_INFO("Backtrace of the run : if incomplete, run smpirun with -keep-temps. To hide, use --log=no_loc");   \
           xbt_backtrace_display_current();                                                                             \
         }                                                                                                              \
+        simgrid::smpi::utils::print_current_handle();                                                                  \
         xbt_die("%s - returned %.*s instead of MPI_SUCCESS", __func__, error_size, error_string);                      \
       } else                                                                                                           \
         err->call((errhan), ret);                                                                                      \
index 6b1c4dc..eb5d4d3 100644 (file)
@@ -250,7 +250,7 @@ int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_f
 
 int PMPI_Keyval_free(int* keyval) {
   CHECK_NULL(1, MPI_ERR_ARG, keyval)
-  CHECK_MPI_NULL(1, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, *keyval)
+  CHECK_VAL(1, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, *keyval)
   return simgrid::smpi::Keyval::keyval_free<simgrid::smpi::Comm>(keyval);
 }
 
index f54d7b4..e000ee2 100644 (file)
@@ -220,7 +220,7 @@ int PMPI_Comm_test_inter(MPI_Comm comm, int* flag){
 
 int PMPI_Attr_delete(MPI_Comm comm, int keyval) {
   CHECK_COMM(1)
-  CHECK_MPI_NULL(2, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, keyval)
+  CHECK_VAL(2, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, keyval)
   if(keyval == MPI_TAG_UB||keyval == MPI_HOST||keyval == MPI_IO ||keyval == MPI_WTIME_IS_GLOBAL||keyval == MPI_APPNUM
        ||keyval == MPI_UNIVERSE_SIZE||keyval == MPI_LASTUSEDCODE)
     return MPI_ERR_ARG;
@@ -238,7 +238,7 @@ int PMPI_Attr_get(MPI_Comm comm, int keyval, void* attr_value, int* flag) {
   CHECK_NULL(4, MPI_ERR_ARG, flag)
   *flag = 0;
   CHECK_COMM(1)
-  CHECK_MPI_NULL(2, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, keyval)
+  CHECK_VAL(2, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, keyval)
 
   switch (keyval) {
   case MPI_HOST:
@@ -271,7 +271,7 @@ int PMPI_Attr_get(MPI_Comm comm, int keyval, void* attr_value, int* flag) {
 
 int PMPI_Attr_put(MPI_Comm comm, int keyval, void* attr_value) {
   CHECK_COMM(1)
-  CHECK_MPI_NULL(2, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, keyval)
+  CHECK_VAL(2, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, keyval)
   if(keyval == MPI_TAG_UB||keyval == MPI_HOST||keyval == MPI_IO ||keyval == MPI_WTIME_IS_GLOBAL||keyval == MPI_APPNUM
        ||keyval == MPI_UNIVERSE_SIZE||keyval == MPI_LASTUSEDCODE)
     return MPI_ERR_ARG;
index fb30222..6447f78 100644 (file)
@@ -94,7 +94,7 @@ int PMPI_Start(MPI_Request * request)
   int retval = 0;
 
   smpi_bench_end();
-  CHECK_REQUEST(1)
+  CHECK_REQUEST_VALID(1)
   if ( *request == MPI_REQUEST_NULL) {
     retval = MPI_ERR_REQUEST;
   } else {
@@ -731,7 +731,7 @@ int PMPI_Cancel(MPI_Request* request)
   int retval = 0;
 
   smpi_bench_end();
-  CHECK_REQUEST(1)
+  CHECK_REQUEST_VALID(1)
   if (*request == MPI_REQUEST_NULL) {
     retval = MPI_ERR_REQUEST;
   } else {
index f543fe4..7f15585 100644 (file)
@@ -14,8 +14,8 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
  * check if the topology is nullptr, but we should check if it is the good topology type (so we have to add a
  *  MPIR_Topo_Type field, and replace the MPI_Topology field by an union)*/
 
-int PMPI_Cart_create(MPI_Comm comm_old, int ndims, const int* dims, const int* periodic, int reorder, MPI_Comm* comm_cart) {
-  CHECK_COMM2(1, comm_old)
+int PMPI_Cart_create(MPI_Comm comm, int ndims, const int* dims, const int* periodic, int reorder, MPI_Comm* comm_cart) {
+  CHECK_COMM(1)
   if (ndims > 0){
     CHECK_NULL(3, MPI_ERR_ARG, dims)
     CHECK_NULL(4, MPI_ERR_ARG, periodic)
@@ -25,7 +25,7 @@ int PMPI_Cart_create(MPI_Comm comm_old, int ndims, const int* dims, const int* p
   for (int i = 0; i < ndims; i++)
     CHECK_NEGATIVE(2, MPI_ERR_ARG, dims[i])
   const simgrid::smpi::Topo_Cart* topo =
-      new simgrid::smpi::Topo_Cart(comm_old, ndims, dims, periodic, reorder, comm_cart);
+      new simgrid::smpi::Topo_Cart(comm, ndims, dims, periodic, reorder, comm_cart);
   if (*comm_cart == MPI_COMM_NULL) {
     delete topo;
   } else {
index cd4ae34..da075e9 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "smpi/smpi.h"
 #include "smpi/smpi_helpers_internal.h"
+#include "smpi_utils.hpp"
 #include "src/instr/instr_smpi.hpp"
 #include <unordered_map>
 #include <vector>
@@ -517,78 +518,138 @@ 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) {                                                                                                          \
-    int error_code_ = (errcode);                                                                                       \
-    if (error_code_ != MPI_SUCCESS)                                                                                    \
-      XBT_WARN(__VA_ARGS__);                                                                                           \
-    return error_code_;                                                                                                \
+#define CHECK_ARGS(test, errcode,...)\
+  {\
+    if (test) {\
+      int error_code_ = (errcode);\
+      if (error_code_ != MPI_SUCCESS){\
+        XBT_WARN(__VA_ARGS__);\
+      }\
+      return error_code_;\
+    }\
   }
 
-#define CHECK_MPI_NULL(num, val, err, ptr)                                                                             \
-  CHECK_ARGS((ptr) == (val), (err),                                                                                    \
-             "%s: param %d %s cannot be %s", __func__, (num), _XBT_STRINGIFY(ptr), _XBT_STRINGIFY(val));
-#define CHECK_NULL(num,err,buf)                                                                                        \
-  CHECK_ARGS((buf) == nullptr, (err),                                                                                  \
-             "%s: param %d %s cannot be NULL", __func__, (num), _XBT_STRINGIFY(buf));
-#define CHECK_NEGATIVE(num, err, val)                                                                                  \
-  CHECK_ARGS((val) < 0, (err),                                                                                         \
-             "%s: param %d %s cannot be negative", __func__, (num), _XBT_STRINGIFY(val));
-#define CHECK_NEGATIVE_OR_ZERO(num, err, val)                                                                          \
-  CHECK_ARGS((val) <= 0, (err),                                                                                        \
-             "%s: param %d %s cannot be negative or 0", __func__, (num), _XBT_STRINGIFY(val));
-#define CHECK_COMM2(num, comm)                                                                                         \
+#define CHECK_MPI_NULL(num, val, err, ptr)\
+  CHECK_ARGS((ptr) == (val), (err),\
+             "%s: param %d %s cannot be %s", __func__, (num), _XBT_STRINGIFY(ptr), _XBT_STRINGIFY(val))
+
+#define CHECK_VAL(num, val, err, value)\
+  CHECK_ARGS((value) == (val), (err),\
+             "%s: param %d %s cannot be %s", __func__, (num), _XBT_STRINGIFY(value), _XBT_STRINGIFY(val))
+
+#define CHECK_NULL(num,err,buf)\
+  CHECK_ARGS((buf) == nullptr, (err),\
+             "%s: param %d %s cannot be NULL", __func__, (num), _XBT_STRINGIFY(buf))
+
+#define CHECK_NEGATIVE(num, err, val)\
+  CHECK_ARGS((val) < 0, (err),\
+             "%s: param %d %s cannot be negative", __func__, (num), _XBT_STRINGIFY(val))
+
+#define CHECK_NEGATIVE_OR_ZERO(num, err, val)\
+  CHECK_ARGS((val) <= 0, (err),\
+             "%s: param %d %s cannot be negative or 0", __func__, (num), _XBT_STRINGIFY(val))
+
+#define CHECK_COMM2(num, comm)\
   CHECK_MPI_NULL((num), MPI_COMM_NULL, MPI_ERR_COMM, (comm))
-#define CHECK_DELETED(num, err, obj)                                                                                   \
-  CHECK_ARGS((obj)->deleted(), (err), "%s: param %d %s has already been freed", __func__, (num), _XBT_STRINGIFY(obj));
-#define CHECK_COMM(num)                                                                                                \
-  CHECK_COMM2((num), comm)                                                                                             \
-  CHECK_DELETED((num), MPI_ERR_COMM, comm)
-#define CHECK_REQUEST(num)                                                                                             \
-  CHECK_ARGS(request == nullptr, MPI_ERR_REQUEST,                                                                      \
+
+#define CHECK_DELETED(num, err, obj)\
+  CHECK_ARGS((obj)->deleted(), (err), "%s: param %d %s has already been freed", __func__, (num),\
+  _XBT_STRINGIFY(obj))
+
+#define CHECK_COMM(num)\
+  {\
+    CHECK_COMM2((num), comm)\
+    CHECK_DELETED((num), MPI_ERR_COMM, comm)\
+    simgrid::smpi::utils::set_current_handle(comm);\
+  }
+
+#define CHECK_REQUEST(num)\
+  CHECK_ARGS(request == nullptr, MPI_ERR_REQUEST,\
              "%s: param %d request cannot be NULL",__func__, (num));
-#define CHECK_BUFFER(num,buf,count)                                                                                    \
-  CHECK_ARGS((buf) == nullptr && (count) > 0, MPI_ERR_BUFFER,                                                          \
-             "%s: param %d %s cannot be NULL if %s > 0",__func__, (num), _XBT_STRINGIFY(buf), _XBT_STRINGIFY(count));
-#define CHECK_COUNT(num, count)                                                                                        \
+
+#define CHECK_REQUEST_VALID(num)\
+  {\
+    CHECK_REQUEST(num)\
+    if(request!=MPI_REQUEST_IGNORED){\
+      CHECK_DELETED((num), MPI_ERR_REQUEST, *request)\
+      simgrid::smpi::utils::set_current_handle(*request);\
+    }\
+  }
+
+#define CHECK_BUFFER(num,buf,count)\
+  CHECK_ARGS((buf) == nullptr && (count) > 0, MPI_ERR_BUFFER,\
+             "%s: param %d %s cannot be NULL if %s > 0",__func__, (num), _XBT_STRINGIFY(buf), _XBT_STRINGIFY(count))
+
+#define CHECK_COUNT(num, count)\
   CHECK_NEGATIVE((num), MPI_ERR_COUNT, (count))
-#define CHECK_TYPE(num, datatype)                                                                                      \
-  CHECK_ARGS(((datatype) == MPI_DATATYPE_NULL|| not (datatype)->is_valid()), MPI_ERR_TYPE,                             \
-             "%s: param %d %s cannot be MPI_DATATYPE_NULL or invalid", __func__, (num), _XBT_STRINGIFY(datatype));
-#define CHECK_OP(num, op, type)                                                                                        \
-  CHECK_MPI_NULL((num), MPI_OP_NULL, MPI_ERR_OP, (op))                                                                 \
-  CHECK_ARGS(((op)->allowed_types() && (((op)->allowed_types() & (type)->flags()) == 0)), MPI_ERR_OP,                \
-             "%s: param %d op %s can't be applied to type %s", __func__, (num), _XBT_STRINGIFY(op), type->name());
+
+#define CHECK_TYPE(num, datatype)\
+  {\
+    CHECK_ARGS(((datatype) == MPI_DATATYPE_NULL|| not (datatype)->is_valid()), MPI_ERR_TYPE,\
+             "%s: param %d %s cannot be MPI_DATATYPE_NULL or invalid", __func__, (num), _XBT_STRINGIFY(datatype));\
+    CHECK_DELETED((num), MPI_ERR_TYPE, datatype)\
+    if (not datatype->is_basic())\
+      simgrid::smpi::utils::set_current_handle(datatype);\
+  }
+
+#define CHECK_OP(num, op, type)\
+  {\
+  CHECK_MPI_NULL((num), MPI_OP_NULL, MPI_ERR_OP, (op))\
+  CHECK_DELETED((num), MPI_ERR_OP, op)\
+  if (not op->is_predefined())\
+    simgrid::smpi::utils::set_current_handle(op);\
+  CHECK_ARGS(((op)->allowed_types() && (((op)->allowed_types() & (type)->flags()) == 0)), MPI_ERR_OP,\
+             "%s: param %d op %s can't be applied to type %s", __func__, (num), _XBT_STRINGIFY(op), type->name().c_str());\
+  }
+
 #define CHECK_ROOT(num)\
-  CHECK_ARGS((root < 0 || root >= comm->size()), MPI_ERR_ROOT,                                                         \
-             "%s: param %d root (=%d) cannot be negative or larger than communicator size (=%d)", __func__, (num),     \
-             root, comm->size());
-#define CHECK_INFO(num,info)                                                                                           \
-  CHECK_MPI_NULL((num), MPI_INFO_NULL, MPI_ERR_INFO, (info))
-#define CHECK_TAG(num,tag)                                                                                             \
-  CHECK_ARGS(((tag) < 0 && (tag) !=  MPI_ANY_TAG), MPI_ERR_TAG,                                                        \
-             "%s: param %d %s (=%d) cannot be negative", __func__, (num), _XBT_STRINGIFY(tag), (tag));
-#define CHECK_FILE(num, fh)                                                                                            \
+  CHECK_ARGS((root < 0 || root >= comm->size()), MPI_ERR_ROOT,\
+             "%s: param %d root (=%d) cannot be negative or larger than communicator size (=%d)", __func__, (num),\
+             root, comm->size())
+
+#define CHECK_INFO(num,info)\
+  {\
+    CHECK_MPI_NULL((num), MPI_INFO_NULL, MPI_ERR_INFO, (info))\
+    CHECK_DELETED((num), MPI_ERR_INFO, info)\
+    simgrid::smpi::utils::set_current_handle(info);\
+  }
+
+#define CHECK_TAG(num,tag)\
+  CHECK_ARGS(((tag) < 0 && (tag) !=  MPI_ANY_TAG), MPI_ERR_TAG,\
+             "%s: param %d %s (=%d) cannot be negative", __func__, (num), _XBT_STRINGIFY(tag), (tag))
+
+#define CHECK_FILE(num, fh)\
   CHECK_MPI_NULL((num), MPI_FILE_NULL, MPI_ERR_FILE, (fh))
-#define CHECK_OFFSET(num, offset)                                                                                      \
+
+#define CHECK_OFFSET(num, offset)\
   CHECK_NEGATIVE((num), MPI_ERR_DISP, (offset))
-#define CHECK_GROUP(num, group)                                                                                        \
+
+#define CHECK_GROUP(num, group)\
   CHECK_MPI_NULL((num), MPI_GROUP_NULL, MPI_ERR_GROUP, (group))
-#define CHECK_WIN(num, win)                                                                                            \
-  CHECK_MPI_NULL((num), MPI_WIN_NULL, MPI_ERR_WIN, (win))
-#define CHECK_RANK(num, rank, comm)                                                                                    \
-  CHECK_ARGS(((rank) >= (comm)->size() || (rank) <0), MPI_ERR_RANK,                                                    \
-             "%s: param %d %s (=%d) cannot be < 0 or > %d", __func__, (num), _XBT_STRINGIFY(rank),                     \
-             (rank), (comm)->size() );
-#define CHECK_PROC_RMA(num,proc,win)                                                                                   \
-  CHECK_MPI_NULL((num), MPI_PROC_NULL, MPI_SUCCESS, (proc))                                                            \
-  CHECK_RANK(num, proc, win->comm())
-#define CHECK_NOT_IN_PLACE_ROOT(num, buf)                                                                                   \
-  CHECK_ARGS((buf == MPI_IN_PLACE), MPI_ERR_BUFFER,                                                                    \
+
+#define CHECK_WIN(num, win)\
+  {\
+  CHECK_MPI_NULL((num), MPI_WIN_NULL, MPI_ERR_WIN, (win))\
+  simgrid::smpi::utils::set_current_handle(win);\
+  }
+#define CHECK_RANK(num, rank, comm)\
+  CHECK_ARGS(((rank) >= (comm)->size() || (rank) <0), MPI_ERR_RANK,\
+             "%s: param %d %s (=%d) cannot be < 0 or > %d", __func__, (num), _XBT_STRINGIFY(rank),\
+             (rank), (comm)->size() )
+
+#define CHECK_PROC_RMA(num,proc,win)\
+  {\
+    CHECK_VAL((num), MPI_PROC_NULL, MPI_SUCCESS, (proc))\
+    CHECK_RANK(num, proc, (win)->comm())\
+  }
+
+#define CHECK_NOT_IN_PLACE_ROOT(num, buf)\
+  CHECK_ARGS((buf == MPI_IN_PLACE), MPI_ERR_BUFFER,\
              "%s: param %d %s cannot be MPI_IN_PLACE for rank %d with root %d", __func__, (num), _XBT_STRINGIFY(buf),  \
-             rank, root);
-#define CHECK_NOT_IN_PLACE(num, buf)                                                                                   \
-  CHECK_ARGS((buf == MPI_IN_PLACE), MPI_ERR_BUFFER,                                                                    \
-             "%s: param %d %s cannot be MPI_IN_PLACE for rank %d", __func__, (num), _XBT_STRINGIFY(buf),  \
-             rank);
+             rank, root)
+
+#define CHECK_NOT_IN_PLACE(num, buf)\
+  CHECK_ARGS((buf == MPI_IN_PLACE), MPI_ERR_BUFFER,\
+             "%s: param %d %s cannot be MPI_IN_PLACE for rank %d", __func__, (num), _XBT_STRINGIFY(buf), rank)
+
 #endif
index 4c6ca1b..856525b 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <memory>
 #include <unordered_map>
+#include <string>
 
 namespace simgrid{
 namespace smpi{
@@ -26,6 +27,7 @@ private:
   static f2c_lookup_type::size_type num_default_handles_;
   int my_f2c_id_ = -1;
   bool deleted_ = false;
+  std::string call_location_;
 
 protected:
   static void allocate_lookup()
@@ -54,6 +56,7 @@ public:
   static F2C* f2c(int id);
   static void finish_initialization() { num_default_handles_ = f2c_lookup_->size(); }
   static f2c_lookup_type::size_type get_num_default_handles() { return num_default_handles_; }
+  std::string call_location(){ return call_location_; }
 };
 
 }
index a804e16..29c0918 100644 (file)
@@ -9,6 +9,7 @@
 #include <cstddef>
 #include <string>
 #include <vector>
+#include "smpi_f2c.hpp"
 
 // Methods used to parse and store the values for timing injections in smpi
 struct s_smpi_factor_t {
@@ -20,12 +21,16 @@ struct s_smpi_factor_t {
 namespace simgrid {
 namespace smpi {
 namespace utils {
+  extern F2C* current_handle;
   XBT_PUBLIC std::vector<s_smpi_factor_t> parse_factor(const std::string& smpi_coef_string);
   XBT_PUBLIC void add_benched_time(double time);
   XBT_PUBLIC void account_malloc_size(size_t size, const char* file, int line);
   XBT_PUBLIC void account_shared_size(size_t size);
   XBT_PUBLIC void print_time_analysis(double time);
   XBT_PUBLIC void print_memory_analysis();
+  XBT_PUBLIC void print_current_handle();
+  static void set_current_handle(F2C* handle){current_handle=handle;}
+
 }
 }
 }
index 791bf56..0f6de95 100644 (file)
@@ -13,9 +13,7 @@
 #include "xbt/file.hpp"
 #include <boost/tokenizer.hpp>
 #include "smpi_config.hpp"
-#include "smpi_f2c.hpp"
 #include "src/simix/smx_private.hpp"
-
 #include <algorithm>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_utils, smpi, "Logging specific to SMPI (utils)");
@@ -38,6 +36,7 @@ struct MaxMalloc {
   std::string file;
 };
 MaxMalloc max_malloc;
+F2C* current_handle=0;
 
 std::vector<s_smpi_factor_t> parse_factor(const std::string& smpi_coef_string)
 {
@@ -179,6 +178,17 @@ void print_memory_analysis()
       XBT_INFO("%lu bytes were automatically shared between processes, in %u calls\n", total_shared_size, total_shared_calls);
   }
 }
+
+void print_current_handle(){
+  if(current_handle){
+    if(current_handle->call_location().empty())
+      XBT_INFO("To get handle location information, pass -trace-call-location flag to smpicc/f90 as well");
+    else
+      XBT_INFO("Handle %s was allocated by a call at %s", current_handle->name().c_str(),
+               (char*)(current_handle->call_location().c_str()));
+  }
+}
+
 }
 }
 } // namespace simgrid
index be9e920..d3b04ac 100644 (file)
@@ -6,6 +6,7 @@
 #include "smpi_f2c.hpp"
 #include "private.hpp"
 #include "src/smpi/include/smpi_actor.hpp"
+#include "src/instr/instr_smpi.hpp"
 
 int mpi_in_place_;
 int mpi_bottom_;
@@ -25,6 +26,9 @@ F2C::F2C() = default;
 int F2C::add_f()
 {
   allocate_lookup();
+  auto loc = smpi_process()->call_location();
+  if(loc && loc->linenumber != 0)
+    call_location_= std::string (loc->filename + ":" + std::to_string(loc->linenumber));
   my_f2c_id_                 = global_f2c_id();
   (*f2c_lookup_)[my_f2c_id_] = this;
   f2c_id_increment();
index 297dd07..bf86017 100644 (file)
@@ -217,7 +217,8 @@ int Win::put(const void *origin_addr, int origin_count, MPI_Datatype origin_data
   }
 
   if(target_count*target_datatype->get_extent()>recv_win->size_){
-    XBT_WARN("Trying to put more than the window size - Bailing out.");
+    XBT_WARN("MPI_Put: Trying to put %ld, which is more than the window size on target process %d : %ld - Bailing out.",
+    target_count*target_datatype->get_extent(), target_rank, recv_win->size_);
     return MPI_ERR_RMA_RANGE;
   }
 
@@ -279,7 +280,8 @@ int Win::get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
   }
 
   if(target_count*target_datatype->get_extent()>send_win->size_){
-    XBT_WARN("Trying to get more than the window size - Bailing out.");
+    XBT_WARN("MPI_Get: Trying to get %ld, which is more than the window size on target process %d : %ld - Bailing out.",
+    target_count*target_datatype->get_extent(), target_rank, send_win->size_);
     return MPI_ERR_RMA_RANGE;
   }
 
@@ -341,7 +343,8 @@ int Win::accumulate(const void *origin_addr, int origin_count, MPI_Datatype orig
   //FIXME: local version
 
   if(target_count*target_datatype->get_extent()>recv_win->size_){
-    XBT_WARN("Trying to accumulate more than the window size - Bailing out.");
+    XBT_WARN("MPI_Accumulate: Trying to accumulate %ld, which is more than the window size on target process %d : %ld - Bailing out.",
+    target_count*target_datatype->get_extent(), target_rank, recv_win->size_);
     return MPI_ERR_RMA_RANGE;
   }
 
@@ -398,7 +401,8 @@ int Win::get_accumulate(const void* origin_addr, int origin_count, MPI_Datatype
   }
 
   if(target_count*target_datatype->get_extent()>send_win->size_){
-    XBT_WARN("Trying to get_accumulate more than the window size - Bailing out.");
+    XBT_WARN("MPI_Get_accumulate: Trying to get_accumulate %ld, which is more than the window size on target process %d : %ld - Bailing out.",
+    target_count*target_datatype->get_extent(), target_rank, send_win->size_);
     return MPI_ERR_RMA_RANGE;
   }