Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into stoprofiles
authorYann Duplouy <yann.duplouy@inria.fr>
Fri, 22 Nov 2019 13:16:21 +0000 (14:16 +0100)
committerYann Duplouy <yann.duplouy@inria.fr>
Fri, 22 Nov 2019 13:16:21 +0000 (14:16 +0100)
42 files changed:
.mailmap
examples/s4u/energy-link/s4u-energy-link.cpp
examples/s4u/platform-profile/s4u-platform-profile.cpp
examples/s4u/synchro-semaphore/s4u-synchro-semaphore.cpp
include/simgrid/Exception.hpp
include/simgrid/kernel/routing/NetZoneImpl.hpp
include/smpi/sampi.h
include/smpi/smpi.h
include/smpi/smpi_extended_traces.h
include/smpi/smpi_helpers.h
include/smpi/smpi_helpers_internal.h
include/xbt/random.hpp
src/bindings/python/simgrid_python.cpp
src/instr/instr_paje_events.cpp
src/instr/instr_paje_values.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/plugins/file_system/s4u_FileSystem.cpp
src/plugins/host_energy.cpp
src/plugins/link_energy.cpp
src/simix/popping_private.hpp
src/smpi/colls/smpi_automatic_selector.cpp
src/smpi/colls/smpi_coll.cpp
src/smpi/colls/smpi_intel_mpi_selector.cpp
src/smpi/include/smpi_coll.hpp
src/smpi/internals/smpi_replay.cpp
src/smpi/internals/smpi_shared.cpp
src/smpi/mpi/smpi_datatype.cpp
src/smpi/mpi/smpi_f2c.cpp
src/smpi/mpi/smpi_keyvals.cpp
src/smpi/mpi/smpi_op.cpp
src/smpi/mpi/smpi_topo.cpp
src/surf/network_constant.cpp
src/surf/xml/platf.hpp
src/surf/xml/surfxml_sax_cb.cpp
src/xbt/automaton/automaton.c
src/xbt/exception.cpp
src/xbt/random.cpp
src/xbt/random_test.cpp
teshsuite/surf/maxmin_bench/maxmin_bench.cpp
tools/cmake/DefinePackages.cmake
tools/cmake/MakeLib.cmake

index 3539f67..c166857 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -46,6 +46,7 @@ Jean-Emile Dartois <jean-emile.dartois@b-com.com>
 Jean-Emile Dartois <jean-emile.dartois@b-com.com> <jedartois@gmail.com>
 Darina Dimitrova <dimitrov@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
 Bruno Donassolo <donassbr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
+Yann Duplouy <yann.duplouy@inria.fr> <duplouy@crans.org>
 Pierre-François Dutot <dutot@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
 Julien Emmanuel <julien.emmanuel@atos.net>
 Lionel Eyraud-Dubois <lionel.eyraud-dubois@inria.fr>
index e765771..aba7a9d 100644 (file)
@@ -54,7 +54,7 @@ static void receiver(std::vector<std::string> args)
     void* res = mailbox->get();
     xbt_free(res);
   } else {
-    void* data[flow_amount];
+    void** data= new void*[flow_amount];
 
     // Start all comms in parallel, and wait for their completion in one shot
     std::vector<simgrid::s4u::CommPtr> comms;
@@ -64,6 +64,7 @@ static void receiver(std::vector<std::string> args)
     simgrid::s4u::Comm::wait_all(&comms);
     for (int i = 0; i < flow_amount; i++)
       xbt_free(data[i]);
+    delete[] data;
   }
   XBT_INFO("receiver done.");
 }
index 0da24ff..5483c2f 100644 (file)
@@ -27,7 +27,7 @@ static void watcher()
              link1->get_latency() * 1000, link2->get_bandwidth() / 1000, link2->get_latency() * 1000);
     simgrid::s4u::this_actor::sleep_for(1);
   }
-};
+}
 
 int main(int argc, char* argv[])
 {
index 6044c2d..f129940 100644 (file)
@@ -15,7 +15,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "a sample log category");
 const char* buffer;                                                        /* Where the data is exchanged */
 simgrid::s4u::SemaphorePtr sem_empty = simgrid::s4u::Semaphore::create(1); /* indicates whether the buffer is empty */
 simgrid::s4u::SemaphorePtr sem_full  = simgrid::s4u::Semaphore::create(0); /* indicates whether the buffer is full */
-;
+
 
 static void producer(std::vector<std::string>* args)
 {
index ad3498a..785a9f1 100644 (file)
@@ -64,6 +64,12 @@ public:
   ~ImpossibleError();
 };
 
+class XBT_PUBLIC InitializationError : public std::logic_error {
+public:
+  explicit InitializationError(const std::string& arg) : std::logic_error(arg) {}
+  ~InitializationError();
+};
+
 class XBT_PUBLIC UnimplementedError : public std::logic_error {
 public:
   explicit UnimplementedError(const std::string& arg) : std::logic_error(arg) {}
@@ -158,21 +164,13 @@ public:
   }
 };
 
-class XBT_PUBLIC ParseError : public Exception, public std::invalid_argument {
-  int line_;
-  std::string file_;
-  std::string msg_;
-  char* rendered_what = nullptr;
-
+/** Exception raised when something is going wrong during the parsing of XML files */
+class ParseError : public Exception {
 public:
-  ParseError(int line, std::string& file, std::string&& msg)
-      : Exception(XBT_THROW_POINT, std::move(msg)), std::invalid_argument(msg), line_(line), file_(file), msg_(msg)
+  ParseError(const std::string& file, int line, const std::string& msg)
+      : Exception(XBT_THROW_POINT, xbt::string_printf("Parse error at %s:%d: %s", file.c_str(), line, msg.c_str()))
   {
-    rendered_what = bprintf("Parse error at %s:%d: %s", file_.c_str(), line_, msg_.c_str());
   }
-  ~ParseError() { free(rendered_what); }
-
-  const char* what() const noexcept override { return rendered_what; }
 };
 
 class XBT_PUBLIC ForcefulKillException {
index ef9b53c..8da6d42 100644 (file)
@@ -148,6 +148,6 @@ private:
 };
 } // namespace routing
 } // namespace kernel
-}; // namespace simgrid
+} // namespace simgrid
 
 #endif /* SIMGRID_ROUTING_NETZONEIMPL_HPP */
index 5e011d9..701df11 100644 (file)
@@ -16,6 +16,7 @@
 
 #ifndef HAVE_SMPI
 #undef malloc
+#undef calloc
 #undef free
 // Internally disable these overrides (HAVE_SMPI is only defined when building the library)
 #define malloc(nbytes) _sampi_malloc(nbytes)
index 3407cc7..282452f 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <simgrid/forward.h>
 #include <smpi/forward.hpp>
+#include <smpi/smpi_helpers_internal.h>
 #include <xbt/function_types.h>
 
 #include <stddef.h>
index b17bb99..42ee369 100644 (file)
 // 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_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__); })
