getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-users] Re: GMM bug?


From: Yves Renard
Subject: [Getfem-users] Re: GMM bug?
Date: Wed, 22 Nov 2006 09:52:06 +0100
User-agent: KMail/1.7.2

Le Dimanche 19 Novembre 2006 23:15, Robi Carnecky a écrit :
> Hi,
>
> I am using the gmm++ library version 2.0 and I have noticed a bug with
> Visual Studio 2005.
>
> gmm_matrix.h (line 401): while (p < e) { *p = a; p += nbl+1; }
> inside of function: template<typename T> void dense_matrix<T>::fill(T a,
> T b)
>
> My application compiled with Visual Studio 2005 throws an exception here
> after the last loop. I think that valid iterators must point at
> container items or at the first position after the last item (returned
> by end() ). If this is indeed true, then Visual Studio would be right,
> since in your implementation, you will exceed the end position by nbl
> steps for square matrices. Changing the line to:
>
> gmm_matrix.h (401): while (p < e) { *p = a; if(distance(p,e)<int(nbl+1))
> return; p += nbl+1; }
>
> did solve the problem, but it is of course less performant and may not
> be the most elegant solution.



Hi,

Thank you Robert for this bug report. Actually, Paolo Greppi already informs 
us about this problem (see the bug track page). Indeed, msvc 2005 is very 
strict. It is in fact more strict that the C++ standard itself for some 
aspects. For instance it declares deprecated the use of std::copy on pointers 
which is used in Gmm++.
The version of Gmm on gna repository (https://gna.org/svn/?group=getfem) has 
been corrected such that it compiles at least with the additional 
option /D_SCL_SECURE_NO_DEPRECATE
but you have to extract the gmm files (all the files begining by "dal_" and 
"gmm_" from the directory trunk/getfem++/src.
I agree that the final code is less optimal that the original one for the 
dense matrices.

I will make soon an archive of this version and male it available on thez 
Getfem site.


Regards,


Yves.

-------------------------------------------------------------------------
  Yves Renard (address@hidden)       tel : (33) 04.72.43.80.11
  Pole de Mathematiques, INSA de Lyon          fax : (33) 04.72.43.85.29
  Institut Camille Jordan - CNRS UMR 5208
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard
-------------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]