1
1
- extendet support for BlueGene/P:
	- building shared VT libraries
	- tracing 3rd-party libraries (e.g. libc I/O)
	- tracing multi-threaded applications 
VT configure fixes:
- fixed detection on CTool for 3rd-party library tracing
VT fixes:
- reduced memory overhead by using the trace buffer for string/array elements of some records
- do not shutdown call-stack if max. number of buffer flushes reached, because the additional function leaves suggest a wrong application flow
- vtunify-mpi:
	- fixed conversion of VTUnify_MPI_Aint arrays 
- vtwrapper:
	- if an OPARI modified object file (*.mod.o) cannot be renamed, abort only if the compiler wrapper runs in "only-compile" mode (-c) 
OTF fixes:
- otfinfo:
	- fixed and enhanced calculation of trace file size
	- changed unit of timer resolution (s -> Hz) 
- otfprofile:
	- fixed progress
	- kill '_' and '\' in process names to make LaTex happier

This commit was SVN r22963.
Этот коммит содержится в:
Matthias Jurenz 2010-04-13 07:20:56 +00:00
родитель b4dc28f075
Коммит 175fd07de4
22 изменённых файлов: 397 добавлений и 328 удалений

Просмотреть файл

@ -3,6 +3,8 @@
(see extlib/otf/ChangeLog) (see extlib/otf/ChangeLog)
- added support for tracing functions in shared libraries instrumented - added support for tracing functions in shared libraries instrumented
by the GNU, Intel, PathScale, or PGI 9 compiler by the GNU, Intel, PathScale, or PGI 9 compiler
- extended support for BlueGene/P in terms of tracing libraries
(e.g. libc I/O) and tracing of multi-threaded applications
- added support for PAPI-C counters which belong to different components - added support for PAPI-C counters which belong to different components
- added environment variable VT_METRICS_SEP to specify a string which - added environment variable VT_METRICS_SEP to specify a string which
separate the counter names in VT_METRICS separate the counter names in VT_METRICS
@ -20,13 +22,15 @@
- use more portable 'nm' command instead of the BFD library to collect - use more portable 'nm' command instead of the BFD library to collect
symbol information for instrumentation with the GNU, Intel, PathScale, symbol information for instrumentation with the GNU, Intel, PathScale,
and PGI 9 compiler and PGI 9 compiler
- fixed stack shutdown if maximum number of buffer flushes was reached - do not shutdown call stack if maximum number of buffer flushes was
reached, because the additional leaves suggest a wrong application
flow
- fixed potential stack underflow in vtfilter which might be cause a - fixed potential stack underflow in vtfilter which might be cause a
segmentation fault segmentation fault
- fixed detection of unique node id on MacOS platforms - fixed detection of unique node id on MacOS platforms
- fixed support for LAM/MPI - fixed support for LAM/MPI
- fixed potential segmentation fault in vtunify-mpi which might occur - fixed potential segmentation fault in vtunify-mpi which might occur
on 32bit platforms using MPICH2 on 32bit platforms
- patched libtool to avoid a bug in detection of the PGI 10 compilers - patched libtool to avoid a bug in detection of the PGI 10 compilers
5.8openmpi 5.8openmpi

Просмотреть файл

@ -8,8 +8,7 @@ CC_FOR_BUILD="xlc_r"
CXX_FOR_BUILD="xlC_r" CXX_FOR_BUILD="xlC_r"
enable_shared="no" enable_shared="no"
enable_threads="no" enable_threads="no"
enable_libctrace="no" enable_libtrace="no"
enable_iotrace="no"
enable_cpuidtrace="no" enable_cpuidtrace="no"
with_cross_prefix="blrts_" with_cross_prefix="blrts_"
with_mpibgl="yes" with_mpibgl="yes"

Просмотреть файл

@ -7,9 +7,6 @@ MPICXX="mpixlcxx_r"
CC_FOR_BUILD="xlc_r" CC_FOR_BUILD="xlc_r"
CXX_FOR_BUILD="xlC_r" CXX_FOR_BUILD="xlC_r"
enable_shared="no" enable_shared="no"
enable_threads="no"
enable_libctrace="no"
enable_iotrace="no"
enable_cpuidtrace="no" enable_cpuidtrace="no"
with_cross_prefix="bg" with_cross_prefix="bg"
with_mpibgp="yes" with_mpibgp="yes"