-#define MPI_Initialized(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Initialized(__VA_ARGS__); })
-#define MPI_Query_thread(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Query_thread(__VA_ARGS__); })
-#define MPI_Is_thread_main(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Is_thread_main(__VA_ARGS__); })
-#define MPI_Get_version(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_version(__VA_ARGS__); })
-#define MPI_Get_library_version(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_library_version(__VA_ARGS__); })
-#define MPI_Get_processor_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_processor_name(__VA_ARGS__); })
-#define MPI_Abort(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Abort(__VA_ARGS__); })
-#define MPI_Alloc_mem(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alloc_mem(__VA_ARGS__); })
-#define MPI_Free_mem(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Free_mem(__VA_ARGS__); })
-#define MPI_Wtime(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Wtime(__VA_ARGS__); })
-#define MPI_Wtick(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Wtick(__VA_ARGS__); })
-#define MPI_Buffer_attach(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Buffer_attach(__VA_ARGS__); })
-#define MPI_Buffer_detach(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Buffer_detach(__VA_ARGS__); })
-#define MPI_Address(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Address(__VA_ARGS__); })
-#define MPI_Get_address(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_address(__VA_ARGS__); })
-#define MPI_Error_class(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Error_class(__VA_ARGS__); })
-#define MPI_Error_string(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Error_string(__VA_ARGS__); })
-#define MPI_Attr_delete(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Attr_delete(__VA_ARGS__); })
-#define MPI_Attr_get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Attr_get(__VA_ARGS__); })
-#define MPI_Attr_put(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Attr_put(__VA_ARGS__); })
-#define MPI_Keyval_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Keyval_create(__VA_ARGS__); })
-#define MPI_Keyval_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Keyval_free(__VA_ARGS__); })
-#define MPI_Type_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_free(__VA_ARGS__); })
-#define MPI_Type_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_size(__VA_ARGS__); })
-#define MPI_Type_size_x(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_size_x(__VA_ARGS__); })
-#define MPI_Type_get_extent(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_extent(__VA_ARGS__); })
-#define MPI_Type_get_true_extent(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_true_extent(__VA_ARGS__); })
-#define MPI_Type_extent(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_extent(__VA_ARGS__); })
-#define MPI_Type_lb(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_lb(__VA_ARGS__); })
-#define MPI_Type_ub(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_ub(__VA_ARGS__); })
-#define MPI_Type_commit(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_commit(__VA_ARGS__); })
-#define MPI_Type_hindexed(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_hindexed(__VA_ARGS__); })
-#define MPI_Type_create_hindexed(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_hindexed(__VA_ARGS__); })
-#define MPI_Type_create_hindexed_block(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_hindexed_block(__VA_ARGS__); })
-#define MPI_Type_hvector(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_hvector(__VA_ARGS__); })
-#define MPI_Type_create_hvector(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_hvector(__VA_ARGS__); })
-#define MPI_Type_indexed(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_indexed(__VA_ARGS__); })
-#define MPI_Type_create_indexed(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_indexed(__VA_ARGS__); })
-#define MPI_Type_create_indexed_block(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_indexed_block(__VA_ARGS__); })
-#define MPI_Type_struct(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_struct(__VA_ARGS__); })
-#define MPI_Type_create_struct(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_struct(__VA_ARGS__); })
-#define MPI_Type_vector(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_vector(__VA_ARGS__); })
-#define MPI_Type_contiguous(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_contiguous(__VA_ARGS__); })
-#define MPI_Type_create_resized(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_resized(__VA_ARGS__); })
-#define MPI_Type_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_f2c(__VA_ARGS__); })
-#define MPI_Type_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_c2f(__VA_ARGS__); })
-#define MPI_Get_count(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_count(__VA_ARGS__); })
-#define MPI_Type_get_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_attr(__VA_ARGS__); })
-#define MPI_Type_set_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_set_attr(__VA_ARGS__); })
-#define MPI_Type_delete_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_delete_attr(__VA_ARGS__); })
-#define MPI_Type_create_keyval(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_keyval(__VA_ARGS__); })
-#define MPI_Type_free_keyval(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_free_keyval(__VA_ARGS__); })
-#define MPI_Type_dup(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_dup(__VA_ARGS__); })
-#define MPI_Type_set_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_set_name(__VA_ARGS__); })
-#define MPI_Type_get_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_name(__VA_ARGS__); })
-#define MPI_Pack(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack(__VA_ARGS__); })
-#define MPI_Pack_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack_size(__VA_ARGS__); })
-#define MPI_Unpack(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Unpack(__VA_ARGS__); })
-#define MPI_Op_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_create(__VA_ARGS__); })
-#define MPI_Op_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_free(__VA_ARGS__); })
-#define MPI_Op_commutative(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_commutative(__VA_ARGS__); })
-#define MPI_Op_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_f2c(__VA_ARGS__); })
-#define MPI_Op_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_c2f(__VA_ARGS__); })
-#define MPI_Group_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_free(__VA_ARGS__); })
-#define MPI_Group_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_size(__VA_ARGS__); })
-#define MPI_Group_rank(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_rank(__VA_ARGS__); })
-#define MPI_Group_translate_ranks(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_translate_ranks(__VA_ARGS__); })
-#define MPI_Group_compare(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_compare(__VA_ARGS__); })
-#define MPI_Group_union(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_union(__VA_ARGS__); })
-#define MPI_Group_intersection(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_intersection(__VA_ARGS__); })
-#define MPI_Group_difference(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_difference(__VA_ARGS__); })
-#define MPI_Group_incl(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_incl(__VA_ARGS__); })
-#define MPI_Group_excl(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_excl(__VA_ARGS__); })
-#define MPI_Group_range_incl(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_range_incl(__VA_ARGS__); })
-#define MPI_Group_range_excl(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_range_excl(__VA_ARGS__); })
-#define MPI_Group_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_f2c(__VA_ARGS__); })
-#define MPI_Group_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_c2f(__VA_ARGS__); })
-#define MPI_Comm_rank(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_rank(__VA_ARGS__); })
-#define MPI_Comm_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_size(__VA_ARGS__); })
-#define MPI_Comm_get_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_name(__VA_ARGS__); })
-#define MPI_Comm_set_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_name(__VA_ARGS__); })
-#define MPI_Comm_dup(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_dup(__VA_ARGS__); })
-#define MPI_Comm_dup_with_info(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_dup_with_info(__VA_ARGS__); })
-#define MPI_Comm_get_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_attr(__VA_ARGS__); })
-#define MPI_Comm_set_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_attr(__VA_ARGS__); })
-#define MPI_Comm_delete_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_delete_attr(__VA_ARGS__); })
-#define MPI_Comm_create_keyval(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create_keyval(__VA_ARGS__); })
-#define MPI_Comm_free_keyval(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_free_keyval(__VA_ARGS__); })
-#define MPI_Comm_group(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_group(__VA_ARGS__); })
-#define MPI_Comm_compare(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_compare(__VA_ARGS__); })
-#define MPI_Comm_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create(__VA_ARGS__); })
-#define MPI_Comm_create_group(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create_group(__VA_ARGS__); })
-#define MPI_Comm_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_free(__VA_ARGS__); })
-#define MPI_Comm_disconnect(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_disconnect(__VA_ARGS__); })
-#define MPI_Comm_split(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_split(__VA_ARGS__); })
-#define MPI_Comm_set_info(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_info(__VA_ARGS__); })
-#define MPI_Comm_get_info(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_info(__VA_ARGS__); })
-#define MPI_Comm_split_type(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_split_type(__VA_ARGS__); })
-#define MPI_Comm_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_f2c(__VA_ARGS__); })
-#define MPI_Comm_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_c2f(__VA_ARGS__); })
-#define MPI_Send_init(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Send_init(__VA_ARGS__); })
-#define MPI_Recv_init(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Recv_init(__VA_ARGS__); })
-#define MPI_Start(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Start(__VA_ARGS__); })
-#define MPI_Startall(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Startall(__VA_ARGS__); })
-#define MPI_Request_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_free(__VA_ARGS__); })
-#define MPI_Irecv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Irecv(__VA_ARGS__); })
-#define MPI_Isend(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Isend(__VA_ARGS__); })
-#define MPI_Recv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Recv(__VA_ARGS__); })
-#define MPI_Send(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Send(__VA_ARGS__); })
-#define MPI_Ssend(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ssend(__VA_ARGS__); })
-#define MPI_Ssend_init(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ssend_init(__VA_ARGS__); })
-#define MPI_Bsend(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Bsend(__VA_ARGS__); })
-#define MPI_Bsend_init(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Bsend_init(__VA_ARGS__); })
-#define MPI_Ibsend(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ibsend(__VA_ARGS__); })
-#define MPI_Issend(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Issend(__VA_ARGS__); })
-#define MPI_Sendrecv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Sendrecv(__VA_ARGS__); })
-#define MPI_Sendrecv_replace(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Sendrecv_replace(__VA_ARGS__); })
-#define MPI_Test(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Test(__VA_ARGS__); })
-#define MPI_Testany(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Testany(__VA_ARGS__); })
-#define MPI_Testall(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Testall(__VA_ARGS__); })
-#define MPI_Testsome(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Testsome(__VA_ARGS__); })
-#define MPI_Test_cancelled(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Test_cancelled(__VA_ARGS__); })
-#define MPI_Wait(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Wait(__VA_ARGS__); })
-#define MPI_Waitany(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Waitany(__VA_ARGS__); })
-#define MPI_Waitall(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Waitall(__VA_ARGS__); })
-#define MPI_Waitsome(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Waitsome(__VA_ARGS__); })
-#define MPI_Iprobe(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iprobe(__VA_ARGS__); })
-#define MPI_Probe(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Probe(__VA_ARGS__); })
-#define MPI_Request_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_f2c(__VA_ARGS__); })
-#define MPI_Request_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_c2f(__VA_ARGS__); })
-#define MPI_Bcast(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Bcast(__VA_ARGS__); })
-#define MPI_Barrier(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Barrier(__VA_ARGS__); })
-#define MPI_Ibarrier(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ibarrier(__VA_ARGS__); })
-#define MPI_Ibcast(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ibcast(__VA_ARGS__); })
-#define MPI_Igather(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Igather(__VA_ARGS__); })
-#define MPI_Igatherv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Igatherv(__VA_ARGS__); })
-#define MPI_Iallgather(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iallgather(__VA_ARGS__); })
-#define MPI_Iallgatherv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iallgatherv(__VA_ARGS__); })
-#define MPI_Iscatter(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iscatter(__VA_ARGS__); })
-#define MPI_Iscatterv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iscatterv(__VA_ARGS__); })
-#define MPI_Ireduce(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ireduce(__VA_ARGS__); })
-#define MPI_Iallreduce(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iallreduce(__VA_ARGS__); })
-#define MPI_Iscan(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iscan(__VA_ARGS__); })
-#define MPI_Iexscan(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iexscan(__VA_ARGS__); })
-#define MPI_Ireduce_scatter(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ireduce_scatter(__VA_ARGS__); })
-#define MPI_Ireduce_scatter_block(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ireduce_scatter_block(__VA_ARGS__); })
-#define MPI_Ialltoall(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ialltoall(__VA_ARGS__); })
-#define MPI_Ialltoallv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ialltoallv(__VA_ARGS__); })
-#define MPI_Ialltoallw(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ialltoallw(__VA_ARGS__); })
-#define MPI_Gather(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Gather(__VA_ARGS__); })
-#define MPI_Gatherv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Gatherv(__VA_ARGS__); })
-#define MPI_Allgather(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Allgather(__VA_ARGS__); })
-#define MPI_Allgatherv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Allgatherv(__VA_ARGS__); })
-#define MPI_Scatter(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Scatter(__VA_ARGS__); })
-#define MPI_Scatterv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Scatterv(__VA_ARGS__); })
-#define MPI_Reduce(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce(__VA_ARGS__); })
-#define MPI_Allreduce(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Allreduce(__VA_ARGS__); })
-#define MPI_Scan(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Scan(__VA_ARGS__); })
-#define MPI_Exscan(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Exscan(__VA_ARGS__); })
-#define MPI_Reduce_scatter(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce_scatter(__VA_ARGS__); })
-#define MPI_Reduce_scatter_block(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce_scatter_block(__VA_ARGS__); })
-#define MPI_Alltoall(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alltoall(__VA_ARGS__); })
-#define MPI_Alltoallv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alltoallv(__VA_ARGS__); })
-#define MPI_Alltoallw(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alltoallw(__VA_ARGS__); })
-#define MPI_Reduce_local(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce_local(__VA_ARGS__); })
-#define MPI_Info_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_create(__VA_ARGS__); })
-#define MPI_Info_set(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_set(__VA_ARGS__); })
-#define MPI_Info_get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get(__VA_ARGS__); })
-#define MPI_Info_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_free(__VA_ARGS__); })
-#define MPI_Info_delete(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_delete(__VA_ARGS__); })
-#define MPI_Info_dup(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_dup(__VA_ARGS__); })
-#define MPI_Info_get_nkeys(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get_nkeys(__VA_ARGS__); })
-#define MPI_Info_get_nthkey(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get_nthkey(__VA_ARGS__); })
-#define MPI_Info_get_valuelen(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get_valuelen(__VA_ARGS__); })
-#define MPI_Info_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_f2c(__VA_ARGS__); })
-#define MPI_Info_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_c2f(__VA_ARGS__); })
-#define MPI_Win_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_free(__VA_ARGS__); })
-#define MPI_Win_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create(__VA_ARGS__); })
-#define MPI_Win_allocate(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_allocate(__VA_ARGS__); })
-#define MPI_Win_allocate_shared(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_allocate_shared(__VA_ARGS__); })
-#define MPI_Win_create_dynamic(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create_dynamic(__VA_ARGS__); })
-#define MPI_Win_attach(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_attach(__VA_ARGS__); })
-#define MPI_Win_detach(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_detach(__VA_ARGS__); })
-#define MPI_Win_set_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_name(__VA_ARGS__); })
-#define MPI_Win_get_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_name(__VA_ARGS__); })
-#define MPI_Win_set_info(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_info(__VA_ARGS__); })
-#define MPI_Win_get_info(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_info(__VA_ARGS__); })
-#define MPI_Win_get_group(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_group(__VA_ARGS__); })
-#define MPI_Win_fence(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_fence(__VA_ARGS__); })
-#define MPI_Win_get_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_attr(__VA_ARGS__); })
-#define MPI_Win_set_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_attr(__VA_ARGS__); })
-#define MPI_Win_delete_attr(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_delete_attr(__VA_ARGS__); })
-#define MPI_Win_create_keyval(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create_keyval(__VA_ARGS__); })
-#define MPI_Win_free_keyval(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_free_keyval(__VA_ARGS__); })
-#define MPI_Win_complete(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_complete(__VA_ARGS__); })
-#define MPI_Win_post(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_post(__VA_ARGS__); })
-#define MPI_Win_start(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_start(__VA_ARGS__); })
-#define MPI_Win_wait(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_wait(__VA_ARGS__); })
-#define MPI_Win_lock(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_lock(__VA_ARGS__); })
-#define MPI_Win_lock_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_lock_all(__VA_ARGS__); })
-#define MPI_Win_unlock(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_unlock(__VA_ARGS__); })
-#define MPI_Win_unlock_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_unlock_all(__VA_ARGS__); })
-#define MPI_Win_flush(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush(__VA_ARGS__); })
-#define MPI_Win_flush_local(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush_local(__VA_ARGS__); })
-#define MPI_Win_flush_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush_all(__VA_ARGS__); })
-#define MPI_Win_flush_local_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush_local_all(__VA_ARGS__); })
-#define MPI_Win_shared_query(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_shared_query(__VA_ARGS__); })
-#define MPI_Win_sync(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_sync(__VA_ARGS__); })
-#define MPI_Win_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_f2c(__VA_ARGS__); })
-#define MPI_Win_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_c2f(__VA_ARGS__); })
-#define MPI_Get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get(__VA_ARGS__); })
-#define MPI_Put(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Put(__VA_ARGS__); })
-#define MPI_Accumulate(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Accumulate(__VA_ARGS__); })
-#define MPI_Get_accumulate(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_accumulate(__VA_ARGS__); })
-#define MPI_Rget(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rget(__VA_ARGS__); })
-#define MPI_Rput(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rput(__VA_ARGS__); })
-#define MPI_Raccumulate(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Raccumulate(__VA_ARGS__); })
-#define MPI_Rget_accumulate(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rget_accumulate(__VA_ARGS__); })
-#define MPI_Fetch_and_op(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Fetch_and_op(__VA_ARGS__); })
-#define MPI_Compare_and_swap(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Compare_and_swap(__VA_ARGS__); })
-#define MPI_Cart_coords(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_coords(__VA_ARGS__); })
-#define MPI_Cart_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_create(__VA_ARGS__); })
-#define MPI_Cart_get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_get(__VA_ARGS__); })
-#define MPI_Cart_rank(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_rank(__VA_ARGS__); })
-#define MPI_Cart_shift(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_shift(__VA_ARGS__); })
-#define MPI_Cart_sub(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_sub(__VA_ARGS__); })
-#define MPI_Cartdim_get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cartdim_get(__VA_ARGS__); })
-#define MPI_Dims_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Dims_create(__VA_ARGS__); })
-#define MPI_Request_get_status(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_get_status(__VA_ARGS__); })
-#define MPI_Grequest_start(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Grequest_start(__VA_ARGS__); })
-#define MPI_Grequest_complete(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Grequest_complete(__VA_ARGS__); })
-#define MPI_Status_set_cancelled(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Status_set_cancelled(__VA_ARGS__); })
-#define MPI_Status_set_elements(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Status_set_elements(__VA_ARGS__); })
-#define MPI_Type_create_subarray(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_subarray(__VA_ARGS__); })
-#define MPI_File_open(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_open(__VA_ARGS__); })
-#define MPI_File_close(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_close(__VA_ARGS__); })
-#define MPI_File_delete(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_delete(__VA_ARGS__); })
-#define MPI_File_get_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_size(__VA_ARGS__); })
-#define MPI_File_get_group(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_group(__VA_ARGS__); })
-#define MPI_File_get_amode(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_amode(__VA_ARGS__); })
-#define MPI_File_set_info(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_info(__VA_ARGS__); })
-#define MPI_File_get_info(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_info(__VA_ARGS__); })
-#define MPI_File_read_at(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at(__VA_ARGS__); })
-#define MPI_File_read_at_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at_all(__VA_ARGS__); })
-#define MPI_File_write_at(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at(__VA_ARGS__); })
-#define MPI_File_write_at_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at_all(__VA_ARGS__); })
-#define MPI_File_read(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read(__VA_ARGS__); })
-#define MPI_File_read_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_all(__VA_ARGS__); })
-#define MPI_File_write(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write(__VA_ARGS__); })
-#define MPI_File_write_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_all(__VA_ARGS__); })
-#define MPI_File_seek(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_seek(__VA_ARGS__); })
-#define MPI_File_get_position(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_position(__VA_ARGS__); })
-#define MPI_File_read_shared(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_shared(__VA_ARGS__); })
-#define MPI_File_write_shared(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_shared(__VA_ARGS__); })
-#define MPI_File_read_ordered(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_ordered(__VA_ARGS__); })
-#define MPI_File_write_ordered(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_ordered(__VA_ARGS__); })
-#define MPI_File_seek_shared(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_seek_shared(__VA_ARGS__); })
-#define MPI_File_get_position_shared(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_position_shared(__VA_ARGS__); })
-#define MPI_File_sync(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_sync(__VA_ARGS__); })
-#define MPI_Errhandler_set(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_set(__VA_ARGS__); })
-#define MPI_Errhandler_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_create(__VA_ARGS__); })
-#define MPI_Errhandler_free(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_free(__VA_ARGS__); })
-#define MPI_Errhandler_get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_get(__VA_ARGS__); })
-#define MPI_Comm_set_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_errhandler(__VA_ARGS__); })
-#define MPI_Comm_get_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_errhandler(__VA_ARGS__); })
-#define MPI_Comm_create_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create_errhandler(__VA_ARGS__); })
-#define MPI_Comm_call_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_call_errhandler(__VA_ARGS__); })
-#define MPI_Win_set_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_errhandler(__VA_ARGS__); })
-#define MPI_Win_get_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_errhandler(__VA_ARGS__); })
-#define MPI_Win_create_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create_errhandler(__VA_ARGS__); })
-#define MPI_Win_call_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_call_errhandler(__VA_ARGS__); })
-#define MPI_File_call_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_call_errhandler(__VA_ARGS__); })
-#define MPI_File_create_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_create_errhandler(__VA_ARGS__); })
-#define MPI_File_set_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_errhandler(__VA_ARGS__); })
-#define MPI_File_get_errhandler(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_errhandler(__VA_ARGS__); })
-#define MPI_Errhandler_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_f2c(__VA_ARGS__); })
-#define MPI_Errhandler_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_c2f(__VA_ARGS__); })
-#define MPI_Cart_map(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_map(__VA_ARGS__); })
-#define MPI_Graph_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_create(__VA_ARGS__); })
-#define MPI_Graph_get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_get(__VA_ARGS__); })
-#define MPI_Graph_map(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_map(__VA_ARGS__); })
-#define MPI_Graph_neighbors(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_neighbors(__VA_ARGS__); })
-#define MPI_Graph_neighbors_count(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_neighbors_count(__VA_ARGS__); })
-#define MPI_Graphdims_get(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graphdims_get(__VA_ARGS__); })
-#define MPI_Topo_test(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Topo_test(__VA_ARGS__); })
-#define MPI_Add_error_class(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Add_error_class(__VA_ARGS__); })
-#define MPI_Add_error_code(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Add_error_code(__VA_ARGS__); })
-#define MPI_Add_error_string(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Add_error_string(__VA_ARGS__); })
-#define MPI_Cancel(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cancel(__VA_ARGS__); })
-#define MPI_Comm_test_inter(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_test_inter(__VA_ARGS__); })
-#define MPI_Intercomm_create(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Intercomm_create(__VA_ARGS__); })
-#define MPI_Intercomm_merge(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Intercomm_merge(__VA_ARGS__); })
-#define MPI_Comm_remote_group(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_remote_group(__VA_ARGS__); })
-#define MPI_Comm_remote_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_remote_size(__VA_ARGS__); })
-#define MPI_Rsend(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rsend(__VA_ARGS__); })
-#define MPI_Rsend_init(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rsend_init(__VA_ARGS__); })
-#define MPI_Irsend(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Irsend(__VA_ARGS__); })
-#define MPI_Get_elements(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_elements(__VA_ARGS__); })
-#define MPI_Pcontrol(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pcontrol(__VA_ARGS__); })
-#define MPI_Type_get_contents(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_contents(__VA_ARGS__); })
-#define MPI_Type_create_darray(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_darray(__VA_ARGS__); })
-#define MPI_Pack_external_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack_external_size(__VA_ARGS__); })
-#define MPI_Pack_external(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack_external(__VA_ARGS__); })
-#define MPI_Unpack_external(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Unpack_external(__VA_ARGS__); })
-#define MPI_Type_match_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_match_size(__VA_ARGS__); })
-#define MPI_Comm_connect(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_connect(__VA_ARGS__); })
-#define MPI_Unpublish_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Unpublish_name(__VA_ARGS__); })
-#define MPI_Publish_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Publish_name(__VA_ARGS__); })
-#define MPI_Lookup_name(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Lookup_name(__VA_ARGS__); })
-#define MPI_Comm_join(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_join(__VA_ARGS__); })
-#define MPI_Open_port(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Open_port(__VA_ARGS__); })
-#define MPI_Close_port(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Close_port(__VA_ARGS__); })
-#define MPI_Comm_accept(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_accept(__VA_ARGS__); })
-#define MPI_Comm_spawn(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_spawn(__VA_ARGS__); })
-#define MPI_Comm_spawn_multiple(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_spawn_multiple(__VA_ARGS__); })
-#define MPI_Comm_get_parent(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_parent(__VA_ARGS__); })
-#define MPI_Win_test(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_test(__VA_ARGS__); })
-#define MPI_File_c2f(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_c2f(__VA_ARGS__); })
-#define MPI_File_f2c(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_f2c(__VA_ARGS__); })
-#define MPI_Register_datarep(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Register_datarep(__VA_ARGS__); })
-#define MPI_File_set_size(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_size(__VA_ARGS__); })
-#define MPI_File_preallocate(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_preallocate(__VA_ARGS__); })
-#define MPI_File_set_view(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_view(__VA_ARGS__); })
-#define MPI_File_get_view(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_view(__VA_ARGS__); })
-#define MPI_File_iread_at(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_at(__VA_ARGS__); })
-#define MPI_File_iwrite_at(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_at(__VA_ARGS__); })
-#define MPI_File_iread_at_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_at_all(__VA_ARGS__); })
-#define MPI_File_iwrite_at_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_at_all(__VA_ARGS__); })
-#define MPI_File_iread(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread(__VA_ARGS__); })
-#define MPI_File_iwrite(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite(__VA_ARGS__); })
-#define MPI_File_iread_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_all(__VA_ARGS__); })
-#define MPI_File_iwrite_all(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_all(__VA_ARGS__); })
-#define MPI_File_get_byte_offset(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_byte_offset(__VA_ARGS__); })
-#define MPI_File_iread_shared(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_shared(__VA_ARGS__); })
-#define MPI_File_iwrite_shared(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_shared(__VA_ARGS__); })
-#define MPI_File_read_at_all_begin(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at_all_begin(__VA_ARGS__); })
-#define MPI_File_read_at_all_end(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at_all_end(__VA_ARGS__); })
-#define MPI_File_write_at_all_begin(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at_all_begin(__VA_ARGS__); })
-#define MPI_File_write_at_all_end(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at_all_end(__VA_ARGS__); })
-#define MPI_File_read_all_begin(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_all_begin(__VA_ARGS__); })
-#define MPI_File_read_all_end(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_all_end(__VA_ARGS__); })
-#define MPI_File_write_all_begin(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_all_begin(__VA_ARGS__); })
-#define MPI_File_write_all_end(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_all_end(__VA_ARGS__); })
-#define MPI_File_read_ordered_begin(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_ordered_begin(__VA_ARGS__); })
-#define MPI_File_read_ordered_end(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_ordered_end(__VA_ARGS__); })
-#define MPI_File_write_ordered_begin(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_ordered_begin(__VA_ARGS__); })
-#define MPI_File_write_ordered_end(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_ordered_end(__VA_ARGS__); })
-#define MPI_File_get_type_extent(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_type_extent(__VA_ARGS__); })
-#define MPI_File_set_atomicity(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_atomicity(__VA_ARGS__); })
-#define MPI_File_get_atomicity(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_atomicity(__VA_ARGS__); })
-#define MPI_Mrecv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Mrecv(__VA_ARGS__); })
-#define MPI_Mprobe(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Mprobe(__VA_ARGS__); })
-#define MPI_Imrecv(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Imrecv(__VA_ARGS__); })
-#define MPI_Improbe(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Improbe(__VA_ARGS__); })
+#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__); }
+#define MPI_Initialized(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Initialized(__VA_ARGS__); }
+#define MPI_Query_thread(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Query_thread(__VA_ARGS__); }
+#define MPI_Is_thread_main(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Is_thread_main(__VA_ARGS__); }
+#define MPI_Get_version(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_version(__VA_ARGS__); }
+#define MPI_Get_library_version(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_library_version(__VA_ARGS__); }
+#define MPI_Get_processor_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_processor_name(__VA_ARGS__); }
+#define MPI_Abort(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Abort(__VA_ARGS__); }
+#define MPI_Alloc_mem(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alloc_mem(__VA_ARGS__); }
+#define MPI_Free_mem(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Free_mem(__VA_ARGS__); }
+#define MPI_Wtime(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Wtime(__VA_ARGS__); }
+#define MPI_Wtick(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Wtick(__VA_ARGS__); }
+#define MPI_Buffer_attach(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Buffer_attach(__VA_ARGS__); }
+#define MPI_Buffer_detach(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Buffer_detach(__VA_ARGS__); }
+#define MPI_Address(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Address(__VA_ARGS__); }
+#define MPI_Get_address(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_address(__VA_ARGS__); }
+#define MPI_Error_class(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Error_class(__VA_ARGS__); }
+#define MPI_Error_string(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Error_string(__VA_ARGS__); }
+#define MPI_Attr_delete(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Attr_delete(__VA_ARGS__); }
+#define MPI_Attr_get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Attr_get(__VA_ARGS__); }
+#define MPI_Attr_put(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Attr_put(__VA_ARGS__); }
+#define MPI_Keyval_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Keyval_create(__VA_ARGS__); }
+#define MPI_Keyval_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Keyval_free(__VA_ARGS__); }
+#define MPI_Type_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_free(__VA_ARGS__); }
+#define MPI_Type_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_size(__VA_ARGS__); }
+#define MPI_Type_size_x(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_size_x(__VA_ARGS__); }
+#define MPI_Type_get_extent(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_extent(__VA_ARGS__); }
+#define MPI_Type_get_true_extent(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_true_extent(__VA_ARGS__); }
+#define MPI_Type_extent(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_extent(__VA_ARGS__); }
+#define MPI_Type_lb(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_lb(__VA_ARGS__); }
+#define MPI_Type_ub(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_ub(__VA_ARGS__); }
+#define MPI_Type_commit(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_commit(__VA_ARGS__); }
+#define MPI_Type_hindexed(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_hindexed(__VA_ARGS__); }
+#define MPI_Type_create_hindexed(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_hindexed(__VA_ARGS__); }
+#define MPI_Type_create_hindexed_block(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_hindexed_block(__VA_ARGS__); }
+#define MPI_Type_hvector(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_hvector(__VA_ARGS__); }
+#define MPI_Type_create_hvector(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_hvector(__VA_ARGS__); }
+#define MPI_Type_indexed(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_indexed(__VA_ARGS__); }
+#define MPI_Type_create_indexed(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_indexed(__VA_ARGS__); }
+#define MPI_Type_create_indexed_block(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_indexed_block(__VA_ARGS__); }
+#define MPI_Type_struct(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_struct(__VA_ARGS__); }
+#define MPI_Type_create_struct(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_struct(__VA_ARGS__); }
+#define MPI_Type_vector(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_vector(__VA_ARGS__); }
+#define MPI_Type_contiguous(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_contiguous(__VA_ARGS__); }
+#define MPI_Type_create_resized(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_resized(__VA_ARGS__); }
+#define MPI_Type_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_f2c(__VA_ARGS__); }
+#define MPI_Type_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_c2f(__VA_ARGS__); }
+#define MPI_Get_count(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_count(__VA_ARGS__); }
+#define MPI_Type_get_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_attr(__VA_ARGS__); }
+#define MPI_Type_set_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_set_attr(__VA_ARGS__); }
+#define MPI_Type_delete_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_delete_attr(__VA_ARGS__); }
+#define MPI_Type_create_keyval(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_keyval(__VA_ARGS__); }
+#define MPI_Type_free_keyval(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_free_keyval(__VA_ARGS__); }
+#define MPI_Type_dup(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_dup(__VA_ARGS__); }
+#define MPI_Type_set_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_set_name(__VA_ARGS__); }
+#define MPI_Type_get_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_name(__VA_ARGS__); }
+#define MPI_Pack(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack(__VA_ARGS__); }
+#define MPI_Pack_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack_size(__VA_ARGS__); }
+#define MPI_Unpack(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Unpack(__VA_ARGS__); }
+#define MPI_Op_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_create(__VA_ARGS__); }
+#define MPI_Op_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_free(__VA_ARGS__); }
+#define MPI_Op_commutative(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_commutative(__VA_ARGS__); }
+#define MPI_Op_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_f2c(__VA_ARGS__); }
+#define MPI_Op_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Op_c2f(__VA_ARGS__); }
+#define MPI_Group_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_free(__VA_ARGS__); }
+#define MPI_Group_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_size(__VA_ARGS__); }
+#define MPI_Group_rank(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_rank(__VA_ARGS__); }
+#define MPI_Group_translate_ranks(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_translate_ranks(__VA_ARGS__); }
+#define MPI_Group_compare(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_compare(__VA_ARGS__); }
+#define MPI_Group_union(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_union(__VA_ARGS__); }
+#define MPI_Group_intersection(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_intersection(__VA_ARGS__); }
+#define MPI_Group_difference(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_difference(__VA_ARGS__); }
+#define MPI_Group_incl(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_incl(__VA_ARGS__); }
+#define MPI_Group_excl(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_excl(__VA_ARGS__); }
+#define MPI_Group_range_incl(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_range_incl(__VA_ARGS__); }
+#define MPI_Group_range_excl(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_range_excl(__VA_ARGS__); }
+#define MPI_Group_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_f2c(__VA_ARGS__); }
+#define MPI_Group_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Group_c2f(__VA_ARGS__); }
+#define MPI_Comm_rank(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_rank(__VA_ARGS__); }
+#define MPI_Comm_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_size(__VA_ARGS__); }
+#define MPI_Comm_get_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_name(__VA_ARGS__); }
+#define MPI_Comm_set_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_name(__VA_ARGS__); }
+#define MPI_Comm_dup(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_dup(__VA_ARGS__); }
+#define MPI_Comm_dup_with_info(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_dup_with_info(__VA_ARGS__); }
+#define MPI_Comm_get_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_attr(__VA_ARGS__); }
+#define MPI_Comm_set_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_attr(__VA_ARGS__); }
+#define MPI_Comm_delete_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_delete_attr(__VA_ARGS__); }
+#define MPI_Comm_create_keyval(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create_keyval(__VA_ARGS__); }
+#define MPI_Comm_free_keyval(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_free_keyval(__VA_ARGS__); }
+#define MPI_Comm_group(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_group(__VA_ARGS__); }
+#define MPI_Comm_compare(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_compare(__VA_ARGS__); }
+#define MPI_Comm_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create(__VA_ARGS__); }
+#define MPI_Comm_create_group(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create_group(__VA_ARGS__); }
+#define MPI_Comm_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_free(__VA_ARGS__); }
+#define MPI_Comm_disconnect(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_disconnect(__VA_ARGS__); }
+#define MPI_Comm_split(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_split(__VA_ARGS__); }
+#define MPI_Comm_set_info(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_info(__VA_ARGS__); }
+#define MPI_Comm_get_info(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_info(__VA_ARGS__); }
+#define MPI_Comm_split_type(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_split_type(__VA_ARGS__); }
+#define MPI_Comm_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_f2c(__VA_ARGS__); }
+#define MPI_Comm_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_c2f(__VA_ARGS__); }
+#define MPI_Send_init(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Send_init(__VA_ARGS__); }
+#define MPI_Recv_init(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Recv_init(__VA_ARGS__); }
+#define MPI_Start(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Start(__VA_ARGS__); }
+#define MPI_Startall(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Startall(__VA_ARGS__); }
+#define MPI_Request_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_free(__VA_ARGS__); }
+#define MPI_Irecv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Irecv(__VA_ARGS__); }
+#define MPI_Isend(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Isend(__VA_ARGS__); }
+#define MPI_Recv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Recv(__VA_ARGS__); }
+#define MPI_Send(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Send(__VA_ARGS__); }
+#define MPI_Ssend(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ssend(__VA_ARGS__); }
+#define MPI_Ssend_init(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ssend_init(__VA_ARGS__); }
+#define MPI_Bsend(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Bsend(__VA_ARGS__); }
+#define MPI_Bsend_init(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Bsend_init(__VA_ARGS__); }
+#define MPI_Ibsend(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ibsend(__VA_ARGS__); }
+#define MPI_Issend(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Issend(__VA_ARGS__); }
+#define MPI_Sendrecv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Sendrecv(__VA_ARGS__); }
+#define MPI_Sendrecv_replace(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Sendrecv_replace(__VA_ARGS__); }
+#define MPI_Test(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Test(__VA_ARGS__); }
+#define MPI_Testany(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Testany(__VA_ARGS__); }
+#define MPI_Testall(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Testall(__VA_ARGS__); }
+#define MPI_Testsome(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Testsome(__VA_ARGS__); }
+#define MPI_Test_cancelled(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Test_cancelled(__VA_ARGS__); }
+#define MPI_Wait(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Wait(__VA_ARGS__); }
+#define MPI_Waitany(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Waitany(__VA_ARGS__); }
+#define MPI_Waitall(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Waitall(__VA_ARGS__); }
+#define MPI_Waitsome(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Waitsome(__VA_ARGS__); }
+#define MPI_Iprobe(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iprobe(__VA_ARGS__); }
+#define MPI_Probe(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Probe(__VA_ARGS__); }
+#define MPI_Request_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_f2c(__VA_ARGS__); }
+#define MPI_Request_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_c2f(__VA_ARGS__); }
+#define MPI_Bcast(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Bcast(__VA_ARGS__); }
+#define MPI_Barrier(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Barrier(__VA_ARGS__); }
+#define MPI_Ibarrier(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ibarrier(__VA_ARGS__); }
+#define MPI_Ibcast(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ibcast(__VA_ARGS__); }
+#define MPI_Igather(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Igather(__VA_ARGS__); }
+#define MPI_Igatherv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Igatherv(__VA_ARGS__); }
+#define MPI_Iallgather(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iallgather(__VA_ARGS__); }
+#define MPI_Iallgatherv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iallgatherv(__VA_ARGS__); }
+#define MPI_Iscatter(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iscatter(__VA_ARGS__); }
+#define MPI_Iscatterv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iscatterv(__VA_ARGS__); }
+#define MPI_Ireduce(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ireduce(__VA_ARGS__); }
+#define MPI_Iallreduce(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iallreduce(__VA_ARGS__); }
+#define MPI_Iscan(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iscan(__VA_ARGS__); }
+#define MPI_Iexscan(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Iexscan(__VA_ARGS__); }
+#define MPI_Ireduce_scatter(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ireduce_scatter(__VA_ARGS__); }
+#define MPI_Ireduce_scatter_block(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ireduce_scatter_block(__VA_ARGS__); }
+#define MPI_Ialltoall(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ialltoall(__VA_ARGS__); }
+#define MPI_Ialltoallv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ialltoallv(__VA_ARGS__); }
+#define MPI_Ialltoallw(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Ialltoallw(__VA_ARGS__); }
+#define MPI_Gather(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Gather(__VA_ARGS__); }
+#define MPI_Gatherv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Gatherv(__VA_ARGS__); }
+#define MPI_Allgather(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Allgather(__VA_ARGS__); }
+#define MPI_Allgatherv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Allgatherv(__VA_ARGS__); }
+#define MPI_Scatter(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Scatter(__VA_ARGS__); }
+#define MPI_Scatterv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Scatterv(__VA_ARGS__); }
+#define MPI_Reduce(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce(__VA_ARGS__); }
+#define MPI_Allreduce(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Allreduce(__VA_ARGS__); }
+#define MPI_Scan(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Scan(__VA_ARGS__); }
+#define MPI_Exscan(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Exscan(__VA_ARGS__); }
+#define MPI_Reduce_scatter(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce_scatter(__VA_ARGS__); }
+#define MPI_Reduce_scatter_block(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce_scatter_block(__VA_ARGS__); }
+#define MPI_Alltoall(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alltoall(__VA_ARGS__); }
+#define MPI_Alltoallv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alltoallv(__VA_ARGS__); }
+#define MPI_Alltoallw(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Alltoallw(__VA_ARGS__); }
+#define MPI_Reduce_local(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Reduce_local(__VA_ARGS__); }
+#define MPI_Info_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_create(__VA_ARGS__); }
+#define MPI_Info_set(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_set(__VA_ARGS__); }
+#define MPI_Info_get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get(__VA_ARGS__); }
+#define MPI_Info_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_free(__VA_ARGS__); }
+#define MPI_Info_delete(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_delete(__VA_ARGS__); }
+#define MPI_Info_dup(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_dup(__VA_ARGS__); }
+#define MPI_Info_get_nkeys(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get_nkeys(__VA_ARGS__); }
+#define MPI_Info_get_nthkey(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get_nthkey(__VA_ARGS__); }
+#define MPI_Info_get_valuelen(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_get_valuelen(__VA_ARGS__); }
+#define MPI_Info_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_f2c(__VA_ARGS__); }
+#define MPI_Info_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Info_c2f(__VA_ARGS__); }
+#define MPI_Win_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_free(__VA_ARGS__); }
+#define MPI_Win_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create(__VA_ARGS__); }
+#define MPI_Win_allocate(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_allocate(__VA_ARGS__); }
+#define MPI_Win_allocate_shared(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_allocate_shared(__VA_ARGS__); }
+#define MPI_Win_create_dynamic(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create_dynamic(__VA_ARGS__); }
+#define MPI_Win_attach(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_attach(__VA_ARGS__); }
+#define MPI_Win_detach(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_detach(__VA_ARGS__); }
+#define MPI_Win_set_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_name(__VA_ARGS__); }
+#define MPI_Win_get_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_name(__VA_ARGS__); }
+#define MPI_Win_set_info(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_info(__VA_ARGS__); }
+#define MPI_Win_get_info(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_info(__VA_ARGS__); }
+#define MPI_Win_get_group(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_group(__VA_ARGS__); }
+#define MPI_Win_fence(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_fence(__VA_ARGS__); }
+#define MPI_Win_get_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_attr(__VA_ARGS__); }
+#define MPI_Win_set_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_attr(__VA_ARGS__); }
+#define MPI_Win_delete_attr(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_delete_attr(__VA_ARGS__); }
+#define MPI_Win_create_keyval(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create_keyval(__VA_ARGS__); }
+#define MPI_Win_free_keyval(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_free_keyval(__VA_ARGS__); }
+#define MPI_Win_complete(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_complete(__VA_ARGS__); }
+#define MPI_Win_post(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_post(__VA_ARGS__); }
+#define MPI_Win_start(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_start(__VA_ARGS__); }
+#define MPI_Win_wait(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_wait(__VA_ARGS__); }
+#define MPI_Win_lock(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_lock(__VA_ARGS__); }
+#define MPI_Win_lock_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_lock_all(__VA_ARGS__); }
+#define MPI_Win_unlock(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_unlock(__VA_ARGS__); }
+#define MPI_Win_unlock_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_unlock_all(__VA_ARGS__); }
+#define MPI_Win_flush(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush(__VA_ARGS__); }
+#define MPI_Win_flush_local(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush_local(__VA_ARGS__); }
+#define MPI_Win_flush_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush_all(__VA_ARGS__); }
+#define MPI_Win_flush_local_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_flush_local_all(__VA_ARGS__); }
+#define MPI_Win_shared_query(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_shared_query(__VA_ARGS__); }
+#define MPI_Win_sync(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_sync(__VA_ARGS__); }
+#define MPI_Win_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_f2c(__VA_ARGS__); }
+#define MPI_Win_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_c2f(__VA_ARGS__); }
+#define MPI_Get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get(__VA_ARGS__); }
+#define MPI_Put(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Put(__VA_ARGS__); }
+#define MPI_Accumulate(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Accumulate(__VA_ARGS__); }
+#define MPI_Get_accumulate(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_accumulate(__VA_ARGS__); }
+#define MPI_Rget(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rget(__VA_ARGS__); }
+#define MPI_Rput(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rput(__VA_ARGS__); }
+#define MPI_Raccumulate(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Raccumulate(__VA_ARGS__); }
+#define MPI_Rget_accumulate(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rget_accumulate(__VA_ARGS__); }
+#define MPI_Fetch_and_op(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Fetch_and_op(__VA_ARGS__); }
+#define MPI_Compare_and_swap(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Compare_and_swap(__VA_ARGS__); }
+#define MPI_Cart_coords(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_coords(__VA_ARGS__); }
+#define MPI_Cart_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_create(__VA_ARGS__); }
+#define MPI_Cart_get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_get(__VA_ARGS__); }
+#define MPI_Cart_rank(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_rank(__VA_ARGS__); }
+#define MPI_Cart_shift(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_shift(__VA_ARGS__); }
+#define MPI_Cart_sub(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_sub(__VA_ARGS__); }
+#define MPI_Cartdim_get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cartdim_get(__VA_ARGS__); }
+#define MPI_Dims_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Dims_create(__VA_ARGS__); }
+#define MPI_Request_get_status(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Request_get_status(__VA_ARGS__); }
+#define MPI_Grequest_start(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Grequest_start(__VA_ARGS__); }
+#define MPI_Grequest_complete(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Grequest_complete(__VA_ARGS__); }
+#define MPI_Status_set_cancelled(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Status_set_cancelled(__VA_ARGS__); }
+#define MPI_Status_set_elements(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Status_set_elements(__VA_ARGS__); }
+#define MPI_Type_create_subarray(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_subarray(__VA_ARGS__); }
+#define MPI_File_open(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_open(__VA_ARGS__); }
+#define MPI_File_close(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_close(__VA_ARGS__); }
+#define MPI_File_delete(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_delete(__VA_ARGS__); }
+#define MPI_File_get_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_size(__VA_ARGS__); }
+#define MPI_File_get_group(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_group(__VA_ARGS__); }
+#define MPI_File_get_amode(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_amode(__VA_ARGS__); }
+#define MPI_File_set_info(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_info(__VA_ARGS__); }
+#define MPI_File_get_info(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_info(__VA_ARGS__); }
+#define MPI_File_read_at(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at(__VA_ARGS__); }
+#define MPI_File_read_at_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at_all(__VA_ARGS__); }
+#define MPI_File_write_at(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at(__VA_ARGS__); }
+#define MPI_File_write_at_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at_all(__VA_ARGS__); }
+#define MPI_File_read(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read(__VA_ARGS__); }
+#define MPI_File_read_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_all(__VA_ARGS__); }
+#define MPI_File_write(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write(__VA_ARGS__); }
+#define MPI_File_write_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_all(__VA_ARGS__); }
+#define MPI_File_seek(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_seek(__VA_ARGS__); }
+#define MPI_File_get_position(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_position(__VA_ARGS__); }
+#define MPI_File_read_shared(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_shared(__VA_ARGS__); }
+#define MPI_File_write_shared(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_shared(__VA_ARGS__); }
+#define MPI_File_read_ordered(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_ordered(__VA_ARGS__); }
+#define MPI_File_write_ordered(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_ordered(__VA_ARGS__); }
+#define MPI_File_seek_shared(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_seek_shared(__VA_ARGS__); }
+#define MPI_File_get_position_shared(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_position_shared(__VA_ARGS__); }
+#define MPI_File_sync(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_sync(__VA_ARGS__); }
+#define MPI_Errhandler_set(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_set(__VA_ARGS__); }
+#define MPI_Errhandler_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_create(__VA_ARGS__); }
+#define MPI_Errhandler_free(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_free(__VA_ARGS__); }
+#define MPI_Errhandler_get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_get(__VA_ARGS__); }
+#define MPI_Comm_set_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_set_errhandler(__VA_ARGS__); }
+#define MPI_Comm_get_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_errhandler(__VA_ARGS__); }
+#define MPI_Comm_create_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_create_errhandler(__VA_ARGS__); }
+#define MPI_Comm_call_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_call_errhandler(__VA_ARGS__); }
+#define MPI_Win_set_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_set_errhandler(__VA_ARGS__); }
+#define MPI_Win_get_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_get_errhandler(__VA_ARGS__); }
+#define MPI_Win_create_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_create_errhandler(__VA_ARGS__); }
+#define MPI_Win_call_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_call_errhandler(__VA_ARGS__); }
+#define MPI_File_call_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_call_errhandler(__VA_ARGS__); }
+#define MPI_File_create_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_create_errhandler(__VA_ARGS__); }
+#define MPI_File_set_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_errhandler(__VA_ARGS__); }
+#define MPI_File_get_errhandler(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_errhandler(__VA_ARGS__); }
+#define MPI_Errhandler_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_f2c(__VA_ARGS__); }
+#define MPI_Errhandler_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Errhandler_c2f(__VA_ARGS__); }
+#define MPI_Cart_map(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cart_map(__VA_ARGS__); }
+#define MPI_Graph_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_create(__VA_ARGS__); }
+#define MPI_Graph_get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_get(__VA_ARGS__); }
+#define MPI_Graph_map(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_map(__VA_ARGS__); }
+#define MPI_Graph_neighbors(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_neighbors(__VA_ARGS__); }
+#define MPI_Graph_neighbors_count(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graph_neighbors_count(__VA_ARGS__); }
+#define MPI_Graphdims_get(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Graphdims_get(__VA_ARGS__); }
+#define MPI_Topo_test(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Topo_test(__VA_ARGS__); }
+#define MPI_Add_error_class(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Add_error_class(__VA_ARGS__); }
+#define MPI_Add_error_code(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Add_error_code(__VA_ARGS__); }
+#define MPI_Add_error_string(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Add_error_string(__VA_ARGS__); }
+#define MPI_Cancel(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Cancel(__VA_ARGS__); }
+#define MPI_Comm_test_inter(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_test_inter(__VA_ARGS__); }
+#define MPI_Intercomm_create(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Intercomm_create(__VA_ARGS__); }
+#define MPI_Intercomm_merge(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Intercomm_merge(__VA_ARGS__); }
+#define MPI_Comm_remote_group(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_remote_group(__VA_ARGS__); }
+#define MPI_Comm_remote_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_remote_size(__VA_ARGS__); }
+#define MPI_Rsend(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rsend(__VA_ARGS__); }
+#define MPI_Rsend_init(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Rsend_init(__VA_ARGS__); }
+#define MPI_Irsend(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Irsend(__VA_ARGS__); }
+#define MPI_Get_elements(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Get_elements(__VA_ARGS__); }
+#define MPI_Pcontrol(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pcontrol(__VA_ARGS__); }
+#define MPI_Type_get_contents(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_get_contents(__VA_ARGS__); }
+#define MPI_Type_create_darray(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_create_darray(__VA_ARGS__); }
+#define MPI_Pack_external_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack_external_size(__VA_ARGS__); }
+#define MPI_Pack_external(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Pack_external(__VA_ARGS__); }
+#define MPI_Unpack_external(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Unpack_external(__VA_ARGS__); }
+#define MPI_Type_match_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Type_match_size(__VA_ARGS__); }
+#define MPI_Comm_connect(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_connect(__VA_ARGS__); }
+#define MPI_Unpublish_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Unpublish_name(__VA_ARGS__); }
+#define MPI_Publish_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Publish_name(__VA_ARGS__); }
+#define MPI_Lookup_name(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Lookup_name(__VA_ARGS__); }
+#define MPI_Comm_join(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_join(__VA_ARGS__); }
+#define MPI_Open_port(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Open_port(__VA_ARGS__); }
+#define MPI_Close_port(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Close_port(__VA_ARGS__); }
+#define MPI_Comm_accept(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_accept(__VA_ARGS__); }
+#define MPI_Comm_spawn(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_spawn(__VA_ARGS__); }
+#define MPI_Comm_spawn_multiple(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_spawn_multiple(__VA_ARGS__); }
+#define MPI_Comm_get_parent(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Comm_get_parent(__VA_ARGS__); }
+#define MPI_Win_test(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Win_test(__VA_ARGS__); }
+#define MPI_File_c2f(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_c2f(__VA_ARGS__); }
+#define MPI_File_f2c(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_f2c(__VA_ARGS__); }
+#define MPI_Register_datarep(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Register_datarep(__VA_ARGS__); }
+#define MPI_File_set_size(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_size(__VA_ARGS__); }
+#define MPI_File_preallocate(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_preallocate(__VA_ARGS__); }
+#define MPI_File_set_view(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_view(__VA_ARGS__); }
+#define MPI_File_get_view(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_view(__VA_ARGS__); }
+#define MPI_File_iread_at(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_at(__VA_ARGS__); }
+#define MPI_File_iwrite_at(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_at(__VA_ARGS__); }
+#define MPI_File_iread_at_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_at_all(__VA_ARGS__); }
+#define MPI_File_iwrite_at_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_at_all(__VA_ARGS__); }
+#define MPI_File_iread(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread(__VA_ARGS__); }
+#define MPI_File_iwrite(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite(__VA_ARGS__); }
+#define MPI_File_iread_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_all(__VA_ARGS__); }
+#define MPI_File_iwrite_all(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_all(__VA_ARGS__); }
+#define MPI_File_get_byte_offset(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_byte_offset(__VA_ARGS__); }
+#define MPI_File_iread_shared(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iread_shared(__VA_ARGS__); }
+#define MPI_File_iwrite_shared(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_iwrite_shared(__VA_ARGS__); }
+#define MPI_File_read_at_all_begin(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at_all_begin(__VA_ARGS__); }
+#define MPI_File_read_at_all_end(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_at_all_end(__VA_ARGS__); }
+#define MPI_File_write_at_all_begin(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at_all_begin(__VA_ARGS__); }
+#define MPI_File_write_at_all_end(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_at_all_end(__VA_ARGS__); }
+#define MPI_File_read_all_begin(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_all_begin(__VA_ARGS__); }
+#define MPI_File_read_all_end(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_all_end(__VA_ARGS__); }
+#define MPI_File_write_all_begin(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_all_begin(__VA_ARGS__); }
+#define MPI_File_write_all_end(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_all_end(__VA_ARGS__); }
+#define MPI_File_read_ordered_begin(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_ordered_begin(__VA_ARGS__); }
+#define MPI_File_read_ordered_end(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_read_ordered_end(__VA_ARGS__); }
+#define MPI_File_write_ordered_begin(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_ordered_begin(__VA_ARGS__); }
+#define MPI_File_write_ordered_end(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_write_ordered_end(__VA_ARGS__); }
+#define MPI_File_get_type_extent(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_type_extent(__VA_ARGS__); }
+#define MPI_File_set_atomicity(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_set_atomicity(__VA_ARGS__); }
+#define MPI_File_get_atomicity(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_File_get_atomicity(__VA_ARGS__); }
+#define MPI_Mrecv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Mrecv(__VA_ARGS__); }
+#define MPI_Mprobe(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Mprobe(__VA_ARGS__); }
+#define MPI_Imrecv(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Imrecv(__VA_ARGS__); }
+#define MPI_Improbe(...) { smpi_trace_set_call_location(__FILE__,__LINE__); MPI_Improbe(__VA_ARGS__); }
index 55efcf8..543f702 100644 (file)
@@ -15,8 +15,8 @@
 #define sleep(x) smpi_sleep(x)
 #define usleep(x) smpi_usleep(x)
 #else
