1
1
- general:
		- incremented version number to 1.12.2
	- OTF library:
		- implemented workaround for handling bogus zlib sync. points during reading
Changes to VT:
	- general:
		- incremented version number ot 5.14.1
	- configure:
		- to prevent conflicts with the libtool RPM, append "/vampirtrace" to ${datadir}, if it doesn't points to the default (=${datarootdir})
		  (Fixes trac:3382)

This commit was SVN r27630.

The following Trac tickets were found above:
  Ticket 3382 --> https://svn.open-mpi.org/trac/ompi/ticket/3382
Этот коммит содержится в:
Matthias Jurenz 2012-11-26 08:54:14 +00:00
родитель 1237f8db57
Коммит e10786c62f
11 изменённых файлов: 1187 добавлений и 1145 удалений

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

@ -1,3 +1,10 @@
5.14.1openmpi
- updated version of internal OTF to 1.12.2openmpi
(see extlib/otf/ChangeLog)
- append "/vampirtrace" to DATADIR, if configuring inside Open MPI and
DATADIR doesn't points to the default (=DATAROOTDIR)
(prevents conflicts with the libtool RPM)
5.14openmpi
- updated version of internal OTF to 1.12.1openmpi
(see extlib/otf/ChangeLog)

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

@ -1 +1 @@
5.14openmpi
5.14.1openmpi

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

@ -81,6 +81,8 @@ AS_IF([test x"$inside_openmpi" != "xno" -o "$includedir" = "\${prefix}/include"]
[includedir="$includedir/vampirtrace"])
AS_IF([test x"$inside_openmpi" != "xno" -o "$datarootdir" = "\${prefix}/share"],
[datarootdir="$datarootdir/vampirtrace"])
AS_IF([test x"$inside_openmpi" != "xno" -a "$datadir" != "\${datarootdir}"],
[datadir="$datadir/vampirtrace"])
AS_IF([test "$docdir" = "\${datarootdir}/doc/\${PACKAGE_TARNAME}"],
[docdir="\${datarootdir}/doc"])

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

@ -67,7 +67,7 @@ BODY { font-family: sans-serif; }
<P>
<P>
<B><BIG CLASS="XHUGE">VampirTrace 5.14&nbsp;User Manual</BIG></B>
<B><BIG CLASS="XHUGE">VampirTrace 5.14.1&nbsp;User Manual</BIG></B>
<BR>
<BR>
<BR>

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

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

@ -1,3 +1,7 @@
1.12.2openmpi
- replaced temporary workaround for handling bogus zlib sync. points
by a more elaborated solution
1.12.1openmpi
- implemented workaround to avoid setting otf_errno when a false
error happens during OTF_RBuffer_Jump to a bogus zlib sync point

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

@ -7,7 +7,7 @@
major=1
minor=12
sub=1
sub=2
# string is used for alpha, beta, or release tags. If it is non-empty, it will
# be appended to the version number.
@ -50,5 +50,5 @@ string=openmpi
# release, age must be incremented. Otherwise, reset age
# to '0'.
library=6:3:5
library=6:4:5

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

