From: Frederic Suter Date: Fri, 27 May 2016 13:50:58 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_14~1136 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/dab3029067ba2677a42fb2f4f2c3b3b2f71e33c2?hp=9219b289b6c24093a7c36823319ddbc3f51dcebf Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/examples/smpi/CMakeLists.txt b/examples/smpi/CMakeLists.txt index b8d676d1a0..e1847b2107 100644 --- a/examples/smpi/CMakeLists.txt +++ b/examples/smpi/CMakeLists.txt @@ -1,9 +1,5 @@ if(enable_smpi) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/") diff --git a/examples/smpi/trace_call_location/smpi_trace_call_location b/examples/smpi/trace_call_location/smpi_trace_call_location index 9ddb4efcb6..5eb63249bd 100755 Binary files a/examples/smpi/trace_call_location/smpi_trace_call_location and b/examples/smpi/trace_call_location/smpi_trace_call_location differ diff --git a/src/simix/ContextRaw.cpp b/src/simix/ContextRaw.cpp index 10330cbd09..4a34afa30f 100644 --- a/src/simix/ContextRaw.cpp +++ b/src/simix/ContextRaw.cpp @@ -61,7 +61,7 @@ public: RawContextFactory(); ~RawContextFactory() override; RawContext* create_context(std::function code, - void_pfn_smxprocess_t, smx_process_t process) override; + void_pfn_smxprocess_t cleanup, smx_process_t process) override; void run_all() override; private: void run_all_adaptative(); diff --git a/src/simix/ContextUnix.cpp b/src/simix/ContextUnix.cpp index ebdd9b075a..922631f445 100644 --- a/src/simix/ContextUnix.cpp +++ b/src/simix/ContextUnix.cpp @@ -116,7 +116,7 @@ public: UContextFactory(); ~UContextFactory() override; Context* create_context(std::function code, - void_pfn_smxprocess_t, smx_process_t process) override; + void_pfn_smxprocess_t cleanup, smx_process_t process) override; void run_all() override; }; diff --git a/src/simix/popping_private.h b/src/simix/popping_private.h index 93f0bfee5e..e8e76b7196 100644 --- a/src/simix/popping_private.h +++ b/src/simix/popping_private.h @@ -55,9 +55,9 @@ typedef struct s_smx_simcall { /******************************** General *************************************/ -XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t); -XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t, int); -XBT_PRIVATE void SIMIX_simcall_exit(smx_synchro_t); +XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t simcall); +XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t simcall, int value); +XBT_PRIVATE void SIMIX_simcall_exit(smx_synchro_t synchro); XBT_PRIVATE const char *SIMIX_simcall_name(e_smx_simcall_t kind); XBT_PRIVATE void SIMIX_run_kernel(std::function const* code); diff --git a/src/simix/smx_context.cpp b/src/simix/smx_context.cpp index 84da19332f..3e46ecec03 100644 --- a/src/simix/smx_context.cpp +++ b/src/simix/smx_context.cpp @@ -42,16 +42,16 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_context, simix, "Context switching mechani static std::pair context_factories[] = { #if HAVE_RAW_CONTEXTS - { "raw", simgrid::simix::raw_factory }, + { "raw", &simgrid::simix::raw_factory }, #endif #if HAVE_UCONTEXT_CONTEXTS - { "ucontext", simgrid::simix::sysv_factory }, + { "ucontext", &simgrid::simix::sysv_factory }, #endif #if HAVE_BOOST_CONTEXTS - { "boost", simgrid::simix::boost_factory }, + { "boost", &simgrid::simix::boost_factory }, #endif #if HAVE_THREAD_CONTEXTS - { "thread", simgrid::simix::thread_factory }, + { "thread", &simgrid::simix::thread_factory }, #endif }; diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index bc31f711af..3001ca036a 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -131,7 +131,7 @@ static void install_segvhandler(void) } struct sigaction action, old_action; - action.sa_sigaction = segvhandler; + action.sa_sigaction = &segvhandler; action.sa_flags = SA_ONSTACK | SA_RESETHAND | SA_SIGINFO; sigemptyset(&action.sa_mask); @@ -205,9 +205,9 @@ void SIMIX_global_init(int *argc, char **argv) simix_global->maestro_process = NULL; simix_global->registered_functions = xbt_dict_new_homogeneous(NULL); - simix_global->create_process_function = SIMIX_process_create; - simix_global->kill_process_function = kill_process; - simix_global->cleanup_process_function = SIMIX_process_cleanup; + simix_global->create_process_function = &SIMIX_process_create; + simix_global->kill_process_function = &kill_process; + simix_global->cleanup_process_function = &SIMIX_process_cleanup; simix_global->mutex = xbt_os_mutex_init(); surf_init(argc, argv); /* Initialize SURF structures */ @@ -218,8 +218,8 @@ void SIMIX_global_init(int *argc, char **argv) simgrid::simix::create_maestro(maestro_code); /* context exception handlers */ - __xbt_running_ctx_fetch = SIMIX_process_get_running_context; - __xbt_ex_terminate = SIMIX_process_exception_terminate; + __xbt_running_ctx_fetch = &SIMIX_process_get_running_context; + __xbt_ex_terminate = &SIMIX_process_exception_terminate; /* Prepare to display some more info when dying on Ctrl-C pressing */ signal(SIGINT, inthandler); diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index 55fc6990fa..6eaa039956 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -30,7 +30,7 @@ XBT_PRIVATE void SIMIX_mbox_remove(smx_mailbox_t mbox, smx_synchro_t comm); XBT_PRIVATE void SIMIX_mbox_set_receiver(smx_mailbox_t mbox, smx_process_t proc); XBT_PRIVATE smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, void *dst_buff, size_t *dst_buff_size, - int (*)(void *, void *, smx_synchro_t), + int (*match_fun)(void *, void *, smx_synchro_t), void (*copy_data_fun)(smx_synchro_t, void*, size_t), void *data, double rate); XBT_PRIVATE smx_synchro_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_mailbox_t mbox, int type, int src, diff --git a/src/simix/smx_process_private.h b/src/simix/smx_process_private.h index 7f6172dd80..da6cf695fd 100644 --- a/src/simix/smx_process_private.h +++ b/src/simix/smx_process_private.h @@ -119,8 +119,8 @@ XBT_PRIVATE void SIMIX_process_sleep_destroy(smx_synchro_t synchro); XBT_PRIVATE void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart); XBT_PRIVATE smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer); -void SIMIX_segment_index_set(smx_process_t, int); -extern void (*SMPI_switch_data_segment)(int); +void SIMIX_segment_index_set(smx_process_t process, int segment_index); +extern void (*SMPI_switch_data_segment)(int dest); SG_END_DECL()