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

more...

comp.lang.fortran Profile…
 Up
some flags for optimization?? ( run with higher speed)??         


Author: Fatemeh
Date: Sep 8, 2008 00:29

Dear all ;

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
Show full article (1.66Kb)
11 Comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: Dr Ivan D. Reid
Date: Sep 8, 2008 01:02

On Mon, 8 Sep 2008 00:29:40 -0700 (PDT), Fatemeh gmail.com>
wrote in <23de88ca-360d-44d2-b1f2-da24b92166bf@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.
> ---...
Show full article (1.72Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: Fatemeh
Date: Sep 8, 2008 01:33

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: ...
Show full article (1.99Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: Fatemeh
Date: Sep 8, 2008 02:15

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 ...
Show full article (2.30Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: Steve Lionel
Date: Sep 8, 2008 06:33

On Mon, 8 Sep 2008 00:29:40 -0700 (PDT), Fatemeh gmail.com>
wrote:
>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.

Since you are using Intel Fortran (for Linux, I assume), please feel free to
ask your questions in our user forum at:

http://softwarecommunity.intel.com/isn/Community/en-US/forums/1011/ShowForum.asp...

-O3 has been suggested. You should also use an instruction set optimization
option appropriate for the processor you're using (which you did not specify.)
http://softwarecommunity.intel.com/isn/Community/en-US/forums/1011/ShowForum.asp...
describes these options and lists the processors to which they apply. You
should also read
http://www.intel.com/support/performancetools/sb/CS-028403.htm For example,
if you were using an Intel Core 2 processor, use -xT .

Another option you can experiment with is -ipo. This needs to be specified
both for compile and for the ifort command that creates the executable. This
has the same effect as combining all the sources as mentioned by Ivan.
Show full article (1.81Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: nospam
Date: Sep 8, 2008 08:40

Fatemeh gmail.com> wrote:
> I need some flags in order to enter them to Makefile which can be able
> to run the code with higher speed.

Others have mentioned the most straightforward answer to this - namely
to turn on the compiler's optimizer, making the code run faster being
exactly what the optimizer is for.

But I'm afraid that a much more basic answer is that there probably is
no magic switch that will solve your problem. Making programs run faster
is a subject of far more depth than just finding a magic switch. At
times there can be trivial solutions, but at other times it can take a
lot of work. You gave pretty much no specific useful data in your
posting, so I can't offer much in the way of specific useful replies.

Some very general answers, unfortunately to general to be of much use,
I'm afraid.

1. Well, there are always the compiler optimization options, as you
asked for. Sometimes one can get lucky. Other times, they do no good at
all. I'd say that most often, they offer some speedup, but probably less
than what I'm guessing you are looking for. Would you be happy with 30%%
speedup? That would be pretty good (though exact numbers do vary a lot).
Show full article (2.76Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: Craig Powers
Date: Sep 8, 2008 09:12

Fatemeh wrote:
> Dear all ;
>
> 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.

In general, you should study the compiler documentation. After a
certain level, optimizations become so aggressive that they are not
guaranteed to speed up your program and may even slow it down. Also,
some optimizations sacrifice accuracy for additional speed. You will
need to test them, to determine what works best and to determine what
you can use without getting wrong (or insufficiently accurate) results.
> -----------------------------------------------------------------
> this is my Makefile:
> ----------------------------------
> FC=ifort
Show full article (1.81Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: Dr Ivan D. Reid
Date: Sep 8, 2008 13:36

On Mon, 8 Sep 2008 01:33:10 -0700 (PDT), Fatemeh gmail.com>
wrote in <25135587-cf11-414f-80d1-a17640c15999@b1g2000hsg.googlegroups.com>:
> 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>:
>>> .f90.o:
>>> $(FC) -c $<
>> 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.
> IN WHICH LINE OF MAKEFILE SHOULD I ADD -O3 ?
>>> .f90.o:
>>> $(FC) -c -O3 $<

but Richard Maine's solution is more general. I think you need to read up
the documentation on makefiles as well as ifort flags.
> WHAT IS YOUR MEAN ABOUT "combining some of the source files"?
Show full article (1.56Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


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 ...
Show full article (2.97Kb)
no comments
Re: some flags for optimization?? ( run with higher speed)??         


Author: Steve Lionel
Date: Sep 9, 2008 07:51

On Mon, 8 Sep 2008 23:08:21 -0700 (PDT), michaelmetcalf@compuserve.com wrote:
>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,

The only situation where array bounds checking is on by default is in the
Debug configuration of a Visual Studio project. In a Release configuration,
or if building from the command line, all the run-time checks are off by
default.

--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"
Show full article (0.86Kb)
no comments

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