Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Please people, stop including internal_config.h in generic header files
[simgrid.git] / src / smpi / include / private.hpp
index 68a8108..7c591b7 100644 (file)
@@ -10,7 +10,6 @@
 #include "smpi/smpi.h"
 #include "smpi/smpi_helpers_internal.h"
 #include "src/instr/instr_smpi.hpp"
-#include "src/internal_config.h"
 #include <unordered_map>
 #include <vector>
 
@@ -26,7 +25,7 @@
 #define MPI_REQ_RMA 0x200
 #define MPI_REQ_ACCUMULATE 0x400
 
-enum class SmpiProcessState { UNINITIALIZED, INITIALIZED, FINALIZED };
+enum class SmpiProcessState { UNINITIALIZED, INITIALIZING, INITIALIZED, FINALIZED };
 
 #define COLL_TAG_REDUCE -112
 #define COLL_TAG_SCATTER -223
@@ -59,8 +58,8 @@ typedef SMPI_Graph_topology* MPIR_Graph_Topology;
 
 typedef SMPI_Dist_Graph_topology* MPIR_Dist_Graph_Topology;
 
-XBT_PRIVATE SMPI_Process* smpi_process();
-XBT_PRIVATE SMPI_Process* smpi_process_remote(simgrid::s4u::ActorPtr actor);
+XBT_PRIVATE simgrid::smpi::ActorExt* smpi_process();
+XBT_PRIVATE simgrid::smpi::ActorExt* smpi_process_remote(simgrid::s4u::ActorPtr actor);
 XBT_PRIVATE int smpi_process_count();
 
 XBT_PRIVATE void smpi_deployment_register_process(const std::string instance_id, int rank,
@@ -404,7 +403,7 @@ void mpi_file_open_(int* comm, char* filename, int* amode, int* info, int* fh, i
 void mpi_file_set_view_(int* fh, long long int* offset, int* etype, int* filetype, char* datarep, int* info, int* ierr);
 void mpi_file_read_(int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
 void mpi_file_write_(int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
-
+void smpi_init_fortran_types();
 } // extern "C"
 
 struct s_smpi_privatization_region_t {
@@ -425,9 +424,13 @@ XBT_PRIVATE smpi_privatization_region_t smpi_init_global_memory_segment_process(
  */
 #define TOPAGE(addr) (void*)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize)
 
-#if HAVE_PAPI
+/** Used only if PAPI is compiled in, but integrated anyway so that this file does not depend on internal_config.h (to speed builds) */
 typedef std::vector<std::pair</* counter name */ std::string, /* counter value */ long long>> papi_counter_t;
-#endif
+struct papi_process_data {
+  papi_counter_t counter_data;
+  int event_set;
+};
+extern std::map</* computation unit name */ std::string, papi_process_data> units2papi_setup;
 
 extern std::unordered_map<std::string, double> location2speedup;