Просмотреть файл

@ -17,8 +17,7 @@ OPENMP_CFLAGS="-Popenmp"
PTHREAD_LIBS="-lpthread" PTHREAD_LIBS="-lpthread"
enable_shared="no" enable_shared="no"
enable_memtrace="no" enable_memtrace="no"
enable_libctrace="no" enable_libtrace="no"
enable_iotrace="no"
enable_cpuidtrace="no" enable_cpuidtrace="no"
enable_mpi2_io="no" enable_mpi2_io="no"
enable_metrics="necsx" enable_metrics="necsx"

Просмотреть файл

@ -24,6 +24,7 @@ AC_DEFUN([ACVT_COMPWRAP],
VT_WRAPPER_AVAIL_INST="manual" VT_WRAPPER_AVAIL_INST="manual"
VT_WRAPPER_DEFAULT_INST=manual VT_WRAPPER_DEFAULT_INST=manual
AC_REQUIRE([ACVT_PLATFORM])
AC_REQUIRE([ACVT_COMPINST]) AC_REQUIRE([ACVT_COMPINST])
AC_REQUIRE([ACVT_DYNINST]) AC_REQUIRE([ACVT_DYNINST])
AC_REQUIRE([ACVT_THREADS]) AC_REQUIRE([ACVT_THREADS])
@ -78,6 +79,11 @@ AC_DEFUN([ACVT_COMPWRAP],
[extra flags to add to LIBS when using wrapper compilers]), [extra flags to add to LIBS when using wrapper compilers]),
[VT_WRAPPER_EXTRA_LIBS=$withval]) [VT_WRAPPER_EXTRA_LIBS=$withval])
AS_IF([test "$PLATFORM" = "bgp" -a x"$enable_shared" = "xyes"],
[
VT_WRAPPER_EXTRA_LDFLAGS="$VT_WRAPPER_EXTRA_LDFLAGS -Wl,-dy"
])
VT_WRAPPER_VTLIB="-lvt" VT_WRAPPER_VTLIB="-lvt"
VT_WRAPPER_VTMPILIB="-lvt-mpi" VT_WRAPPER_VTMPILIB="-lvt-mpi"
VT_WRAPPER_VTMTLIB="-lvt-mt" VT_WRAPPER_VTMTLIB="-lvt-mt"

Просмотреть файл

@ -37,23 +37,23 @@ AC_DEFUN([ACVT_CTOOL],
sav_LDFLAGS=$LDFLAGS; LDFLAGS=$LDFLAGS_FOR_BUILD sav_LDFLAGS=$LDFLAGS; LDFLAGS=$LDFLAGS_FOR_BUILD
sav_LIBS=$LIBS; LIBS=$LIBS_FOR_BUILD sav_LIBS=$LIBS; LIBS=$LIBS_FOR_BUILD
sav_CPPFLAGS=$CPPFLAGS sav2_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $CTOOLINCDIR" CPPFLAGS="$CPPFLAGS $CTOOLINCDIR"
AC_CHECK_HEADER([ctool/ctool.h], [], AC_CHECK_HEADER([ctool/ctool.h], [],
[ [
AC_MSG_NOTICE([error: no ctool/ctool.h found; check path for CTool package first...]) AC_MSG_NOTICE([error: no ctool/ctool.h found; check path for CTool package first...])
ctool_error="yes" ctool_error="yes"
]) ])
CPPFLAGS=$sav_CPPFLAGS CPPFLAGS=$sav2_CPPFLAGS
AS_IF([test x"$CTOOLLIB" = x -a x"$ctool_error" = "xno"], AS_IF([test x"$CTOOLLIB" = x -a x"$ctool_error" = "xno"],
[ [
sav_LIBS=$LIBS sav2_LIBS=$LIBS
LIBS="$LIBS $CTOOLLIBDIR -lctool" LIBS="$LIBS $CTOOLLIBDIR -lctool"
AC_MSG_CHECKING([whether linking with -lctool works]) AC_MSG_CHECKING([whether linking with -lctool works])
AC_TRY_LINK([],[], AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); CTOOLLIB=-lctool],[AC_MSG_RESULT([no])]) [AC_MSG_RESULT([yes]); CTOOLLIB=-lctool],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS LIBS=$sav2_LIBS
]) ])
CXX=$sav_CXX CXX=$sav_CXX

