Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try again to be 32/64 bit agnostic
authorAugustin Degomme <degomme@idpann.imag.fr>
Tue, 25 Jun 2013 14:51:50 +0000 (16:51 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Tue, 25 Jun 2013 14:51:50 +0000 (16:51 +0200)
teshsuite/smpi/shared.c

index 61d244d..61ea3e4 100644 (file)
@@ -9,8 +9,9 @@
 #include <stdio.h>
 #include <mpi.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <mpi.h>
 #include <stdint.h>
+#include <inttypes.h>
 
 
-unsigned long hash(char *str);
+uint64_t hash(char *str);
 
 uint64_t hash(char *str)
 {
 
 uint64_t hash(char *str)
 {
@@ -38,7 +39,7 @@ int main(int argc, char *argv[])
   
   MPI_Barrier(MPI_COMM_WORLD);
   //everyobne reads from it. 
   
   MPI_Barrier(MPI_COMM_WORLD);
   //everyobne reads from it. 
-  printf("[%d] The value in the shared buffer is: %zu\n", rank, *buf);
+  printf("[%d] The value in the shared buffer is: %llu\n", rank, (unsigned long long)*buf);
   
   
   MPI_Barrier(MPI_COMM_WORLD);
   
   
   MPI_Barrier(MPI_COMM_WORLD);