Prev: Elaboration query
Next: Dhrystone
From: Ada novice on 26 Jul 2010 10:07 On Jul 25, 9:30 pm, "Jeffrey R. Carter" <spam.jrcarter....(a)spam.acm.org> wrote: > 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. > Thanks. I understand. I would prefer to keep the -gnatnp just to be safe. With the code that I'm running, I didn't observe differences in execution speeds with or without -gnatnp. YC
From: Ada novice on 26 Jul 2010 10:12 On Jul 26, 12:57 am, jonathan <johns...(a)googlemail.com> wrote: > 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. Maybe what I have in my code is not affected by the -ffast-math switch. > 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! I would prefer to keep the -gnatn. > > 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. Thanks for this information. YC
From: Ada novice on 26 Jul 2010 10:13 On Jul 25, 9:30 pm, "Jeffrey R. Carter" <spam.jrcarter....(a)spam.acm.org> wrote: > 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. Thanks. I understand. I would prefer to keep the -gnatn just to be safe. YC
From: sjw on 26 Jul 2010 11:48 On Jul 26, 3:13 pm, Ada novice <po...(a)gmx.us> wrote: > On Jul 25, 9:30 pm, "Jeffrey R. Carter" > > <spam.jrcarter....(a)spam.acm.org> wrote: > > 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. > > Thanks. I understand. I would prefer to keep the -gnatn just to be > safe. -gnatp to suppress checks. -gnatn is about inlining.
From: Dmitry A. Kazakov on 26 Jul 2010 13:12
On Mon, 26 Jul 2010 08:48:58 -0700 (PDT), sjw wrote: > On Jul 26, 3:13�pm, Ada novice <po...(a)gmx.us> wrote: >> On Jul 25, 9:30 pm, "Jeffrey R. Carter" >> >> <spam.jrcarter....(a)spam.acm.org> wrote: >>> 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. >> >> Thanks. I understand. I would prefer to keep the -gnatn just to be >> safe. > > -gnatp to suppress checks. -gnatn is about inlining. The gentleman's set is: debug -gnatVa all validity checks on -gnatf show all errors messages -gnato integer overflow check -g add debug info -fstack-check check stack overflow release -gnatVa -gnatf -gnato -O2 medium level optimization -gnatn inline as defined by the user -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de |