← Back to team overview

dolfin team mailing list archive

problem with umfpack (visual studio)

 

I have inherited the uBlasLUSolver class and basically done copy and paste
of the first part of the LU UMFPACK solver. I'm using the last stable
version of dolfin, that is the complete_index1_data() call is already
present. However the code already breaks at the call:

umfpack_dl_transpose(M, M, (const long int*) Ap, (const long int*) Ai, Ax,
inull, inull, Rp, Ri, Rx);

which exits with return status -8. The UMFPACK userguide says that this
happens when Ap or Ai are invalid. I've saved my matrix A to a file and it
seems it contains what it should. I have suspects that something might be
wrong in the uBlas interface, since I get the following warnings:

.\PlasticityUpdatedSolver.cpp(788) : warning C4267: 'initializing' :
conversion from 'size_t' to 'const dolfin::uint', possible loss of data
C:\dolfin\Include\dolfin/uBlasMatrix.h(176) : warning C4267: 'return' :
conversion from 'size_t' to 'dolfin::uint', possible loss of data
        C:\dolfin\Include\dolfin/uBlasMatrix.h(174) : while compiling
class template member function 'dolfin::uint
dolfin::uBlasMatrix<Mat>::size(dolfin::uint) const'
        with
        [
            Mat=dolfin::ublas_dense_matrix
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(312) : see reference to
class template instantiation 'dolfin::uBlasMatrix<Mat>' being
compiled
        with
        [
            Mat=dolfin::ublas_dense_matrix
        ]
C:\dolfin\Include\dolfin/uBlasMatrix.h(176) : warning C4267: 'return' :
conversion from 'size_t' to 'dolfin::uint', possible loss of data
        C:\dolfin\Include\dolfin/uBlasMatrix.h(174) : while compiling
class template member function 'dolfin::uint
dolfin::uBlasMatrix<Mat>::size(dolfin::uint) const'
        with
        [
            Mat=dolfin::ublas_sparse_matrix
        ]
        C:\dolfin\Include\dolfin/Matrix.h(99) : see reference to class
template instantiation 'dolfin::uBlasMatrix<Mat>' being compiled
        with
        [
            Mat=dolfin::ublas_sparse_matrix
        ]
C:\dolfin\Include\dolfin/uBlasMatrix.h(193) : warning C4267: 'argument' :
conversion from 'size_t' to 'const int', possible loss of data
        C:\dolfin\Include\dolfin/uBlasMatrix.h(182) : while compiling
class template member function 'void
dolfin::uBlasMatrix<Mat>::getRow(dolfin::uint,int
&,dolfin::Array<T> &,dolfin::Array<dolfin::real> &) const'
        with
        [
            Mat=dolfin::ublas_sparse_matrix,
            T=int
        ]
C:\dolfin\Include\dolfin/uBlasMatrix.h(196) : warning C4267: '=' :
conversion from 'size_t' to 'int', possible loss of data
C:\Program\Microsoft Visual Studio 8\VC\include\memory(93) : warning
C4996: 'std::_Uninit_copy' was declared deprecated
        C:\Program\Microsoft Visual Studio 8\VC\include\memory(82) : see
declaration of 'std::_Uninit_copy'
        Message: 'You have used a std:: construct that is not safe. See
documentation on how to use the Safe Standard C++ Library'
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/storage.hpp(96)
: see reference to function template instantiation '_FwdIt
std::uninitialized_copy<const
double*,double*>(_InIt,_InIt,_FwdIt)' being compiled
        with
        [
            _FwdIt=double *,
            _InIt=const double *
        ]
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/storage.hpp(92)
: while compiling class template member function
'boost::numeric::ublas::unbounded_array<T>::unbounded_array(const
boost::numeric::ublas::unbounded_array<T> &)'
        with
        [
            T=double
        ]
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/vector.hpp(38) :
see reference to class template instantiation
'boost::numeric::ublas::unbounded_array<T>' being compiled
        with
        [
            T=double
        ]
        C:\dolfin\Include\dolfin/uBlasVector.h(38) : see reference to
class template instantiation 'boost::numeric::ublas::vector<T>'
being compiled
        with
        [
            T=double
        ]
C:\Program\Microsoft Visual Studio 8\VC\include\xutility(2404) : warning
C4996: 'std::_Copy_backward_opt' was declared deprecated
        C:\Program\Microsoft Visual Studio 8\VC\include\xutility(2391) :
see declaration of 'std::_Copy_backward_opt'
        Message: 'You have used a std:: construct that is not safe. See
