X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2b4dcee56b147273d7e7c0c8c2b376c0297aa594..98755faee042e94d1ff52f6e9508b18015bb1ae5:/src/smpi/include/private.hpp diff --git a/src/smpi/include/private.hpp b/src/smpi/include/private.hpp index 32f9d3a71e..8e1588f13c 100644 --- a/src/smpi/include/private.hpp +++ b/src/smpi/include/private.hpp @@ -27,7 +27,7 @@ constexpr unsigned MPI_REQ_ACCUMULATE = 0x400; constexpr unsigned MPI_REQ_GENERALIZED = 0x800; constexpr unsigned MPI_REQ_COMPLETE = 0x1000; -enum class SmpiProcessState { UNINITIALIZED, INITIALIZING, INITIALIZED, FINALIZED }; +enum class SmpiProcessState { UNINITIALIZED, INITIALIZING, INITIALIZED /*(=MPI_Init called)*/, FINALIZED }; constexpr int COLL_TAG_REDUCE = -112; constexpr int COLL_TAG_SCATTER = -223; @@ -71,12 +71,13 @@ typedef SMPI_Dist_Graph_topology* MPIR_Dist_Graph_Topology; 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 int smpi_get_universe_size(); XBT_PRIVATE void smpi_deployment_register_process(const std::string& instance_id, int rank, simgrid::s4u::ActorPtr actor); +XBT_PRIVATE void smpi_deployment_unregister_process(const std::string& instance_id); + XBT_PRIVATE MPI_Comm* smpi_deployment_comm_world(const std::string& instance_id); -XBT_PRIVATE simgrid::s4u::Barrier* smpi_deployment_finalization_barrier(const std::string& instance_id); XBT_PRIVATE void smpi_deployment_cleanup_instances(); XBT_PRIVATE void smpi_comm_copy_buffer_callback(simgrid::kernel::activity::CommImpl* comm, void* buff, @@ -86,8 +87,6 @@ XBT_PRIVATE void smpi_comm_null_copy_buffer_callback(simgrid::kernel::activity:: size_t buff_size); XBT_PRIVATE int smpi_enabled(); -XBT_PRIVATE void smpi_global_init(); -XBT_PRIVATE void smpi_global_destroy(); XBT_PRIVATE double smpi_mpi_wtime(); XBT_PRIVATE void smpi_mpi_init(); @@ -101,7 +100,6 @@ enum class SharedMallocType { NONE, LOCAL, GLOBAL }; extern XBT_PRIVATE SharedMallocType smpi_cfg_shared_malloc; // Whether to activate shared malloc XBT_PRIVATE void smpi_switch_data_segment(simgrid::s4u::ActorPtr actor); -XBT_PRIVATE void smpi_really_switch_data_segment(simgrid::s4u::ActorPtr actor); XBT_PRIVATE void smpi_prepare_global_memory_segment(); XBT_PRIVATE void smpi_backup_global_memory_segment(); @@ -342,12 +340,12 @@ void mpi_graph_neighbors_count_(int* comm, int* rank, int* nneighbors, int* ierr void mpi_graphdims_get_(int* comm, int* nnodes, int* nedges, int* ierr); void mpi_topo_test_(int* comm, int* top_type, int* ierr); void mpi_error_class_(int* errorcode, int* errorclass, int* ierr); -void mpi_errhandler_create_(void* function, void* errhandler, int* ierr); -void mpi_errhandler_free_(void* errhandler, int* ierr); -void mpi_errhandler_get_(int* comm, void* errhandler, int* ierr); -void mpi_errhandler_set_(int* comm, void* errhandler, int* ierr); -void mpi_comm_set_errhandler_(int* comm, void* errhandler, int* ierr); -void mpi_comm_get_errhandler_(int* comm, void* errhandler, int* ierr); +void mpi_errhandler_create_(void* function, int* errhandler, int* ierr); +void mpi_errhandler_free_(int* errhandler, int* ierr); +void mpi_errhandler_get_(int* comm, int* errhandler, int* ierr); +void mpi_errhandler_set_(int* comm, int* errhandler, int* ierr); +void mpi_comm_set_errhandler_(int* comm, int* errhandler, int* ierr); +void mpi_comm_get_errhandler_(int* comm, int* errhandler, int* ierr); void mpi_type_contiguous_(int* count, int* old_type, int* newtype, int* ierr); void mpi_cancel_(int* request, int* ierr); void mpi_buffer_attach_(void* buffer, int* size, int* ierr); @@ -361,14 +359,14 @@ void mpi_pack_external_(char* datarep, void* inbuf, int* incount, int* datatype, void mpi_unpack_external_(char* datarep, void* inbuf, MPI_Aint* insize, MPI_Aint* position, void* outbuf, int* outcount, int* datatype, int* ierr); void mpi_type_hindexed_(int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr); -void mpi_type_create_hindexed_(int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr); -void mpi_type_create_hindexed_block_(int* count, int* blocklength, int* indices, int* old_type, int* newtype, +void mpi_type_create_hindexed_(int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr); +void mpi_type_create_hindexed_block_(int* count, int* blocklength, MPI_Aint* indices, int* old_type, int* newtype, int* ierr); void mpi_type_indexed_(int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr); void mpi_type_create_indexed_(int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr); void mpi_type_create_indexed_block_(int* count, int* blocklength, int* indices, int* old_type, int* newtype, int* ierr); void mpi_type_struct_(int* count, int* blocklens, int* indices, int* old_types, int* newtype, int* ierr); -void mpi_type_create_struct_(int* count, int* blocklens, int* indices, int* old_types, int* newtype, int* ierr); +void mpi_type_create_struct_(int* count, int* blocklens, MPI_Aint* indices, int* old_types, int* newtype, int* ierr); void mpi_ssend_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* ierr); void mpi_ssend_init_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr); void mpi_intercomm_create_(int* local_comm, int* local_leader, int* peer_comm, int* remote_leader, int* tag, @@ -408,7 +406,7 @@ void mpi_comm_split_type_(int* comm, int* split_type, int* key, int* info, int* void mpi_comm_set_info_(int* comm, int* info, int* ierr); void mpi_comm_get_info_(int* comm, int* info, int* ierr); void mpi_info_get_(int* info, char* key, int* valuelen, char* value, int* flag, int* ierr, unsigned int keylen); -void mpi_comm_create_errhandler_(void* function, void* errhandler, int* ierr); +void mpi_comm_create_errhandler_(void* function, int* errhandler, int* ierr); void mpi_add_error_class_(int* errorclass, int* ierr); void mpi_add_error_code_(int* errorclass, int* errorcode, int* ierr); void mpi_add_error_string_(int* errorcode, char* string, int* ierr); @@ -455,7 +453,6 @@ struct s_smpi_privatization_region_t { typedef s_smpi_privatization_region_t* smpi_privatization_region_t; extern XBT_PRIVATE int smpi_loaded_page; -extern XBT_PRIVATE int smpi_universe_size; XBT_PRIVATE smpi_privatization_region_t smpi_init_global_memory_segment_process(); /**