[Insight-developers] vnl and borland compiler

Miller, James V (Research) millerjv@crd.ge.com
Thu, 3 Oct 2002 15:30:31 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C26B11.DE4F68B6
Content-Type: text/plain;
	charset="iso-8859-1"

I have made progress on getting all the vnl tests to pass using the Borland compiler.
The SVD tests and eigenvector tests all pass now.
 
I have two remaining issues.  One in test_rnpoly_roots and one in test_sparse_matrix.
 
The sparse matrix test is particularly troubling.  For following code crashes when executed
 
  std::vector<double> f1;
  std::vector<double> f2(f1);

Basically f2's copy constructor is called with an empty vector, f1. f2 tries to allocate
0 bytes and copy the contents of f1 to f2. I believe allocating 0 bytes is causing the crash.
 
vnl_sparse_matrix is implemented as a std::vector<std::vector<somePairType> >. The
default initializer for the "outer" vector constructs an std::vector<somePairType> which
is empty and "copies" that empty vector into all of its elements.
 
Reading through the newsgroups, it looks as though other people have had this problem
with the Borland compiler and have been able to apply a patch from Borland. The patches
I have found for the "free command line tools" have not addressed this problem. I am 
guessing that the patches people are applying are for the full commercial product.
 
Just wanted to keep people up to date.  If anyone has any ideas....
 
 

Jim Miller 
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv@research.ge.com <mailto:millerjv@research.ge.com> 

james.miller@research.ge.com
(518) 387-4005, Dial Comm: 8*833-4005, 
Cell: (518) 505-7065, Fax: (518) 387-6981 

 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

------_=_NextPart_001_01C26B11.DE4F68B6
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=893451919-03102002><FONT size=2>I have made progress on getting 
all the vnl tests to pass&nbsp;using the Borland compiler.</FONT></SPAN></DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2>The SVD tests and eigenvector 
tests all pass now.</FONT></SPAN></DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2>I have two remaining 
issues.&nbsp; One in test_rnpoly_roots and one in 
test_sparse_matrix.</FONT></SPAN></DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2>The sparse matrix test is 
particularly troubling.&nbsp; For following code crashes when 
executed</FONT></SPAN></DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2>&nbsp; 
std::vector&lt;double&gt; f1;<BR>&nbsp; std::vector&lt;double&gt; 
f2(f1);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2>Basically f2's copy constructor 
is called with an empty vector, f1. f2 tries to allocate</FONT></SPAN></DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2>0 bytes and copy the contents 
of f1 to f2. I believe allocating 0 bytes is causing the 
crash.</FONT></SPAN></DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=893451919-03102002><FONT size=2>vnl_sparse_matrix is 
implemented as a std::vector&lt;std::vector&lt;somePairType&gt; &gt;. 
The</FONT></SPAN></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002>default initializer for the 
"outer" vector constructs an std::vector&lt;somePairType&gt; 
which</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002>is empty and "copies" that 
empty vector into all of its elements.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002>Reading through the newsgroups, 
it looks as though other people have had this problem</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002>with the Borland compiler and 
have been able to apply a patch from Borland. The patches</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002>I have found for the "free 
command line tools" have not addressed this problem. I am </SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002>guessing that the patches 
people are applying are for the full commercial product.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002>Just wanted to keep people up 
to date.&nbsp; If anyone has any ideas....</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=893451919-03102002></SPAN></FONT>&nbsp;</DIV>
<DIV class=Section1>
<P style="MARGIN: 0in 0in 0pt"><B><SPAN 
style="COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">Jim Miller</SPAN></B> 
<BR><B><I><SPAN 
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Arial">_____________________________________</SPAN></I></B><BR><EM><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Visualization &amp; 
Computer Vision</SPAN></EM><I><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial"><BR><EM>GE 
Research</EM><BR><EM>Bldg. KW, Room C218B</EM><BR><EM>P.O. Box 8, Schenectady NY 
12301</EM><BR><BR></SPAN></I><EM><U><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: blue"><A 
href="mailto:millerjv@research.ge.com">millerjv@research.ge.com</A></SPAN></U></EM></P>
<P style="MARGIN: 0in 0in 0pt"><EM><U><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: blue">james.miller@research.ge.com</SPAN></U></EM><BR><I><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">(518) 387-4005, Dial 
Comm: 8*833-4005, </SPAN></I><BR><I><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Cell: (518) 505-7065, 
Fax: (518) 387-6981</SPAN></I> </P>
<P class=MsoNormal>&nbsp;<?xml:namespace prefix = o ns = 
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></P></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C26B11.DE4F68B6--