Blitz logo

Blitz Support :

From: Julian C. Cummings (cummings_at_[hidden])
Date: 2005-03-05 01:59:53


Hello James,
 
I don't believe that this problem report was ever addressed. Sorry it has
taken me so long to get back to this. I have had very few spare cycles to
devote to blitz support. Anyway, I've looked into this, and it appears to
me to be a compiler bug in g++. The error stems from the wrong evaluator
mechanism being selected. It is supposed to be using IndexTraversalN, since
there are IndexPlaceholders in the expression. But instead it falls into a
2D Tiled traversal mechanism that is only appropriate for stencil
operations. There is a test on T_expr::numIndexPlaceholders>0, and it is
failing for the expression involving ComplexTensor objects, even though
precisely the same expression form works with DoubleTensor objects. Very
bizarre! But this code compiles just fine under the Intel C++ compiler, so
it seems to be g++ compiler bug here. I haven't found any sort of
workaround at this point.
 
Regards, Julian C.
 
Dr. Julian C. Cummings
Staff Scientist, CACR/Caltech
(626) 395-2543
cummings_at_[hidden]
  

-----Original Message-----
From: blitz-support-bounces_at_[hidden]
[mailto:blitz-support-bounces_at_[hidden]] On Behalf Of James Evans
Sent: Tuesday, January 04, 2005 12:50 PM
To: blitz-support_at_[hidden]
Subject: [Blitz-support] Problem in expr.h? (templates are not
unrollingcorrectly)

I have a set of classes I am using that creates run-time checking of tensor
dimensions (instead of compile-time checking) for purposes of promotion into
Python. Everything works grand on windows using the MSVC++ .NET 2003
compiler. on linux using gcc3.2 or gcc3.4.3 there is a problem.
 
I have attached a set of files that are causing the problems.
 
The 'doit' script will compile the files (and thus show off the error.
 
The 'out.log' is the output from my failed compile.
 
I have been wracking my brain trying to figure this out, so it is probably
something pretty obvious. Any suggestions / help would be greatly
appreciated.
 
It is interesting to not that I only get this error when attempting to do a
multiplication of two tensors consisting of my Complex class (included).
 
And getting rid of my Complex class is not an option as it acts as a bridge
btween std::complex<double> and gsl_complex (the GSL library).
 
Thanks,
--James Evans