Discussion:
[ALLPROSE] compiling with optimisation
Martin Rubey
2007-03-14 15:17:36 UTC
Permalink
Dear Ralf,

as I already remarked earlier, combinat builds with other compiler settings,
too.

However, today I noticed, that the compiler does not seem to like siprimes,
unless optimisation is -q1.

So, what I really would like to do is to specify "exceptional" optimisation
settings per file. I.e., I'd like to say

VARIANTFLAGSordinary=-q3 -qinline-limit=1 -qinline-size=1 -lalgebra -laldor

but override this setting for certain files, namely siprimes, but also some
files in the test directory.

Is it possible to specify optimization settings in the sourcefiles themselves,
maybe?

Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Ralf Hemmecke
2007-03-14 17:22:54 UTC
Permalink
Post by Martin Rubey
However, today I noticed, that the compiler does not seem to like siprimes,
unless optimisation is -q1.
I thought, I had posted that bug at aldor-l...

It should be sufficient to say -q no-all. I have no idea what
optimizations are not done then, but at least one can use -q2 or -q3, I
believe.
Post by Martin Rubey
So, what I really would like to do is to specify "exceptional" optimisation
settings per file. I.e., I'd like to say
VARIANTFLAGSordinary=-q3 -qinline-limit=1 -qinline-size=1 -lalgebra -laldor
but override this setting for certain files, namely siprimes, but also some
files in the test directory.
Unfortunately, the design of ALLPROSE currently does not allow this.
I'll think about it whether it could easily be achieved. But actually,
I'd hate it, since it is just the compiler that does something wrong.
And thus I would add workarounds into ALLPROSE. That's ugly.
Post by Martin Rubey
Is it possible to specify optimization settings in the sourcefiles themselves,
maybe?
Ask at aldor-l. I only know that one can say

import from Foo;
inline from Foo;

but maybe this is done automatically for -q n if n>=3.

And I know of "#int options ..." (see AUG), but that is only for
interactive use, I'm afraid.

Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Martin Rubey
2007-03-14 20:59:09 UTC
Permalink
Dear Ralf,

I just committed a more or less trivial modification of the compiler settings,
such that the flag "ordinary" produces - more or less - usable code.

As I remarked before, comparing cycle index series fails, no matter what the
optimisation setting, if one does not assert DEBUG.

The speedup seems to be quite significant, but cannot be relied on because some
tests fail earlier.

Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Loading...