-#define sleep(x) ({ smpi_trace_set_call_location(__FILE__,__LINE__); smpi_sleep(x); })
-#define usleep(x) ({ smpi_trace_set_call_location(__FILE__,__LINE__); smpi_usleep(x); })
+#define sleep(x) { smpi_trace_set_call_location(__FILE__,__LINE__); smpi_sleep(x); }
+#define usleep(x) { smpi_trace_set_call_location(__FILE__,__LINE__); smpi_usleep(x); }
 #endif
 
 #define gettimeofday(x, y) smpi_gettimeofday((x), 0)
@@ -24,7 +24,7 @@
 #ifndef TRACE_CALL_LOCATION /* Defined by smpicc on the command line */
 #define nanosleep(x, y) smpi_nanosleep((x), (y))
 #else
-#define nanosleep(x) ({ smpi_trace_set_call_location(__FILE__,__LINE__); smpi_nanosleep(x); })
+#define nanosleep(x) { smpi_trace_set_call_location(__FILE__,__LINE__); smpi_nanosleep(x); }
 #endif
 #define clock_gettime(x, y) smpi_clock_gettime((x), (y))
 #endif
@@ -34,6 +34,7 @@
 #define getopt_long_only(x, y, z, a, b) smpi_getopt_long_only((x), (y), (z), (a), (b))
 #ifndef SAMPI_OVERRIDEN_MALLOC
 #define malloc(x) smpi_shared_malloc_intercept(x, __FILE__, __LINE__)
