Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix compilation with warnings
authordegomme <augustin.degomme@unibas.ch>
Fri, 3 Mar 2017 13:12:45 +0000 (14:12 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Fri, 3 Mar 2017 13:12:45 +0000 (14:12 +0100)
include/smpi/smpi.h
src/smpi/private.h
src/smpi/smpi_base.cpp
src/smpi/smpi_global.cpp

index 2713dfa78aaedb13f4a444aaaba9b29d8ff77c50..d87e94dabbc4011c2a0e80742ff8343f1bee75a1 100644 (file)
@@ -16,6 +16,7 @@
 #include <stddef.h>
 #include <xbt/misc.h>
 #include <xbt/function_types.h>
+#include "simgrid/datatypes.h"
 
 #ifdef _WIN32
 #define MPI_CALL(type,name,args) \
@@ -828,7 +829,8 @@ XBT_PUBLIC(void) smpi_sample_3(int global, const char *file, int line);
  * Need a public setter for SMPI copy_callback function, so users can define 
  * their own while still using default SIMIX_copy_callback for MSG copies.
  */
-XBT_PUBLIC(void) smpi_comm_set_copy_data_callback(void (*callback));
+XBT_PUBLIC(void) smpi_comm_set_copy_data_callback(void (*callback) (smx_activity_t, void*, size_t));
+
 
 /** 
  * Functions for call location tracing. These functions will be
index 5950b3e9f9fc6bcc54fa3885569121b4462b359f..30d679f8914016f3c14ff993e3ed4e566fb1ba51 100644 (file)
@@ -191,8 +191,6 @@ XBT_PRIVATE void smpi_comm_copy_buffer_callback(smx_activity_t comm, void *buff,
 
 XBT_PRIVATE void smpi_comm_null_copy_buffer_callback(smx_activity_t comm, void *buff, size_t buff_size);
 
-static void (*smpi_comm_copy_data_callback) (smx_activity_t, void*, size_t) = &smpi_comm_copy_buffer_callback;
-
 XBT_PRIVATE void print_request(const char *message, MPI_Request request);
 
 XBT_PRIVATE int smpi_enabled();
index 59f3d3ad3f7107b55e23e5b862a7bd66737e3aa4..1448c8ec7a488b3eb102f59ed3eea99e75278086 100644 (file)
@@ -23,6 +23,9 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_base, smpi, "Logging specific to SMPI (base)");
 
+extern void (*smpi_comm_copy_data_callback) (smx_activity_t, void*, size_t);
+
+
 static int match_recv(void* a, void* b, smx_activity_t ignored) {
   MPI_Request ref = static_cast<MPI_Request>(a);
   MPI_Request req = static_cast<MPI_Request>(b);
index 7cde17bf2c2c681eb0997925dab8fa7295d25e90..bcc611cae3e113ee334e53722e16272c02008dc5 100644 (file)
@@ -83,6 +83,8 @@ MPI_Errhandler *MPI_ERRORS_RETURN = nullptr;
 MPI_Errhandler *MPI_ERRORS_ARE_FATAL = nullptr;
 MPI_Errhandler *MPI_ERRHANDLER_NULL = nullptr;
 
+void (*smpi_comm_copy_data_callback) (smx_activity_t, void*, size_t) = &smpi_comm_copy_buffer_callback;
+
 #define MAILBOX_NAME_MAXLEN (5 + sizeof(int) * 2 + 1)
 
 static char *get_mailbox_name(char *str, int index)