Optimizations
Steve Kargl
sgk@troutmask.apl.washington.edu
Fri May 6 16:18:00 GMT 2005
On Fri, May 06, 2005 at 06:04:17PM +0200, Lorenzo Isella wrote:
> On Tue, 2005-05-03 at 09:56 -0700, Steve Kargl wrote:
> > On Tue, May 03, 2005 at 06:53:20PM +0200, Lorenzo Isella wrote:
> > > Hi,
> > > I am interested in fortran90/95.
> > > So far I have always been using Microsoft visual studio, but I am now
> > > getting into the open source world. I am toying around with the gfortran
> > > and testing some old .f90 files of mine.
> > > I am a bit puzzled as I did not find any optimization options (Did I
> > > overlook something?).
> >
> > Yes, you overlooked the fact that gfortran shares the gcc options.
> > Thus, the gcc options -O1, -O2, and -Os and the machine options
> > of -march=opteron are supported by gfortran.
> >
> > > Second, I have never used the Lapack routines, but can they be used
> > > without troubles/conflicts with the gfortran compiler?
> >
> > Yes.
> >
>
> Ok, thanks for the reply. How should I specify that I want to use e.g.
> Lapack3? Should I also use a statement like
>
> external :: dsytri, dsytrf
>
> in the main part of the code?
It's not clear to me from your question, what you are asking?
But, I'll give an answer anyway. First, lapack is not distributed
with gfortran. You need to go to www.netlib.org, get a
copy of the source code, build lapack with gfortran, and install
the blas and lapack library. Now, you can link to the libraries
as you would with any other library.
As far as the use of "external :: dsytri, dsytrf" in your code,
this is not required. gfortran will find the procedure in the
lapack library. OTOH, some would claim that the use of "external"
is good program practice.
--
Steve
More information about the Fortran
mailing list