From: Ada novice on
On Jul 24, 2:03 pm, Robert A Duff <bobd...(a)shell01.TheWorld.com>
wrote:

>
> No.  I meant -gnatp, not -gnatn.  Sorry!
>
> - Bob


Thanks for the clarifications. So I have the options

-O3 -gnatn -funroll-loops -gnatf -gnato -fpeel-loops -ftracer -
funswitch-loops -fweb -frename-registers -mfpmath=sse -msse3

to play with.
From: Ada novice on
Many thanks for all these precious information. The settings

-gnatnp -O2 -march=native -ffast-math -funroll-loops

was only 1 s faster (1537 s) as compared to using

-gnatVa -O3 -gnatn -funroll-loops -gnatf -gnato

which took 1538 s. I have two questions:

1. I see that you use -gnatnp. Is this safe to do so i.e. to suppress
all checks?

2. In the specification -march="machine architecture here", you use
native for the machine architecture. Does this apply to Intel
processors as well?


And thank you very much for making accessible the programs on your
website. This is indeed very generous on your part. I find some very
useful codes there.


YC
From: Jeffrey R. Carter on
On 07/25/2010 06:29 AM, Ada novice wrote:
>
> 1. I see that you use -gnatnp. Is this safe to do so i.e. to suppress
> all checks?

No, but it is a little faster. You asked about maximizing speed, not about
safety. Of course, none of this is going to make a significant difference, as
you found out yourself. Significant speed changes come about from improved
algorithms. The correct approach is to implement correctly, clearly, and safely,
then measure against your timing requirements (which are unspecified), and only
make changes if the result fails to meet the timing requirements.

--
Jeff Carter
"I soiled my armor, I was so scared."
Monty Python & the Holy Grail
71
From: jonathan on
On Jul 25, 2:29 pm, Ada novice <po...(a)gmx.us> wrote:
> Many thanks for all these precious information. The settings
>
> -gnatnp -O2 -march=native -ffast-math -funroll-loops
>
> was only 1 s faster (1537 s) as compared to using
>
> -gnatVa -O3 -gnatn -funroll-loops -gnatf -gnato

Interesting result. I repeated the 100 calls to
COMPLEX_EIGENVALUES.Eigen ( P, W, V, FAIL) test on a
121 x 121 sized matrix.
I still get the same big decrease in running time from the
-ffast-math switch. Generic_Complex_Eigenvalues
seems sensitive to -ffast-math, but I've never seen any other
program care much about it.

> 1. I see that you use -gnatnp. Is this safe to do so i.e. to suppress
> all checks?

If I remove the -gnatp then running time goes from 3.61 to 6.1 sec.
If I remove the -gnatnp then running time goes from 3.61 to 6.7 sec.
(I suspect that you know that -gnatnp is really -gnatn -gnatp).

On a high percentage of ordinary problems (usually data
analysis) I would not care at all about the increased
running time, and I would not remove the checks. There
is another class of program I write and these run for days
or weeks. These I never stop optimizing and testing, and
all checks are removed!

> 2. In the specification -march="machine architecture here", you use
> native for the machine architecture. Does this apply to Intel
> processors as well?

I just checked the gcc man pages and found nothing at all about
-march=native. It helps a little on all the machines I've
used and occasionally in the past it has helped enormously. Just
now I removed -march=native from the Generic_Complex_Eigenvalues
test and running time went from 3.61 sec to 3.58 sec. When
I remove it from the Jacobi benchmark, the program slows down
slightly. So the switch seems to do something on my intel machine,
but all I can say now is that the difference is very small and
unpredictable.

J.
From: jonathan on
On Jul 25, 2:29 pm, Ada novice <po...(a)gmx.us> wrote:

> 1. I see that you use -gnatnp. Is this safe to do so i.e. to suppress
> all checks?


I could not resist testing the -gnatp switch on my other benchmark,
the Jacobi eigendecomposition. So I removed -gnatp and added -gnato,
and running time went from 2.04 sec to 2.35 sec. Not bad at all!

J.
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: Elaboration query
Next: Dhrystone