documentation on how to use the Safe Standard C++ Library'
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/matrix_sparse.hpp(2782)
: see reference to function template instantiation '_BidIt2
std::copy_backward<__w64 unsigned int*,__w64 unsigned
int*>(_BidIt1,_BidIt1,_BidIt2)' being compiled
        with
        [
            _BidIt2=__w64 unsigned int *,
            _BidIt1=__w64 unsigned int *
        ]
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/matrix_sparse.hpp(2763)
: while compiling class template member function 'double
&boost::numeric::ublas::compressed_matrix<T,L>::insert_element(__w64
unsigned int,__w64 unsigned int,const double &)'
        with
        [
            T=double,
            L=boost::numeric::ublas::row_major
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(41) : see reference to
class template instantiation
'boost::numeric::ublas::compressed_matrix<T,L>' being compiled
        with
        [
            T=double,
            L=boost::numeric::ublas::row_major
        ]
C:\Program\Microsoft Visual Studio 8\VC\include\xutility(2404) : warning
C4996: 'std::_Copy_backward_opt' was declared deprecated
        C:\Program\Microsoft Visual Studio 8\VC\include\xutility(2391) :
see declaration of 'std::_Copy_backward_opt'
        Message: 'You have used a std:: construct that is not safe. See
documentation on how to use the Safe Standard C++ Library'
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/matrix_sparse.hpp(2785)
: see reference to function template instantiation '_BidIt2
std::copy_backward<double*,double*>(_BidIt1,_BidIt1,_BidIt2)'
being compiled
        with
        [
            _BidIt2=double *,
            _BidIt1=double *
        ]
C:\Program\Microsoft Visual Studio 8\VC\include\memory(93) : warning
C4996: 'std::_Uninit_copy' was declared deprecated
        C:\Program\Microsoft Visual Studio 8\VC\include\memory(82) : see
declaration of 'std::_Uninit_copy'
        Message: 'You have used a std:: construct that is not safe. See
documentation on how to use the Safe Standard C++ Library'
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/storage.hpp(96)
: see reference to function template instantiation '_FwdIt
std::uninitialized_copy<__w64 const unsigned int*,__w64 unsigned
int*>(_InIt,_InIt,_FwdIt)' being compiled
        with
        [
            _FwdIt=__w64 unsigned int *,
            _InIt=__w64 const unsigned int *
        ]
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/storage.hpp(92)
: while compiling class template member function
'boost::numeric::ublas::unbounded_array<T>::unbounded_array(const
boost::numeric::ublas::unbounded_array<T> &)'
        with
        [
            T=size_t
        ]
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/matrix_sparse.hpp(2513)
: see reference to class template instantiation
'boost::numeric::ublas::unbounded_array<T>' being compiled
        with
        [
            T=size_t
        ]
