|
SimGrid
3.18
Versatile Simulation of Distributed Systems
|
#include "SmpiHost.hpp"#include "mc/mc.h"#include "private.hpp"#include "simgrid/s4u/Host.hpp"#include "simgrid/s4u/Mailbox.hpp"#include "smpi_coll.hpp"#include "smpi_comm.hpp"#include "smpi_group.hpp"#include "smpi_info.hpp"#include "smpi_process.hpp"#include "src/msg/msg_private.hpp"#include "src/simix/smx_private.hpp"#include "src/surf/surf_interface.hpp"#include "xbt/config.hpp"#include <cfloat>#include <dlfcn.h>#include <fcntl.h>#include <fstream>#include <sys/stat.h>#include <boost/tokenizer.hpp>#include <boost/algorithm/string.hpp>Macros | |
| #define | RTLD_DEEPBIND 0 |
Typedefs | |
| typedef std::function< int(int argc, char *argv[])> | smpi_entry_point_type |
| typedef int(* | smpi_c_entry_point_type) (int argc, char **argv) |
| typedef void(* | smpi_fortran_entry_point_type) () |
Functions | |
| XBT_LOG_NEW_DEFAULT_SUBCATEGORY (smpi_kernel, smpi, "Logging specific to SMPI (kernel)") | |
| int | smpi_process_count () |
| simgrid::smpi::Process * | smpi_process () |
| simgrid::smpi::Process * | smpi_process_remote (int index) |
| MPI_Comm | smpi_process_comm_self () |
| void | smpi_process_init (int *argc, char ***argv) |
| int | smpi_process_index () |
| void * | smpi_process_get_user_data () |
| void | smpi_process_set_user_data (void *data) |
| int | smpi_global_size () |
| void | smpi_comm_set_copy_data_callback (void(*callback)(smx_activity_t, void *, size_t)) |
| Need a public setter for SMPI copy_callback function, so users can define their own while still using default SIMIX_copy_callback for MSG copies. More... | |
| static void | print (std::vector< std::pair< size_t, size_t >> vec) |
| static void | memcpy_private (void *dest, const void *src, std::vector< std::pair< size_t, size_t >> &private_blocks) |
| static void | check_blocks (std::vector< std::pair< size_t, size_t >> &private_blocks, size_t buff_size) |
| void | smpi_comm_copy_buffer_callback (smx_activity_t synchro, void *buff, size_t buff_size) |
| void | smpi_comm_null_copy_buffer_callback (smx_activity_t comm, void *buff, size_t buff_size) |
| static void | smpi_check_options () |
| int | smpi_enabled () |
| void | smpi_global_init () |
| void | smpi_global_destroy () |
| static void | smpi_init_logs () |
| static void | smpi_init_options () |
| static int | smpi_run_entry_point (smpi_entry_point_type entry_point, std::vector< std::string > args) |
| static smpi_entry_point_type | smpi_resolve_function (void *handle) |
| int | smpi_main (const char *executable, int argc, char *argv[]) |
| void | SMPI_init () |
| void | SMPI_finalize () |
| void | smpi_mpi_init () |
| double | smpi_mpi_wtime () |
Variables | |
| std::unordered_map< std::string, double > | location2speedup |
| static simgrid::smpi::Process ** | process_data = nullptr |
| int | process_count = 0 |
| int | smpi_universe_size = 0 |
| int * | index_to_process_data = nullptr |
| double | smpi_total_benched_time |
| xbt_os_timer_t | global_timer |
| MPI_Comm | MPI_COMM_WORLD = MPI_COMM_UNINITIALIZED |
| Setting MPI_COMM_WORLD to MPI_COMM_UNINITIALIZED (it's a variable) is important because the implementation of MPI_Comm checks "this == MPI_COMM_UNINITIALIZED"? If yes, it uses smpi_process()->comm_world() instead of "this". More... | |
| MPI_Errhandler * | MPI_ERRORS_RETURN = nullptr |
| MPI_Errhandler * | MPI_ERRORS_ARE_FATAL = nullptr |
| MPI_Errhandler * | MPI_ERRHANDLER_NULL = nullptr |
| static const char * | smpi_default_instance_name = "smpirun" |
| static simgrid::config::Flag< double > | smpi_wtime_sleep ("smpi/wtime", "Minimum time to inject inside a call to MPI_Wtime", 0.0) |
| static simgrid::config::Flag< double > | smpi_init_sleep ("smpi/init", "Time to inject inside a call to MPI_Init", 0.0) |
| void(* | smpi_comm_copy_data_callback )(smx_activity_t, void *, size_t) = &smpi_comm_copy_buffer_callback |
| #define RTLD_DEEPBIND 0 |
| typedef std::function<int(int argc, char *argv[])> smpi_entry_point_type |
| typedef void(* smpi_fortran_entry_point_type) () |
| XBT_LOG_NEW_DEFAULT_SUBCATEGORY | ( | smpi_kernel | , |
| smpi | , | ||
| "Logging specific to SMPI (kernel)" | |||
| ) |
| int smpi_process_count | ( | ) |
| simgrid::smpi::Process* smpi_process | ( | ) |
| simgrid::smpi::Process* smpi_process_remote | ( | int | index | ) |
| MPI_Comm smpi_process_comm_self | ( | ) |
| void smpi_process_init | ( | int * | argc, |
| char *** | argv | ||
| ) |
| int smpi_process_index | ( | ) |
| void* smpi_process_get_user_data | ( | ) |
| int smpi_global_size | ( | ) |
| void smpi_comm_set_copy_data_callback | ( | void(*)(smx_activity_t, void *, size_t) | callback | ) |
Need a public setter for SMPI copy_callback function, so users can define their own while still using default SIMIX_copy_callback for MSG copies.
|
static |
|
static |
|
static |
| void smpi_comm_copy_buffer_callback | ( | smx_activity_t | synchro, |
| void * | buff, | ||
| size_t | buff_size | ||
| ) |
| void smpi_comm_null_copy_buffer_callback | ( | smx_activity_t | comm, |
| void * | buff, | ||
| size_t | buff_size | ||
| ) |
|
static |
| int smpi_enabled | ( | ) |
| void smpi_global_init | ( | ) |
| void smpi_global_destroy | ( | ) |
|
static |
|
static |
|
static |
|
static |
| int smpi_main | ( | const char * | executable, |
| int | argc, | ||
| char * | argv[] | ||
| ) |
| void SMPI_init | ( | ) |
| void SMPI_finalize | ( | ) |
| void smpi_mpi_init | ( | ) |
| double smpi_mpi_wtime | ( | ) |
| std::unordered_map<std::string, double> location2speedup |
|
static |
| int process_count = 0 |
| int smpi_universe_size = 0 |
| int* index_to_process_data = nullptr |
| double smpi_total_benched_time |
| xbt_os_timer_t global_timer |
| MPI_Comm MPI_COMM_WORLD = MPI_COMM_UNINITIALIZED |
Setting MPI_COMM_WORLD to MPI_COMM_UNINITIALIZED (it's a variable) is important because the implementation of MPI_Comm checks "this == MPI_COMM_UNINITIALIZED"? If yes, it uses smpi_process()->comm_world() instead of "this".
This is basically how we only have one global variable but all processes have different communicators (basically, the one their SMPI instance uses).
See smpi_comm.cpp and the functions therein for details.
| MPI_Errhandler* MPI_ERRORS_RETURN = nullptr |
| MPI_Errhandler* MPI_ERRORS_ARE_FATAL = nullptr |
| MPI_Errhandler* MPI_ERRHANDLER_NULL = nullptr |
|
static |
|
static |
|
static |
| void(* smpi_comm_copy_data_callback) (smx_activity_t, void *, size_t) = &smpi_comm_copy_buffer_callback |