+#define calloc(x,y) smpi_shared_calloc_intercept(x,y, __FILE__, __LINE__)
 #define free(x) smpi_shared_free(x)
 #endif
 #endif
index 59aa0df..8a21ead 100644 (file)
@@ -35,6 +35,7 @@ int smpi_getopt_long(int argc, char* const* argv, const char* options, const str
 int smpi_getopt(int argc, char* const* argv, const char* options);
 
 void* smpi_shared_malloc_intercept(size_t size, const char* file, int line);
+void* smpi_shared_calloc_intercept(size_t num_elm, size_t elem_size, const char* file, int line);
 void smpi_shared_free(void* data);
 #ifdef __cplusplus
 } // extern "C"
index 3ca1db1..b1d8b14 100644 (file)
@@ -6,16 +6,18 @@
 #ifndef SIMGRID_XBT_RANDOM_HPP
 #define SIMGRID_XBT_RANDOM_HPP
 
-#include <random>
-
 namespace simgrid {
 namespace xbt {
 namespace random {
+
+void set_implem_xbt();
+void set_implem_std();
+void set_mersenne_seed(int);
+
 int uniform_int(int, int);
 double uniform_real(double, double);
 double exponential(double);
 double normal(double, double);
-void set_mersenne_seed(int);
 } // namespace random
 } // namespace xbt
 } // namespace simgrid
index 2cc272a..7a64f97 100644 (file)
@@ -43,7 +43,7 @@ using simgrid::s4u::Mailbox;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(python, "python");
 
-PYBIND11_DECLARE_HOLDER_TYPE(T, boost::intrusive_ptr<T>);
+PYBIND11_DECLARE_HOLDER_TYPE(T, boost::intrusive_ptr<T>)
 
 namespace {
 
index 54ebc59..bba1933 100644 (file)
@@ -24,7 +24,7 @@ PajeEvent::PajeEvent(Container* container, Type* type, double timestamp, e_event
     stream_ << eventType_ << " " << timestamp_ << " " << type_->get_id() << " " << container_->get_id();
   }
   insert_into_buffer();
-};
+}
 
 void PajeEvent::print()
 {
index 6a4bd38..81a86d7 100644 (file)
@@ -13,7 +13,7 @@ namespace simgrid {
 namespace instr {
 
 EntityValue::EntityValue(const std::string& name, const std::string& color, Type* father)
-    : id_(instr_new_paje_id()), name_(name), color_(color), father_(father){};
+    : id_(instr_new_paje_id()), name_(name), color_(color), father_(father){}
 
 void EntityValue::print()
 {
index 11e544c..971fd4c 100644 (file)
@@ -108,8 +108,8 @@ void TorusZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
    * both arrays, we can easily assess whether we need to route into this dimension or not.
    */
   const unsigned int dsize = dimensions_.size();
-  unsigned int myCoords[dsize];
-  unsigned int targetCoords[dsize];
+  unsigned int* myCoords = new unsigned int[dsize];
+  unsigned int* targetCoords= new unsigned int[dsize];
   unsigned int dim_size_product = 1;
   for (unsigned i = 0; i < dsize; i++) {
     unsigned cur_dim_size = dimensions_[i];
@@ -187,6 +187,8 @@ void TorusZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 
     current_node = next_node;
   }
+  delete[] myCoords;
+  delete[] targetCoords;
 }
 }
 }
index 818bffe..8b03725 100644 (file)
@@ -41,7 +41,7 @@ Coords::Coords(NetPoint* netpoint, const std::string& coordStr)
   netpoint->extension_set<Coords>(this);
   XBT_DEBUG("Coords of %s %p: %s", netpoint->get_cname(), netpoint, coordStr.c_str());
 }
