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 2713dfa..d87e94d 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 5950b3e..30d679f 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 59f3d3a..1448c8e 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 7cde17b..bcc611c 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)