From: Martin Quinson Date: Thu, 1 Aug 2019 03:53:31 +0000 (+0200) Subject: MPI: we don't mess with argc/argv anymore nowadays X-Git-Tag: v3.24~226 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b5af0e296f9c0b2b43c81112197c76e87f74ab9b MPI: we don't mess with argc/argv anymore nowadays Previously, the rank and instance were added in argv, mandating a specific handling of MPI_Init parameters. But now, they are passed as properties, and the argv is left unmodified. So there is no need to deal specifically with the MPI_Init parameters. --- diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 30a9ebe1eb..d2aee1f56b 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -1041,7 +1041,6 @@ XBT_PUBLIC void* smpi_shared_set_call(const char* func, const char* input, void* /* Fortran specific stuff */ XBT_PUBLIC int smpi_main(const char* program, int argc, char* argv[]); -XBT_PUBLIC void smpi_process_init(int* argc, char*** argv); /* Trace replay specific stuff */ XBT_PUBLIC void smpi_replay_init(const char* instance_id, int rank, double start_delay_flops); // Only initialization diff --git a/include/smpi/smpi_extended_traces.h b/include/smpi/smpi_extended_traces.h index c45e7de177..e792b0bad0 100644 --- a/include/smpi/smpi_extended_traces.h +++ b/include/smpi/smpi_extended_traces.h @@ -1,7 +1,7 @@ // This file has been automatically generated by the script // in tools/smpi/generate_smpi_defines.pl // DO NOT EDIT MANUALLY. ALL CHANGES WILL BE OVERWRITTEN! -#define MPI_Init(...) ({ smpi_process_init(__VA_ARGS__); smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Init(NULL, NULL); }) +#define MPI_Init(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Init(__VA_ARGS__); }) #define MPI_Finalize(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Finalize(__VA_ARGS__); }) #define MPI_Finalized(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Finalized(__VA_ARGS__); }) #define MPI_Init_thread(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Init_thread(__VA_ARGS__); }) diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index bc01be35b7..96857513df 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -129,11 +129,6 @@ MPI_Info smpi_process_info_env(){ return smpi_process()->info_env(); } -void smpi_process_init(int*, char***) -{ - simgrid::smpi::ActorExt::init(); -} - void * smpi_process_get_user_data(){ return simgrid::s4u::Actor::self()->get_impl()->get_user_data(); } diff --git a/tools/smpi/generate_smpi_defines.pl b/tools/smpi/generate_smpi_defines.pl index 0bd941b171..fc0255ba9f 100755 --- a/tools/smpi/generate_smpi_defines.pl +++ b/tools/smpi/generate_smpi_defines.pl @@ -42,12 +42,7 @@ sub output_macro { print "#define ". uc($id) ." smpi_trace_set_call_location(__FILE__,__LINE__); call ". ucfirst $id ."\n"; } else { - if ($id eq "MPI_Init") { - print "#define MPI_Init(...) ({ smpi_process_init(__VA_ARGS__); smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Init(NULL, NULL); })\n"; - } - else { - print "#define $id(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); $id(__VA_ARGS__); })\n"; - } + print "#define $id(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); $id(__VA_ARGS__); })\n"; } }