Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 5 Dec 2019 13:07:45 +0000 (14:07 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 5 Dec 2019 13:07:45 +0000 (14:07 +0100)
12 files changed:
include/smpi/smpi_extended_traces.h
include/smpi/smpi_helpers.h
src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.cpp
src/smpi/include/private.hpp
src/smpi/include/smpi_config.hpp
src/smpi/internals/smpi_actor.cpp
src/smpi/internals/smpi_memory.cpp
src/smpi/internals/smpi_shared.cpp
teshsuite/smpi/mpich3-test/perf/dtpack.c
teshsuite/smpi/mpich3-test/perf/non_zero_root.c
teshsuite/smpi/topo-cart-sub/topo-cart-sub.c
tools/smpi/generate_smpi_defines.pl

index b17bb99..1f5ede2 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 5772c93..1f0067d 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
index d317ed5..37008f7 100644 (file)
@@ -22,88 +22,74 @@ int alltoallv__ompi_basic_linear(const void *sbuf, const int *scounts, const int
                                  MPI_Datatype rdtype,
                                  MPI_Comm comm)
 {
-    int i, size, rank;
-    char *psnd, *prcv;
-    int nreqs;
-    ptrdiff_t sext, rext;
-    MPI_Request *preq;
-    size = comm->size();
-    rank = comm->rank();
-    MPI_Request* ireqs = new MPI_Request[size * 2];
-    XBT_DEBUG(
-                 "coll:tuned:alltoallv_intra_basic_linear rank %d", rank);
-
-    sext=sdtype->get_extent();
-    rext=rdtype->get_extent();
-
-    /* Simple optimization - handle send to self first */
-    psnd = ((char *) sbuf) + (sdisps[rank] * sext);
-    prcv = ((char *) rbuf) + (rdisps[rank] * rext);
-    if (0 != scounts[rank]) {
-        Datatype::copy(psnd, scounts[rank], sdtype,
-                              prcv, rcounts[rank], rdtype);
-    }
-
-    /* If only one process, we're done. */
-    if (1 == size) {
-        return MPI_SUCCESS;
-    }
-
-    /* Now, initiate all send/recv to/from others. */
-    nreqs = 0;
-    preq = ireqs;
-
-    /* Post all receives first */
-    for (i = 0; i < size; ++i) {
-        if (i == rank) {
-            continue;
-        }
-
-        prcv = ((char *) rbuf) + (rdisps[i] * rext);
-
-        *preq = Request::irecv_init(prcv, rcounts[i], rdtype,
-                                      i, COLL_TAG_ALLTOALLV, comm
-                                      );
-        preq++;
-        ++nreqs;
-
-    }
+  int size = comm->size();
+  int rank = comm->rank();
+  XBT_DEBUG("coll:tuned:alltoallv_intra_basic_linear rank %d", rank);
+
+  ptrdiff_t sext = sdtype->get_extent();
+  ptrdiff_t rext = rdtype->get_extent();
+
+  /* Simple optimization - handle send to self first */
+  char* psnd = ((char*)sbuf) + (sdisps[rank] * sext);
+  char* prcv = ((char*)rbuf) + (rdisps[rank] * rext);
+  if (0 != scounts[rank]) {
+    Datatype::copy(psnd, scounts[rank], sdtype, prcv, rcounts[rank], rdtype);
+  }
+
+  /* If only one process, we're done. */
+  if (1 == size) {
+    return MPI_SUCCESS;
+  }
 
-    /* Now post all sends */
-    for (i = 0; i < size; ++i) {
-        if (i == rank) {
-            continue;
-        }
+  /* Now, initiate all send/recv to/from others. */
+  MPI_Request* ireqs = new MPI_Request[size * 2];
+  int nreqs          = 0;
+  MPI_Request* preq  = ireqs;
 
-        psnd = ((char *) sbuf) + (sdisps[i] * sext);
-        *preq=Request::isend_init(psnd, scounts[i], sdtype,
-                                      i, COLL_TAG_ALLTOALLV, comm
-                                      );
-        preq++;
-        ++nreqs;
+  /* Post all receives first */
+  for (int i = 0; i < size; ++i) {
+    if (i == rank) {
+      continue;
     }
 
-    /* Start your engines.  This will never return an error. */
-    Request::startall(nreqs, ireqs);
+    prcv = ((char*)rbuf) + (rdisps[i] * rext);
 
-    /* Wait for them all.  If there's an error, note that we don't care
-     * what the error was -- just that there *was* an error.  The PML
-     * will finish all requests, even if one or more of them fail.
-     * i.e., by the end of this call, all the requests are free-able.
-     * So free them anyway -- even if there was an error, and return the
-     * error after we free everything. */
-    Request::waitall(nreqs, ireqs,
-                                MPI_STATUSES_IGNORE);
+    *preq = Request::irecv_init(prcv, rcounts[i], rdtype, i, COLL_TAG_ALLTOALLV, comm);
+    preq++;
+    ++nreqs;
+  }
 
-    /* Free the requests. */
-    for (i = 0; i < nreqs; ++i) {
-      if(ireqs[i]!=MPI_REQUEST_NULL)
-        Request::unref(&ireqs[i]);
+  /* Now post all sends */
+  for (int i = 0; i < size; ++i) {
+    if (i == rank) {
+      continue;
     }
-    delete[] ireqs;
 
-    return MPI_SUCCESS;
+    psnd  = ((char*)sbuf) + (sdisps[i] * sext);
+    *preq = Request::isend_init(psnd, scounts[i], sdtype, i, COLL_TAG_ALLTOALLV, comm);
+    preq++;
+    ++nreqs;
+  }
+
+  /* Start your engines.  This will never return an error. */
+  Request::startall(nreqs, ireqs);
+
+  /* Wait for them all.  If there's an error, note that we don't care
+   * what the error was -- just that there *was* an error.  The PML
+   * will finish all requests, even if one or more of them fail.
+   * i.e., by the end of this call, all the requests are free-able.
+   * So free them anyway -- even if there was an error, and return the
+   * error after we free everything. */
+  Request::waitall(nreqs, ireqs, MPI_STATUSES_IGNORE);
+
+  /* Free the requests. */
+  for (int i = 0; i < nreqs; ++i) {
+    if (ireqs[i] != MPI_REQUEST_NULL)
+      Request::unref(&ireqs[i]);
+  }
+  delete[] ireqs;
+
+  return MPI_SUCCESS;
 }
 }
 }
-
index 001d71d..5238bb5 100644 (file)
@@ -463,6 +463,9 @@ void mpi_file_write_(int* fh, void* buf, int* count, int* datatype, MPI_Status*
 void smpi_init_fortran_types();
 } // extern "C"
 
+XBT_PRIVATE int smpi_temp_shm_get();
+XBT_PRIVATE void* smpi_temp_shm_mmap(int fd, size_t size);
+
 struct s_smpi_privatization_region_t {
   void* address;
   int file_descriptor;
index 512816f..6919cce 100644 (file)
@@ -6,7 +6,9 @@
 #ifndef SMPI_CONFIG_HPP
 #define SMPI_CONFIG_HPP
 
+#include "src/internal_config.h" // HAVE_PAPI
 #include <xbt/config.hpp>
+
 XBT_PUBLIC void smpi_init_options();
 XBT_PRIVATE void smpi_check_options();
 /********************************** Configuration of SMPI **************************************/
index da0e96c..0bc5edc 100644 (file)
@@ -55,6 +55,8 @@ ActorExt::ActorExt(s4u::Actor* actor) : actor_(actor)
 
 ActorExt::~ActorExt()
 {
+  if (info_env_ != MPI_INFO_NULL)
+    simgrid::smpi::Info::unref(info_env_);
   if (comm_self_ != MPI_COMM_NULL)
     simgrid::smpi::Comm::destroy(comm_self_);
   if (comm_intra_ != MPI_COMM_NULL)
index 18cdacb..a315b6c 100644 (file)
@@ -110,6 +110,71 @@ static void* asan_safe_memcpy(void* dest, void* src, size_t n)
 #define asan_safe_memcpy(dest, src, n) memcpy((dest), (src), (n))
 #endif
 
+/**
+ * @brief Uses shm_open to get a temporary shm, and returns its file descriptor.
+ */
+int smpi_temp_shm_get()
+{
+  constexpr unsigned VAL_MASK = 0xffffffffUL;
+  static unsigned prev_val    = VAL_MASK;
+  char shmname[32]; // cannot be longer than PSHMNAMLEN = 31 on macOS (shm_open raises ENAMETOOLONG otherwise)
+  int fd;
+
+  for (unsigned i = (prev_val + 1) & VAL_MASK; i != prev_val; i = (i + 1) & VAL_MASK) {
+    snprintf(shmname, sizeof(shmname), "/smpi-buffer-%016x", i);
+    fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+    if (fd != -1 || errno != EEXIST) {
+      prev_val = i;
+      break;
+    }
+  }
+  if (fd < 0) {
+    if (errno == EMFILE) {
+      xbt_die("Impossible to create temporary file for memory mapping: %s\n\
+The shm_open() system call failed with the EMFILE error code (too many files). \n\n\
+This means that you reached the system limits concerning the amount of files per process. \
+This is not a surprise if you are trying to virtualize many processes on top of SMPI. \
+Don't panic -- you should simply increase your system limits and try again. \n\n\
+First, check what your limits are:\n\
+  cat /proc/sys/fs/file-max # Gives you the system-wide limit\n\
+  ulimit -Hn                # Gives you the per process hard limit\n\
+  ulimit -Sn                # Gives you the per process soft limit\n\
+  cat /proc/self/limits     # Displays any per-process limitation (including the one given above)\n\n\
+If one of these values is less than the amount of MPI processes that you try to run, then you got the explanation of this error. \
+Ask the Internet about tutorials on how to increase the files limit such as: https://rtcamp.com/tutorials/linux/increase-open-files-limit/",
+              strerror(errno));
+    }
+    xbt_die("Impossible to create temporary file for memory mapping. shm_open: %s", strerror(errno));
+  }
+  XBT_DEBUG("Got temporary shm %s (fd = %d)", shmname, fd);
+  if (shm_unlink(shmname) < 0)
+    XBT_WARN("Could not early unlink %s. shm_unlink: %s", shmname, strerror(errno));
+  return fd;
+}
+
+/**
+ * @brief Mmap a region of size bytes from temporary shm with file descriptor fd.
+ */
+void* smpi_temp_shm_mmap(int fd, size_t size)
+{
+  struct stat st;
+  if (fstat(fd, &st) != 0)
+    xbt_die("Could not stat fd %d: %s", fd, strerror(errno));
+  if (static_cast<off_t>(size) > st.st_size && ftruncate(fd, static_cast<off_t>(size)) != 0)
+    xbt_die("Could not truncate fd %d to %zu: %s", fd, size, strerror(errno));
+  void* mem = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+  if (mem == MAP_FAILED) {
+    xbt_die("Failed to map fd %d with size %zu: %s\n"
+            "If you are running a lot of ranks, you may be exceeding the amount of mappings allowed per process.\n"
+            "On Linux systems, change this value with sudo sysctl -w vm.max_map_count=newvalue (default value: 65536)\n"
+            "Please see "
+            "https://simgrid.org/doc/latest/Configuring_SimGrid.html#configuring-the-user-code-virtualization for more "
+            "information.",
+            fd, size, strerror(errno));
+  }
+  return mem;
+}
+
 /** Map a given SMPI privatization segment (make a SMPI process active)
  *
  *  When doing a state restoration, the state of the restored variables  might not be consistent with the state of the
@@ -166,52 +231,10 @@ void smpi_backup_global_memory_segment()
 // Initializes the memory mapping for a single process and returns the privatization region
 smpi_privatization_region_t smpi_init_global_memory_segment_process()
 {
-  int file_descriptor;
-  void* address = nullptr;
-  char path[24];
-  int status;
-
-  constexpr unsigned VAL_MASK = 0xffffffU;
-  static unsigned prev_val    = VAL_MASK;
-  for (unsigned i = (prev_val + 1) & VAL_MASK; i != prev_val; i = (i + 1) & VAL_MASK) {
-    snprintf(path, sizeof(path), "/smpi-buffer-%06x", i);
-    file_descriptor = shm_open(path, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
-    if (file_descriptor != -1 || errno != EEXIST) {
-      prev_val = i;
-      break;
-    }
-  }
-  if (file_descriptor < 0) {
-    if (errno == EMFILE) {
-      xbt_die("Impossible to create temporary file for memory mapping: %s\n\
-The open() system call failed with the EMFILE error code (too many files). \n\n\
-This means that you reached the system limits concerning the amount of files per process. \
-This is not a surprise if you are trying to virtualize many processes on top of SMPI. \
-Don't panic -- you should simply increase your system limits and try again. \n\n\
-First, check what your limits are:\n\
-  cat /proc/sys/fs/file-max # Gives you the system-wide limit\n\
-  ulimit -Hn                # Gives you the per process hard limit\n\
-  ulimit -Sn                # Gives you the per process soft limit\n\
-  cat /proc/self/limits     # Displays any per-process limitation (including the one given above)\n\n\
-If one of these values is less than the amount of MPI processes that you try to run, then you got the explanation of this error. \
-Ask the Internet about tutorials on how to increase the files limit such as: https://rtcamp.com/tutorials/linux/increase-open-files-limit/",
-              strerror(errno));
-    }
-    xbt_die("Impossible to create temporary file for memory mapping: %s", strerror(errno));
-  }
-
-  status = ftruncate(file_descriptor, smpi_data_exe_size);
-  if (status)
-    xbt_die("Impossible to set the size of the temporary file for memory mapping");
-
-  /* Ask for a free region */
-  address = mmap(nullptr, smpi_data_exe_size, PROT_RW, MAP_SHARED, file_descriptor, 0);
-  if (address == MAP_FAILED)
-    xbt_die("Couldn't find a free region for memory mapping");
+  int file_descriptor = smpi_temp_shm_get();
 
-  status = shm_unlink(path);
-  if (status)
-    xbt_die("Impossible to unlink temporary file for memory mapping");
+  // ask for a free region
+  void* address = smpi_temp_shm_mmap(file_descriptor, smpi_data_exe_size);
 
   // initialize the values
   asan_safe_memcpy(address, smpi_data_exe_copy, smpi_data_exe_size);
index 2e406e3..9b2a263 100644 (file)
@@ -59,8 +59,6 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_shared, smpi, "Logging specific to SMPI (shared memory macros)");
 
-#define PTR_STRLEN (2 + 2 * sizeof(void*) + 1)
-
 namespace{
 /** Some location in the source code
  *
@@ -109,35 +107,11 @@ void smpi_shared_destroy()
   calls.clear();
 }
 
-static size_t shm_size(int fd) {
-  struct stat st;
-
-  if(fstat(fd, &st) < 0) {
-    xbt_die("Could not stat fd %d: %s", fd, strerror(errno));
-  }
-  return static_cast<size_t>(st.st_size);
-}
-
 #ifndef WIN32
-static void* shm_map(int fd, size_t size, shared_data_key_type* data) {
-  char loc[PTR_STRLEN];
+static void* shm_map(int fd, size_t size, shared_data_key_type* data)
+{
+  void* mem = smpi_temp_shm_mmap(fd, size);
   shared_metadata_t meta;
-
-  if(size > shm_size(fd) && (ftruncate(fd, static_cast<off_t>(size)) < 0)) {
-    xbt_die("Could not truncate fd %d to %zu: %s", fd, size, strerror(errno));
-  }
-
-  void* mem = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-  if(mem == MAP_FAILED) {
-    xbt_die("Failed to map fd %d with size %zu: %s\n"
-            "If you are running a lot of ranks, you may be exceeding the amount of mappings allowed per process.\n"
-            "On Linux systems, change this value with sudo sysctl -w vm.max_map_count=newvalue (default value: 65536)\n"
-            "Please see "
-            "https://simgrid.org/doc/latest/Configuring_SimGrid.html#configuring-the-user-code-virtualization for more "
-            "information.",
-            fd, size, strerror(errno));
-  }
-  snprintf(loc, PTR_STRLEN, "%p", mem);
   meta.size = size;
   meta.data = data;
   meta.allocated_ptr   = mem;
@@ -155,28 +129,15 @@ static void *smpi_shared_malloc_local(size_t size, const char *file, int line)
   auto data = res.first;
   if (res.second) {
     // The new element was inserted.
-    // Generate a shared memory name from the address of the shared_data:
-    char shmname[32]; // cannot be longer than PSHMNAMLEN = 31 on macOS (shm_open raises ENAMETOOLONG otherwise)
-    snprintf(shmname, 31, "/shmalloc%p", &*data);
-    int fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-    if (fd < 0) {
-      if (errno == EEXIST)
-        xbt_die("Please cleanup /dev/shm/%s", shmname);
-      else
-        xbt_die("An unhandled error occurred while opening %s. shm_open: %s", shmname, strerror(errno));
-    }
-    data->second.fd = fd;
+    int fd             = smpi_temp_shm_get();
+    data->second.fd    = fd;
     data->second.count = 1;
     mem = shm_map(fd, size, &*data);
-    if (shm_unlink(shmname) < 0) {
-      XBT_WARN("Could not early unlink %s. shm_unlink: %s", shmname, strerror(errno));
-    }
-    XBT_DEBUG("Mapping %s at %p through %d", shmname, mem, fd);
   } else {
     mem = shm_map(data->second.fd, size, &*data);
     data->second.count++;
   }
-  XBT_DEBUG("Shared malloc %zu in %p (metadata at %p)", size, mem, &*data);
+  XBT_DEBUG("Shared malloc %zu in %p through %d (metadata at %p)", size, mem, data->second.fd, &*data);
   return mem;
 }
 
@@ -441,8 +402,6 @@ std::vector<std::pair<size_t, size_t>> merge_private_blocks(const std::vector<st
 void smpi_shared_free(void *ptr)
 {
   if (smpi_cfg_shared_malloc() == SharedMallocType::LOCAL) {
-    char loc[PTR_STRLEN];
-    snprintf(loc, PTR_STRLEN, "%p", ptr);
     auto meta = allocs_metadata.find(ptr);
     if (meta == allocs_metadata.end()) {
       ::operator delete(ptr);
index f3ccafc..029c2a4 100644 (file)
@@ -66,6 +66,7 @@ double noise(double *list, int count)
     if (retval < 0)
         retval = -retval;
 
+    free(margin);
     return retval;
 }
 
index 0ab6f41..63970c8 100644 (file)
@@ -70,6 +70,8 @@ int main(int argc, char *argv[])
             printf(" No Errors\n");
     }
 
+    free(sbuf);
+    free(rbuf);
     MPI_Finalize();
 
     return 0;
index fc64b7d..5acc708 100644 (file)
@@ -1,14 +1,14 @@
-/* Copyright (c) 2019. Jonathan Borne.
-*/
 /* 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. */
 
+/* Copyright (c) 2019. Jonathan Borne.                                      */
+
+#include <mpi.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <mpi.h>
 
 #define DIM 2
 #define Q 2
 #define N 3
 /* Local matrices size N*N */
 
-int main(int argc, char **argv){
-    /* Nb of nodes in the grid:
-       initialized by MPI_Comm_size according to commandline -np value */
-    int nbNodes;
-
-    /* Communicators */
-    MPI_Comm gridComm, lineComm;
-    /* Current process ranks */
-    int rank, gridSize, myGridRank, myLineRank, myColRank;
-    /* coords: used to get myLineRank and myColRank
-       initialized by MPI_Cart_coords
-     */
-    int coords[DIM];
-    /* dims: Integer array of size ndims specifying the number
-       of processes in each dimension.
-       if init value is 0 it is reset by MPI_Dims_create.
-    */
-    int dims[DIM];
-    for(int i=0; i<DIM; i++){
-        dims[i] = Q;
-    }
-    /* periods:
-       Logical array of size ndims specifying whether the grid is
-       periodic (true) or not (false) in each dimension. */
-    int periods[DIM];
-    for(int i=0; i<DIM; i++){
-        periods[i] = 1;
-    }
-    /* reorder: do not allows rank reordering when creating the grid comm */
-    int reorder = 0;
-    /* remainDims[]: used to set which dimension is kept in subcommunicators */
-    int remainDim[DIM];
-
-    /* Local Matrix */
-    int *A = (int *)malloc(N * N * sizeof(int));
-
-    /* Init */
-    MPI_Init(&argc, &argv);
-    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-    MPI_Comm_size(MPI_COMM_WORLD, &nbNodes);
-
-    printf("rank %d: Alive \n", rank);
-
-    MPI_Barrier(MPI_COMM_WORLD);
-
-    /* Set dims[] values to descibe a grid of nbNodes and DIM dimensions*/
-    MPI_Cart_create(MPI_COMM_WORLD, DIM, dims, periods, reorder,
-                    &gridComm);
-
-    if(gridComm == MPI_COMM_NULL) printf("error grid NULLCOMM \n");
-
-    MPI_Comm_rank(gridComm, &myGridRank);
-    MPI_Comm_size(gridComm, &gridSize);
-    MPI_Cart_coords(gridComm, myGridRank, DIM, coords);
-    myLineRank = coords[0];
-    myColRank = coords[1];
-
-    MPI_Barrier(MPI_COMM_WORLD);
-
-    /* Create a line communicator for current process */
-    remainDim[0] = 0;
-    remainDim[1] = 1;
-    MPI_Cart_sub(gridComm, remainDim , &lineComm);
-
-    /* Check if lineComm was initialized */
-    if(lineComm == MPI_COMM_NULL) printf("(%d,%d): ERR (lineComm == NULLCOMM)\n",
-                                         myLineRank, myColRank);
-
-    /* A Initialization */
-    for(int i=0; i<N; i++){
-        for(int j=0; j<N; j++){
-            *(A + (i*N) + j) = i==j?rank:0;
-        }
+int main(int argc, char** argv)
+{
+  /* Nb of nodes in the grid:
+     initialized by MPI_Comm_size according to commandline -np value */
+  int nbNodes;
+
+  /* Communicators */
+  MPI_Comm gridComm;
+  MPI_Comm lineComm;
+  /* Current process ranks */
+  int rank;
+  int gridSize;
+  int myGridRank;
+  int myLineRank;
+  int myColRank;
+  /* coords: used to get myLineRank and myColRank
+     initialized by MPI_Cart_coords
+   */
+  int coords[DIM];
+  /* dims: Integer array of size ndims specifying the number
+     of processes in each dimension.
+     if init value is 0 it is reset by MPI_Dims_create.
+  */
+  int dims[DIM];
+  for (int i = 0; i < DIM; i++) {
+    dims[i] = Q;
+  }
+  /* periods:
+     Logical array of size ndims specifying whether the grid is
+     periodic (true) or not (false) in each dimension. */
+  int periods[DIM];
+  for (int i = 0; i < DIM; i++) {
+    periods[i] = 1;
+  }
+  /* reorder: do not allows rank reordering when creating the grid comm */
+  int reorder = 0;
+  /* remainDims[]: used to set which dimension is kept in subcommunicators */
+  int remainDim[DIM];
+
+  /* Local Matrix */
+  int* A = malloc(N * N * sizeof(int));
+
+  /* Init */
+  MPI_Init(&argc, &argv);
+  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+  MPI_Comm_size(MPI_COMM_WORLD, &nbNodes);
+
+  printf("rank %d: Alive \n", rank);
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  /* Set dims[] values to descibe a grid of nbNodes and DIM dimensions*/
+  MPI_Cart_create(MPI_COMM_WORLD, DIM, dims, periods, reorder, &gridComm);
+
+  if (gridComm == MPI_COMM_NULL)
+    printf("error grid NULLCOMM \n");
+
+  MPI_Comm_rank(gridComm, &myGridRank);
+  MPI_Comm_size(gridComm, &gridSize);
+  MPI_Cart_coords(gridComm, myGridRank, DIM, coords);
+  myLineRank = coords[0];
+  myColRank  = coords[1];
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  /* Create a line communicator for current process */
+  remainDim[0] = 0;
+  remainDim[1] = 1;
+  MPI_Cart_sub(gridComm, remainDim, &lineComm);
+
+  /* Check if lineComm was initialized */
+  if (lineComm == MPI_COMM_NULL)
+    printf("(%d,%d): ERR (lineComm == NULLCOMM)\n", myLineRank, myColRank);
+
+  /* A Initialization */
+  for (int i = 0; i < N; i++) {
+    for (int j = 0; j < N; j++) {
+      *(A + (i * N) + j) = i == j ? rank : 0;
     }
+  }
 
-    MPI_Barrier(MPI_COMM_WORLD);
+  MPI_Barrier(MPI_COMM_WORLD);
 
-    /* Broadcast */
-    int root = 0;
-    MPI_Bcast(A, N*N, MPI_INT, root, lineComm);
+  /* Broadcast */
+  int root = 0;
+  MPI_Bcast(A, N * N, MPI_INT, root, lineComm);
 
-    /* Print A */
-    printf("process:(%d,%d) \n", myLineRank,
-           myColRank);
+  /* Print A */
+  printf("process:(%d,%d) \n", myLineRank, myColRank);
 
-    printf("-------------------\n");
-    for(int i=0; i<N; i++){
-        for(int j=0; j<N; j++){
-            printf("%d ", *(A + (i*N) + j));
-        }
-        printf("\n");
+  printf("-------------------\n");
+  for (int i = 0; i < N; i++) {
+    for (int j = 0; j < N; j++) {
+      printf("%d ", *(A + (i * N) + j));
     }
-    printf("-------------------\n");
-    free(A);
-    MPI_Barrier (MPI_COMM_WORLD);
-    MPI_Finalize();
-    return 0;
+    printf("\n");
+  }
+  printf("-------------------\n");
+
+  MPI_Comm_free(&lineComm);
+  MPI_Comm_free(&gridComm);
+  free(A);
+  MPI_Barrier(MPI_COMM_WORLD);
+  MPI_Finalize();
+  return 0;
 }
index fc0255b..fefb7d0 100755 (executable)
@@ -42,7 +42,7 @@ sub output_macro {
     print "#define ". uc($id) ." smpi_trace_set_call_location(__FILE__,__LINE__); call ". ucfirst $id ."\n";
   }
   else {
-    print "#define $id(...) ({ smpi_trace_set_call_location(__FILE__,__LINE__); $id(__VA_ARGS__); })\n";
+    print "#define $id(...) (smpi_trace_set_call_location(__FILE__, __LINE__), $id(__VA_ARGS__))\n";
   }
 }