Page 1 of 1

Pre-Built Libraries with GFORTRAN

PostPosted: Tue Jul 30, 2013 4:56 pm
by jelanier
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,

Jim

Re: Pre-Built Libraries with GFORTRAN

PostPosted: Wed Jul 31, 2013 8:27 pm
by jelanier
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)


Thanks,

Jim

Re: Pre-Built Libraries with GFORTRAN

PostPosted: Wed Jul 31, 2013 8:39 pm
by admin
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) [http://icl.cs.utk.edu/plasma/] that should give you better performance than LAPACK on multicore machines.

Hope it helps

Re: Pre-Built Libraries with GFORTRAN

PostPosted: Thu Aug 01, 2013 4:14 pm
by jelanier
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.

Re: Pre-Built Libraries with GFORTRAN

PostPosted: Fri Dec 13, 2013 7:45 am
by Abbysam007
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.