The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

LIBs needed to successfully link C ATLAS & CLAPACK?

Open discussion regarding features, bugs, issues, vendors, etc.

LIBs needed to successfully link C ATLAS & CLAPACK?

Postby flexneck » Mon Jun 14, 2010 4:16 pm

I've managed to get my code running with ATLAS compiled with --nof77, and CLAPACK. However, it appears that I am not using the ATLAS optimized "LAPACK" library.

If I use the following for libs,
Code: Select all
LDLIBS = CLAPACK/lapack_LINUX.a CLAPACK/libcblaswr.a $(BLASPATH)/lib/libptcblas.a $(BLASPATH)/lib/libatlas.a $(F2CDIR)/libf2c.a -lpthread -lm


my project compiles fine - and runs. However, my 9x9 SVD takes 2.4 ms. Since I'm linking to the CLAPACK lib, I expect to it to be a bit slower, since it is not taking advantage of optimized BLAS.

If I use this code for my libs,
Code: Select all
LDLIBS = $(ATLASPATH)/liblapack.a $(ROOTPATH)/libcblaswr.a $(BLASPATH)/lib/libcblas.a $(BLASPATH)/lib/libatlas.a $(F2CDIR)/libf2c.a  -lm


I get
    ATLAS3.8.3/PDSSE3x8664/lib/liblapack.a(ilaenv.o): In function `ilaenv_':
    ilaenv.f:(.text+0x22d): undefined reference to `atl_f77wrap_sgetnb_'
    ilaenv.f:(.text+0x245): undefined reference to `atl_f77wrap_dgetnb_'
    ilaenv.f:(.text+0x25d): undefined reference to `atl_f77wrap_cgetnb_'
    ilaenv.f:(.text+0x275): undefined reference to `atl_f77wrap_zgetnb_'
    ilaenv.f:(.text+0x311): undefined reference to `_gfortran_compare_string'
    ilaenv.f:(.text+0x334): undefined reference to `_gfortran_compare_string'
    ilaenv.f:(.text+0x357): undefined reference to `_gfortran_compare_string'
    ilaenv.f:(.text+0x376): undefined reference to `_gfortran_compare_string'
    ilaenv.f:(.text+0x395): undefined reference to `_gfortran_compare_string'
    ATLAS3.8.3/PDSSE3x8664/lib/liblapack.a(ilaenv.o):ilaenv.f:(.text+0x3b4): more undefined references to `_gfortran_compare_string' follow
    collect2: ld returned 1 exit status
    make: *** [esprit] Error 1

Now I can clearly link with -lgfortran to make the _gfortran_compare_string go away. However, that kind of defeats the purpose of compiling ATLAS with -noF77 (no fortran) and using CLAPACK. I'm using C because my end platform does not have a FORTRAN compiler.

What am I missing to make the atl_f77wrap_sgetnb_ errors go away?

I did merge the CLAPACK library with the ATLAS optimized LAPACK library, per the instructions on the ATLAS FAQ. Are these instructions correct for the ATLAS --nof77 and CLAPACK case?

If this forum is not the correct place to ask, is there another more appropriate forum to pose this question?
flexneck
 
Posts: 7
Joined: Thu May 06, 2010 10:25 am

Re: LIBs needed to successfully link C ATLAS & CLAPACK?

Postby admin » Mon Jun 14, 2010 8:30 pm

What you did looks fine to me, you may want to contact the ATLAS for the linking problem.
I am not sure you will get a significant speedup by plugging ATLAS LAPACK lib. What is really important is the BLAS library not really the LAPACK library.
I really believe CLAPACK should be fine.

What you can do is use a basic machine to run some performance comparison, this would give you a rough idea of which configuration you want to use.
admin
Site Admin
 
Posts: 616
Joined: Wed Dec 08, 2004 7:07 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 7 guests