-}; // namespace vivaldi
+} // namespace vivaldi
 
 static inline double euclidean_dist_comp(int index, std::vector<double>* src, std::vector<double>* dst)
 {
index 5ab8307..3892c2d 100644 (file)
@@ -26,7 +26,7 @@ simgrid::xbt::Extension<Disk, FileSystemDiskExt> FileSystemDiskExt::EXTENSION_ID
 simgrid::xbt::Extension<Storage, FileSystemStorageExt> FileSystemStorageExt::EXTENSION_ID;
 simgrid::xbt::Extension<Host, FileDescriptorHostExt> FileDescriptorHostExt::EXTENSION_ID;
 
-File::File(const std::string& fullpath, void* userdata) : File(fullpath, Host::current(), userdata){};
+File::File(const std::string& fullpath, void* userdata) : File(fullpath, Host::current(), userdata){}
 
 File::File(const std::string& fullpath, sg_host_t host, void* userdata) : fullpath_(fullpath)
 {
index bd348e2..175c455 100644 (file)
@@ -3,6 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "simgrid/Exception.hpp"
 #include "simgrid/plugins/energy.h"
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Exec.hpp"
@@ -584,8 +585,8 @@ void sg_host_energy_update_all()
 static void ensure_plugin_inited()
 {
   if (not HostEnergy::EXTENSION_ID.valid())
-    throw std::logic_error("The Energy plugin is not active. Please call sg_host_energy_plugin_init() before calling "
-                           "any function related to that plugin.");
+    throw simgrid::xbt::InitializationError("The Energy plugin is not active. Please call sg_host_energy_plugin_init() "
+                                            "before calling any function related to that plugin.");
 }
 
 /** @ingroup plugin_host_energy
index b2b5e10..3a81581 100644 (file)
@@ -3,6 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "simgrid/Exception.hpp"
 #include "simgrid/plugins/energy.h"
 #include "simgrid/s4u/Engine.hpp"
 #include "src/surf/network_interface.hpp"
@@ -229,7 +230,7 @@ void sg_link_energy_plugin_init()
 double sg_link_get_consumed_energy(sg_link_t link)
 {
   if (not LinkEnergy::EXTENSION_ID.valid())
-    throw std::logic_error("The Energy plugin is not active. Please call sg_link_energy_plugin_init() before calling "
-                           "sg_link_get_consumed_energy().");
+    throw simgrid::xbt::InitializationError("The Energy plugin is not active. Please call sg_link_energy_plugin_init() "
+                                            "before calling sg_link_get_consumed_energy().");
   return link->extension<LinkEnergy>()->get_consumed_energy();
 }
index fce643c..26a3cbc 100644 (file)
@@ -93,20 +93,20 @@ template <typename T> struct marshal_t {
   inline T unmarshal_raw(type<T>, u_smx_scalar const& simcall)                                                         \
   { /* Exactly same as unmarshal. It differs only for intrusive_ptr */ return simcall.field; }
 
-SIMIX_MARSHAL(bool, b);
-SIMIX_MARSHAL(char, c);
-SIMIX_MARSHAL(short, s);
-SIMIX_MARSHAL(int, i);
-SIMIX_MARSHAL(long, l);
-SIMIX_MARSHAL(unsigned char, uc);
-SIMIX_MARSHAL(unsigned short, us);
-SIMIX_MARSHAL(unsigned int, ui);
-SIMIX_MARSHAL(unsigned long, ul);
-SIMIX_MARSHAL(unsigned long long, ull);
-SIMIX_MARSHAL(long long, ll);
-SIMIX_MARSHAL(float, d);
-SIMIX_MARSHAL(double, d);
-SIMIX_MARSHAL(FPtr, fp);
+SIMIX_MARSHAL(bool, b)
+SIMIX_MARSHAL(char, c)
+SIMIX_MARSHAL(short, s)
+SIMIX_MARSHAL(int, i)
+SIMIX_MARSHAL(long, l)
+SIMIX_MARSHAL(unsigned char, uc)
+SIMIX_MARSHAL(unsigned short, us)
+SIMIX_MARSHAL(unsigned int, ui)
+SIMIX_MARSHAL(unsigned long, ul)
+SIMIX_MARSHAL(unsigned long long, ull)
+SIMIX_MARSHAL(long long, ll)
+SIMIX_MARSHAL(float, d)
+SIMIX_MARSHAL(double, d)
+SIMIX_MARSHAL(FPtr, fp)
 
 inline void unmarshal(type<void>, u_smx_scalar const& simcall)
 {
index a4ba840..0f7ff3c 100644 (file)
 namespace simgrid{
 namespace smpi{
 
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLGATHERV_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_disps, recv_type, comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLREDUCE_SIG, (sbuf, rbuf, rcount, dtype, op, comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_GATHER_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_type, root, comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLGATHER_SIG, (send_buff,send_count,send_type,recv_buff,recv_count,recv_type,comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLTOALL_SIG,(send_buff, send_count, send_type, recv_buff, recv_count, recv_type,comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLTOALLV_SIG, (send_buff, send_counts, send_disps, send_type, recv_buff, recv_counts, recv_disps, recv_type, comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_BCAST_SIG , (buf, count, datatype, root, comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_REDUCE_SIG,(buf,rbuf, count, datatype, op, root, comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_REDUCE_SCATTER_SIG ,(sbuf,rbuf, rcounts,dtype,op,comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm));
-COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_BARRIER_SIG,(comm));
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLGATHERV_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_disps, recv_type, comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLREDUCE_SIG, (sbuf, rbuf, rcount, dtype, op, comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_GATHER_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_type, root, comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLGATHER_SIG, (send_buff,send_count,send_type,recv_buff,recv_count,recv_type,comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLTOALL_SIG,(send_buff, send_count, send_type, recv_buff, recv_count, recv_type,comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLTOALLV_SIG, (send_buff, send_counts, send_disps, send_type, recv_buff, recv_counts, recv_disps, recv_type, comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_BCAST_SIG , (buf, count, datatype, root, comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_REDUCE_SIG,(buf,rbuf, count, datatype, op, root, comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_REDUCE_SCATTER_SIG ,(sbuf,rbuf, rcounts,dtype,op,comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm))
+COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_BARRIER_SIG,(comm))
 
 }
 }
index 2dce7e7..36fbd53 100644 (file)
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_coll, smpi, "Logging specific to SMPI collectives.");
 
-#define COLL_SETTER(cat, ret, args, args2)                                                                             \
-  void colls::_XBT_CONCAT(set_, cat)(const std::string& name)                                                          \
-  {                                                                                                                    \
-    int id = find_coll_description(_XBT_CONCAT3(mpi_coll_, cat, _description), name, _XBT_STRINGIFY(cat));             \
-    cat    = reinterpret_cast<ret(*) args>(_XBT_CONCAT3(mpi_coll_, cat, _description)[id].coll);                       \
-    if (cat == nullptr)                                                                                                \
-      xbt_die("Collective " _XBT_STRINGIFY(cat) " set to nullptr!");                                                   \
-  }
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid {
+namespace smpi {
 
 /* these arrays must be nullptr terminated */
-s_mpi_coll_description_t mpi_coll_gather_description[]         = {COLL_GATHERS(COLL_DESCRIPTION, COLL_COMMA),
-                                                          {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_allgather_description[]      = {COLL_ALLGATHERS(COLL_DESCRIPTION, COLL_COMMA),
-                                                             {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_allgatherv_description[]     = {COLL_ALLGATHERVS(COLL_DESCRIPTION, COLL_COMMA),
-                                                              {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_allreduce_description[]      = {COLL_ALLREDUCES(COLL_DESCRIPTION, COLL_COMMA),
-                                                             {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_reduce_scatter_description[] = {COLL_REDUCE_SCATTERS(COLL_DESCRIPTION, COLL_COMMA),
-                                                                  {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_scatter_description[]        = {COLL_SCATTERS(COLL_DESCRIPTION, COLL_COMMA),
-                                                           {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_barrier_description[]        = {COLL_BARRIERS(COLL_DESCRIPTION, COLL_COMMA),
-                                                           {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_alltoall_description[]       = {COLL_ALLTOALLS(COLL_DESCRIPTION, COLL_COMMA),
-                                                            {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_alltoallv_description[]      = {COLL_ALLTOALLVS(COLL_DESCRIPTION, COLL_COMMA),
-                                                             {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_bcast_description[]  = {COLL_BCASTS(COLL_DESCRIPTION, COLL_COMMA), {"", "", nullptr}};
-s_mpi_coll_description_t mpi_coll_reduce_description[] = {COLL_REDUCES(COLL_DESCRIPTION, COLL_COMMA),
-                                                          {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_gather_description[] = {
+    {"default","gather default collective", (void*)gather__default},
+    {"ompi","gather ompi collective", (void*)gather__ompi},
+    {"ompi_basic_linear","gather ompi_basic_linear collective", (void*)gather__ompi_basic_linear},
+    {"ompi_binomial", "gather ompi_binomial collective", (void*)gather__ompi_binomial},
+    {"ompi_linear_sync", "gather ompi_linear_sync collective", (void*)gather__ompi_linear_sync},
+    {"mpich", "gather mpich collective", (void*)gather__mpich},
+    {"mvapich2","gather mvapich2 collective", (void*)gather__mvapich2},
+    {"mvapich2_two_level", "gather mvapich2_two_level collective", (void*)gather__mvapich2_two_level},
+    {"impi","gather impi collective", (void*)gather__impi},
+    {"automatic","gather automatic collective",(void*)gather__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_allgather_description[] = {
+    {"default", "allgather default collective", (void*)allgather__default},
+    {"2dmesh", "allgather 2dmesh collective", (void*)allgather__2dmesh},
+    {"3dmesh", "allgather 3dmesh collective", (void*)allgather__3dmesh},
+    {"bruck", "allgather bruck collective", (void*)allgather__bruck},
+    {"GB", "allgather GB collective", (void*)allgather__GB},
+    {"loosely_lr", "allgather loosely_lr collective", (void*)allgather__loosely_lr},
+    {"NTSLR", "allgather NTSLR collective", (void*)allgather__NTSLR},
+    {"NTSLR_NB", "allgather NTSLR_NB collective", (void*)allgather__NTSLR_NB},
+    {"pair", "allgather pair collective", (void*)allgather__pair},
+    {"rdb", "allgather rdb collective", (void*)allgather__rdb},
+    {"rhv", "allgather rhv collective", (void*)allgather__rhv},
+    {"ring", "allgather ring collective", (void*)allgather__ring },
+    {"SMP_NTS", "allgather SMP_NTS collective", (void*)allgather__SMP_NTS},
+    {"smp_simple", "allgather smp_simple collective", (void*)allgather__smp_simple},
+    {"spreading_simple", "allgather spreading_simple collective", (void*)allgather__spreading_simple},
+    {"ompi", "allgather ompi collective", (void*)allgather__ompi},
+    {"ompi_neighborexchange", "allgather ompi_neighborexchange collective", (void*)allgather__ompi_neighborexchange},
+    {"mvapich2", "allgather mvapich2 collective", (void*)allgather__mvapich2},
+    {"mvapich2_smp", "allgather mvapich2_smp collective", (void*)allgather__mvapich2_smp},
+    {"mpich", "allgather mpich collective", (void*)allgather__mpich},
+    {"impi", "allgather impi collective", (void*)allgather__impi},
+    {"automatic", "allgather automatic collective", (void*)allgather__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_allgatherv_description[] = {
+    {"default", "allgatherv default collective", (void*)allgatherv__default},
+    {"GB", "allgatherv GB collective", (void*)allgatherv__GB},
+    {"pair", "allgatherv pair collective", (void*)allgatherv__pair},
+    {"ring", "allgatherv ring collective", (void*)allgatherv__ring},
+    {"ompi", "allgatherv ompi collective", (void*)allgatherv__ompi},
+    {"ompi_neighborexchange", "allgatherv ompi_neighborexchange collective", (void*)allgatherv__ompi_neighborexchange},
+    {"ompi_bruck", "allgatherv ompi_bruck collective", (void*)allgatherv__ompi_bruck},
+    {"mpich", "allgatherv mpich collective", (void*)allgatherv__mpich},
+    {"mpich_rdb", "allgatherv mpich_rdb collective", (void*)allgatherv__mpich_rdb},
+    {"mpich_ring", "allgatherv mpich_ring collective", (void*)allgatherv__mpich_ring},
+    {"mvapich2", "allgatherv mvapich2 collective", (void*)allgatherv__mvapich2},
+    {"impi", "allgatherv impi collective", (void*)allgatherv__impi},
+    {"automatic", "allgatherv automatic collective", (void*)allgatherv__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_allreduce_description[] = {
+    {"default", "allreduce default collective", (void*)allreduce__default},
+    {"lr", "allreduce lr collective", (void*)allreduce__lr},
+    {"rab1", "allreduce rab1 collective", (void*)allreduce__rab1},
+    {"rab2", "allreduce rab2 collective", (void*)allreduce__rab2},
+    {"rab_rdb", "allreduce rab_rdb collective", (void*)allreduce__rab_rdb},
+    {"rdb", "allreduce rdb collective", (void*)allreduce__rdb},
+    {"smp_binomial", "allreduce smp_binomial collective", (void*)allreduce__smp_binomial},
+    {"smp_binomial_pipeline", "allreduce smp_binomial_pipeline collective", (void*)allreduce__smp_binomial_pipeline},
+    {"smp_rdb", "allreduce smp_rdb collective", (void*)allreduce__smp_rdb},
+    {"smp_rsag", "allreduce smp_rsag collective", (void*)allreduce__smp_rsag},
+    {"smp_rsag_lr", "allreduce smp_rsag_lr collective", (void*)allreduce__smp_rsag_lr},
+    {"smp_rsag_rab", "allreduce smp_rsag_rab collective", (void*)allreduce__smp_rsag_rab},
+    {"redbcast", "allreduce redbcast collective", (void*)allreduce__redbcast},
+    {"ompi", "allreduce ompi collective", (void*)allreduce__ompi},
+    {"ompi_ring_segmented", "allreduce ompi_ring_segmented collective", (void*)allreduce__ompi_ring_segmented},
+    {"mpich", "allreduce mpich collective", (void*)allreduce__mpich},
+    {"mvapich2", "allreduce mvapich2 collective", (void*)allreduce__mvapich2},
+    {"mvapich2_rs", "allreduce mvapich2_rs collective", (void*)allreduce__mvapich2_rs},
+    {"mvapich2_two_level", "allreduce mvapich2_two_level collective", (void*)allreduce__mvapich2_two_level},
+    {"impi", "allreduce impi collective", (void*)allreduce__impi},
+    {"rab", "allreduce rab collective", (void*)allreduce__rab},
+    {"automatic", "allreduce automatic collective", (void*)allreduce__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_reduce_scatter_description[] = {
+    {"default", "reduce_scatter default collective", (void*)reduce_scatter__default},
+    {"ompi", "reduce_scatter ompi collective", (void*)reduce_scatter__ompi},
+    {"ompi_basic_recursivehalving", "reduce_scatter ompi_basic_recursivehalving collective", (void*)reduce_scatter__ompi_basic_recursivehalving},
+    {"ompi_ring", "reduce_scatter ompi_ring collective", (void*)reduce_scatter__ompi_ring},
+    {"mpich", "reduce_scatter mpich collective", (void*)reduce_scatter__mpich},
+    {"mpich_pair", "reduce_scatter mpich_pair collective", (void*)reduce_scatter__mpich_pair},
+    {"mpich_rdb", "reduce_scatter mpich_rdb collective", (void*)reduce_scatter__mpich_rdb},
+    {"mpich_noncomm", "reduce_scatter mpich_noncomm collective", (void*)reduce_scatter__mpich_noncomm},
+    {"mvapich2", "reduce_scatter mvapich2 collective", (void*)reduce_scatter__mvapich2},
+    {"impi", "reduce_scatter impi collective", (void*)reduce_scatter__impi},
+    {"automatic", "reduce_scatter automatic collective", (void*)reduce_scatter__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_scatter_description[] = {
+    {"default", "scatter default collective", (void*)scatter__default},
+    {"ompi", "scatter ompi collective", (void*)scatter__ompi},
+    {"ompi_basic_linear", "scatter ompi_basic_linear collective", (void*)scatter__ompi_basic_linear},
+    {"ompi_binomial", "scatter ompi_binomial collective", (void*)scatter__ompi_binomial},
+    {"mpich", "scatter mpich collective", (void*)scatter__mpich},
+    {"mvapich2", "scatter mvapich2 collective", (void*)scatter__mvapich2},
+    {"mvapich2_two_level_binomial", "scatter mvapich2_two_level_binomial collective", (void*)scatter__mvapich2_two_level_binomial},
+    {"mvapich2_two_level_direct", "scatter mvapich2_two_level_direct collective", (void*)scatter__mvapich2_two_level_direct},
+    {"impi", "scatter impi collective", (void*)scatter__impi},
+    {"automatic", "scatter automatic collective", (void*)scatter__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_barrier_description[] = {
+    {"default", "barrier default collective", (void*)barrier__default},
+    {"ompi", "barrier ompi collective", (void*)barrier__ompi},
+    {"ompi_basic_linear", "barrier ompi_basic_linear collective", (void*)barrier__ompi_basic_linear},
+    {"ompi_two_procs", "barrier ompi_two_procs collective", (void*)barrier__ompi_two_procs},
+    {"ompi_tree", "barrier ompi_tree collective", (void*)barrier__ompi_tree},
+    {"ompi_bruck", "barrier ompi_bruck collective", (void*)barrier__ompi_bruck},
+    {"ompi_recursivedoubling", "barrier ompi_recursivedoubling collective", (void*)barrier__ompi_recursivedoubling},
+    {"ompi_doublering", "barrier ompi_doublering collective", (void*)barrier__ompi_doublering},
+    {"mpich_smp", "barrier mpich_smp collective", (void*)barrier__mpich_smp},
+    {"mpich", "barrier mpich collective", (void*)barrier__mpich},
+    {"mvapich2_pair", "barrier mvapich2_pair collective", (void*)barrier__mvapich2_pair},
+    {"mvapich2", "barrier mvapich2 collective", (void*)barrier__mvapich2},
+    {"impi", "barrier impi collective", (void*)barrier__impi},
+    {"automatic", "barrier automatic collective", (void*)barrier__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_alltoall_description[] = {
+    {"default", "alltoall default collective", (void*)alltoall__default},
+    {"2dmesh", "alltoall 2dmesh collective", (void*)alltoall__2dmesh},
+    {"3dmesh", "alltoall 3dmesh collective", (void*)alltoall__3dmesh},
+    {"basic_linear", "alltoall basic_linear collective", (void*)alltoall__basic_linear},
+    {"bruck", "alltoall bruck collective", (void*)alltoall__bruck},
+    {"pair", "alltoall pair collective", (void*)alltoall__pair},
+    {"pair_rma", "alltoall pair_rma collective", (void*)alltoall__pair_rma},
+    {"pair_light_barrier", "alltoall pair_light_barrier collective", (void*)alltoall__pair_light_barrier},
+    {"pair_mpi_barrier", "alltoall pair_mpi_barrier collective", (void*)alltoall__pair_mpi_barrier},
+    {"pair_one_barrier", "alltoall pair_one_barrier collective", (void*)alltoall__pair_one_barrier},
+    {"rdb", "alltoall rdb collective", (void*)alltoall__rdb},
+    {"ring", "alltoall ring collective", (void*)alltoall__ring},
+    {"ring_light_barrier", "alltoall ring_light_barrier collective", (void*)alltoall__ring_light_barrier},
+    {"ring_mpi_barrier", "alltoall ring_mpi_barrier collective", (void*)alltoall__ring_mpi_barrier},
+    {"ring_one_barrier", "alltoall ring_one_barrier collective", (void*)alltoall__ring_one_barrier},
+    {"mvapich2", "alltoall mvapich2 collective", (void*)alltoall__mvapich2},
+    {"mvapich2_scatter_dest", "alltoall mvapich2_scatter_dest collective", (void*)alltoall__mvapich2_scatter_dest},
+    {"ompi", "alltoall ompi collective", (void*)alltoall__ompi},
+    {"mpich", "alltoall mpich collective", (void*)alltoall__mpich},
+    {"impi", "alltoall impi collective", (void*)alltoall__impi},
+    {"automatic", "alltoall automatic collective", (void*)alltoall__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_alltoallv_description[] = {
+    {"default", "alltoallv default collective", (void*)alltoallv__default},
+    {"bruck", "alltoallv bruck collective", (void*)alltoallv__bruck},
+    {"pair", "alltoallv pair collective", (void*)alltoallv__pair},
+    {"pair_light_barrier", "alltoallv pair_light_barrier collective", (void*)alltoallv__pair_light_barrier},
+    {"pair_mpi_barrier", "alltoallv pair_mpi_barrier collective", (void*)alltoallv__pair_mpi_barrier},
+    {"pair_one_barrier", "alltoallv pair_one_barrier collective", (void*)alltoallv__pair_one_barrier},
+    {"ring", "alltoallv ring collective", (void*)alltoallv__ring},
+    {"ring_light_barrier", "alltoallv ring_light_barrier collective", (void*)alltoallv__ring_light_barrier},
+    {"ring_mpi_barrier", "alltoallv ring_mpi_barrier collective", (void*)alltoallv__ring_mpi_barrier},
+    {"ring_one_barrier", "alltoallv ring_one_barrier collective", (void*)alltoallv__ring_one_barrier},
+    {"ompi", "alltoallv ompi collective", (void*)alltoallv__ompi},
+    {"mpich", "alltoallv mpich collective", (void*)alltoallv__mpich},
+    {"ompi_basic_linear", "alltoallv ompi_basic_linear collective", (void*)alltoallv__ompi_basic_linear},
+    {"mvapich2", "alltoallv mvapich2 collective", (void*)alltoallv__mvapich2},
+    {"impi", "alltoallv impi collective", (void*)alltoallv__impi},
+    {"automatic", "alltoallv automatic collective", (void*)alltoallv__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_bcast_description[] = {
+    {"default", "bcast default collective", (void*)bcast__default},
+    {"arrival_pattern_aware", "bcast arrival_pattern_aware collective", (void*)bcast__arrival_pattern_aware},
+    {"arrival_pattern_aware_wait", "bcast arrival_pattern_aware_wait collective", (void*)bcast__arrival_pattern_aware_wait},
+    {"arrival_scatter", "bcast arrival_scatter collective", (void*)bcast__arrival_scatter},
+    {"binomial_tree", "bcast binomial_tree collective", (void*)bcast__binomial_tree},
+    {"flattree", "bcast flattree collective", (void*)bcast__flattree},
+    {"flattree_pipeline", "bcast flattree_pipeline collective", (void*)bcast__flattree_pipeline},
+    {"NTSB", "bcast NTSB collective", (void*)bcast__NTSB},
+    {"NTSL", "bcast NTSL collective", (void*)bcast__NTSL},
+    {"NTSL_Isend", "bcast NTSL_Isend collective", (void*)bcast__NTSL_Isend},
+    {"scatter_LR_allgather", "bcast scatter_LR_allgather collective", (void*)bcast__scatter_LR_allgather},
+    {"scatter_rdb_allgather", "bcast scatter_rdb_allgather collective", (void*)bcast__scatter_rdb_allgather},
+    {"SMP_binary", "bcast SMP_binary collective", (void*)bcast__SMP_binary},
+    {"SMP_binomial", "bcast SMP_binomial collective", (void*)bcast__SMP_binomial},
+    {"SMP_linear", "bcast SMP_linear collective", (void*)bcast__SMP_linear},
+    {"ompi", "bcast ompi collective", (void*)bcast__ompi},
+    {"ompi_split_bintree", "bcast ompi_split_bintree collective", (void*)bcast__ompi_split_bintree},
+    {"ompi_pipeline", "bcast ompi_pipeline collective", (void*)bcast__ompi_pipeline},
+    {"mpich", "bcast mpich collective", (void*)bcast__mpich},
+    {"mvapich2", "bcast mvapich2 collective", (void*)bcast__mvapich2},
+    {"mvapich2_inter_node", "bcast mvapich2_inter_node collective", (void*)bcast__mvapich2_inter_node},
+    {"mvapich2_intra_node", "bcast mvapich2_intra_node collective", (void*)bcast__mvapich2_intra_node},
+    {"mvapich2_knomial_intra_node", "bcast mvapich2_knomial_intra_node collective", (void*)bcast__mvapich2_knomial_intra_node},
+    {"impi", "bcast impi collective", (void*)bcast__impi},
+    {"automatic", "bcast automatic collective", (void*)bcast__automatic},
+    {"", "", nullptr}};
+s_mpi_coll_description_t mpi_coll_reduce_description[] = {
+    {"default", "reduce default collective", (void*)reduce__default},
+    {"arrival_pattern_aware", "reduce arrival_pattern_aware collective", (void*)reduce__arrival_pattern_aware},
+    {"binomial", "reduce binomial collective", (void*)reduce__binomial},
+    {"flat_tree", "reduce flat_tree collective", (void*)reduce__flat_tree},
+    {"NTSL", "reduce NTSL collective", (void*)reduce__NTSL},
+    {"scatter_gather", "reduce scatter_gather collective", (void*)reduce__scatter_gather},
+    {"ompi", "reduce ompi collective", (void*)reduce__ompi},
+    {"ompi_chain", "reduce ompi_chain collective", (void*)reduce__ompi_chain},
+    {"ompi_pipeline", "reduce ompi_pipeline collective", (void*)reduce__ompi_pipeline},
+    {"ompi_basic_linear", "reduce ompi_basic_linear collective", (void*)reduce__ompi_basic_linear},
+    {"ompi_in_order_binary", "reduce ompi_in_order_binary collective", (void*)reduce__ompi_in_order_binary},
+    {"ompi_binary", "reduce ompi_binary collective", (void*)reduce__ompi_binary},
+    {"ompi_binomial", "reduce ompi_binomial collective", (void*)reduce__ompi_binomial},
+    {"mpich", "reduce mpich collective", (void*)reduce__mpich},
+    {"mvapich2", "reduce mvapich2 collective", (void*)reduce__mvapich2},
+    {"mvapich2_knomial", "reduce mvapich2_knomial collective", (void*)reduce__mvapich2_knomial},
+    {"mvapich2_two_level", "reduce mvapich2_two_level collective", (void*)reduce__mvapich2_two_level},
+    {"impi", "reduce impi collective", (void*)reduce__impi},
+    {"rab", "reduce rab collective", (void*)reduce__rab},
+    {"automatic", "reduce automatic collective", (void*)reduce__automatic},
+    {"", "", nullptr}};
 
 // Needed by the automatic selector weird implementation
 s_mpi_coll_description_t* colls::get_smpi_coll_description(const char* name, int rank)
@@ -128,27 +304,25 @@ int (*colls::barrier)(MPI_Comm comm);
 
 void (*colls::smpi_coll_cleanup_callback)();
 
-void colls::set_gather(const std::string& name)
-{
-  int id = find_coll_description(mpi_coll_gather_description, name, "gather");
-  gather = reinterpret_cast<int(*)(const void *send_buff, int send_count, MPI_Datatype send_type,
-                                    void *recv_buff, int recv_count, MPI_Datatype recv_type,
-                                        int root, MPI_Comm comm)>(mpi_coll_gather_description[id].coll);
-  if (gather == nullptr)
-    xbt_die("Collective gather set to nullptr!");
-}
-
-//COLL_APPLY(COLL_SETTER,COLL_GATHER_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_ALLGATHER_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_ALLGATHERV_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_REDUCE_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_ALLREDUCE_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_REDUCE_SCATTER_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_SCATTER_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_BARRIER_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_BCAST_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_ALLTOALL_SIG,"");
-COLL_APPLY(COLL_SETTER,COLL_ALLTOALLV_SIG,"");
+#define COLL_SETTER(cat, ret, args, args2)                                                                             \
+  void colls::_XBT_CONCAT(set_, cat)(const std::string& name)                                                          \
+  {                                                                                                                    \
+    int id = find_coll_description(_XBT_CONCAT3(mpi_coll_, cat, _description), name, _XBT_STRINGIFY(cat));             \
+    cat    = reinterpret_cast<ret(*) args>(_XBT_CONCAT3(mpi_coll_, cat, _description)[id].coll);                       \
+    if (cat == nullptr)                                                                                                \
+      xbt_die("Collective " _XBT_STRINGIFY(cat) " set to nullptr!");                                                   \
+  }
+COLL_APPLY(COLL_SETTER, COLL_GATHER_SIG, "")
+COLL_APPLY(COLL_SETTER,COLL_ALLGATHER_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_ALLGATHERV_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_REDUCE_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_ALLREDUCE_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_REDUCE_SCATTER_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_SCATTER_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_BARRIER_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_BCAST_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_ALLTOALL_SIG,"")
+COLL_APPLY(COLL_SETTER,COLL_ALLTOALLV_SIG,"")
 
 void colls::set_collectives()
 {
index 7a87309..7d21362 100644 (file)
@@ -2290,17 +2290,17 @@ intel_tuning_table_element intel_alltoallv_table[] =
                          _functions_table)[_XBT_CONCAT3(intel_, cat, _table)[i].elems[j].elems[k].algo - 1] args2);    \
   }
 
-COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLGATHERV_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_disps, recv_type, comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLREDUCE_SIG, (sbuf, rbuf, rcount, dtype, op, comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_GATHER_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_type, root, comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLGATHER_SIG, (send_buff,send_count,send_type,recv_buff,recv_count,recv_type,comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLTOALL_SIG,(send_buff, send_count, send_type, recv_buff, recv_count, recv_type,comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLTOALLV_SIG, (send_buff, send_counts, send_disps, send_type, recv_buff, recv_counts, recv_disps, recv_type, comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_BCAST_SIG , (buf, count, datatype, root, comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_REDUCE_SIG,(buf,rbuf, count, datatype, op, root, comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_REDUCE_SCATTER_SIG ,(sbuf,rbuf, rcounts,dtype,op,comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm));
-COLL_APPLY(IMPI_COLL_SELECT, COLL_BARRIER_SIG,(comm));
+COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLGATHERV_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_disps, recv_type, comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLREDUCE_SIG, (sbuf, rbuf, rcount, dtype, op, comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_GATHER_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_type, root, comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLGATHER_SIG, (send_buff,send_count,send_type,recv_buff,recv_count,recv_type,comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLTOALL_SIG,(send_buff, send_count, send_type, recv_buff, recv_count, recv_type,comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_ALLTOALLV_SIG, (send_buff, send_counts, send_disps, send_type, recv_buff, recv_counts, recv_disps, recv_type, comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_BCAST_SIG , (buf, count, datatype, root, comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_REDUCE_SIG,(buf,rbuf, count, datatype, op, root, comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_REDUCE_SCATTER_SIG ,(sbuf,rbuf, rcounts,dtype,op,comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm))
+COLL_APPLY(IMPI_COLL_SELECT, COLL_BARRIER_SIG,(comm))
 
 }
 }
index 04378c6..dd8faa7 100644 (file)
@@ -1,6 +1,5 @@
-/*High level handling of collective algorithms*/
-/* Copyright (c) 2009-2019. The SimGrid Team.
- * All rights reserved.                                                     */
+/* High level handling of collective algorithms */
+/* Copyright (c) 2009-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 /** @brief MPI collective description */
 
 #define COLL_DEFS(cat, ret, args, args2)                                                                               \
-  void _XBT_CONCAT(set_, cat)(const std::string& name);                                                                \
   extern int(*cat) args;
 
 #define COLL_SIG(cat, ret, args, args2) int cat args;
 
-#define COLL_DESCRIPTION(cat, ret, args, name)                                                                         \
-  {                                                                                                                    \
-    _XBT_STRINGIFY(name)                                                                                               \
-    , _XBT_STRINGIFY(cat) " " _XBT_STRINGIFY(name) " collective", (void*)_XBT_CONCAT3(cat, __, name)        \
-  }
-
-#define COLL_PROTO(cat, ret, args, name)                                                                               \
-  ret _XBT_CONCAT3(cat, __, name) args;
-
 #define COLL_UNPAREN(...)  __VA_ARGS__
-
 #define COLL_APPLY(action, sig, name) action(sig, name)
-#define COLL_COMMA ,
-#define COLL_NOsep
-#define COLL_NOTHING(...)
-
-#define COLL_GATHER_SIG gather, int, \
-                      (const void *send_buff, int send_count, MPI_Datatype send_type, \
-                       void *recv_buff, int recv_count, MPI_Datatype recv_type, \
-                           int root, MPI_Comm comm)
-#define COLL_ALLGATHER_SIG allgather, int, \
-                      (const void *send_buff, int send_count, MPI_Datatype send_type, \
-                       void *recv_buff, int recv_count, MPI_Datatype recv_type, \
-                           MPI_Comm comm)
-#define COLL_ALLGATHERV_SIG allgatherv, int, \
-                      (const void *send_buff, int send_count, MPI_Datatype send_type, \
-                       void *recv_buff, const int *recv_count, const int *recv_disps, \
-               MPI_Datatype recv_type, MPI_Comm comm)
-#define COLL_ALLTOALL_SIG alltoall, int, \
-                     (const void *send_buff, int send_count, MPI_Datatype send_type, \
-                      void *recv_buff, int recv_count, MPI_Datatype recv_type, \
-                          MPI_Comm comm)
-#define COLL_ALLTOALLV_SIG alltoallv, int, \
-                     (const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, \
-                      void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, \
-                          MPI_Comm comm)
-#define COLL_BCAST_SIG bcast, int, \
-                  (void *buf, int count, MPI_Datatype datatype, \
-                   int root, MPI_Comm comm)
-#define COLL_REDUCE_SIG reduce, int, \
-                   (const void *buf, void *rbuf, int count, MPI_Datatype datatype, \
-                        MPI_Op op, int root, MPI_Comm comm)
-#define COLL_ALLREDUCE_SIG allreduce, int, \
-                      (const void *sbuf, void *rbuf, int rcount, \
-                           MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
-#define COLL_REDUCE_SCATTER_SIG reduce_scatter, int, \
-                      (const void *sbuf, void *rbuf, const int *rcounts,\
-                    MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm)
-#define COLL_SCATTER_SIG scatter, int, \
-                (const void *sendbuf, int sendcount, MPI_Datatype sendtype,\
-                void *recvbuf, int recvcount, MPI_Datatype recvtype,\
-                int root, MPI_Comm comm)
-#define COLL_BARRIER_SIG barrier, int, \
-                (MPI_Comm comm)
 
-namespace simgrid{
-namespace smpi{
+#define COLL_GATHER_SIG gather, int,                                                                                   \
+    (const void *send_buff, int send_count, MPI_Datatype send_type,                                                    \
+           void *recv_buff, int recv_count, MPI_Datatype recv_type,  int root, MPI_Comm comm)
+#define COLL_ALLGATHER_SIG allgather, int,                                                                             \
+    (const void *send_buff, int send_count, MPI_Datatype send_type,                                                    \
+            void *recv_buff, int recv_count, MPI_Datatype recv_type,  MPI_Comm comm)
+#define COLL_ALLGATHERV_SIG allgatherv, int,                                                                           \
+    (const void *send_buff, int send_count, MPI_Datatype send_type,                                                    \
+           void *recv_buff, const int *recv_count, const int *recv_disps,  MPI_Datatype recv_type, MPI_Comm comm)
+#define COLL_ALLTOALL_SIG alltoall, int,                                                                               \
+    (const void *send_buff, int send_count, MPI_Datatype send_type,                                                    \
+           void *recv_buff, int recv_count, MPI_Datatype recv_type,  MPI_Comm comm)
+#define COLL_ALLTOALLV_SIG alltoallv, int,                                                                             \
+    (const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type,                     \
+           void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm)
+#define COLL_BCAST_SIG bcast, int,                                                                                     \
+    (void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
+#define COLL_REDUCE_SIG reduce, int,                                                                                   \
+    (const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
+#define COLL_ALLREDUCE_SIG allreduce, int,                                                                             \
+    (const void *sbuf, void *rbuf, int rcount,  MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
+#define COLL_REDUCE_SCATTER_SIG reduce_scatter, int,                                                                   \
+    (const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm)
+#define COLL_SCATTER_SIG scatter, int,                                                                                 \
+    (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
+#define COLL_BARRIER_SIG barrier, int,                                                                                 \
+    (MPI_Comm comm)
+
+namespace simgrid {
+namespace smpi {
 
 struct s_mpi_coll_description_t {
   std::string name;
@@ -89,8 +63,19 @@ XBT_PUBLIC int find_coll_description(s_mpi_coll_description_t* table, const std:
 void set_collectives();
 XBT_PUBLIC s_mpi_coll_description_t* get_smpi_coll_description(const char* name, int rank);
 
+void set_gather(const std::string& name);
+void set_allgather(const std::string& name);
+void set_allgatherv(const std::string& name);
+void set_reduce(const std::string& name);
+void set_allreduce(const std::string& name);
+void set_reduce_scatter(const std::string& name);
+void set_scatter(const std::string& name);
+void set_barrier(const std::string& name);
+void set_bcast(const std::string& name);
+void set_alltoall(const std::string& name);
+void set_alltoallv(const std::string& name);
+
 // for each collective type, create the set_* prototype, the description array and the function pointer
-//  void set_gather(const std::string& name);
 //  extern int(*gather)(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count,
 //                      MPI_Datatype recv_type, int root, MPI_Comm comm);
 COLL_APPLY(COLL_DEFS, COLL_GATHER_SIG, "")
@@ -153,11 +138,11 @@ int ialltoallw(const void* sendbuf, const int* sendcounts, const int* senddisps,
                MPI_Request* request, int external = 1);
 
 extern void (*smpi_coll_cleanup_callback)();
-};
+}
 
-/*************
- * GATHER *
- *************/
+/***********************************************
+ * Prototypes of each and every implementation *
+ ***********************************************/
 
 int gather__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
 int gather__ompi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
@@ -170,21 +155,6 @@ int gather__mvapich2_two_level(const void *send_buff, int send_count, MPI_Dataty
 int gather__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
 int gather__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
 
-#define COLL_GATHERS(action, COLL_sep) \
-COLL_APPLY(action, COLL_GATHER_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, ompi_basic_linear) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, ompi_binomial) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, ompi_linear_sync) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, mvapich2_two_level) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_GATHER_SIG, automatic)
-
-/*************
- * ALLGATHER *
- *************/
 int allgather__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 int allgather__2dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 int allgather__3dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
@@ -208,49 +178,6 @@ int allgather__mpich(const void *send_buff, int send_count, MPI_Datatype send_ty
 int allgather__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 int allgather__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 
-#define COLL_ALLGATHERS(action, COLL_sep) \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, 2dmesh) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, 3dmesh) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, bruck) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, GB) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, loosely_lr) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, NTSLR) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, NTSLR_NB) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, pair) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, rdb) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, rhv) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, ring) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, SMP_NTS) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, smp_simple) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, spreading_simple) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, ompi_neighborexchange) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, mvapich2_smp) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHER_SIG, automatic)
-
-/**************
- * ALLGATHERV *
- **************/
-
-#define COLL_ALLGATHERVS(action, COLL_sep) \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, GB) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, pair) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, ring) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi_neighborexchange) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi_bruck) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich_rdb) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich_ring) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_ALLGATHERV_SIG, automatic)
-
 int allgatherv__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 int allgatherv__GB(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 int allgatherv__pair(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
@@ -265,34 +192,6 @@ int allgatherv__mvapich2(const void *send_buff, int send_count, MPI_Datatype sen
 int allgatherv__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 int allgatherv__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 
-/*************
- * ALLREDUCE *
- *************/
-
-#define COLL_ALLREDUCES(action, COLL_sep) \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, lr) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab1) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab2) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab_rdb) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, rdb) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_binomial) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_binomial_pipeline) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rdb) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag_lr) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag_rab) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, redbcast) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, ompi_ring_segmented) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2_rs) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2_two_level) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab) COLL_sep \
-COLL_APPLY(action, COLL_ALLREDUCE_SIG, automatic)
-
 int allreduce__default(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
 int allreduce__lr(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
 int allreduce__rab1(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
@@ -316,33 +215,6 @@ int allreduce__impi(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype
 int allreduce__rab(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
 int allreduce__automatic(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
 
-/************
- * ALLTOALL *
- ************/
-
-#define COLL_ALLTOALLS(action, COLL_sep) \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, 2dmesh) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, 3dmesh) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, basic_linear) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, bruck) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, pair) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_rma) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_light_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_mpi_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_one_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, rdb) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, ring) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_light_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_mpi_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_one_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, mvapich2_scatter_dest) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, automatic)
-
 int alltoall__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 int alltoall__2dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 int alltoall__3dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
@@ -365,28 +237,6 @@ int alltoall__mpich(const void *send_buff, int send_count, MPI_Datatype send_typ
 int alltoall__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 int alltoall__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
 
-/*************
- * ALLTOALLV *
- *************/
-
-#define COLL_ALLTOALLVS(action, COLL_sep) \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, bruck) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_light_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_mpi_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_one_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_light_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_mpi_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_one_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, ompi_basic_linear) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALLV_SIG, automatic)
-
 int alltoallv__default(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 int alltoallv__bruck(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 int alltoallv__pair(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
@@ -404,37 +254,6 @@ int alltoallv__mvapich2(const void *send_buff, const int *send_counts, const int
 int alltoallv__impi(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 int alltoallv__automatic(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
 
-/*********
- * BCAST *
- *********/
-
-#define COLL_BCASTS(action, COLL_sep) \
-COLL_APPLY(action, COLL_BCAST_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware_wait) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, arrival_scatter) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, binomial_tree) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, flattree) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, flattree_pipeline) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, NTSB) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, NTSL) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, NTSL_Isend) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, scatter_LR_allgather) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, scatter_rdb_allgather) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, SMP_binary) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, SMP_binomial) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, SMP_linear) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, ompi_split_bintree) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, ompi_pipeline) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, mvapich2)   COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_inter_node)   COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_intra_node)   COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_knomial_intra_node)   COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, impi)   COLL_sep \
-COLL_APPLY(action, COLL_BCAST_SIG, automatic)
-
 int bcast__default(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
 int bcast__arrival_pattern_aware(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
 int bcast__arrival_pattern_aware_wait(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
@@ -461,32 +280,6 @@ int bcast__mvapich2_knomial_intra_node(void *buf, int count, MPI_Datatype dataty
 int bcast__impi(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
 int bcast__automatic(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
 
-/**********
- * REDUCE *
- **********/
-
-#define COLL_REDUCES(action, COLL_sep) \
-COLL_APPLY(action, COLL_REDUCE_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, arrival_pattern_aware) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, binomial) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, flat_tree) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, NTSL) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, scatter_gather) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, ompi_chain) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, ompi_pipeline) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, ompi_basic_linear) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, ompi_in_order_binary) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, ompi_binary) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, ompi_binomial) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2_knomial) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2_two_level) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, rab) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SIG, automatic)
-
 int reduce__default(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
 int reduce__arrival_pattern_aware(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
 int reduce__binomial(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
@@ -508,23 +301,6 @@ int reduce__impi(const void *buf, void *rbuf, int count, MPI_Datatype datatype,
 int reduce__rab(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
 int reduce__automatic(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
 
-/*************
- * REDUCE_SCATTER *
- *************/
-
-#define COLL_REDUCE_SCATTERS(action, COLL_sep) \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi_basic_recursivehalving) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi_ring)  COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_pair) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_rdb) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_noncomm) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mvapich2) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, impi) COLL_sep \
-COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, automatic)
-
 int reduce_scatter__default(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
 int reduce_scatter__ompi(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
 int reduce_scatter__ompi_basic_recursivehalving(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
@@ -537,22 +313,6 @@ int reduce_scatter__mvapich2(const void *sbuf, void *rbuf, const int *rcounts, M
 int reduce_scatter__impi(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
 int reduce_scatter__automatic(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
 
-/*************
- * SCATTER *
- *************/
-
-#define COLL_SCATTERS(action, COLL_sep) \
-COLL_APPLY(action, COLL_SCATTER_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, ompi_basic_linear) COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, ompi_binomial)  COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, mpich)   COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2)   COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2_two_level_binomial)   COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2_two_level_direct)   COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, impi)   COLL_sep \
-COLL_APPLY(action, COLL_SCATTER_SIG, automatic)
-
 int scatter__default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
 int scatter__ompi(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
 int scatter__ompi_basic_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
@@ -564,26 +324,6 @@ int scatter__mvapich2_two_level_direct(const void *sendbuf, int sendcount, MPI_D
 int scatter__impi (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
 int scatter__automatic (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
 
-/*************
- * BARRIER *
- *************/
-
-#define COLL_BARRIERS(action, COLL_sep) \
-COLL_APPLY(action, COLL_BARRIER_SIG, default) COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, ompi) COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, ompi_basic_linear) COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, ompi_two_procs)  COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, ompi_tree)  COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, ompi_bruck)  COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, ompi_recursivedoubling) COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, ompi_doublering) COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, mpich_smp)   COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, mpich)   COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2_pair)   COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2)   COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, impi)   COLL_sep \
-COLL_APPLY(action, COLL_BARRIER_SIG, automatic)
-
 int barrier__default(MPI_Comm comm);
 int barrier__ompi(MPI_Comm comm);
 int barrier__ompi_basic_linear(MPI_Comm comm);
index f0f6dd2..b0c8bd9 100644 (file)
@@ -563,8 +563,7 @@ void WaitAllAction::kernel(simgrid::xbt::ReplayAction&)
         sender_receiver.push_back({req->src(), req->dst()});
       }
     }
-    MPI_Status status[count_requests];
-    Request::waitall(count_requests, &(reqs.data())[0], status);
+    Request::waitall(count_requests, &(reqs.data())[0], MPI_STATUSES_IGNORE);
     req_storage.get_store().clear();
 
     for (auto& pair : sender_receiver) {
@@ -807,15 +806,15 @@ void smpi_replay_main(int rank, const char* trace_filename)
   unsigned int count_requests = storage[simgrid::s4u::this_actor::get_pid()].size();
   XBT_DEBUG("There are %ud elements in reqq[*]", count_requests);
   if (count_requests > 0) {
-    MPI_Request requests[count_requests];
-    MPI_Status status[count_requests];
+    MPI_Request* requests= new MPI_Request[count_requests];
     unsigned int i=0;
 
     for (auto const& pair : storage[simgrid::s4u::this_actor::get_pid()].get_store()) {
       requests[i] = pair.second;
       i++;
     }
-    simgrid::smpi::Request::waitall(count_requests, requests, status);
+    simgrid::smpi::Request::waitall(count_requests, requests, MPI_STATUSES_IGNORE);
+    delete[] requests;
   }
   active_processes--;
 
index 2fb5a57..9f9d03b 100644 (file)
@@ -350,6 +350,13 @@ void *smpi_shared_malloc_intercept(size_t size, const char *file, int line) {
     return smpi_shared_malloc(size, file, line);
 }
 
+void* smpi_shared_calloc_intercept(size_t num_elm, size_t elem_size, const char* file, int line){
+  if( simgrid::config::get_value<double>("smpi/auto-shared-malloc-thresh") == 0 || elem_size*num_elm < simgrid::config::get_value<double>("smpi/auto-shared-malloc-thresh"))
+    return ::operator new(elem_size*num_elm);
+  else
+    return smpi_shared_malloc(elem_size*num_elm, file, line);
+}
+
 void *smpi_shared_malloc(size_t size, const char *file, int line) {
   if (size > 0 && smpi_cfg_shared_malloc == SharedMallocType::LOCAL) {
     return smpi_shared_malloc_local(size, file, line);
@@ -435,10 +442,7 @@ void smpi_shared_free(void *ptr)
     snprintf(loc, PTR_STRLEN, "%p", ptr);
     auto meta = allocs_metadata.find(ptr);
     if (meta == allocs_metadata.end()) {
-      if (simgrid::config::get_value<double>("smpi/auto_shared_malloc_thresh") > 0)//this free belongs to a malloc under the threshold.
-        ::operator delete(ptr);
-      else
-        XBT_WARN("Cannot free: %p was not shared-allocated by SMPI - maybe its size was 0?", ptr);
+      ::operator delete(ptr);
       return;
     }
     shared_data_t* data = &meta->second.data->second;
@@ -459,11 +463,17 @@ void smpi_shared_free(void *ptr)
     auto meta = allocs_metadata.find(ptr);
     if (meta != allocs_metadata.end()){
       meta->second.data->second.count--;
-      if(meta->second.data->second.count==0)
+      XBT_DEBUG("Shared free - Global - of %p", ptr);
+      munmap(ptr, meta->second.size);
+      if(meta->second.data->second.count==0){
         delete meta->second.data;
+        allocs_metadata.erase(ptr);
+      }
+    }else{
+      ::operator delete(ptr);
+      return;
     }
-    XBT_DEBUG("Shared free - Global - of %p", ptr);
-    munmap(ptr, meta->second.size);
+
   } else {
     XBT_DEBUG("Classic deallocation of %p", ptr);
     ::operator delete(ptr);
index d4257b1..53ce75e 100644 (file)
@@ -34,68 +34,68 @@ static std::unordered_map<std::string, simgrid::smpi::Datatype*> id2type_lookup;
   const MPI_Datatype name = &_XBT_CONCAT(mpi_, name);
 
 // Predefined data types
-CREATE_MPI_DATATYPE(MPI_CHAR, 2, char);
-CREATE_MPI_DATATYPE(MPI_SHORT, 3, short);
-CREATE_MPI_DATATYPE(MPI_INT, 1, int);
-CREATE_MPI_DATATYPE(MPI_LONG, 4, long);
-CREATE_MPI_DATATYPE(MPI_LONG_LONG, 7, long long);
-CREATE_MPI_DATATYPE(MPI_SIGNED_CHAR, 8, signed char);
-CREATE_MPI_DATATYPE(MPI_UNSIGNED_CHAR, 9, unsigned char);
-CREATE_MPI_DATATYPE(MPI_UNSIGNED_SHORT, 10, unsigned short);
-CREATE_MPI_DATATYPE(MPI_UNSIGNED, 11, unsigned int);
-CREATE_MPI_DATATYPE(MPI_UNSIGNED_LONG, 12, unsigned long);
-CREATE_MPI_DATATYPE(MPI_UNSIGNED_LONG_LONG, 13, unsigned long long);
-CREATE_MPI_DATATYPE(MPI_FLOAT, 5, float);
-CREATE_MPI_DATATYPE(MPI_DOUBLE, 0, double);
-CREATE_MPI_DATATYPE(MPI_LONG_DOUBLE, 14, long double);
-CREATE_MPI_DATATYPE(MPI_WCHAR, 15, wchar_t);
-CREATE_MPI_DATATYPE(MPI_C_BOOL, 16, bool);
-CREATE_MPI_DATATYPE(MPI_BYTE, 6, int8_t);
-CREATE_MPI_DATATYPE(MPI_INT8_T, 17, int8_t);
-CREATE_MPI_DATATYPE(MPI_INT16_T, 18, int16_t);
-CREATE_MPI_DATATYPE(MPI_INT32_T, 19, int32_t);
-CREATE_MPI_DATATYPE(MPI_INT64_T, 20, int64_t);
-CREATE_MPI_DATATYPE(MPI_UINT8_T, 21, uint8_t);
-CREATE_MPI_DATATYPE(MPI_UINT16_T, 22, uint16_t);
-CREATE_MPI_DATATYPE(MPI_UINT32_T, 23, uint32_t);
-CREATE_MPI_DATATYPE(MPI_UINT64_T, 24, uint64_t);
-CREATE_MPI_DATATYPE(MPI_C_FLOAT_COMPLEX, 25, float _Complex);
-CREATE_MPI_DATATYPE(MPI_C_DOUBLE_COMPLEX, 26, double _Complex);
-CREATE_MPI_DATATYPE(MPI_C_LONG_DOUBLE_COMPLEX, 27, long double _Complex);
-CREATE_MPI_DATATYPE(MPI_AINT, 28, MPI_Aint);
-CREATE_MPI_DATATYPE(MPI_OFFSET, 29, MPI_Offset);
-
-CREATE_MPI_DATATYPE(MPI_FLOAT_INT, 30, float_int);
-CREATE_MPI_DATATYPE(MPI_LONG_INT, 31, long_int);
-CREATE_MPI_DATATYPE(MPI_DOUBLE_INT, 32, double_int);
-CREATE_MPI_DATATYPE(MPI_SHORT_INT, 33, short_int);
-CREATE_MPI_DATATYPE(MPI_2INT, 34, int_int);
-CREATE_MPI_DATATYPE(MPI_2FLOAT, 35, float_float);
-CREATE_MPI_DATATYPE(MPI_2DOUBLE, 36, double_double);
-CREATE_MPI_DATATYPE(MPI_2LONG, 37, long_long);
-
-CREATE_MPI_DATATYPE(MPI_REAL, 38, float);
-CREATE_MPI_DATATYPE(MPI_REAL4, 39, float);
-CREATE_MPI_DATATYPE(MPI_REAL8, 40, double);
-CREATE_MPI_DATATYPE(MPI_REAL16, 41, long double);
-CREATE_MPI_DATATYPE_NULL(MPI_DATATYPE_NULL, -1);
-CREATE_MPI_DATATYPE(MPI_COMPLEX8, 42, float_float);
-CREATE_MPI_DATATYPE(MPI_COMPLEX16, 43, double_double);
-CREATE_MPI_DATATYPE(MPI_COMPLEX32, 44, double_double);
-CREATE_MPI_DATATYPE(MPI_INTEGER1, 45, int);
-CREATE_MPI_DATATYPE(MPI_INTEGER2, 46, int16_t);
-CREATE_MPI_DATATYPE(MPI_INTEGER4, 47, int32_t);
-CREATE_MPI_DATATYPE(MPI_INTEGER8, 48, int64_t);
-CREATE_MPI_DATATYPE(MPI_INTEGER16, 49, integer128_t);
-
-CREATE_MPI_DATATYPE(MPI_LONG_DOUBLE_INT, 50, long_double_int);
-
-CREATE_MPI_DATATYPE_NULL(MPI_UB, 51);
-CREATE_MPI_DATATYPE_NULL(MPI_LB, 52);
-CREATE_MPI_DATATYPE(MPI_PACKED, 53, char);
+CREATE_MPI_DATATYPE(MPI_CHAR, 2, char)
+CREATE_MPI_DATATYPE(MPI_SHORT, 3, short)
+CREATE_MPI_DATATYPE(MPI_INT, 1, int)
+CREATE_MPI_DATATYPE(MPI_LONG, 4, long)
+CREATE_MPI_DATATYPE(MPI_LONG_LONG, 7, long long)
+CREATE_MPI_DATATYPE(MPI_SIGNED_CHAR, 8, signed char)
+CREATE_MPI_DATATYPE(MPI_UNSIGNED_CHAR, 9, unsigned char)
+CREATE_MPI_DATATYPE(MPI_UNSIGNED_SHORT, 10, unsigned short)
+CREATE_MPI_DATATYPE(MPI_UNSIGNED, 11, unsigned int)
+CREATE_MPI_DATATYPE(MPI_UNSIGNED_LONG, 12, unsigned long)
+CREATE_MPI_DATATYPE(MPI_UNSIGNED_LONG_LONG, 13, unsigned long long)
+CREATE_MPI_DATATYPE(MPI_FLOAT, 5, float)
+CREATE_MPI_DATATYPE(MPI_DOUBLE, 0, double)
+CREATE_MPI_DATATYPE(MPI_LONG_DOUBLE, 14, long double)
+CREATE_MPI_DATATYPE(MPI_WCHAR, 15, wchar_t)
+CREATE_MPI_DATATYPE(MPI_C_BOOL, 16, bool)
+CREATE_MPI_DATATYPE(MPI_BYTE, 6, int8_t)
+CREATE_MPI_DATATYPE(MPI_INT8_T, 17, int8_t)
+CREATE_MPI_DATATYPE(MPI_INT16_T, 18, int16_t)
+CREATE_MPI_DATATYPE(MPI_INT32_T, 19, int32_t)
+CREATE_MPI_DATATYPE(MPI_INT64_T, 20, int64_t)
+CREATE_MPI_DATATYPE(MPI_UINT8_T, 21, uint8_t)
+CREATE_MPI_DATATYPE(MPI_UINT16_T, 22, uint16_t)
+CREATE_MPI_DATATYPE(MPI_UINT32_T, 23, uint32_t)
+CREATE_MPI_DATATYPE(MPI_UINT64_T, 24, uint64_t)
+CREATE_MPI_DATATYPE(MPI_C_FLOAT_COMPLEX, 25, float _Complex)
+CREATE_MPI_DATATYPE(MPI_C_DOUBLE_COMPLEX, 26, double _Complex)
+CREATE_MPI_DATATYPE(MPI_C_LONG_DOUBLE_COMPLEX, 27, long double _Complex)
+CREATE_MPI_DATATYPE(MPI_AINT, 28, MPI_Aint)
+CREATE_MPI_DATATYPE(MPI_OFFSET, 29, MPI_Offset)
+
+CREATE_MPI_DATATYPE(MPI_FLOAT_INT, 30, float_int)
+CREATE_MPI_DATATYPE(MPI_LONG_INT, 31, long_int)
+CREATE_MPI_DATATYPE(MPI_DOUBLE_INT, 32, double_int)
+CREATE_MPI_DATATYPE(MPI_SHORT_INT, 33, short_int)
+CREATE_MPI_DATATYPE(MPI_2INT, 34, int_int)
+CREATE_MPI_DATATYPE(MPI_2FLOAT, 35, float_float)
+CREATE_MPI_DATATYPE(MPI_2DOUBLE, 36, double_double)
+CREATE_MPI_DATATYPE(MPI_2LONG, 37, long_long)
+
+CREATE_MPI_DATATYPE(MPI_REAL, 38, float)
+CREATE_MPI_DATATYPE(MPI_REAL4, 39, float)
+CREATE_MPI_DATATYPE(MPI_REAL8, 40, double)
+CREATE_MPI_DATATYPE(MPI_REAL16, 41, long double)
+CREATE_MPI_DATATYPE_NULL(MPI_DATATYPE_NULL, -1)
+CREATE_MPI_DATATYPE(MPI_COMPLEX8, 42, float_float)
+CREATE_MPI_DATATYPE(MPI_COMPLEX16, 43, double_double)
+CREATE_MPI_DATATYPE(MPI_COMPLEX32, 44, double_double)
+CREATE_MPI_DATATYPE(MPI_INTEGER1, 45, int)
+CREATE_MPI_DATATYPE(MPI_INTEGER2, 46, int16_t)
+CREATE_MPI_DATATYPE(MPI_INTEGER4, 47, int32_t)
+CREATE_MPI_DATATYPE(MPI_INTEGER8, 48, int64_t)
+CREATE_MPI_DATATYPE(MPI_INTEGER16, 49, integer128_t)
+
+CREATE_MPI_DATATYPE(MPI_LONG_DOUBLE_INT, 50, long_double_int)
+
+CREATE_MPI_DATATYPE_NULL(MPI_UB, 51)
+CREATE_MPI_DATATYPE_NULL(MPI_LB, 52)
+CREATE_MPI_DATATYPE(MPI_PACKED, 53, char)
 // Internal use only
-CREATE_MPI_DATATYPE(MPI_PTR, 54, void*);
-CREATE_MPI_DATATYPE(MPI_COUNT, 55, long long);
+CREATE_MPI_DATATYPE(MPI_PTR, 54, void*)
+CREATE_MPI_DATATYPE(MPI_COUNT, 55, long long)
 
 
 namespace simgrid{
index 5fd2657..0c0cab3 100644 (file)
@@ -32,11 +32,11 @@ void F2C::set_f2c_lookup(std::unordered_map<std::string, F2C*>* map)
 
 void F2C::f2c_id_increment(){
   f2c_id_++;
-};
+}
 
 int F2C::f2c_id(){
   return f2c_id_;
-};
+}
 
 char* F2C::get_my_key(char* key) {
   std::snprintf(key, KEY_SIZE, "%d", my_f2c_id_);
index d22bbf2..33badb3 100644 (file)
@@ -12,7 +12,7 @@ namespace smpi{
 
 std::unordered_map<int, void*>* Keyval::attributes(){
   return &attributes_;
-};
+}
 
 template <> int Keyval::call_deleter<Comm>(Comm* obj, smpi_key_elem elem, int keyval, void* value, int* /*flag*/)
 {
index 4a18f6e..24c9eb6 100644 (file)
@@ -220,20 +220,20 @@ static void no_func(void*, void*, int*, MPI_Datatype*)
   static SMPI_Op _XBT_CONCAT(mpi_, name)(&(func) /* func */, true, true);                                              \
   MPI_Op name = &_XBT_CONCAT(mpi_, name);
 
-CREATE_MPI_OP(MPI_MAX, max_func);
-CREATE_MPI_OP(MPI_MIN, min_func);
-CREATE_MPI_OP(MPI_SUM, sum_func);
-CREATE_MPI_OP(MPI_PROD, prod_func);
-CREATE_MPI_OP(MPI_LAND, land_func);
-CREATE_MPI_OP(MPI_LOR, lor_func);
-CREATE_MPI_OP(MPI_LXOR, lxor_func);
-CREATE_MPI_OP(MPI_BAND, band_func);
-CREATE_MPI_OP(MPI_BOR, bor_func);
-CREATE_MPI_OP(MPI_BXOR, bxor_func);
-CREATE_MPI_OP(MPI_MAXLOC, maxloc_func);
-CREATE_MPI_OP(MPI_MINLOC, minloc_func);
-CREATE_MPI_OP(MPI_REPLACE, replace_func);
-CREATE_MPI_OP(MPI_NO_OP, no_func);
+CREATE_MPI_OP(MPI_MAX, max_func)
+CREATE_MPI_OP(MPI_MIN, min_func)
+CREATE_MPI_OP(MPI_SUM, sum_func)
+CREATE_MPI_OP(MPI_PROD, prod_func)
+CREATE_MPI_OP(MPI_LAND, land_func)
+CREATE_MPI_OP(MPI_LOR, lor_func)
+CREATE_MPI_OP(MPI_LXOR, lxor_func)
+CREATE_MPI_OP(MPI_BAND, band_func)
+CREATE_MPI_OP(MPI_BOR, bor_func)
+CREATE_MPI_OP(MPI_BXOR, bxor_func)
+CREATE_MPI_OP(MPI_MAXLOC, maxloc_func)
+CREATE_MPI_OP(MPI_MINLOC, minloc_func)
+CREATE_MPI_OP(MPI_REPLACE, replace_func)
+CREATE_MPI_OP(MPI_NO_OP, no_func)
 
 namespace simgrid{
 namespace smpi{
index 3376a52..710eaaf 100644 (file)
@@ -169,7 +169,7 @@ int Topo_Cart::rank(const int* coords, int* rank) {
 
 int Topo_Cart::shift(int direction, int disp, int *rank_source, int *rank_dest) {
 
-  int position[ndims_];
+  int* position = new int[ndims_];
 
   if(ndims_ == 0) {
     return MPI_ERR_ARG;
@@ -204,7 +204,7 @@ int Topo_Cart::shift(int direction, int disp, int *rank_source, int *rank_dest)
   } else {
     this->rank(position, rank_source);
   }
-
+  delete[] position;
   return MPI_SUCCESS;
 }
 
index 4426bda..d13d0bc 100644 (file)
@@ -87,7 +87,7 @@ NetworkConstantAction::NetworkConstantAction(NetworkConstantModel* model_, doubl
   latency_ = latency;
   if (latency_ <= 0.0)
     NetworkConstantAction::set_state(Action::State::FINISHED);
-};
+}
 
 NetworkConstantAction::~NetworkConstantAction() = default;
 
index d488e55..6c8b9d0 100644 (file)
@@ -16,11 +16,8 @@ XBT_PUBLIC void sg_platf_exit();
 
 XBT_PUBLIC void surf_parse_open(const std::string& file);
 XBT_PUBLIC void surf_parse_close();
-XBT_PUBLIC void surf_parse_assert(bool cond, std::string&& msg);
-SG_BEGIN_DECL
-XBT_ATTRIB_NORETURN XBT_PUBLIC void surf_parse_error(const char* msg);
-SG_END_DECL
-XBT_ATTRIB_NORETURN XBT_PUBLIC void surf_parse_error(std::string&& msg);
+XBT_PUBLIC void surf_parse_assert(bool cond, const std::string& msg);
+XBT_ATTRIB_NORETURN XBT_PUBLIC void surf_parse_error(const std::string& msg);
 XBT_PUBLIC void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre,
                                            const std::string& post);
 
index 0b49682..c73780d 100644 (file)
@@ -34,19 +34,15 @@ std::vector<simgrid::kernel::resource::DiskImpl*> parsed_disk_list; /* temporary
 /*
  * Helping functions
  */
-void surf_parse_assert(bool cond, std::string&& msg)
+void surf_parse_assert(bool cond, const std::string& msg)
 {
   if (not cond)
-    surf_parse_error(std::move(msg));
+    surf_parse_error(msg);
 }
 
-void surf_parse_error(const char* msg) {
-  throw simgrid::ParseError(surf_parse_lineno, surf_parsed_filename, std::string(msg));
-}
-
-void surf_parse_error(std::string&& msg)
+void surf_parse_error(const std::string& msg)
 {
-  throw simgrid::ParseError(surf_parse_lineno, surf_parsed_filename, std::move(msg));
+  throw simgrid::ParseError(surf_parsed_filename, surf_parse_lineno, msg);
 }
 
 void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post)
index 2a65be1..e732b9c 100644 (file)
@@ -206,9 +206,9 @@ xbt_automaton_state_t xbt_automaton_get_current_state(xbt_automaton_t a){
   return a->current_state;
 }
 
-static int call_simple_function(void* function)
+static int call_simple_function(int function(void) )
 {
-  return ((int (*)(void)) function)();
+  return function();
 }
 
 xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new(xbt_automaton_t a, const char* id,
@@ -216,8 +216,8 @@ xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new(xbt_
 {
   xbt_automaton_propositional_symbol_t prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
   prop_symb->pred = xbt_strdup(id);
-  prop_symb->callback                            = &call_simple_function;
-  prop_symb->data = fct;
+  prop_symb->callback                            = ((int (*)(void *))&call_simple_function);
+  prop_symb->data = (void*)&fct;
   prop_symb->free_function = NULL;
   xbt_dynar_push(a->propositional_symbols, &prop_symb);
   return prop_symb;
index 7e4366a..2d0748a 100644 (file)
@@ -27,8 +27,9 @@ void _xbt_throw(char* message, int value, const char* file, int line, const char
 namespace simgrid {
 namespace xbt {
 
-ImpossibleError::~ImpossibleError()       = default;
-UnimplementedError::~UnimplementedError() = default;
+ImpossibleError::~ImpossibleError()         = default;
+InitializationError::~InitializationError() = default;
+UnimplementedError::~UnimplementedError()   = default;
 
 void log_exception(e_xbt_log_priority_t prio, const char* context, std::exception const& exception)
 {
index 63d5353..e7ba9e2 100644 (file)
 namespace simgrid {
 namespace xbt {
 namespace random {
-std::mt19937 mt19937_gen;
+enum xbt_random_implem { XBT_RNG_xbt, XBT_RNG_std };
+static xbt_random_implem rng_implem = XBT_RNG_xbt;
+
+static std::mt19937 mt19937_gen;
+
+void set_implem_xbt()
+{
+  rng_implem = XBT_RNG_xbt;
+}
+void set_implem_std()
+{
+  rng_implem = XBT_RNG_std;
+}
+void set_mersenne_seed(int seed)
+{
+  mt19937_gen.seed(seed);
+}
 
 int uniform_int(int min, int max)
 {
-  unsigned long gmin   = mt19937_gen.min();
-  unsigned long gmax   = mt19937_gen.max();
-  unsigned long grange = gmax - gmin + 1;
+  if (rng_implem == XBT_RNG_std) {
+    std::uniform_int_distribution<> dist(min, max);
+    return dist(mt19937_gen);
+    }
+
   unsigned long range  = max - min + 1;
+  unsigned long value  = mt19937_gen();
+  xbt_assert(range > 0, "Overflow in the uniform integer distribution, please use a smaller range.");
   xbt_assert(
-      min < max || min == max,
+      min <= max,
       "The maximum value for the uniform integer distribution must be greater than or equal to the minimum value");
-  xbt_assert(range < grange || range == grange, "The current implementation of the uniform integer distribution does "
-                                                "not allow range to be higher than mt19937's range");
-  unsigned long mult       = grange / range;
-  unsigned long maxallowed = gmin + (mult + 1) * range - 1;
-  while (true) {
-    unsigned long value = mt19937_gen();
-    if (value > maxallowed) {
-    } else {
-      return value % range + min;
-    }
-  }
+  return value % range + min;
 }
 
 double uniform_real(double min, double max)
 {
+  if (rng_implem == XBT_RNG_std) {
+    std::uniform_real_distribution<> dist(min, max);
+    return dist(mt19937_gen);
+    }
+
   // This reuses Boost's uniform real distribution ideas
   unsigned long numerator = mt19937_gen() - mt19937_gen.min();
   unsigned long divisor   = mt19937_gen.max() - mt19937_gen.min();
@@ -45,11 +60,21 @@ double uniform_real(double min, double max)
 
 double exponential(double lambda)
 {
+  if (rng_implem == XBT_RNG_std) {
+    std::exponential_distribution<> dist(lambda);
+    return dist(mt19937_gen);
+    }
+
   return -1 / lambda * log(uniform_real(0, 1));
 }
 
 double normal(double mean, double sd)
 {
+  if (rng_implem == XBT_RNG_std) {
+    std::normal_distribution<> dist(mean, sd);
+    return dist(mt19937_gen);
+  }
+
   double u1 = 0;
   while (u1 < std::numeric_limits<double>::min()) {
     u1 = uniform_real(0, 1);
@@ -59,11 +84,6 @@ double normal(double mean, double sd)
   return z0 * sd + mean;
 }
 
-void set_mersenne_seed(int seed)
-{
-  mt19937_gen.seed(seed);
-}
-
 } // namespace random
 } // namespace xbt
 } // namespace simgrid
index c93049b..c35943e 100644 (file)
@@ -6,16 +6,38 @@
 #include "src/include/catch.hpp"
 #include "xbt/log.h"
 #include "xbt/random.hpp"
+#include <random>
+#include <cmath>
+
+#define EPSILON (100*std::numeric_limits<double>::epsilon())
 
 TEST_CASE("xbt::random: Random Number Generation")
 {
-  SECTION("Random")
+  SECTION("Using XBT_RNG_xbt")
   {
     simgrid::xbt::random::set_mersenne_seed(12345);
-
-    REQUIRE(simgrid::xbt::random::exponential(25) == 0.00291934351538427348);
+    REQUIRE(simgrid::xbt::random::exponential(25) == Approx(0.00291934351538427348).epsilon(EPSILON));
     REQUIRE(simgrid::xbt::random::uniform_int(1, 6) == 4);
-    REQUIRE(simgrid::xbt::random::uniform_real(0, 1) == 0.31637556043369124970);
-    REQUIRE(simgrid::xbt::random::normal(0, 2) == 1.62746784745133976635);
+    REQUIRE(simgrid::xbt::random::uniform_real(0, 1) == Approx(0.31637556043369124970).epsilon(EPSILON));
+    REQUIRE(simgrid::xbt::random::normal(0, 2) == Approx(1.62746784745133976635).epsilon(EPSILON));
+  }
+
+  SECTION("Using XBT_RNG_std")
+  {
+    std::mt19937 gen;
+    gen.seed(12345);
+
+    simgrid::xbt::random::set_mersenne_seed(12345);
+    simgrid::xbt::random::set_implem_std();
+
+    std::exponential_distribution<> distA(25);
+    std::uniform_int_distribution<> distB(1, 6);
+    std::uniform_real_distribution<> distC(0, 1);
+    std::normal_distribution<> distD(0, 2);
+
+    REQUIRE(simgrid::xbt::random::exponential(25) == Approx(distA(gen)).epsilon(EPSILON));
+    REQUIRE(simgrid::xbt::random::uniform_int(1, 6) == distB(gen));
+    REQUIRE(simgrid::xbt::random::uniform_real(0, 1) == Approx(distC(gen)).epsilon(EPSILON));
+    REQUIRE(simgrid::xbt::random::normal(0, 2) == Approx(distD(gen)).epsilon(EPSILON));
   }
 }
index 2e8704a..7e0bd91 100644 (file)
@@ -37,9 +37,9 @@ static unsigned int int_random(int max)
 static void test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_limit, unsigned int pw_max_limit,
                  float rate_no_limit, int max_share, int mode)
 {
-  simgrid::kernel::lmm::Constraint* cnst[nb_cnst];
-  simgrid::kernel::lmm::Variable* var[nb_var];
-  int used[nb_cnst];
+  simgrid::kernel::lmm::Constraint** cnst = new simgrid::kernel::lmm::Constraint*[nb_cnst];
+  simgrid::kernel::lmm::Variable** var = new simgrid::kernel::lmm::Variable*[nb_var];
+  int* used = new int[nb_cnst];
 
   /* We cannot activate the selective update as we pass nullptr as an Action when creating the variables */
   simgrid::kernel::lmm::System* Sys = new simgrid::kernel::lmm::System(false);
@@ -105,6 +105,9 @@ static void test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_limi
   for (int i = 0; i < nb_var; i++)
     Sys->variable_free(var[i]);
   delete Sys;
+  delete[] cnst;
+  delete[] var;
+  delete[] used;
 }
 
 unsigned int TestClasses [][4]=
index b6c905a..4344ecb 100644 (file)
@@ -157,6 +157,14 @@ set(SMPI_SRC
   src/smpi/bindings/smpi_f77_comm.cpp
   src/smpi/bindings/smpi_f77_request.cpp
   src/smpi/bindings/smpi_f77_type.cpp
+  src/smpi/colls/smpi_coll.cpp
+  src/smpi/colls/smpi_nbc_impl.cpp
+  src/smpi/colls/smpi_automatic_selector.cpp
+  src/smpi/colls/smpi_default_selector.cpp
+  src/smpi/colls/smpi_mpich_selector.cpp
+  src/smpi/colls/smpi_intel_mpi_selector.cpp
+  src/smpi/colls/smpi_openmpi_selector.cpp
+  src/smpi/colls/smpi_mvapich2_selector.cpp
   src/smpi/colls/allgather/allgather-2dmesh.cpp
   src/smpi/colls/allgather/allgather-3dmesh.cpp
   src/smpi/colls/allgather/allgather-GB.cpp
@@ -256,14 +264,6 @@ set(SMPI_SRC
   src/smpi/colls/reduce/reduce-rab.cpp
   src/smpi/colls/scatter/scatter-ompi.cpp
   src/smpi/colls/scatter/scatter-mvapich-two-level.cpp
-  src/smpi/colls/smpi_nbc_impl.cpp
-  src/smpi/colls/smpi_automatic_selector.cpp
-  src/smpi/colls/smpi_default_selector.cpp
-  src/smpi/colls/smpi_mpich_selector.cpp
-  src/smpi/colls/smpi_intel_mpi_selector.cpp
-  src/smpi/colls/smpi_openmpi_selector.cpp
-  src/smpi/colls/smpi_mvapich2_selector.cpp
-  src/smpi/colls/smpi_coll.cpp
   )
 
 set(XBT_SRC
index 480b934..3ddbb8e 100644 (file)
@@ -60,7 +60,7 @@ if (HAVE_BOOST_ADDR2LINE_BACKTRACE)
 endif()
 
 if(CMAKE_USE_PTHREADS_INIT)
-  set(SIMGRID_DEP "${SIMGRID_DEP} ${CMAKE_THREAD_LIBS_INIT}")
+  target_link_libraries(simgrid ${CMAKE_THREAD_LIBS_INIT})
 endif()
 
 if(SIMGRID_HAVE_LUA)