C:\Boost\include\boost-1_34_1\boost/numeric/ublas/operation.hpp(44) :
warning C4267: 'argument' : conversion from 'size_t' to 'dolfin::uint',
possible loss of data
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/operation.hpp(87)
: see reference to function template instantiation 'V
&boost::numeric::ublas::axpy_prod<dolfin::uBlasVector,double,boost::numeric::ublas::unbounded_array<T>,boost::numeric::ublas::unbounded_array<double>,C>(const
boost::numeric::ublas::compressed_matrix<double,L> &,const
boost::numeric::ublas::vector_expression<E> &,V
&,boost::numeric::ublas::row_major_tag)' being compiled
        with
        [
            V=dolfin::uBlasVector,
            T=size_t,
            C=boost::numeric::ublas::scalar_vector<double>,
            L=boost::numeric::ublas::row_major,
            E=boost::numeric::ublas::scalar_vector<double>
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(235) : see reference to
function template instantiation 'V
&boost::numeric::ublas::axpy_prod<dolfin::uBlasVector,double,boost::numeric::ublas::row_major,boost::numeric::ublas::unbounded_array<T>,boost::numeric::ublas::unbounded_array<double>,C>(const
boost::numeric::ublas::compressed_matrix<double,L> &,const
boost::numeric::ublas::vector_expression<E> &,V &,bool)' being
compiled
        with
        [
            V=dolfin::uBlasVector,
            T=size_t,
            C=boost::numeric::ublas::scalar_vector<double>,
            L=boost::numeric::ublas::row_major,
            E=boost::numeric::ublas::scalar_vector<double>
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(231) : while compiling
class template member function 'void
dolfin::uBlasMatrix<Mat>::lump(dolfin::uBlasVector &) const'
        with
        [
            Mat=dolfin::ublas_sparse_matrix
        ]
C:\Boost\include\boost-1_34_1\boost/numeric/ublas/operation.hpp(47) :
warning C4267: 'argument' : conversion from 'size_t' to 'dolfin::uint',
possible loss of data
C:\Boost\include\boost-1_34_1\boost/numeric/ublas/operation.hpp(44) :
warning C4267: 'argument' : conversion from 'size_t' to 'dolfin::uint',
possible loss of data
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/operation.hpp(87)
: see reference to function template instantiation 'V
&boost::numeric::ublas::axpy_prod<dolfin::uBlasVector,double,boost::numeric::ublas::unbounded_array<T>,boost::numeric::ublas::unbounded_array<double>,C>(const
boost::numeric::ublas::compressed_matrix<double,L> &,const
boost::numeric::ublas::vector_expression<E> &,V
&,boost::numeric::ublas::row_major_tag)' being compiled
        with
        [
            V=dolfin::uBlasVector,
            T=size_t,
            C=boost::numeric::ublas::vector<double>,
            L=boost::numeric::ublas::row_major,
            E=boost::numeric::ublas::vector<double>
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(277) : see reference to
function template instantiation 'V
&boost::numeric::ublas::axpy_prod<dolfin::uBlasVector,double,boost::numeric::ublas::row_major,boost::numeric::ublas::unbounded_array<T>,boost::numeric::ublas::unbounded_array<double>,C>(const
boost::numeric::ublas::compressed_matrix<double,L> &,const
boost::numeric::ublas::vector_expression<E> &,V &,bool)' being
compiled
        with
        [
            V=dolfin::uBlasVector,
            T=size_t,
            C=boost::numeric::ublas::vector<double>,
            L=boost::numeric::ublas::row_major,
            E=boost::numeric::ublas::vector<double>
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(276) : while compiling
class template member function 'void
dolfin::uBlasMatrix<Mat>::mult(const dolfin::uBlasVector
&,dolfin::uBlasVector &) const'
        with
        [
            Mat=dolfin::ublas_sparse_matrix
        ]
C:\Boost\include\boost-1_34_1\boost/numeric/ublas/operation.hpp(47) :
warning C4267: 'argument' : conversion from 'size_t' to 'dolfin::uint',
possible loss of data
C:\Boost\include\boost-1_34_1\boost/numeric/ublas/detail/vector_assign.hpp(82)
: warning C4267: 'argument' : conversion from 'size_t' to 'const
dolfin::uint', possible loss of data
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/detail/vector_assign.hpp(389)
: see reference to function template instantiation 'void
boost::numeric::ublas::detail::make_conformant<V,C>(V &,const
boost::numeric::ublas::vector_expression<E> &)' being compiled
        with
        [
            V=boost::numeric::ublas::matrix_row<dolfin::uBlasMatrix<dolfin::ublas_sparse_matrix>>,
            C=boost::numeric::ublas::compressed_vector<double>,
            E=boost::numeric::ublas::compressed_vector<double>
        ]
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/detail/vector_assign.hpp(448)
: see reference to function template instantiation 'void
boost::numeric::ublas::vector_assign<F,V,C>(V &,const
boost::numeric::ublas::vector_expression<E>
&,boost::numeric::ublas::sparse_proxy_tag)' being compiled
        with
        [
            F=boost::numeric::ublas::scalar_assign,
            V=boost::numeric::ublas::matrix_row<dolfin::uBlasMatrix<dolfin::ublas_sparse_matrix>>,
            C=boost::numeric::ublas::compressed_vector<double>,
            E=boost::numeric::ublas::compressed_vector<double>
        ]
        C:\Boost\include\boost-1_34_1\boost/numeric/ublas/matrix_proxy.hpp(130)
: see reference to function template instantiation 'void
boost::numeric::ublas::vector_assign<boost::numeric::ublas::scalar_assign,boost::numeric::ublas::matrix_row<M>,C>(V
&,const boost::numeric::ublas::vector_expression<E> &)' being
compiled
        with
        [
            M=dolfin::uBlasMatrix<dolfin::ublas_sparse_matrix>,
            C=boost::numeric::ublas::compressed_vector<double>,
            V=boost::numeric::ublas::matrix_row<dolfin::uBlasMatrix<dolfin::ublas_sparse_matrix>>,
            E=boost::numeric::ublas::compressed_vector<double>
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(271) : see reference to
function template instantiation
'boost::numeric::ublas::matrix_row<M>
&boost::numeric::ublas::matrix_row<M>::operator =<C>(const
boost::numeric::ublas::vector_expression<E> &)' being compiled
        with
        [
            M=dolfin::uBlasMatrix<dolfin::ublas_sparse_matrix>,
            C=boost::numeric::ublas::unit_vector<double>,
            E=boost::numeric::ublas::unit_vector<double>
        ]
        C:\dolfin\Include\dolfin/uBlasMatrix.h(268) : while compiling
class template member function 'void
dolfin::uBlasMatrix<Mat>::ident(dolfin::uint,const dolfin::uint
*)'
        with
        [
            Mat=dolfin::ublas_sparse_matrix
        ]
C:\Boost\include\boost-1_34_1\boost/numeric/ublas/detail/vector_assign.hpp(94)
: warning C4267: 'argument' : conversion from 'size_t' to 'const
dolfin::uint', possible loss of data
Build log was saved at "file://c:\plasticity-updated\Release\BuildLog.htm"

Any idea what could be wrong?

Alessio