Re: some flags for optimization?? ( run with higher speed)??
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: some flags for optimization?? ( run with higher speed)??         

Group: comp.lang.fortran · Group Profile
Author: michaelmetcalf
Date: Sep 8, 2008 23:08

On Sep 8, 11:15 am, Fatemeh gmail.com> wrote:
> On Sep 8, 12:33 pm, Fatemeh gmail.com> wrote:
>
>
>
>
>
>> On Sep 8, 12:02 pm, "Dr Ivan D. Reid" brunel.ac.uk> wrote:
>
>>> On Mon, 8 Sep 2008 00:29:40 -0700 (PDT), Fatemeh gmail.com>
>>>  wrote in <23de88ca-360d-44d2-b1f2-da24b9216...@z66g2000hsc.googlegroups.com>:
>
>>>> I've written a code in fortran90. Since my sample is large, my code
>>>> runs slowly.
>>>> I need some flags in order to enter them to Makefile which can be able
>>>> to run the code with higher speed.
>>>> -----------------------------------------------------------------
>>>> this is my Makefile:
>>>> ----------------------------------
>>>> FC=ifort
>>>> NROBJS=nr.o nrtype.o parametros.o
>>>> MYOBJS= wfinside.o gauntutils.o leedutils.o
>>>> MYSUBFUN=DoubleFactorialDP.o FactorialDP.o Gaunt.o Legendre.o
>>>> SphericalHarmonicYZ.o SqrtFactorialDP.o ThreeJSymbol.o factorial.f90
>>>> bessel.o writefile.o intgral.o ComlexUnit.o
>>>> .SUFFIXES:
>>>> .SUFFIXES: .f90 .o
>
>>>> all: $(NROBJS) $(MYOBJS) $(MYSUBFUN) main-goodformat2.o
>>>>         $(FC) $(NROBJS) $(MYOBJS) $(MYSUBFUN) main-goodformat2.o  -o
>>>> wannier.exe
>
>>>> .f90.o:
>>>>         $(FC) -c $<
>
>>>> nr.o: nr.f90 nrtype.o
>>>> nrtype.o: nrtype.f90
>
>>> ...
>
>>>> Would you please guide me if there is any flag for this purpose?
>>>> (I cannot write my code in Parallel. so I should find some flags!!!)
>>>> I'm anxiously looking forward your reply and guidelines.
>
>>>         You don't appear to be using any optimisation.  Try adding -O3 to
>>> your .f90.o: line.  Type in 'ifort --help' to get a listing of some flags you
>>> can try.  There's also a chance you can get better interprocedural optimisation
>>> by combining some of your source files together.
>
>>> --
>>> Ivan Reid, School of Engineering & Design, _____________  CMS Collaboration,
>>> Brunel University.    Ivan.Reid@[brunel.ac.uk|cern.ch]    Room 40-1-B12, CERN
>>>         KotPT -- "for stupidity above and beyond the call of duty".
>
>> IN WHICH LINE OF MAKEFILE SHOULD I ADD  -O3 ?
>> WHAT IS YOUR MEAN ABOUT "combining some of the source files"?
>
> I wrote -O3 at the first line of makefile and it works, but the speed
> is still low. what should I do? Is there any usefull flag for my
> purpose?
>
> Thanks in advance.
> Fatemeh- Hide quoted text -
>
> - Show quoted text -

A further possibility is to examine whether the compiler's flags are,
by default, degrading run-time performance. In particular, ifort
peforms run-time array bounds checking by default, very useful for
code development, but if you're using arrays heavily, as I do, the
peformance hit can be large. If I use O3 and no run-time checking my
programs go up to three times faster than with O0 and bounds checking.

Regards,

Mike Metcalf
no comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
FS: Banner Flag Flag 3'x 5' Washington Nationals - Item #: 395261 via auctionalt.marketplace.online.ebay ·