RE: external BLAS library with gfortran 4.1 or 4.4 on rhel5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As suggested I have managed to build and install atlas libraries that gfortran44 can use. For the record the process briefly was:

-- downloaded and unpacked atlas3.8.4

-- ran configure with options -C ic gcc44 -C if gfortran44 -Fa alg -fPIC

-- ran make and (in lib directory) make shared

-- installed into /usr/local/atlas/lib and /usr/local/atlas/include

-- copied .so files into  /usr/local/atlas/lib

Now I can compile and link my test program like this:

export LD_LIBRARY_PATH=/usr/local/atlas/lib
gfortran44  -L/usr/local/atlas/lib -fexternal-blas -latlas -lf77blas matmultest.f90 -o matmultest_atlas

There is now no inapropriate link to libgfortran.so.1:

ldd matmultest_atlas
	linux-vdso.so.1 =>  (0x00007fffe29fd000)
	libatlas.so => /usr/local/atlas/lib/libatlas.so (0x00002ab82712d000)
	libf77blas.so => /usr/local/atlas/lib/libf77blas.so (0x00002ab827a14000)
	libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00002ab827c4b000)
	libm.so.6 => /lib64/libm.so.6 (0x0000003191200000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003f75800000)
	libc.so.6 => /lib64/libc.so.6 (0x0000003190e00000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003191a00000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003190a00000)

It runs much faster than a version that doesn't use atlas:

time ./matmultest_atlas

real	0m2.426s
user	0m2.349s
sys	0m0.077s


In fact I had tried to install atlas like this earlier but had not been successful - I don't know why.

Thanks Shakthi and Jonathan for taking the time to respond.


Matthew
________________________________________
From: Jonathan Wakely [jwakely.gcc@xxxxxxxxx]
Sent: Wednesday, March 14, 2012 7:47 PM
To: Matthew Hobbs
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: external BLAS library with gfortran 4.1 or 4.4 on rhel5

On 14 March 2012 02:42, Matthew Hobbs wrote:
> Hi,
>
> I want to be able to use an external BLAS library with some Fortran programs we are using. I am using a rhel5 system with two versions of gfortran available:
>
> 1)  GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52) - this does not have the "-fexternal-blas" option so am I right to think that with this version it is not possible to use an external blas library (provided by e.g. atlas)?
>
> 2) GNU Fortran (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13) ("gfortran44") - this has the "-fexternal-blas" option but unfortunately I cannot find any RHEL5 package that provides an external BLAS library that can be used with this version (correct me if I'm wrong).  I have tried installing netlib blas, atlas, goto2 from source to get something that will work with gfortran44 but have been unsuccessful.
>
> Please can someone give me some guidance?

You should be able to get the source code for atlas and build it
yourself with gfortran44, installing it to a different location (e.g.
/usr/local or /opt)



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux