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

Did it work?

Total votes : 51


Postby mesakimya » Thu Jun 21, 2012 6:37 pm

What would solve this problem Thank you.
Posts: 1
Joined: Thu Jun 21, 2012 6:30 pm


Postby admin » Tue Jul 17, 2012 4:59 pm

CLAPACK is no longer maintained.
We released LAPACKE a Standard C Interface to LAPACK, a year ago.
You do not need a Fortran Compiler under Windows to use it and it is easily integrated into VS.
We are providing all and associated lib files.
See ... index.html for more info
Site Admin
Posts: 468
Joined: Wed Dec 08, 2004 7:07 pm


Postby TomCZek » Fri Nov 09, 2012 7:52 pm

I'm using your prebuilt libraries blas.lib, libf2c.lib, lapack.lib and the haeders clapack.h, f2c.h. I'm using Eclipse in Win7 64bit and I'm building code of my pregram like this:
gcc "-LD:\\Programovani\\Eclipse\\Workspace\\letiste\\src" -o letiste.exe "src\\letiste_rqfnb.o" -lblas -llapack -llibf2c -lblas -llapack -llibf2c
First few functions are ok, but later it's going like this:
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/manifestdependency:"type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/manifestdependency:"type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x4): undefined reference to `__security_cookie'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x11a): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x2cd): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x4ce): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x5cf): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x61d): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x650): more undefined references to `@__security_check_cookie@4' follow
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x10b1): undefined reference to `_ftol2_sse'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x10c0): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x10d8): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x10f0): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x111a): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x1144): undefined reference to `@__security_check_cookie@4'
D:\Programovani\Eclipse\Workspace\letiste\src/lapack.lib(./lapack.dir/Release/ilaenv.obj):(.text[_ilaenv_]+0x1172): more undefined references to `@__security_check_cookie@4' follow
D:\Programovani\Eclipse\Workspace\letiste\src/libf2c.lib(./f2c.dir/Release/i_nint.obj):(.text[_i_nint]+0x26): undefined reference to `_ftol2_sse'
D:\Programovani\Eclipse\Workspace\letiste\src/libf2c.lib(./f2c.dir/Release/i_nint.obj):(.text[_i_nint]+0x3e): undefined reference to `_ftol2_sse'
collect2.exe: error: ld returned 1 exit status

Do you think it's because your prebuilt libraries were build unter Visual Studio 2008 and I'm using Eclipse? But I really want to stick with it..

I tried to build my own libraries, but there are only instructions for Visual Basic, again.. :( I used Cmake with MinGW settings (I hope) but I dont know, how to use MinGW32-make to make libraries. (*.lib)
Can you help me, please?
Thank you a lot.
Posts: 1
Joined: Fri Nov 09, 2012 6:49 pm


Postby sanbowo » Sun Dec 02, 2012 10:00 pm

Ok I needed to put project properties->linker->optimization->references to default to let it work in release mode.

But now if I compare the time it takes to do a matrix-vector multiplication with this optimized BLAS library and with Matlab, Matlab is still a bit faster. Is this normal? Did anyone else compare the speed between these?
Posts: 1
Joined: Sun Dec 02, 2012 9:53 pm


Postby graphicsRat » Wed Jan 23, 2013 2:03 pm

It is no longer news that GotoBLAS is no longer maintained and as such is gradually becoming obsolete. Fortunately GotoBLAS2 has been forked as OpenBLAS, under commercially-friendly BSD license. OpenBLAS is very install, but takes ages to complete. Here's how in Cygwin, mingw or the Linux bash shell :
(Note: compiling in the mingw environment produces a *.lib and *.dll file that I guess can be used Visual Studio)

1. clone the project
git clone git://

2. build
make FC=gfortran (for a 32 bit OS) or
make FC=gfortran BINARY=64 (for a 64 bit OS)

3. install (optional)
make install *or* make install PREFIX=your_installation_directory

OpenBLAS detects the number of cores and your processor architecture.

I'll update with info on how to build a Windows lib file and dll from the Cygwin build.

Another massive improvement to the HOWTO is that it is no longer necessary to manually write function prototypes for LAPACK subroutines. This has already been done in clapack.h, even the extern "C" directive that C++ requires. The only caveat is that C/C++ typedefs for LAPACK types must now be used e.g. "integer, "doublereal", "logical" etc. Fortunately these typedefs for these are available in f2c.h

Code: Select all
// from f2c.h
typedef long int integer;
typedef unsigned long int uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
typedef long int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;

Finally, f2c.h must appear before clapack.h as shown below

Code: Select all
// TestOpenBLAS.cpp
#include <stdio.h>
#include "f2c.h"
#include "clapack.h"

int main(void)
    /* 3x3 matrix A
     * 76 25 11
     * 27 89 51
     * 18 60 32
    double A[9] = {76, 27, 18, 25, 89, 60, 11, 51, 32};
    double b[3] = {10, 7, 43};

    integer N = 3;
    integer nrhs = 1;
    integer lda = 3;
    integer ipiv[3];
    integer ldb = 3;
    integer info;
    dgesv_(&N, &nrhs, A, &lda, ipiv, b, &ldb, &info);

    if(info == 0) /* succeed */
   printf("The solution is %lf %lf %lf\n", b[0], b[1], b[2]);
   fprintf(stderr, "dgesv_ fails %d\n", info);

    return info;

g++ TestOpenBLAS.cpp -lopenblas

Expected program output:
The solution is -0.661082 9.456125 -16.014625

I'd appreciate feedback on how OpenBLAS performs copes with very large (dense) linear systems to confirm that it performs as well as GotoBLAS2. I haven't solved any large liner systems in a while (working on other stuff ATM).

I'll update the HOWTO before too long.
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm


Postby Zalta999+ » Tue Jul 02, 2013 9:08 am

In the Visual Studio command prompt, change directory to the "exports" subdirectory of GotoBLAS and run the command "make dll". The result should be something like: libgoto_<processor_class>-r<a_number>.lib and libgoto_<processor_class>-r<a_number>.dll . For example: libgoto_banias-r1.26.dll, or libgoto_northwood-r1.26.dll[/quote] Don't you need to run "make libs" first?

I get an error if I ran "make dll" without running "make libs":
Code: Select all
make: *** No rule to make target `../libgoto2_prescottp-r1.00.lib', needed by `libgoto2_prescottp-r1.00.dll'.  Stop.

