Skip to content

#417 SuperLU< BCRSMatrix... > produces memory errors in constructor (?)

Metadata

Property Value
Reported by Uli Sack (usack@math.fu-berlin.de)
Reported at Jul 22, 2008 14:05
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Linux
Last edited by Markus Blatt (markus@dr-blatt.de)
Last edited at Aug 20, 2008 08:48
Closed by Markus Blatt (markus@dr-blatt.de)
Closed at Aug 20, 2008 08:48
Closed in version Unknown
Resolution Works for me
Comment As pointed out before this is probably a problem in blas which is not crucial.

Additional I could not reproduce the messages with valgrind on our systems.

Please reopen if this still is an issue |

Description

calling the constructor of Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > > causes memory errors somewhere in my BLAS: (valgrind)

==21436== Use of uninitialised value of size 4 ==21436== at 0x40A127C: (within /usr/lib/atlas/sse2/libblas.so.3.0) ==21436== ==21436== Use of uninitialised value of size 4 ==21436== at 0x40991EC: (within /usr/lib/atlas/sse2/libblas.so.3.0) ==21436== ==21436== Use of uninitialised value of size 4 ==21436== at 0x40991F2: (within /usr/lib/atlas/sse2/libblas.so.3.0)

The (more or less) minimal code example to produce this (on my machine) is:

#ifdef HAVE_CONFIG_H

include "config.h"

#endif

#include

#include <dune/istl/bcrsmatrix.hh> #include <dune/istl/matrixindexset.hh> #include <dune/istl/bvector.hh> #include <dune/istl/solvers.hh> #include <dune/istl/superlu.hh>

using namespace Dune;

int main (int argc, char *argv[]) try {

typedef Dune::BCRSMatrix< Dune::FieldMatrix<double,1,1> > Matrix;
typedef Dune::BlockVector< Dune::FieldVector<double,1> > Vector;

const int N=9;

Matrix A;
MatrixIndexSet indices(9,9);

for (int i=0; i<N; ++i) {
	for (int j=0; j<N; ++j) {
		if ((j<N/4+i and i<N/4+j) or (j==N/2+i or i==N/2+j) or (j==N-2+i or i==N-2+j)) {
			indices.add(i,j);
			std::cout << "