Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow MPI codes to use timezone in their gettimeofday (but we replace it
authorsuter <frederic.suter@cc.in2p3.fr>
Wed, 7 May 2014 01:09:51 +0000 (03:09 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Wed, 7 May 2014 01:09:51 +0000 (03:09 +0200)
to NULL anyway). The previous macro prevented the compilation of some
code.

include/smpi/mpi.h
include/smpi/smpi.h
src/smpi/smpi_bench.c

index 4224e7f..482fa7e 100644 (file)
@@ -10,7 +10,6 @@
 #define SEED 221238
 
 #define sleep(x) smpi_sleep(x)
 #define SEED 221238
 
 #define sleep(x) smpi_sleep(x)
-#define gettimeofday(x, y) smpi_gettimeofday(x)
 
 #include <smpi/smpi.h>
 #include <xbt/sysdep.h>
 
 #include <smpi/smpi.h>
 #include <xbt/sysdep.h>
@@ -18,6 +17,8 @@
 #include <xbt/asserts.h>
 #include <simgrid/modelchecker.h>
 
 #include <xbt/asserts.h>
 #include <simgrid/modelchecker.h>
 
+#define gettimeofday(x, y) smpi_gettimeofday(x, NULL)
+
 #ifdef HAVE_MC
 #undef assert
 #define assert(x) MC_assert(x)
 #ifdef HAVE_MC
 #undef assert
 #define assert(x) MC_assert(x)
index 0cc6f08..c520980 100644 (file)
@@ -709,7 +709,7 @@ XBT_PUBLIC(void) smpi_set_host_power_peak_at(int pstate_index);
 XBT_PUBLIC(double) smpi_get_host_consumed_energy(void);
 
 XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs);
 XBT_PUBLIC(double) smpi_get_host_consumed_energy(void);
 
 XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs);
-XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv);
+XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv, void* tz);
 XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void);
 XBT_PUBLIC(unsigned long long) smpi_rastro_timestamp (void);
 XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line,
 XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void);
 XBT_PUBLIC(unsigned long long) smpi_rastro_timestamp (void);
 XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line,
index f7464db..2cb5bb2 100644 (file)
@@ -227,7 +227,7 @@ unsigned int smpi_sleep(unsigned int secs)
   return secs;
 }
 
   return secs;
 }
 
-int smpi_gettimeofday(struct timeval *tv)
+int smpi_gettimeofday(struct timeval *tv, void* tz)
 {
   double now;
   smpi_bench_end();
 {
   double now;
   smpi_bench_end();