So, after making .lib file using "make libs" I ran "make dll" and I got this error:
Code: Select all
./gensymbol win2k x86 dummy 0 0 > libgoto2_prescottp-r1.00.def
gcc -O2 -Wall -m32 -DF_INTERFACE_GFORT -DSMP_SERVER -DMAX_CPU_NUMBER=2 -DASMNAME =_dllinit -DASMFNAME=_dllinit_ -DNAME=dllinit_ -DCNAME=dllinit -DNO_AFFINITY -DV ERSION="1.00" -I.. -c -o dllinit.obj -s dllinit.c
ranlib ../libgoto2_prescottp-r1.00.lib
dllwrap -mno-cygwin -o libgoto2_prescottp-r1.00.dll --def libgoto2_prescottp-r1.00.def \
        --entry _dllinit@12 -s dllinit.obj --dllname libgoto.dll ../libgoto2_pre
scottp-r1.00.lib -Lc:/mingw/bin/../lib/gcc/i386-pc-mingw32/4.3.3 -Lc:/mingw/bin/
../lib/gcc -Lc:/mingw/i386-pc-mingw32/lib -Lc:/mingw/bin/../lib/gcc/i386-pc-ming
w32/4.3.3/../../../../i386-pc-mingw32/lib -Lc:/mingw/bin/../lib/gcc/i386-pc-ming
w32/4.3.3/../../..  -lgfortran -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcr
t -lmingw32 -lmoldname -lmingwex -lmsvcrt
dllinit.obj:dllinit.c:(.text+0x22): undefined reference to `blas_memory_alloc'
dllinit.obj:dllinit.c:(.text+0x2d): undefined reference to `blas_cpu_number'
dllinit.obj:dllinit.c:(.text+0x36): undefined reference to `blas_server_avail'
dllinit.obj:dllinit.c:(.text+0x43): undefined reference to `blas_memory_free'
dllinit.obj:dllinit.c:(.text+0x59): undefined reference to `blas_get_cpu_number'

dllinit.obj:dllinit.c:(.text+0x61): undefined reference to `blas_thread_init'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
make: *** [libgoto2_prescottp-r1.00.dll] Error 1

Any help is appreciated. Thank you
Posts: 2
Joined: Tue Jul 02, 2013 9:05 am

lapack functions ..

Postby kaffel07 » Sat Jul 27, 2013 4:51 am


I found that eig and qz matlab functions give infinite spurious modes, I think the elimination of the spurious modes is needed when the matrix B is singular.

Could you help me about this issue and provide me a matlab package or lapack routine which can solve the eigenvalue problem A X= c B X when A and B are complex and one of the matrices is singular ?

I really appreciate your help.

Best regards

Posts: 3
Joined: Sat Jul 27, 2013 4:39 am


Postby RDalmagro » Wed Mar 26, 2014 11:24 am

I'm trying to build and install CLAPACK in MS Visual Studio 2010 using the CMAKE 2.8 by following the instructions given on the CLAPACK for Windows site. My build in CMAKE seems to run normally; however, when I try to install CLAPACK and go to its target directory, I just get the ALL_BUILD project file without the INSTALL file being in the directory and my RUN_TESTS project's name isn't in bold. I can run the ALL_BUILD file, but VS skips 6 files. Has this problem arisen before? MS seems to have really moved a lot of things around in VS 2010.
Posts: 1
Joined: Wed Mar 26, 2014 11:22 am


Postby admin » Wed Mar 26, 2014 11:34 am

CLAPACK is no longer maintain.
Please look at using the C LAPACK Standard Interface: LAPACKE (included in the library)
Windows instructions are
Site Admin
Posts: 468
Joined: Wed Dec 08, 2004 7:07 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 2 guests