Pre-Built Libraries with GFORTRAN

Post here if you have a question about linking your program with LAPACK or ScaLAPACK library

Pre-Built Libraries with GFORTRAN

Postby jelanier » Tue Jul 30, 2013 4:56 pm

I compiled and created library files with GFORTRAN and linked..

gfortran -c -Ofast -frecursive NEC42_MOD.f
gfortran -c -Ofast -fno-automatic NEC4MODEL.F
gfortran -c -Ofast -fno-automatic SOMGN3_GF.f
gfortran -c -Ofast -fno-automatic GASYN4.F
gfortran -c -Ofast -fno-automatic GN2GAsy.f
gfortran -c -Ofast -fno-automatic SOMGN2_GF.f
gfortran -c -Ofast -fno-automatic SOMLIB.F
gfortran -c -Ofast -frecursive Nec4d42_GF.f
gfortran -o NEC4D42DCL -static *.o liblapack.a libblas.a

The program works fine but I am disappointed with the calculation speed. I have seen it do much better. I see where you can download pre-built libraries, but how to you link them with the example above? The downloaded files are BLAS.LIB and LAPACK.LIB.

Thanks in advance,

Posts: 3
Joined: Tue Jul 30, 2013 4:44 pm

Re: Pre-Built Libraries with GFORTRAN

Postby jelanier » Wed Jul 31, 2013 8:27 pm

Let me restate my question. I am looking for LAPACK and BLAS libs that are optimized. The compilation in my post works, but when compared to the same program compiled with Intel Fortran with optimized libraries there is a huge difference in speed.

The Intel version is over 5 times faster! Where can I get optimized libraries that I can link to make stand-alone executables with GFORTRAN? (I am running Win7_64)


Posts: 3
Joined: Tue Jul 30, 2013 4:44 pm

Re: Pre-Built Libraries with GFORTRAN

Postby admin » Wed Jul 31, 2013 8:39 pm

INTEL is definitely the best optimized FORTRAN/BLAS library for Windows. There is not many choices here...
What you can do is to get ATLAS (optimized BLAS), it should be Windows compatible.

After you can use PLASMA (multicore LAPACK) [] that should give you better performance than LAPACK on multicore machines.

Hope it helps
Site Admin
Posts: 616
Joined: Wed Dec 08, 2004 7:07 pm

Re: Pre-Built Libraries with GFORTRAN

Postby jelanier » Thu Aug 01, 2013 4:14 pm

Thanks for the reply. I can't use the Intel or the AMD.(compiled .lib files)

I am linking OPENBLAS.a with GFORTRAN now and it is much better. Not as fast as Intel but 2.5 times faster than what I had before on FACTOR time. This is a
Numerical Electromagnetic Code program that is doing lots of number crunching. You can see the run time comparison below. I would love to try ATLAS, but I can't figure out what the heck they are talking about in the instructions for Windows :)

4291 segments:
GF_LAPACK_64 FILL= 58.110 SEC., FACTOR= 55.490 SEC.
GF_OPENBLAS_64 FILL= 55.677 SEC., FACTOR= 22.355 SEC.
Intel_LAPACK_64 FILL= 57.028 SEC., FACTOR= 10.408 SEC.

7459 segments:
GF_LAPACK_64 FILL= 174.877 SEC., FACTOR= 289.085 SEC.
GF_OPENBLAS_64 FILL= 174.144 SEC., FACTOR= 115.254 SEC.
Intel_LAPACK_64 FILL= 177.968 SEC., FACTOR= 53.019 SEC.
Posts: 3
Joined: Tue Jul 30, 2013 4:44 pm

Re: Pre-Built Libraries with GFORTRAN

Postby Abbysam007 » Fri Dec 13, 2013 7:45 am

Julie, it was not necessary to build the BLAS library. I had run "make all" and modified the makefile exchanging a comment on 2 lines.
Posts: 1
Joined: Fri Dec 13, 2013 7:38 am

Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 2 guests