@ -88,6 +88,7 @@ void OTF_File_init( OTF_File* file ) {
file->z= NULL;
file->zbuffer= NULL;
file->zbuffersize= 1024*10;
file->zbuffer_seek_further= 0;
#endif /* HAVE_ZLIB */
file->pos= 0;
file->mode= OTF_FILEMODE_NOTHING;
@ -110,6 +111,7 @@ void OTF_File_finalize( OTF_File* file ) {
file->z= NULL;
file->zbuffer= NULL;
file->zbuffersize= 0;
file->zbuffer_seek_further= 0;
#endif /* HAVE_ZLIB */
file->pos= 0;
file->mode= OTF_FILEMODE_NOTHING;
@ -372,15 +374,29 @@ size_t OTF_File_read( OTF_File* file, void* ptr, size_t size ) {
status = inflate( OTF_FILE_Z(file), Z_SYNC_FLUSH );
if ( status != Z_OK ) {
/* see declaration of 'zbuffer_seek_further' in struct_OTF_File in OTF_File.h */
if ( 0 != file->zbuffer_seek_further ) {
if ( 0 == OTF_File_seek( file, file->zbuffer_seek_further ) ) {
file->zbuffer_seek_further= 0;
return 0;
}
return OTF_File_read( file, ptr, size );
}
OTF_Error( "ERROR in function %s, file: %s, line: %i:\n "
"error in uncompressing, status %u.\n",
__FUNCTION__, __FILE__, __LINE__, status );
return 0;
}
}
file->zbuffer_seek_further= 0;
return size - OTF_FILE_Z(file)->avail_out;
} else {
@ -469,6 +485,11 @@ int OTF_File_seek( OTF_File* file, uint64_t pos ) {
if ( 0 != pos ) {
sync= inflateSync( OTF_FILE_Z(file) );
if ( Z_OK == sync ) {
/* see declaration of 'zbuffer_seek_further' in struct_OTF_File in OTF_File.h */
file->zbuffer_seek_further= pos + OTF_FILE_Z(file)->total_in;
}
}
if ( Z_OK == sync ) {
@ -476,6 +497,8 @@ int OTF_File_seek( OTF_File* file, uint64_t pos ) {
return ret;
}
pos += read;
if ( Z_BUF_ERROR == sync ) {
continue;

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

@ -79,6 +79,51 @@ struct struct_OTF_File {
uint32_t zbuffersize;
/* This is for a workaround for zlib: At the time of the first implementation
of 'OTF_File_seek()' the documentation of zlib's 'inflateSync' said it would
jump to the next "full flush point", i.e. the point where zlib decompression
can be safely resumed after an error or -- in our case a file seek.
It turned out it is only a "possible full flush point" -- this is what zlib's
docu says now, after our inquiry with the zlib authors. It is also possible
that it finds a fake flush point, i.e. the compressed data looks like a flush
point but it is not.
Now this workaround relies on the likely case that resuming decompression at a
fake flush point will cause a decompression error during the next
'OTF_File_read()' operation. Should the decompression error happen later or
not at all, garbage data will be produced. Then, OTF is out of luck and will
throw a parser error. One can resolve this by uncompressing the trace or the
stream in question with the 'otfdecompress' command.
But back to the likely case where zlib decompress (the 'inflate()' routine)
produces an error. Then OTF can save the day like the following:
1) Every time 'OTF_File_seek()' thinks it found a full flush point via
'inflateSync()' it stores the following byte position in 'zbuffer_seek_further'
-- this is where it needs to continue to search for the next flush point later
in case it turns out that it was a fake flush point. If 'zbuffer_seek_further'
is 0 it means there is no following position.
2) In 'OTF_File_read()' the 'zbuffer' contents is decompressed with 'inflate()'.
If this produces an error AND there is a valid following position in
'zbuffer_seek_further', then call 'OTF_File_seek()' again with the position in
'zbuffer_seek_further' and try to read again from the newly found flush point.
In this case 'OTF_File_read()' is called recursively until some data is read
successfully or the end of the file is reached.
3) Every time after a successful read or reaching the end of the file, the value
or 'zbuffer_seek_further' is set to '0' such that the workaround is not activated
for successive reads. Thus, the workaround can only by triggered by the first read
request after a seek operation. It the decompression error manifests itself later
than the first read operation, then the workaround cannot fix anything. However, by
that time OTF should already have experienced parsing errors anyway.
By Andreas Knuepfer, Thomas Ilsche, Matthias Jurenz. This was a fascinating puzzle!
*/
uint64_t zbuffer_seek_further;
#endif /* HAVE_ZLIB */
/** keep file pos when the real file is closed,

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

@ -660,9 +660,6 @@ int OTF_RBuffer_jump( OTF_RBuffer* rbuffer, uint64_t filepos ) {
int ret;
#ifdef HAVE_ZLIB
int otf_errno_backup;
#endif
size_t read;
/* uint64_t currentPos; */
uint32_t i;
@ -679,43 +676,7 @@ int OTF_RBuffer_jump( OTF_RBuffer* rbuffer, uint64_t filepos ) {
}
rbuffer->pos= 0;
#ifdef HAVE_ZLIB
/*
* ooooooooooooo .oooooo. oooooooooo. .oooooo.
* 8' 888 `8 d8P' `Y8b `888' `Y8b d8P' `Y8b
* 888 888 888 888 888 888 888
* 888 888 888 888 888 888 888
* 888 888 888 888 888 888 888
* 888 `88b d88' 888 d88' `88b d88'
* o888o `Y8bood8P' o888bood8P' `Y8bood8P'
*
* BIG TODO / FIXME --- this is a temporary workaround, waiting to be
* replaced by a better workaround.
* When seeking in a zlib compressed file it is possible to find a sync
* point marker that is not actually a sync point. Then the inflate will
* fail with an error. Usually this happens in
* OTF_RBuffer_getFileProperties, where it will just retry, so this is not
* too bad. I have no idea what happens if this happens in
* OTF_RBuffer_searchTime (a.k.a. partial loading)
* Well, in any case - if the error code is set, vtunify will notice that
* sooner or later and die thinking that something went wrong. We don't
* want that to happen while there was no real error, so we reset the error
* code.
*
* Also this is not threadsafe )-;
*
* [tilsche/juenz, 12.11.2012]
*/
otf_errno_backup= otf_errno;
#endif
read= OTF_File_read( rbuffer->file, rbuffer->buffer, rbuffer->jumpsize );
#ifdef HAVE_ZLIB
if ( otf_errno != otf_errno_backup ) {
otf_errno= otf_errno_backup;
return 0;
}
#endif
rbuffer->end= (uint32_t) read;

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

@ -18,7 +18,7 @@
#define OTF_VERSION_MAJOR 1
#define OTF_VERSION_MINOR 12
#define OTF_VERSION_SUB 1
#define OTF_VERSION_SUB 2
#define OTF_VERSION_STRING "openmpi"
/**