Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
32bits I hate you.
[simgrid.git] / src / smpi / private.h
index 047b7a8..a01bc88 100644 (file)
 #include "src/smpi/smpi_datatype.hpp"
 #include "src/smpi/smpi_datatype_derived.hpp"
 #include "src/smpi/smpi_request.hpp"
+#include "src/smpi/smpi_status.hpp"
 #include "src/smpi/smpi_win.hpp"
 SG_BEGIN_DECL()
 
 
-using namespace simgrid::smpi;
-
-
 #define PERSISTENT     0x1
 #define NON_PERSISTENT 0x2
 #define SEND           0x4
@@ -64,7 +62,8 @@ enum smpi_process_state{
 #define COLL_TAG_GATHERV -2223
 #define COLL_TAG_BCAST -3334
 #define COLL_TAG_ALLREDUCE -4445
-#define SMPI_RMA_TAG -1234
+//SMPI_RMA_TAG has to be the smallest one, as it will be decremented for accumulate ordering.
+#define SMPI_RMA_TAG -6666
 
 extern XBT_PRIVATE MPI_Comm MPI_COMM_UNINITIALIZED;
 
@@ -74,8 +73,8 @@ typedef SMPI_Graph_topology *MPIR_Graph_Topology;
 
 typedef SMPI_Dist_Graph_topology *MPIR_Dist_Graph_Topology;
 
-XBT_PRIVATE Process* smpi_process();
-XBT_PRIVATE Process* smpi_process_remote(int index);
+XBT_PRIVATE SMPI_Process* smpi_process();
+XBT_PRIVATE SMPI_Process* smpi_process_remote(int index);
 XBT_PRIVATE int smpi_process_count();
 
 XBT_PRIVATE void smpi_deployment_register_process(const char* instance_id, int rank, int index);
@@ -93,14 +92,16 @@ XBT_PRIVATE void smpi_global_destroy();
 XBT_PRIVATE double smpi_mpi_wtime();
 XBT_PRIVATE void smpi_mpi_init();
 
-XBT_PRIVATE void smpi_empty_status(MPI_Status * status);
-XBT_PRIVATE int smpi_mpi_get_count(MPI_Status * status, MPI_Datatype datatype);
-
-
 // utilities
 extern XBT_PRIVATE double smpi_cpu_threshold;
 extern XBT_PRIVATE double smpi_host_speed;
-extern XBT_PRIVATE bool smpi_privatize_global_variables;
+
+#define SMPI_PRIVATIZE_NONE 0
+#define SMPI_PRIVATIZE_MMAP 1
+#define SMPI_PRIVATIZE_DLOPEN 2
+#define SMPI_PRIVATIZE_DEFAULT SMPI_PRIVATIZE_MMAP
+extern XBT_PRIVATE int smpi_privatize_global_variables;
+
 extern XBT_PRIVATE char* smpi_start_data_exe; //start of the data+bss segment of the executable
 extern XBT_PRIVATE int smpi_size_data_exe; //size of the data+bss segment of the executable
 
@@ -117,6 +118,7 @@ XBT_PRIVATE void smpi_destroy_global_memory_segments();
 XBT_PRIVATE void smpi_bench_destroy();
 XBT_PRIVATE void smpi_bench_begin();
 XBT_PRIVATE void smpi_bench_end();
+XBT_PRIVATE void smpi_shared_destroy();
 
 XBT_PRIVATE void* smpi_get_tmp_sendbuffer(int size);
 XBT_PRIVATE void* smpi_get_tmp_recvbuffer(int size);