Problem installing CLAPACK with custom BLAS

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

Problem installing CLAPACK with custom BLAS

Postby Jean_C » Sun Feb 24, 2008 11:43 pm

Hello,

I'm trying to install CLAPACK using a custom BLAS. My machine is a Pentium III running Ubuntu 7.04 (Feisty).

I started out following the instructions in the README.install document. CLAPACK appeared to install fine using the reference BLAS library (make blaslib) so I decided to try an optimized BLAS.

Following the instructions here, I was able to install ATLAS with a full LAPACK 3.1.1 library.

At this point, I wondered whether it was necessary to install CLAPACK since I now already had a LAPACK library compiled. However, I decided to soldier on since I wanted to run an old program written in C that included "blaswrap.h", "f2c.h", and "clapack.h".

So I did the following:
make cblaswrap

then tried to edit my CLAPACK's make.inc file to reflect the new BLAS:
BLASLIB = ../../libcblaswr.a -l/usr/local/atlas/lib/libcblas.a -l/usr/local/atlas/libatlas.a

However, when I go to BLAS/TESTING and run
make -f Makeblat2

I get the following result:
gcc -O3 -c sblat2.c
gcc sblat2.o \
../../libcblaswr.a -l/usr/local/atlas/lib/libcblas.a -l/usr/local/atlas/libatlas.a ../../F2CLIBS/libf2c.a -lm -o ../xblat2s
/usr/bin/ld: cannot find -l/usr/local/atlas/lib/libcblas.a
collect2: ld returned 1 exit status
make: *** [../xblat2s] Error 1

Any suggestions on what could be wrong here? I thought perhaps I am referencing the wrong libraries, or perhaps there could be something wrong with permissions (everything in /usr/local/atlas/lib is 0644, owner/group are root/root), or maybe weirdness with library path settings (had some trouble when doing the ATLAS install and ended up having to mess around with LD_LIBRARY_PATH.

Thanks for your help!
Jean_C
 
Posts: 2
Joined: Sun Feb 24, 2008 10:58 pm

Postby Julie » Sun Feb 24, 2008 11:45 pm

Jean,
try:
Code: Select all
BLASLIB = ../../libcblaswr.a /usr/local/atlas/lib/libcblas.a /usr/local/atlas/libatlas.a


it should work better...
Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby Jean_C » Mon Feb 25, 2008 12:05 am

Thanks so much Julie for your fast reply! That did the trick!!

Now of course, I am plagued with alarming reports like:

******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
EXPECTED RESULT COMPUTED RESULT
1 ( .244216 , -.135886 ) ( .244216 , -.135886 )
******* CGEMM FAILED ON CALL NUMBER:
3489: CGEMM ('N','N', 1, 1, 1,( 1.0, .0), A, 2, B, 2,( 1.3,-1.1), C, 2
).

or

DGEMV COMPLETED THE COMPUTATIONAL TESTS ( 3460 CALLS)
******* BUT WITH MAXIMUM TEST RATIO 2224.85 - SUSPECT *******

in the output files. I'll look at the LAPACK FAQ on errors but these do sound discouraging.
Jean_C
 
Posts: 2
Joined: Sun Feb 24, 2008 10:58 pm

Postby Julie » Mon Feb 25, 2008 2:10 pm

Jean
CLAPACK is intended for machine that does not have a Fortran Compiler, it is a automatically generated code and thus a little less reliable that LAPACK itself.

I would advice to check if you have the same problems in your testing with LAPACK with f77 blas from ATLAS and CLAPACK with cblas from atlas and CLAPCK with f77blas from ATLAS. If so, this might be an ATLAS problem, otherwise I will advice you to switch to the Fortran LAPACK library and to call it directly from C. To call the Fortran interface (from C). First you must be column major. Then the name of the routine is probably dgesv_, and third you need to pass all the arguments by reference.

Some C wrappers exist for LAPACK that can ease the calling sequence. One is http://icl.cs.utk.edu/~delmas/lapwrapc.html.

Let me know if it helps
Bon courage
Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado


Return to User Discussion

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 1 guest

cron