diff --git a/ompi/contrib/vt/vt/ChangeLog b/ompi/contrib/vt/vt/ChangeLog index 1f14a05b23..647ed0f29a 100644 --- a/ompi/contrib/vt/vt/ChangeLog +++ b/ompi/contrib/vt/vt/ChangeLog @@ -1,4 +1,5 @@ 5.12.1openmpi + - fixed build issues on MacOS using GCC v4.2 - fixed a bug in the MPI wrapper functions MPI_Gatherv and MPI_Scatterv which occurred due to illegal access to insignificant parameters on non-root ranks diff --git a/ompi/contrib/vt/vt/config_bottom.h b/ompi/contrib/vt/vt/config_bottom.h index 03c6f86ea9..5619819130 100644 --- a/ompi/contrib/vt/vt/config_bottom.h +++ b/ompi/contrib/vt/vt/config_bottom.h @@ -4,6 +4,13 @@ #include "util/util.h" +/* use own implementation of assert() to work around a compiler bug + (seen on MacOS using GCC v4.2.1): + The linker results in an undefined reference to ___builtin_expect() + when using assert() within OpenMP-parallel regions. */ +#undef assert +#define assert vt_assert + #if !(defined(HAVE_ASPRINTF) && HAVE_ASPRINTF) # undef asprintf # define asprintf vt_asprintf diff --git a/ompi/contrib/vt/vt/tools/vtdyn/vt_dyn.cc b/ompi/contrib/vt/vt/tools/vtdyn/vt_dyn.cc index b8b4adcf23..954989cc41 100644 --- a/ompi/contrib/vt/vt/tools/vtdyn/vt_dyn.cc +++ b/ompi/contrib/vt/vt/tools/vtdyn/vt_dyn.cc @@ -14,7 +14,6 @@ #include "vt_dyn.h" #include -#include #include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtfilter/old/vt_tracefilter.cc b/ompi/contrib/vt/vt/tools/vtfilter/old/vt_tracefilter.cc index 3969e55b8c..07c60cda93 100644 --- a/ompi/contrib/vt/vt/tools/vtfilter/old/vt_tracefilter.cc +++ b/ompi/contrib/vt/vt/tools/vtfilter/old/vt_tracefilter.cc @@ -46,7 +46,6 @@ #include "vt_filthandler.h" #include -#include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter.cc b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter.cc index 3baa31abe3..dee0276a85 100644 --- a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter.cc +++ b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter.cc @@ -18,7 +18,6 @@ #include -#include #include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_common.cc b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_common.cc index b041811ddf..b52d98c449 100644 --- a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_common.cc +++ b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_common.cc @@ -15,7 +15,6 @@ #include -#include #include diff --git a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_gen.cc b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_gen.cc index 8514180bed..f3aa70a745 100644 --- a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_gen.cc +++ b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_gen.cc @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc.cc b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc.cc index 48717fc275..9d48dea3e8 100644 --- a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc.cc +++ b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc.cc @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc_hdlr.cc b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc_hdlr.cc index 1f8e87785f..291ec34ae5 100644 --- a/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc_hdlr.cc +++ b/ompi/contrib/vt/vt/tools/vtfilter/vt_filter_trc_hdlr.cc @@ -15,8 +15,6 @@ #include -#include - // Define this macro to avoid writing of events which have relationships to // disabled processes. // For example: Do not write a send message event where its receive process is diff --git a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_aevents.cc b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_aevents.cc index 394f9078cf..24f00f32ca 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_aevents.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_aevents.cc @@ -19,8 +19,6 @@ #include -#include - //////////////////// class HooksAsyncEventsC //////////////////// // class's instance object to allow access from static member methods diff --git a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.cc b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.cc index f6a00280da..007a9ab373 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.cc @@ -14,8 +14,6 @@ #include "vt_inttypes.h" -#include - //////////////////// class HooksBaseC //////////////////// // public methods diff --git a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.h b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.h index 4cf4b345c4..7e689c55c1 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.h +++ b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_base.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_HOOKS_BASE_H_ #define _VT_UNIFY_HOOKS_BASE_H_ +#include "config.h" + #include "vt_unify_hooks.h" // diff --git a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_margins.cc b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_margins.cc index c3731ddb70..13f0f6b4c5 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_margins.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_margins.cc @@ -13,8 +13,6 @@ #include "vt_unify.h" #include "vt_unify_hooks_margins.h" -#include - //////////////////// class HooksProcessMarginsC //////////////////// // public methods diff --git a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_msgmatch.cc b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_msgmatch.cc index 3f1afd7543..5f18ed1f98 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_msgmatch.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/hooks/vt_unify_hooks_msgmatch.cc @@ -23,8 +23,6 @@ #include #include -#include - //////////////////// class HooksMsgMatchC //////////////////// // public methods diff --git a/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.c b/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.c index cfcf0cf317..c2d4620619 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.c +++ b/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.c @@ -16,7 +16,6 @@ #include "mpi.h" -#include #include #define MAX_TYPES 50 diff --git a/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h b/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h index 53f9a7950c..535aed7d10 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h +++ b/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_MPI_H_ #define _VT_UNIFY_MPI_H_ +#include "config.h" + #include "vt_defs.h" /* to get VT_MPI_INT */ /* use MPI's profile interface for the library version of the unifier */ diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify.cc index 11a895eca6..1acbba982f 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify.h index 4963d3ea45..238cf86059 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify.h @@ -31,8 +31,6 @@ #include #include -#include - #if defined(HAVE_OMP) && HAVE_OMP # ifdef VT_LIB # undef HAVE_OMP diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.cc index 898e2bd5a6..b18e43f99e 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.cc @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.h index 31da714373..79aa0ad84f 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_DEFS_H_ #define _VT_UNIFY_DEFS_H_ +#include "config.h" + #include "vt_unify_defs_recs.h" #include "vt_unify_lvector.hh" #include "vt_unify_usrcom.h" diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs_recs.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs_recs.h index 88f0cc916d..18e17e0f80 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs_recs.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_defs_recs.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_DEFS_RECS_H_ #define _VT_UNIFY_DEFS_RECS_H_ +#include "config.h" + #include "vt_unify.h" #include "vt_inttypes.h" diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.cc index 41e0e2fec0..aef433edc4 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.cc @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.h index 5c736220eb..daac74fdc8 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_esync.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_ESYNC_H_ #define _VT_UNIFY_ESYNC_H_ +#include "config.h" + #include "vt_inttypes.h" #include @@ -20,8 +22,6 @@ #include #include -#include - // // ETimeSyncC class // diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.cc index b4660b6acd..7a4dcfc236 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.cc @@ -19,8 +19,6 @@ #include -#include - // instances of class EventsAndStatsC // EventsAndStatsC * theEvents = 0; diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.h index 2ae8477fd5..a1b7385e25 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_events_stats.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_EVENTS_STATS_H_ #define _VT_UNIFY_EVENTS_STATS_H_ +#include "config.h" + // // EventsAndStatsC class // diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.cc index 2c638035a0..837638c61c 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.cc @@ -21,8 +21,6 @@ #include "otf.h" -#include - void HandleKeyValueList( const uint32_t & proc, OTF_KeyValueList * kvs ) { diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.h index b24ed71234..0ed20136c5 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_handlers.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_HANDLERS_H_ #define _VT_UNIFY_HANDLERS_H_ +#include "config.h" + #include "vt_unify_defs_recs.h" #include "vt_unify_lvector.hh" #include "vt_unify_markers.h" diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_hooks.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_hooks.h index 2dcb950ddb..758fa97231 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_hooks.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_hooks.h @@ -13,12 +13,12 @@ #ifndef _VT_UNIFY_HOOKS_H_ #define _VT_UNIFY_HOOKS_H_ +#include "config.h" + #include "vt_inttypes.h" #include -#include - // generic hooks' identifier bits // enum diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_lvector.hh b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_lvector.hh index 1bc21f4399..9f6a5778a6 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_lvector.hh +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_lvector.hh @@ -13,9 +13,9 @@ #ifndef _VT_UNIFY_LVECTOR_HH_ #define _VT_UNIFY_LVECTOR_HH_ -#include +#include "config.h" -#include +#include // // LargeVectorC class diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.cc index c785590e30..59a7d4c5d4 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.cc @@ -20,8 +20,6 @@ #include #include -#include - MarkersC * theMarkers = 0; // instance of class MarkersC //////////////////// class MarkersC //////////////////// diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.h index c42e47b1bb..e1df6aa216 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_markers.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_MARKERS_H_ #define _VT_UNIFY_MARKERS_H_ +#include "config.h" + #include "vt_inttypes.h" #include "vt_unify.h" diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_sync.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_sync.h index acec2ec40e..9c7d46ca6e 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_sync.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_sync.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_SYNC_H_ #define _VT_UNIFY_SYNC_H_ +#include "config.h" + #include "vt_unify.h" #ifdef VT_ETIMESYNC @@ -23,8 +25,6 @@ #include -#include - // // TimeSyncC class // diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.cc index e01c38efbc..5e0978d86b 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.cc @@ -13,8 +13,6 @@ #include "vt_unify.h" #include "vt_unify_tkfac.h" -#include - TokenFactoryC * theTokenFactory = 0; // instance of class TokenFactoryC //////////////////// class TokenFactoryC //////////////////// diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.h index d418800c78..1670a4f0e3 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_TKFAC_H_ #define _VT_UNIFY_TKFAC_H_ +#include "config.h" + #include "vt_unify_defs_recs.h" #include "vt_unify_tkfac_scope.h" diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac_scope.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac_scope.h index 7d3b345b6f..cc386cf186 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac_scope.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_tkfac_scope.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_TKFAC_SCOPE_H_ #define _VT_UNIFY_TKFAC_SCOPE_H_ +#include "config.h" + #include "vt_unify.h" #include diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.cc b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.cc index c4fff7cde8..205ced38a1 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.cc +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.cc @@ -13,8 +13,6 @@ #include "vt_unify.h" #include "vt_unify_usrcom.h" -#include - UserComC * theUserCom = 0; // instance of class UserComC //////////////////// class UserComC //////////////////// diff --git a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.h b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.h index 9c222b875d..90712004a2 100644 --- a/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.h +++ b/ompi/contrib/vt/vt/tools/vtunify/vt_unify_usrcom.h @@ -13,6 +13,8 @@ #ifndef _VT_UNIFY_USRCOM_H_ #define _VT_UNIFY_USRCOM_H_ +#include "config.h" + #include "vt_inttypes.h" #include diff --git a/ompi/contrib/vt/vt/tools/vtwrapper/vt_wrapper.cc b/ompi/contrib/vt/vt/tools/vtwrapper/vt_wrapper.cc index bca5d7b4d6..6bf7d08dfd 100644 --- a/ompi/contrib/vt/vt/tools/vtwrapper/vt_wrapper.cc +++ b/ompi/contrib/vt/vt/tools/vtwrapper/vt_wrapper.cc @@ -13,6 +13,7 @@ #include "vt_inttypes.h" #include "util/installdirs.h" +#include "util/util.h" #include #include @@ -21,7 +22,6 @@ #include #include -#include #include #include #include @@ -1316,7 +1316,7 @@ doWrap() // std::string cpp_file = src_file; si = cpp_file.rfind( '.' ); - assert( si != std::string::npos ); + vt_assert( si != std::string::npos ); cpp_file.insert( si, ".cpp" ); files_to_remove.push_back( cpp_file ); @@ -1350,7 +1350,7 @@ doWrap() std::string pomp_file = src_file; si = pomp_file.rfind( '.' ); - assert( si != std::string::npos ); + vt_assert( si != std::string::npos ); pomp_file.insert( si, ".pomp" ); // convert Fortran source file suffix to upper case, in order to @@ -1401,7 +1401,7 @@ doWrap() if( si != std::string::npos ) pdb_file = src_file.substr( si+1 ); si = pdb_file.rfind( '.' ); - assert( si != std::string::npos ); + vt_assert( si != std::string::npos ); pdb_file.replace( si, 4, ".pdb" ); files_to_remove.push_back( pdb_file ); @@ -1411,7 +1411,7 @@ doWrap() std::string tau_file = src_file; si = tau_file.rfind( '.' ); - assert( si != std::string::npos ); + vt_assert( si != std::string::npos ); tau_file.insert( si, ".tau" ); // convert Fortran source file suffix to upper case, in order to @@ -1481,7 +1481,7 @@ doWrap() obj_file = src_file.substr( si+1 ); si = obj_file.rfind( '.' ); - assert( si != std::string::npos ); + vt_assert( si != std::string::npos ); obj_file = obj_file.substr( 0, si ) + ".o"; obj_files_to_rename[obj_file] = Config.mod_files[i].second; @@ -2068,14 +2068,14 @@ ConfigS::setCompilerCmd( const std::string& cmd ) void ConfigS::addCompilerArg( const std::string& arg ) { - assert( arg.length() > 0 ); + vt_assert( arg.length() > 0 ); addOrSetStringList( Config.comp_args, arg ); } void ConfigS::addCompilerLib( const std::string& lib ) { - assert( lib.length() > 0 ); + vt_assert( lib.length() > 0 ); addOrSetStringList( Config.comp_libs, lib ); } @@ -2096,7 +2096,7 @@ ConfigS::addModSrcFile( const std::string& file ) // create object file name of source file // si = file_base.rfind( '.' ); - assert( si != std::string::npos ); + vt_assert( si != std::string::npos ); file_obj = file_base.substr( 0, si ) + ".o"; // store source/object file name for later processing by OPARI and/or TAU @@ -2106,7 +2106,7 @@ ConfigS::addModSrcFile( const std::string& file ) // si = file.rfind( '.' ); - assert( si != std::string::npos ); + vt_assert( si != std::string::npos ); std::string base = file.substr( 0, si ); std::string suffix = file.substr( si ); @@ -2160,28 +2160,28 @@ ConfigS::setOpariRcFile( const std::string& file ) void ConfigS::addOpariArg( const std::string& arg ) { - assert( arg.length() > 0 ); + vt_assert( arg.length() > 0 ); addOrSetStringList( Config.opari_args, arg, arg[0] == '!' ); } void ConfigS::addTauinstArg( const std::string& arg ) { - assert( arg.length() > 0 ); + vt_assert( arg.length() > 0 ); addOrSetStringList( Config.tauinst_args, arg, arg[0] == '!' ); } void ConfigS::addTauinstParseArg( const std::string& arg ) { - assert( arg.length() > 0 ); + vt_assert( arg.length() > 0 ); addOrSetStringList( Config.tauinst_parseargs, arg, arg[0] == '!' ); } void ConfigS::addPrepFlag( const std::string& flag ) { - assert( flag.length() > 0 ); + vt_assert( flag.length() > 0 ); addOrSetStringList( Config.prep_flags, flag, flag[0] == '!' ); } @@ -2281,7 +2281,7 @@ ConfigS::setInstAvail( const std::string& type ) bool ConfigS::setInstType( const InstTypeT type ) { - assert( inst_avail != 0 ); + vt_assert( inst_avail != 0 ); // instrumentation available ? if( !isInstAvail( type ) ) diff --git a/ompi/contrib/vt/vt/util/util.c b/ompi/contrib/vt/vt/util/util.c index 0ede35cb68..5108a71dc2 100644 --- a/ompi/contrib/vt/vt/util/util.c +++ b/ompi/contrib/vt/vt/util/util.c @@ -172,6 +172,12 @@ static int guess_strlen(const char* fmt, va_list ap) } +void vt_assert_fail(const char* file, int line, const char* expr) +{ + printf("%s:%u: failed assertion `%s'\n", file, line, expr); + abort(); +} + int vt_asprintf(char** ptr, const char* fmt, ...) { int length; diff --git a/ompi/contrib/vt/vt/util/util.h b/ompi/contrib/vt/vt/util/util.h index 3e94522070..2f91a7bcd1 100644 --- a/ompi/contrib/vt/vt/util/util.h +++ b/ompi/contrib/vt/vt/util/util.h @@ -35,6 +35,9 @@ #include #include +#define vt_assert(expr) if(!(expr)) vt_assert_fail(__FILE__, __LINE__, #expr); + +EXTERN void vt_assert_fail(const char* file, int line, const char* expr); EXTERN int vt_asprintf(char** ptr, const char* fmt, ...); EXTERN int vt_snprintf(char* str, size_t size, const char* fmt, ...); EXTERN int vt_vasprintf(char** ptr, const char* fmt, va_list ap); diff --git a/ompi/contrib/vt/vt/vtlib/vt_comp_openuh.c b/ompi/contrib/vt/vt/vtlib/vt_comp_openuh.c index b323452b05..47c5546662 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_comp_openuh.c +++ b/ompi/contrib/vt/vt/vtlib/vt_comp_openuh.c @@ -119,7 +119,7 @@ static void register_region(struct profile_gen_struct* d, uint8_t rtype) strncpy(stname, "do_while", 8+1); break; default: - vt_assert(0); + vt_libassert(0); break; } diff --git a/ompi/contrib/vt/vt/vtlib/vt_dyninst.c b/ompi/contrib/vt/vt/vtlib/vt_dyninst.c index 280b559188..13bf6b389a 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_dyninst.c +++ b/ompi/contrib/vt/vt/vtlib/vt_dyninst.c @@ -72,7 +72,7 @@ void VT_Dyn_start(uint32_t index, char* name, char* fname, int lno) uint64_t time; uint32_t* rid; - vt_assert(index < VT_MAX_DYNINST_REGIONS); + vt_libassert(index < VT_MAX_DYNINST_REGIONS); /* Ignore events if VT is initializing */ if( !dyn_init && !vt_is_alive ) return; @@ -128,7 +128,7 @@ void VT_Dyn_end(uint32_t index) { uint64_t time; - vt_assert(index < VT_MAX_DYNINST_REGIONS); + vt_libassert(index < VT_MAX_DYNINST_REGIONS); /* If VampirTrace already finalized, return */ if ( !vt_is_alive ) return; diff --git a/ompi/contrib/vt/vt/vtlib/vt_error.c b/ompi/contrib/vt/vt/vtlib/vt_error.c index bab0e94166..30c4da3b0e 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_error.c +++ b/ompi/contrib/vt/vt/vtlib/vt_error.c @@ -50,7 +50,7 @@ static void vt_print_msg(const char* prefix, const char* fmt, va_list az) fflush(NULL); } -void vt_assert_impl(const char* f, int l, const char* expr) +void vt_libassert_fail(const char* f, int l, const char* expr) { vt_iowrap_externals_init(); libc_fprintf(stderr, "%s: FATAL: %s:%d: Assertion `%s' failed\n\nPlease report this incident to " PACKAGE_BUGREPORT "\n", diff --git a/ompi/contrib/vt/vt/vtlib/vt_error.h b/ompi/contrib/vt/vt/vtlib/vt_error.h index c96f4e6e88..ca2c0fac29 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_error.h +++ b/ompi/contrib/vt/vt/vtlib/vt_error.h @@ -24,8 +24,9 @@ /* set process id/rank for messages */ EXTERN void vt_error_pid(const int pid); -#define vt_assert(expr) if(!(expr)) vt_assert_impl(__FILE__, __LINE__, #expr); -EXTERN void vt_assert_impl(const char* f, int l, const char* expr); +/* abort if assertion is false */ +#define vt_libassert(expr) if(!(expr)) vt_libassert_fail(__FILE__, __LINE__, #expr); +EXTERN void vt_libassert_fail(const char* f, int l, const char* expr); /* abort and system error message */ #define vt_error() vt_error_impl(__FILE__, __LINE__) diff --git a/ompi/contrib/vt/vt/vtlib/vt_esync.c b/ompi/contrib/vt/vt/vtlib/vt_esync.c index b2fb57fb8e..4786e15842 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_esync.c +++ b/ompi/contrib/vt/vt/vtlib/vt_esync.c @@ -305,7 +305,7 @@ void vt_esync_app_uctl_data(char** data) size_t size; uint32_t i; - vt_assert(*data != NULL); + vt_libassert(*data != NULL); size = strlen(*data); diff --git a/ompi/contrib/vt/vt/vtlib/vt_fmpiconst.c b/ompi/contrib/vt/vt/vtlib/vt_fmpiconst.c index 6dc160fcb0..fe25d1e806 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_fmpiconst.c +++ b/ompi/contrib/vt/vt/vtlib/vt_fmpiconst.c @@ -77,25 +77,25 @@ VT_DECLDEF(void vt_get_mpi_f_statuses_ignore_cb_f(void* addr1, void* addr2)) { void vt_fmpiconst_init() { vt_get_mpi_f_bottom___(); - vt_assert(vt_mpi_f_bottom_addr != NULL); + vt_libassert(vt_mpi_f_bottom_addr != NULL); vt_cntl_msg(2, "Detected address of MPI_BOTTOM=%x", vt_mpi_f_bottom_addr); #if (defined(HAVE_DECL_MPI_IN_PLACE) && HAVE_DECL_MPI_IN_PLACE) vt_get_mpi_f_in_place___(); - vt_assert(vt_mpi_f_in_place_addr != NULL); + vt_libassert(vt_mpi_f_in_place_addr != NULL); vt_cntl_msg(2, "Detected address of MPI_IN_PLACE=%x", vt_mpi_f_in_place_addr); #endif /* HAVE_DECL_MPI_IN_PLACE */ vt_get_mpi_f_statuses_ignore___(); - vt_assert(vt_mpi_f_status_ignore_addr != NULL); + vt_libassert(vt_mpi_f_status_ignore_addr != NULL); vt_cntl_msg(2, "Detected address of MPI_F_STATUS_IGNORE=%x", vt_mpi_f_status_ignore_addr); - vt_assert(vt_mpi_f_statuses_ignore_addr != NULL); + vt_libassert(vt_mpi_f_statuses_ignore_addr != NULL); vt_cntl_msg(2, "Detected address of MPI_F_STATUSES_IGNORE=%x", vt_mpi_f_statuses_ignore_addr); #if !(defined(HAVE_DECL_MPI_STATUS_SIZE) && HAVE_DECL_MPI_STATUS_SIZE) vt_get_mpi_status_size___(&vt_mpi_status_size); - vt_assert(vt_mpi_status_size > 0); + vt_libassert(vt_mpi_status_size > 0); vt_cntl_msg(2, "Detected value of MPI_STATUS_SIZE=%d", vt_mpi_status_size); #endif /* HAVE_DECL_MPI_STATUS_SIZE */ diff --git a/ompi/contrib/vt/vt/vtlib/vt_fork.c b/ompi/contrib/vt/vt/vtlib/vt_fork.c index 38f55fe56d..a5d3ec6e8a 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_fork.c +++ b/ompi/contrib/vt/vt/vtlib/vt_fork.c @@ -58,7 +58,7 @@ static int get_new_trcid() char tmp[10] = ""; uint8_t do_unlock = 1; - vt_assert(trcid_filename[0] != '\0'); + vt_libassert(trcid_filename[0] != '\0'); VT_SUSPEND_IO_TRACING(VT_CURRENT_THREAD); @@ -131,7 +131,7 @@ void vt_fork_finalize() void vt_fork(pid_t pid) { - vt_assert(pid != -1); + vt_libassert(pid != -1); fork_performed = 1; @@ -195,7 +195,7 @@ uint32_t vt_fork_get_num_childs_tot() int fd; char tmp[16] = ""; - vt_assert(trcid_filename[0] != '\0'); + vt_libassert(trcid_filename[0] != '\0'); VT_SUSPEND_IO_TRACING(VT_CURRENT_THREAD); @@ -207,9 +207,9 @@ uint32_t vt_fork_get_num_childs_tot() if ( read(fd, tmp, 16) == -1 ) vt_error_msg("Cannot read file %s: %s", trcid_filename, strerror(errno)); - vt_assert(tmp[0] != '\0'); + vt_libassert(tmp[0] != '\0'); nchilds_tot = atoi(tmp); - vt_assert(nchilds_tot > 0); + vt_libassert(nchilds_tot > 0); /* close temp. id file */ close(fd); @@ -228,7 +228,7 @@ char* vt_fork_get_trcid_filename() { char* filename; - vt_assert(trcid_filename[0] != '\0'); + vt_libassert(trcid_filename[0] != '\0'); filename = strdup(trcid_filename); if ( filename == NULL ) diff --git a/ompi/contrib/vt/vt/vtlib/vt_getcpu.c b/ompi/contrib/vt/vt/vtlib/vt_getcpu.c index d3a2a8b7c6..81afb84958 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_getcpu.c +++ b/ompi/contrib/vt/vt/vtlib/vt_getcpu.c @@ -26,7 +26,7 @@ uint32_t vt_getcpu_cid = 0; void vt_getcpu_init() { - vt_assert(vt_misc_cgid != 0); + vt_libassert(vt_misc_cgid != 0); /* write counter definition */ vt_getcpu_cid = vt_def_counter(VT_CURRENT_THREAD, "CPU_ID", "#", diff --git a/ompi/contrib/vt/vt/vtlib/vt_iowrap_helper.c b/ompi/contrib/vt/vt/vtlib/vt_iowrap_helper.c index 6d1ab43971..46cac9412e 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_iowrap_helper.c +++ b/ompi/contrib/vt/vt/vtlib/vt_iowrap_helper.c @@ -38,7 +38,7 @@ static void store_vampir_file_id(int fd, uint32_t file_id, { vampir_file_t *file_ptr; - vt_assert( (fd < max_open_files) && (fd >= 0) ); + vt_libassert( (fd < max_open_files) && (fd >= 0) ); file_ptr = &fd_to_vampirid[fd]; file_ptr->vampir_file_id = file_id; file_ptr->vampir_file_group_id = file_group_id; @@ -49,7 +49,7 @@ vampir_file_t *get_vampir_file(int fd) { vampir_file_t *file_ptr; - vt_assert( (fd < max_open_files) && (fd >= 0) ); + vt_libassert( (fd < max_open_files) && (fd >= 0) ); file_ptr = &fd_to_vampirid[fd]; if( file_ptr->vampir_file_id == 0 ) { return &unknown_fd_vampir_file; @@ -77,7 +77,7 @@ void vt_iofile_open(const char* fname, int fd) uint32_t gid; /* fprintf( stderr, "opening file: %s\n", fname); */ - vt_assert( (fd < max_open_files) && (fd >= 0) ); + vt_libassert( (fd < max_open_files) && (fd >= 0) ); gid=(fd<3) ? file_group_id_stdio : file_group_id_rest; #if defined (VT_MT) || defined (VT_HYB) || defined (VT_JAVA) VTTHRD_LOCK_IDS(); @@ -92,7 +92,7 @@ void vt_iofile_open(const char* fname, int fd) /** Mark the fd as closed */ void vt_iofile_close(int fd) { - vt_assert( (fd < max_open_files) && (fd >= 0) ); + vt_libassert( (fd < max_open_files) && (fd >= 0) ); fd_to_vampirid[fd].vampir_file_id = 0; } @@ -115,7 +115,7 @@ uint32_t vt_iofile_id(const char* fname) void vt_iofile_dupfd(int oldfd, int newfd) { - vt_assert( (newfd < max_open_files) && (newfd >=0) && + vt_libassert( (newfd < max_open_files) && (newfd >=0) && (oldfd < max_open_files) && (oldfd >=0) ); fd_to_vampirid[newfd] = fd_to_vampirid[oldfd]; fd_to_vampirid[newfd].handle = VTTHRD_IO_NEXT_HANDLE(VTTHRD_MY_VTTHRD); diff --git a/ompi/contrib/vt/vt/vtlib/vt_java.c b/ompi/contrib/vt/vt/vtlib/vt_java.c index 44343b1461..62ed47e4ab 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_java.c +++ b/ompi/contrib/vt/vt/vtlib/vt_java.c @@ -823,7 +823,7 @@ void vt_java_get_thread_name(jvmtiEnv* jvmti, jthread thread, jvmtiError error; if ( jvmti == NULL ) jvmti = vt_jvmti_agent->jvmti; - vt_assert(jvmti != NULL); + vt_libassert(jvmti != NULL); /* initialize thread name */ strcpy(tname, "Unknown"); @@ -851,7 +851,7 @@ void vt_java_get_thread_name(jvmtiEnv* jvmti, jthread thread, void vt_java_check_error(jvmtiEnv* jvmti, jvmtiError error, const char* str) { if ( jvmti == NULL ) jvmti = vt_jvmti_agent->jvmti; - vt_assert(jvmti != NULL); + vt_libassert(jvmti != NULL); if ( error != JVMTI_ERROR_NONE ) { diff --git a/ompi/contrib/vt/vt/vtlib/vt_libwrap.c b/ompi/contrib/vt/vt/vtlib/vt_libwrap.c index 164f5f2cee..1b474e9dc1 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_libwrap.c +++ b/ompi/contrib/vt/vt/vtlib/vt_libwrap.c @@ -199,7 +199,7 @@ void VTLibwrap_delete(VTLibwrap** lw) { uint32_t i; - vt_assert(*lw); + vt_libassert(*lw); /* close all opened handles */ for( i = 0; i < (*lw)->handlen; i++ ) @@ -236,7 +236,7 @@ void VTLibwrap_func_init(const VTLibwrap* lw, const char* func, { uint32_t i; - vt_assert(lw); + vt_libassert(lw); VT_MEMHOOKS_OFF(); @@ -334,13 +334,13 @@ void VTLibwrap_func_start(const VTLibwrap* lw, const int funcid) { uint64_t time; - vt_assert(lw); + vt_libassert(lw); if( !vt_is_alive ) return; VT_MEMHOOKS_OFF(); - vt_assert(funcid != VT_LIBWRAP_NOID); + vt_libassert(funcid != VT_LIBWRAP_NOID); time = vt_pform_wtime(); @@ -353,13 +353,13 @@ void VTLibwrap_func_end(const VTLibwrap* lw, const int funcid) { uint64_t time; - vt_assert(lw); + vt_libassert(lw); if( !vt_is_alive ) return; VT_MEMHOOKS_OFF(); - vt_assert(funcid != VT_LIBWRAP_NOID); + vt_libassert(funcid != VT_LIBWRAP_NOID); time = vt_pform_wtime(); diff --git a/ompi/contrib/vt/vt/vtlib/vt_mpireg.c b/ompi/contrib/vt/vt/vtlib/vt_mpireg.c index 87103f3c73..8f37fde3e2 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_mpireg.c +++ b/ompi/contrib/vt/vt/vtlib/vt_mpireg.c @@ -48,7 +48,7 @@ void vt_mpi_register() void vt_mpi_register_remain() { - vt_assert( mpi_fid != (uint32_t)-1 ); + vt_libassert( mpi_fid != (uint32_t)-1 ); /* include generated function registry */ # include "vt_mpireg.gen.c" diff --git a/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c b/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c index 38d72b11f7..3d30c027b5 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c +++ b/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c @@ -475,7 +475,7 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush, ctype = OTF_COLLECTIVE_TYPE_ONE2ALL; break; default: - vt_assert(0); + vt_libassert(0); } if (OTF_WStream_writeDefCollectiveOperation(gen->filestream, entry->cid, @@ -594,7 +594,7 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush, mtype = OTF_MARKER_TYPE_HINT; break; default: - vt_assert(0); + vt_libassert(0); } if (OTF_WStream_writeDefMarker(gen->filestream, entry->mid, @@ -634,7 +634,7 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush, vtype = OTF_DOUBLE; break; default: - vt_assert(0); + vt_libassert(0); } if (OTF_WStream_writeDefKeyValue(gen->filestream, entry->kid, vtype, @@ -792,7 +792,7 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush, kvpair.value.otf_double = entry->kvalue.d; break; default: - vt_assert(0); + vt_libassert(0); } if (OTF_WBuffer_writeKeyValuePair_short( filestream_buffer, @@ -985,7 +985,7 @@ void VTGen_flush(VTGen* gen, uint8_t lastFlush, } default: { - vt_assert(0); + vt_libassert(0); } } @@ -1135,25 +1135,25 @@ void VTGen_delete(VTGen* gen) OTF_getFilename(gen->fileprefix, gen->tid+1, OTF_FILETYPE_DEF | gen->filecomp, 0, NULL); - vt_assert(tmp_namev[0]); + vt_libassert(tmp_namev[0]); tmp_namev[1] = OTF_getFilename(gen->fileprefix, gen->tid+1, OTF_FILETYPE_EVENT | gen->filecomp, 0, NULL); - vt_assert(tmp_namev[1]); + vt_libassert(tmp_namev[1]); tmp_namev[2] = OTF_getFilename(gen->fileprefix, gen->tid+1, OTF_FILETYPE_STATS | gen->filecomp, 0, NULL); - vt_assert(tmp_namev[2]); + vt_libassert(tmp_namev[2]); tmp_namev[3] = OTF_getFilename(gen->fileprefix, gen->tid+1, OTF_FILETYPE_MARKER | gen->filecomp, 0, NULL); - vt_assert(tmp_namev[3]); + vt_libassert(tmp_namev[3]); tmp_namev[4] = NULL; @@ -1965,7 +1965,7 @@ void VTGen_write_KEYVAL(VTGen* gen, uint32_t kid, uint8_t vtype, void* kvalue) VTGEN_ALIGN_LENGTH(sizeof(VTBuf_Entry_KeyValue)); /* No VTGEN_ALLOC_EVENT since space must be guaranteed */ - vt_assert( (uint64_t)((gen)->buf->pos - (gen)->buf->mem) <= + vt_libassert( (uint64_t)((gen)->buf->pos - (gen)->buf->mem) <= (uint64_t)((gen)->buf->size - length) ); new_entry = ((VTBuf_Entry_KeyValue*)gen->buf->pos); @@ -1999,7 +1999,7 @@ void VTGen_write_KEYVAL(VTGen* gen, uint32_t kid, uint8_t vtype, void* kvalue) new_entry->kvalue.d = *((double*)kvalue); break; default: - vt_assert(0); + vt_libassert(0); } VTGEN_JUMP(gen, length); diff --git a/ompi/contrib/vt/vt/vtlib/vt_plugin_cntr.c b/ompi/contrib/vt/vt/vtlib/vt_plugin_cntr.c index bf6a467d56..ac5b316787 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_plugin_cntr.c +++ b/ompi/contrib/vt/vt/vtlib/vt_plugin_cntr.c @@ -697,13 +697,13 @@ void vt_plugin_cntr_finalize(uint32_t tnum) { static void maybe_register_new_thread(VTThrd * thrd, uint32_t tid) { struct vt_plugin_cntr_defines * plugin_cntr_defines; - vt_assert(thrd!=NULL); + vt_libassert(thrd!=NULL); /* "register" a thread */ if (thrd->plugin_cntr_defines == NULL) { uint32_t i; thrd->plugin_cntr_defines = calloc(1, sizeof(struct vt_plugin_cntr_defines)); - vt_assert(thrd->plugin_cntr_defines!=NULL); + vt_libassert(thrd->plugin_cntr_defines!=NULL); plugin_cntr_defines = (struct vt_plugin_cntr_defines *) thrd->plugin_cntr_defines; plugin_cntr_defines->counters = calloc(VT_PLUGIN_CNTR_SYNCH_TYPE_MAX, @@ -829,7 +829,7 @@ static void add_events(struct vt_plugin current_plugin, VTThrd * thrd) { uint32_t vt_plugin_cntr_get_num_synch_metrics(VTThrd * thrd) { uint32_t num = 0; - vt_assert(thrd != NULL); + vt_libassert(thrd != NULL); if (thrd->plugin_cntr_defines == NULL) return 0; num = ((struct vt_plugin_cntr_defines *)(thrd->plugin_cntr_defines)) diff --git a/ompi/contrib/vt/vt/vtlib/vt_thrd_java.c b/ompi/contrib/vt/vt/vtlib/vt_thrd_java.c index 90c49eb77f..53454fd2fc 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_thrd_java.c +++ b/ompi/contrib/vt/vt/vtlib/vt_thrd_java.c @@ -124,7 +124,7 @@ uint32_t VTThrd_getThreadId() if (tid == NULL && vt_jvmti_agent->vm_is_dead) return 0; else - vt_assert(tid != NULL); + vt_libassert(tid != NULL); return *tid; } @@ -133,7 +133,7 @@ void VTThrd_createMutex(VTThrdMutex** mutex) { jvmtiError error; - vt_assert(mutexInitMutex != NULL); + vt_libassert(mutexInitMutex != NULL); error = (*jvmti)->RawMonitorEnter(jvmti, mutexInitMutex); vt_java_check_error(jvmti, error, "RawMonitorEnter"); @@ -190,7 +190,7 @@ void VTThrd_unlock(VTThrdMutex** mutex) { jvmtiError error; - vt_assert(*mutex != NULL); + vt_libassert(*mutex != NULL); error = (*jvmti)->RawMonitorExit(jvmti, (*mutex)->m); vt_java_check_error(jvmti, error, "RawMonitorExit"); diff --git a/ompi/contrib/vt/vt/vtlib/vt_thrd_omp.c b/ompi/contrib/vt/vt/vtlib/vt_thrd_omp.c index 2a8fcfa7e2..1bfd4cee42 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_thrd_omp.c +++ b/ompi/contrib/vt/vt/vtlib/vt_thrd_omp.c @@ -66,7 +66,7 @@ uint8_t VTThrd_isAlive() uint32_t VTThrd_getThreadId() { - vt_assert(threadId != VT_NO_ID); + vt_libassert(threadId != VT_NO_ID); return threadId; } @@ -109,7 +109,7 @@ void VTThrd_lock(VTThrdMutex** mutex) void VTThrd_unlock(VTThrdMutex** mutex) { - vt_assert(*mutex != NULL); + vt_libassert(*mutex != NULL); omp_unset_lock(&((*mutex)->m)); } diff --git a/ompi/contrib/vt/vt/vtlib/vt_thrd_pthread.c b/ompi/contrib/vt/vt/vtlib/vt_thrd_pthread.c index fb75e904b3..4877326566 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_thrd_pthread.c +++ b/ompi/contrib/vt/vt/vtlib/vt_thrd_pthread.c @@ -60,7 +60,7 @@ static uint8_t masterThreadTerminated = 0; static uint32_t idle_tid_list_size(uint32_t ptid) { - vt_assert(ptid < VTThrdMaxNum); + vt_libassert(ptid < VTThrdMaxNum); return idleThreadIds[ptid].size; } @@ -68,7 +68,7 @@ static void idle_tid_list_push_back(uint32_t ptid, uint32_t tid) { IdleThreadIdListEntryT* idle_tid; - vt_assert(ptid < VTThrdMaxNum); + vt_libassert(ptid < VTThrdMaxNum); /* create new list entry */ idle_tid = (IdleThreadIdListEntryT*)calloc(1, @@ -98,8 +98,8 @@ static uint32_t idle_tid_list_pop_front(uint32_t ptid) uint32_t tid; IdleThreadIdListEntryT* tmp; - vt_assert(ptid < VTThrdMaxNum); - vt_assert(idleThreadIds[ptid].size > 0); + vt_libassert(ptid < VTThrdMaxNum); + vt_libassert(idleThreadIds[ptid].size > 0); /* get thread-ID from the first list entry */ tid = idleThreadIds[ptid].first->tid; @@ -289,7 +289,7 @@ uint32_t VTThrd_getThreadId() if (tid == NULL && masterThreadTerminated) return 0; else - vt_assert(tid != NULL); + vt_libassert(tid != NULL); return *tid; } @@ -331,7 +331,7 @@ void VTThrd_lock(VTThrdMutex** mutex) void VTThrd_unlock(VTThrdMutex** mutex) { - vt_assert(*mutex != NULL); + vt_libassert(*mutex != NULL); pthread_mutex_unlock(&((*mutex)->m)); } diff --git a/ompi/contrib/vt/vt/vtlib/vt_trc.c b/ompi/contrib/vt/vt/vtlib/vt_trc.c index bd659f02ed..196c6d76bd 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_trc.c +++ b/ompi/contrib/vt/vt/vtlib/vt_trc.c @@ -2196,7 +2196,7 @@ uint32_t vt_def_region(uint32_t tid, const char* rname, uint32_t fid, #if !defined(VT_DISABLE_RFG) /* get region's filter/group information */ rinf = RFG_Regions_add(VTTHRD_RFGREGIONS(VTThrdv[0]), rname, rid); - vt_assert(rinf != NULL); + vt_libassert(rinf != NULL); /* get region's group name, if specified by VT_GROUPS_SPEC */ if ( rinf->groupName != NULL ) @@ -2558,7 +2558,7 @@ uint8_t vt_enter(uint32_t tid, uint64_t* time, uint32_t rid) #if (defined(VT_MT) || defined(VT_HYB) || defined(VT_JAVA)) VTTHRD_UNLOCK_IDS(); #endif /* VT_MT || VT_HYB || V_JAVA */ - vt_assert(rinf_master != NULL); + vt_libassert(rinf_master != NULL); rinf = RFG_Regions_add(VTTHRD_RFGREGIONS(VTThrdv[tid]), rinf_master->regionName, rid); @@ -2571,9 +2571,9 @@ uint8_t vt_enter(uint32_t tid, uint64_t* time, uint32_t rid) if (!RFG_Regions_stackPush(VTTHRD_RFGREGIONS(VTThrdv[tid]), rid, do_trace, &rinf)) - vt_assert(0); + vt_libassert(0); # else /* VT_MT || VT_HYB || VT_JAVA || VT_GPU */ - vt_assert(0); + vt_libassert(0); # endif /* VT_MT || VT_HYB || VT_JAVA || VT_GPU */ } @@ -2633,7 +2633,7 @@ void vt_exit(uint32_t tid, uint64_t* time) if (!RFG_Regions_stackPop(VTTHRD_RFGREGIONS(VTThrdv[tid]), &rinf, &climitbyenter)) { - vt_assert(0); + vt_libassert(0); } if (climitbyenter == 0) diff --git a/ompi/contrib/vt/vt/vtlib/vt_unimci.c b/ompi/contrib/vt/vt/vtlib/vt_unimci.c index 3344bf4cf2..6e336a48e4 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_unimci.c +++ b/ompi/contrib/vt/vt/vtlib/vt_unimci.c @@ -66,12 +66,12 @@ void vt_unimci_check_msg(uint8_t record, uint64_t* time) /* get first message */ UNIMCI_pop_msg( &msg ); - vt_assert( msg ); + vt_libassert( msg ); /* record marker, if allowed */ if( record ) { - vt_assert( time ); + vt_libassert( time ); /* check for message type */ switch( msg->msgType )