Просмотреть файл

@ -33,11 +33,15 @@ AC_DEFUN([ACVT_DL],
AC_HELP_STRING([--with-dl-lib=DLLIB], [use given libdl lib, default: -ldl]), AC_HELP_STRING([--with-dl-lib=DLLIB], [use given libdl lib, default: -ldl]),
[DLLIB="$withval"]) [DLLIB="$withval"])
AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "bgp" -o "$PLATFORM" = "crayxt"], AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "crayxt"],
[ [
AC_MSG_NOTICE([error: dynamic linking library (libdl) isn't suitable on this platform]) AC_MSG_NOTICE([error: dynamic linking library (libdl) isn't suitable on this platform])
dl_error="yes" dl_error="yes"
]) ])
AS_IF([test "$PLATFORM" = "bgp"],
[
ac_cv_have_decl_RTLD_NEXT="no"
])
AS_IF([test x"$dl_error" = "xno"], AS_IF([test x"$dl_error" = "xno"],
[ [

Просмотреть файл

@ -5,6 +5,8 @@ AC_DEFUN([ACVT_JAVA],
force_java="no" force_java="no"
have_java="no" have_java="no"
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_ENABLE(java, AC_ARG_ENABLE(java,
AC_HELP_STRING([--enable-java], AC_HELP_STRING([--enable-java],
[enable Java support, default: enable if JVMTI found by configure]), [enable Java support, default: enable if JVMTI found by configure]),
@ -12,9 +14,18 @@ AC_DEFUN([ACVT_JAVA],
AS_IF([test x"$check_java" = "xyes"], AS_IF([test x"$check_java" = "xyes"],
[ [
AC_MSG_CHECKING([whether we can build shared libraries]) AS_IF([test "$PLATFORM" = "bgp"],
AS_IF([test x"$enable_shared" = "xyes"], [
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); java_error="yes"]) AC_MSG_NOTICE([error: Java tracing not supported on this platform])
java_error="yes"
])
AS_IF([test x"$java_error" = "xno"],
[
AC_MSG_CHECKING([whether we can build shared libraries])
AS_IF([test x"$enable_shared" = "xyes"],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); java_error="yes"])
])
AS_IF([test x"$java_error" = "xno"], AS_IF([test x"$java_error" = "xno"],
[ [

Просмотреть файл

@ -4,6 +4,8 @@ AC_DEFUN([ACVT_LIBC],
libc_pathname= libc_pathname=
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_WITH(libc, AC_ARG_WITH(libc,
AC_HELP_STRING([--with-libc=NAME], AC_HELP_STRING([--with-libc=NAME],
[give the pathname for LIBC, default: automatically by configure]), [give the pathname for LIBC, default: automatically by configure]),
@ -17,24 +19,30 @@ AC_DEFUN([ACVT_LIBC],
AS_IF([test x"$libc_pathname" = x], AS_IF([test x"$libc_pathname" = x],
[ [
rm -f conftest AS_IF([test "$PLATFORM" = "bgp"],
AC_TRY_LINK([], [],
[ [
AS_IF([test -r "conftest"], libc_pathname="/lib/libc.so.6"
],
[
rm -f conftest
AC_TRY_LINK([], [],
[ [
libc_pathname=`ldd conftest 2>/dev/null | grep "libc\." | \ AS_IF([test -r "conftest"],
sed -e "s/.*=>//" \ [
-e "s/[[\(].*[\)]]//" \ libc_pathname=`ldd conftest 2>/dev/null | grep "libc\." | \
-e "s/[[ ]]//g" \ sed -e "s/.*=>//" \
-e "s%^[[^/]].*%%" | \ -e "s/[[\(].*[\)]]//" \
head -n1` -e "s/[[ ]]//g" \
-e "s%^[[^/]].*%%" | \
head -n1`
],
[
libc_error="yes"
])
], ],
[ [
libc_error="yes" libc_error="yes"
]) ])
],
[
libc_error="yes"
]) ])
]) ])

Просмотреть файл

@ -10,6 +10,8 @@ AC_DEFUN([ACVT_LIBWRAP],
force_libcwrap="no" force_libcwrap="no"
force_iowrap="no" force_iowrap="no"
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_ENABLE(libtrace, AC_ARG_ENABLE(libtrace,
AC_HELP_STRING([--enable-libtrace=LIST], AC_HELP_STRING([--enable-libtrace=LIST],
[enable library tracing support (gen,libc,io), default: automatically by configure]), [enable library tracing support (gen,libc,io), default: automatically by configure]),
@ -42,8 +44,17 @@ AC_DEFUN([ACVT_LIBWRAP],
AS_IF([test x"$check_libwrap" != "xno"], AS_IF([test x"$check_libwrap" != "xno"],
[ [
ACVT_DL AS_IF([test "$PLATFORM" = "bgp" -a x"$enable_shared" = "xno"],
AS_IF([test x"$have_dl" = "xno"], [libwrap_error="yes"]) [
AC_MSG_NOTICE([error: library tracing requires building of shared libraries on this platform; re-configure with \`--enable-shared'])
libwrap_error="yes"
])
AS_IF([test x"$libwrap_error" = "xno"],
[
ACVT_DL
AS_IF([test x"$have_dl" = "xno"], [libwrap_error="yes"])
])
AS_IF([test x"$libwrap_error" = "xno"], AS_IF([test x"$libwrap_error" = "xno"],
[ [

Просмотреть файл

@ -79,6 +79,12 @@ AC_DEFUN([ACVT_PLATFORM],
BITMODE=$withval BITMODE=$withval
]) ])
AS_IF([test "$PLATFORM" = "bgp"],
[
CPPFLAGS="$CPPFLAGS -I/bgsys/drivers/ppcfloor/arch/include"
])
AC_SUBST(PLATFORM) AC_SUBST(PLATFORM)
AC_SUBST(BITMODE) AC_SUBST(BITMODE)
]) ])

Просмотреть файл

@ -59,7 +59,6 @@ AC_DEFUN([ACVT_TIMER],
timer=TIMER_RTS_GET_TIMEBASE timer=TIMER_RTS_GET_TIMEBASE
;; ;;
bgp) bgp)
CPPFLAGS="$CPPFLAGS -I/bgsys/drivers/ppcfloor/arch/include"
AC_DEFINE([TIMER_BGP_GET_TIMEBASE], [1], [Use `_bgp_GetTimeBase' function]) AC_DEFINE([TIMER_BGP_GET_TIMEBASE], [1], [Use `_bgp_GetTimeBase' function])
timer=TIMER_BGP_GET_TIMEBASE timer=TIMER_BGP_GET_TIMEBASE
;; ;;

Просмотреть файл

@ -147,14 +147,20 @@ AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strdup])
# Check for libtool # Check for libtool
ACVT_CONF_TITLE([Libtool]) ACVT_CONF_TITLE([Libtool])
AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "bgp"],
[ # Override the configure options '--enable-static' and '--enable-shared' to
AS_IF([test x"$enable_shared" = "xyes"], # enforce building only static libraries on CrayXT and BlueGene/L platforms.
[AC_MSG_WARN([VampirTrace does not support shared libraries on IBM BlueGene; build static libraries])]) AS_IF([test "$PLATFORM" = "crayxt" -o "$PLATFORM" = "bgl"],
enable_shared="no"; enable_static="yes" [enable_static="yes"; enable_shared="no"])
])
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
# If building of shared libraries is desired on BlueGene/P, add '-Wl,-dy'
# to linker flags on BlueGene/P platforms to lead libtool to believe that
# dynamic linking is the default behaviour of the linker.
AS_IF([test "$PLATFORM" = "bgp" -a x"$enable_shared" = "xyes"],
[export LDFLAGS="$LDFLAGS -Wl,-dy"])
# Check for OTF # Check for OTF
ACVT_CONF_TITLE([Open Trace Format (OTF)]) ACVT_CONF_TITLE([Open Trace Format (OTF)])
ACVT_OTF ACVT_OTF

Просмотреть файл

@ -2,7 +2,10 @@
- enforce building position independent code (PIC) for the static - enforce building position independent code (PIC) for the static
version of the OTF library version of the OTF library
(so it's possible to add these objects to 3rd-party shared libraries) (so it's possible to add these objects to 3rd-party shared libraries)
- patched libtool to avoid a bug in detection of the PGI 10 C++ compiler - fixed and enhanced calculation of trace file size in otfinfo
- patched libtool:
- to avoid a bug in detection of the PGI 10 C++ compiler
- to detect IBM cross compilers on BlueGene/P
1.6.4openmpi 1.6.4openmpi
- enhanced reading of process group definition records - enhanced reading of process group definition records

Просмотреть файл

@ -11,6 +11,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#define PROGRESSBARLEN 20 #define PROGRESSBARLEN 20
@ -42,10 +45,12 @@ int main(int argc, char **argv)
uint64_t size = 0; /*size of the event files*/ uint64_t size = 0; /*size of the event files*/
uint64_t minRead = 0; /*variable for progress*/ uint64_t minRead = 0; /*variable for progress*/
uint64_t currRead = 0; /*count of current read bytes*/ uint64_t currRead = 0; /*count of current read bytes*/
uint32_t numStreams = 0;
char* parameter = NULL; /*reference to the parameters*/ char* parameter = NULL; /*reference to the parameters*/
char* fileLocation = NULL; /*path to the tracefiles*/ char* fileLocation = NULL; /*path to the tracefiles*/
OTF_FileManager *manager = NULL; OTF_FileManager *manager = NULL;
OTF_Reader *reader = NULL; OTF_Reader *reader = NULL;
OTF_MasterControl* master = NULL;
OTF_HandlerArray *handles = NULL; OTF_HandlerArray *handles = NULL;
int showProgress = 0; int showProgress = 0;
int infoLevel = 1; /*level for the output of information (local)*/ int infoLevel = 1; /*level for the output of information (local)*/
@ -167,18 +172,44 @@ int main(int argc, char **argv)
/*read definition file*/ /*read definition file*/
checkVal = OTF_Reader_readDefinitions( reader, handles ); checkVal = OTF_Reader_readDefinitions( reader, handles );
otfinfo_assert( checkVal != OTF_READ_ERROR ); otfinfo_assert( checkVal != OTF_READ_ERROR );
checkVal = OTF_Reader_readMarkers( reader, handles ); checkVal = OTF_Reader_readMarkers( reader, handles );
otfinfo_assert( checkVal != OTF_READ_ERROR ); otfinfo_assert( checkVal != OTF_READ_ERROR );
/*getting the size of the event files*/ /*getting the size of the event files*/
OTF_Reader_setRecordLimit( reader, 0 ); master = OTF_Reader_getMasterControl( reader );
checkVal = OTF_Reader_readEvents( reader, handles ); otfinfo_assert( master );
otfinfo_assert(checkVal != OTF_READ_ERROR);
checkVal = OTF_Reader_eventBytesProgress( reader, &minRead, numStreams = OTF_MasterControl_getCount( master );
&currRead, &size); otfinfo_assert( numStreams > 0 );
otfinfo_assert( checkVal != OTF_READ_ERROR );
info.traceFileSize = size; info.traceFileSize = 0;
for( i = 0; i < (int)numStreams; i++ )
{
static char filename[1024];
static uint32_t filecomp = OTF_FILECOMPRESSION_COMPRESSED;
static struct stat filestat;
/*get event file name of stream*/
OTF_getFilename( fileLocation, i+1, OTF_FILETYPE_EVENT | filecomp,
sizeof(filename), filename );
/*if stat succeeds, compute total file size*/
if( stat( filename, &filestat ) == 0 )
{
info.traceFileSize += (uint64_t)filestat.st_size;
}
/*otherwise, re-try with uncompressed file*/
else
{
if( filecomp == OTF_FILECOMPRESSION_COMPRESSED )
{
filecomp = OTF_FILECOMPRESSION_UNCOMPRESSED;
i--; continue;
}
}
filecomp = OTF_FILECOMPRESSION_COMPRESSED;
}
/*printing the results and cleanup*/ /*printing the results and cleanup*/
if( 0 < infoLevel ) if( 0 < infoLevel )
@ -339,15 +370,15 @@ static void show_info_level_1( definitionInfoT *info )
} }
switch( i ) switch( i )
{ {
case 0: unitTimer = "s";break; case 0: unitTimer = "Hz";break;
case 1: unitTimer = "ms";break; case 1: unitTimer = "KHz";break;
case 2: unitTimer = "µs";break; case 2: unitTimer = "MHz";break;
default: unitTimer = "ns";break; default: unitTimer = "GHz";break;
} }
/*formating the size of the event files*/ /*formating the size of the event files*/
i = 0; i = 0;
while( (fileSize / 1024 >= 1.0) && (i < 4) ) while( (fileSize / 1024 >= 1.0) && (i < 5) )
{ {
fileSize /= 1024; fileSize /= 1024;
i++; i++;
@ -357,6 +388,7 @@ static void show_info_level_1( definitionInfoT *info )
case 0: unitFileSize = "Bytes"; break; case 0: unitFileSize = "Bytes"; break;
case 1: unitFileSize = "KB"; break; case 1: unitFileSize = "KB"; break;
case 2: unitFileSize = "MB"; break; case 2: unitFileSize = "MB"; break;
case 3: unitFileSize = "GB"; break;
default: unitFileSize = "TB";break; default: unitFileSize = "TB";break;
} }

Просмотреть файл

@ -119,7 +119,18 @@ int handleDefProcess(void* firsthandlerarg, uint32_t streamid,
} }
else else
{ {
gd_ptr->sum_container.adddef_Proc(p_def_key, strdup(name));
char* dup= strdup( name );
char* p= dup;
while ( '\0' != *p ) {
if ( '_' == *p ) *p= ' ';
if ( '\\' == *p ) *p= ' ';
p++;
}
gd_ptr->sum_container.adddef_Proc(p_def_key, dup );
} }
Process p; Process p;

Просмотреть файл

@ -554,7 +554,9 @@ int main( int argc, const char** argv )
} }
# ifdef _OPENMP # ifdef _OPENMP
if(status) {
# pragma omp barrier # pragma omp barrier
}
# endif # endif
if( (read <= 0) && (ready == false) ) { if( (read <= 0) && (ready == false) ) {
# ifdef _OPENMP # ifdef _OPENMP
@ -585,11 +587,10 @@ int main( int argc, const char** argv )
} }
} }
} }
# ifdef _OPENMP
# pragma omp barrier
# endif
if(status && ready == false) { if(status && ready == false) {
# ifdef _OPENMP # ifdef _OPENMP
# pragma omp barrier
# pragma omp single nowait # pragma omp single nowait
# endif # endif
{ {
@ -599,6 +600,7 @@ int main( int argc, const char** argv )
} }
} }
} }
OTF_Reader_setRecordLimit( reader, (uint64_t) OTF_READ_MAXRECORDS ); OTF_Reader_setRecordLimit( reader, (uint64_t) OTF_READ_MAXRECORDS );
OTF_Reader_close(reader); OTF_Reader_close(reader);

Просмотреть файл

@ -248,23 +248,30 @@ VT_MPI_INT VTUnify_MPI_Type_free( VTUnify_MPI_Datatype * utype )
VT_MPI_INT VTUnify_MPI_Type_struct( VT_MPI_INT count, VT_MPI_INT VTUnify_MPI_Type_struct( VT_MPI_INT count,
VT_MPI_INT * array_of_blocklengths, VT_MPI_INT * array_of_blocklengths,
VTUnify_MPI_Aint * array_of_displacements, VTUnify_MPI_Aint * array_of_udisplacements,
VTUnify_MPI_Datatype * array_of_utypes, VTUnify_MPI_Datatype * array_of_utypes,
VTUnify_MPI_Datatype * newutype ) VTUnify_MPI_Datatype * newutype )
{ {
VT_MPI_INT error, i; VT_MPI_INT error, i;
MPI_Aint * array_of_displacements;
MPI_Datatype * array_of_types; MPI_Datatype * array_of_types;
MPI_Datatype newtype; MPI_Datatype newtype;
array_of_displacements = (MPI_Aint*)malloc( count * sizeof( MPI_Aint ));
assert( array_of_displacements );
for( i = 0; i < count; i++ )
array_of_displacements[i] = (MPI_Aint)array_of_udisplacements[i];
array_of_types = (MPI_Datatype*)malloc( count * sizeof( MPI_Datatype )); array_of_types = (MPI_Datatype*)malloc( count * sizeof( MPI_Datatype ));
assert( array_of_types ); assert( array_of_types );
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
array_of_types[i] = get_mpi_type( array_of_utypes[i] ); array_of_types[i] = get_mpi_type( array_of_utypes[i] );
error = MPI_Type_struct( count, array_of_blocklengths, error = MPI_Type_struct( count, array_of_blocklengths,
(MPI_Aint*)array_of_displacements, array_of_types, array_of_displacements, array_of_types,
&newtype ); &newtype );
free( array_of_displacements );
free( array_of_types ); free( array_of_types );
if( error == MPI_SUCCESS ) if( error == MPI_SUCCESS )

Просмотреть файл

@ -95,7 +95,7 @@ EXTERN VT_MPI_INT VTUnify_MPI_Type_free( VTUnify_MPI_Datatype * utype );
EXTERN VT_MPI_INT VTUnify_MPI_Type_struct( VT_MPI_INT count, EXTERN VT_MPI_INT VTUnify_MPI_Type_struct( VT_MPI_INT count,
VT_MPI_INT * array_of_blocklengths, VT_MPI_INT * array_of_blocklengths,
VTUnify_MPI_Aint * array_of_displacements, VTUnify_MPI_Aint * array_of_udisplacements,
VTUnify_MPI_Datatype * array_of_utypes, VTUnify_MPI_Datatype * array_of_utypes,
VTUnify_MPI_Datatype * newutype ); VTUnify_MPI_Datatype * newutype );

Просмотреть файл

@ -981,7 +981,8 @@ Wrapper::run()
std::cout << "+++ rename " << m_pConfig->m_vecOpari_ModObjFiles[i] std::cout << "+++ rename " << m_pConfig->m_vecOpari_ModObjFiles[i]
<< " to " << target << std::endl; << " to " << target << std::endl;
if( rename( m_pConfig->m_vecOpari_ModObjFiles[i].c_str(), if( m_pConfig->m_bCompOnly &&
rename( m_pConfig->m_vecOpari_ModObjFiles[i].c_str(),
target.c_str() ) == -1 ) target.c_str() ) == -1 )
{ {
std::cerr << ExeName << ": could not rename " std::cerr << ExeName << ": could not rename "

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -942,38 +942,28 @@ void vt_trace_off(uint8_t mark, uint8_t permanent)
if ( vt_is_alive && if ( vt_is_alive &&
VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) != VT_TRACE_OFF_PERMANENT ) VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) != VT_TRACE_OFF_PERMANENT )
{ {
uint64_t time; if ( mark )
{
uint64_t time;
time = vt_pform_wtime();
vt_enter(&time, vt_trc_regid[VT__TRC_OFF]);
}
if ( permanent ) if ( permanent )
{ {
/* shutdown call stack */
while(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]) > 0) {
time = vt_pform_wtime();
vt_exit(&time);
}
VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) = VT_TRACE_OFF_PERMANENT; VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) = VT_TRACE_OFF_PERMANENT;
vt_cntl_msg(1, "Tracing switched off permanently"); vt_cntl_msg(1, "Tracing switched off permanently");
} }
else else if ( VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON )
{ {
if ( VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON ) /* store current call stack level */
{ VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) = VT_TRACE_OFF;
if ( mark ) VTTHRD_STACK_LEVEL_AT_OFF(VTThrdv[VT_MY_THREAD]) =
{ VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]);
time = vt_pform_wtime();
vt_enter(&time, vt_trc_regid[VT__TRC_OFF]);
}
/* store current call stack level */ vt_cntl_msg(2, "Tracing switched off at call stack level (%i)",
VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) = VT_TRACE_OFF; VTTHRD_STACK_LEVEL_AT_OFF(VTThrdv[VT_MY_THREAD]));
VTTHRD_STACK_LEVEL_AT_OFF(VTThrdv[VT_MY_THREAD]) =
VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]);
vt_cntl_msg(2, "Tracing switched off at call stack level (%i)",
VTTHRD_STACK_LEVEL_AT_OFF(VTThrdv[VT_MY_THREAD]));
}
} }
} }
} }
@ -1465,7 +1455,7 @@ static void vt_write_def_header()
#if defined(VT_THRD_PTHREAD) #if defined(VT_THRD_PTHREAD)
/* VT_PTHREAD_REUSE */ /* VT_PTHREAD_REUSE */
vt_def_comment("__VT_COMMENT__ VT_PTHREAD_REUSE: %s", vt_def_comment("__VT_COMMENT__ VT_PTHREAD_REUSE: %s",
vt_env_pthread_reuse() ? "yes" : "no"); vt_env_pthread_reuse() ? "yes" : "no");
#endif /* VT_THRD_PTHREAD */ #endif /* VT_THRD_PTHREAD */
@ -1834,8 +1824,10 @@ uint8_t vt_enter(uint64_t* time, uint32_t rid) {
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) ==
VT_TRACE_OFF_PERMANENT) return 0; VT_TRACE_OFF_PERMANENT) return 0;
VTTHRD_STACK_PUSH(VTThrdv[VT_MY_THREAD]);
do_trace = ((VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON) && do_trace = ((VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON) &&
(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]) < max_stack_depth)); (VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD]) <= max_stack_depth));
#if !defined(VT_DISABLE_RFG) #if !defined(VT_DISABLE_RFG)
if( !RFG_Regions_stackPush(VTTHRD_RFGREGIONS(VTThrdv[VT_MY_THREAD]), if( !RFG_Regions_stackPush(VTTHRD_RFGREGIONS(VTThrdv[VT_MY_THREAD]),
@ -1924,11 +1916,6 @@ uint8_t vt_enter(uint64_t* time, uint32_t rid) {
UPDATE_RUSAGE(time); UPDATE_RUSAGE(time);
} }
/* push call stack, if tracing was not disabled by this event
(max buffer flushes reached) */
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) != VT_TRACE_OFF_PERMANENT)
VTTHRD_STACK_PUSH(VTThrdv[VT_MY_THREAD]);
return do_trace; return do_trace;
} }
@ -1944,8 +1931,10 @@ void vt_exit(uint64_t* time) {
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) ==
VT_TRACE_OFF_PERMANENT) return; VT_TRACE_OFF_PERMANENT) return;
VTTHRD_STACK_POP(VTThrdv[VT_MY_THREAD]);
do_trace = ((VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON) && do_trace = ((VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) == VT_TRACE_ON) &&
(VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD])+1 < max_stack_depth)); (VTTHRD_STACK_LEVEL(VTThrdv[VT_MY_THREAD])+1 <= max_stack_depth));
#if !defined(VT_DISABLE_RFG) #if !defined(VT_DISABLE_RFG)
if (!RFG_Regions_stackPop(VTTHRD_RFGREGIONS(VTThrdv[VT_MY_THREAD]), if (!RFG_Regions_stackPop(VTTHRD_RFGREGIONS(VTThrdv[VT_MY_THREAD]),
@ -1995,11 +1984,6 @@ void vt_exit(uint64_t* time) {
0, NULL); 0, NULL);
# endif /* VT_METR */ # endif /* VT_METR */
} }
/* pop call stack, if tracing was not disabled by this event
(max buffer flushes reached) */
if (VTTHRD_TRACE_STATUS(VTThrdv[VT_MY_THREAD]) != VT_TRACE_OFF_PERMANENT)
VTTHRD_STACK_POP(VTThrdv[VT_MY_THREAD]);
} }
/* -- File I/O -- */ /* -- File I/O -- */