HOWTO LAPACK/CLAPACK for Windows

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

Did it work?

Yes
39
75%
No
13
25%
 
Total votes : 52

Re: HOWTO LAPACK/CLAPACK for Windows

Postby chengyue » Thu Mar 11, 2010 11:21 pm

Yes,I just can run the sample program by adding the library in
http://www.tecgraf.puc-rio.br/~ismael/C ... ds/Lapack/
and successfully use the lapack and blas in cholmod.

So I think I have the intel fortran complier and ms visual studio 2005 and 2008
properly installed

The problem is I can't use the prebuilded lib in
http://icl.cs.utk.edu/lapack-for-window ... #libraries
and can't use the lib complied by CMake generated vs 2005 sln project.

I don't know why?
chengyue
 
Posts: 4
Joined: Thu Feb 25, 2010 10:45 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby admin » Thu Mar 11, 2010 11:25 pm

I am just asking you to run the testings in the VS Solution generated by CMAKE, not the sample program.
Could you give it a try please?

The only difference between the packages is the Visual studio version and Intel compiler version.
Also something to try is to generate a VS Studio 2005 Project with CMAKE.
Julie
admin
Site Admin
 
Posts: 490
Joined: Wed Dec 08, 2004 7:07 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby chengyue » Thu Mar 11, 2010 11:51 pm

I just running the test and the output like this:
It's that right.
when I using the CMake to generate the Vs2005 project
I don't specify the fortran complier and just use the default

2> 1/ 94 Testing xblat1s Passed
2> 2/ 94 Testing xblat1c Passed
2> 3/ 94 Testing xblat1d Passed
2> 4/ 94 Testing xblat1z Passed
2> 5/ 94 Testing xblat2s Passed
2> 6/ 94 Testing xblat2c Passed
2> 7/ 94 Testing xblat2d Passed
2> 8/ 94 Testing xblat2z Passed
2> 9/ 94 Testing xblat3s Passed
2> 10/ 94 Testing xblat3c Passed
2> 11/ 94 Testing xblat3d Passed
2> 12/ 94 Testing xblat3z Passed
2> 13/ 94 Testing xlintsts_stest_in Passed
2> 14/ 94 Testing xlintstc_ctest_in Passed
2> 15/ 94 Testing xlintstd_dtest_in Passed
2> 16/ 94 Testing xlintstz_ztest_in Passed
2> 17/ 94 Testing xlintstds_dstest_in Passed
2> 18/ 94 Testing xlintstzc_zctest_in Passed
2> 19/ 94 Testing xlintstrfs_stest_rfp_in Passed
2> 20/ 94 Testing xlintstrfd_dtest_rfp_in Passed
2> 21/ 94 Testing xlintstrfc_ctest_rfp_in Passed
2> 22/ 94 Testing xlintstrfz_ztest_rfp_in Passed
2> 23/ 94 Testing xeigtsts_nep_in Passed
2> 24/ 94 Testing xeigtsts_sep_in Passed
2> 25/ 94 Testing xeigtsts_svd_in Passed
2> 26/ 94 Testing xeigtsts_sec_in Passed
2> 27/ 94 Testing xeigtsts_sed_in Passed
2> 28/ 94 Testing xeigtsts_sgg_in Passed
2> 29/ 94 Testing xeigtsts_sgd_in Passed
2> 30/ 94 Testing xeigtsts_ssb_in Passed
2> 31/ 94 Testing xeigtsts_ssg_in Passed
2> 32/ 94 Testing xeigtsts_sbal_in Passed
2> 33/ 94 Testing xeigtsts_sbak_in Passed
2> 34/ 94 Testing xeigtsts_sgbal_in Passed
2> 35/ 94 Testing xeigtsts_sgbak_in Passed
2> 36/ 94 Testing xeigtsts_sbb_in Passed
2> 37/ 94 Testing xeigtsts_glm_in Passed
2> 38/ 94 Testing xeigtsts_gqr_in Passed
2> 39/ 94 Testing xeigtsts_gsv_in Passed
2> 40/ 94 Testing xeigtsts_lse_in Passed
2> 41/ 94 Testing xeigtstc_nep_in Passed
2> 42/ 94 Testing xeigtstc_sep_in Passed
2> 43/ 94 Testing xeigtstc_svd_in Passed
2> 44/ 94 Testing xeigtstc_cec_in Passed
2> 45/ 94 Testing xeigtstc_ced_in Passed
2> 46/ 94 Testing xeigtstc_cgg_in Passed
2> 47/ 94 Testing xeigtstc_cgd_in Passed
2> 48/ 94 Testing xeigtstc_csb_in Passed
2> 49/ 94 Testing xeigtstc_csg_in Passed
2> 50/ 94 Testing xeigtstc_cbal_in Passed
2> 51/ 94 Testing xeigtstc_cbak_in Passed
2> 52/ 94 Testing xeigtstc_cgbal_in Passed
2> 53/ 94 Testing xeigtstc_cgbak_in Passed
2> 54/ 94 Testing xeigtstc_cbb_in Passed
2> 55/ 94 Testing xeigtstc_glm_in Passed
2> 56/ 94 Testing xeigtstc_gqr_in Passed
2> 57/ 94 Testing xeigtstc_gsv_in Passed
2> 58/ 94 Testing xeigtstc_lse_in Passed
2> 59/ 94 Testing xeigtstd_nep_in Passed
2> 60/ 94 Testing xeigtstd_sep_in Passed
2> 61/ 94 Testing xeigtstd_svd_in Passed
2> 62/ 94 Testing xeigtstd_dec_in Passed
2> 63/ 94 Testing xeigtstd_ded_in Passed
2> 64/ 94 Testing xeigtstd_dgg_in Passed
2> 65/ 94 Testing xeigtstd_dgd_in Passed
2> 66/ 94 Testing xeigtstd_dsb_in Passed
2> 67/ 94 Testing xeigtstd_dsg_in Passed
2> 68/ 94 Testing xeigtstd_dbal_in Passed
2> 69/ 94 Testing xeigtstd_dbak_in Passed
2> 70/ 94 Testing xeigtstd_dgbal_in Passed
2> 71/ 94 Testing xeigtstd_dgbak_in Passed
2> 72/ 94 Testing xeigtstd_dbb_in Passed
2> 73/ 94 Testing xeigtstd_glm_in Passed
2> 74/ 94 Testing xeigtstd_gqr_in Passed
2> 75/ 94 Testing xeigtstd_gsv_in Passed
2> 76/ 94 Testing xeigtstd_lse_in Passed
2> 77/ 94 Testing xeigtstz_nep_in Passed
2> 78/ 94 Testing xeigtstz_sep_in Passed
2> 79/ 94 Testing xeigtstz_svd_in Passed
2> 80/ 94 Testing xeigtstz_zec_in Passed
2> 81/ 94 Testing xeigtstz_zed_in Passed
2> 82/ 94 Testing xeigtstz_zgg_in Passed
2> 83/ 94 Testing xeigtstz_zgd_in Passed
2> 84/ 94 Testing xeigtstz_zsb_in Passed
2> 85/ 94 Testing xeigtstz_zsg_in Passed
2> 86/ 94 Testing xeigtstz_zbal_in Passed
2> 87/ 94 Testing xeigtstz_zbak_in Passed
2> 88/ 94 Testing xeigtstz_zgbal_in Passed
2> 89/ 94 Testing xeigtstz_zgbak_in Passed
2> 90/ 94 Testing xeigtstz_zbb_in Passed
2> 91/ 94 Testing xeigtstz_glm_in Passed
2> 92/ 94 Testing xeigtstz_gqr_in Passed
2> 93/ 94 Testing xeigtstz_gsv_in Passed
2> 94/ 94 Testing xeigtstz_lse_in Passed
chengyue
 
Posts: 4
Joined: Thu Feb 25, 2010 10:45 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby chengyue » Thu Mar 11, 2010 11:56 pm

when I specify the fortran compiler
C:\Program Files\Intel\Compiler\Fortran\10.1.014\IA32\Bin\ifort.exe
run CMAKE configire output

Looking for Fortran NONE - found
Looking for Fortran INT_CPU_TIME - found
Looking for Fortran EXT_ETIME - found
Looking for Fortran EXT_ETIME_ - not found
Looking for Fortran INT_ETIME - not found
--> Will use second_EXT_ETIME.f and dsecnd_EXT_ETIME.f as timing function.
Configuring done

It's that right?
Thanks for your constant help,maybe my question is sometime naive!
chengyue
 
Posts: 4
Joined: Thu Feb 25, 2010 10:45 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby plant_biologist » Fri Mar 12, 2010 4:12 pm

Please help. I am stressed to the point of tears with trying to install Lappack. I need to install it as part of installing SciPy, which is required to run a program that I, thankfully, do know how to use. I have no unix or programming experience. Please, please understand that my experience with installing anything is limited to Windows install wizard. I am very willing to learn, but I have have found that the instructions and tutorials here and elsewhere on the web are really -way- over my head. Let me tell you what I have managed to do and if someone could suggest how to proceed, I would be very grateful.

I have downloaded and unzipped lapack-3.2.1 and I think I have installed cgywin. I say "think" because the installation was very confusing. In any case a folder now exists in my C:/ that is called cgywin. I opened mintty, which came with cgywin and typed out some unix commands that I saw online and was unable to navigate to lapack, which is what I think I am supposed to do.

Please help!

Thank you in advance for any assistance.

AJ Harris
plant_biologist
 
Posts: 1
Joined: Fri Mar 12, 2010 4:01 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby chrisdawkins2010 » Thu Mar 18, 2010 6:30 am

Hi,
I have Intel Fortran compiler and Visual Studio 2008 on my comp and I want to link the LAPACK Fortran Library to a C program. I've heard from my colleagues that some testing might be goood to do, but what package will you recommend?
Thanks
Chris
Tinnitus Relief
chrisdawkins2010
 
Posts: 1
Joined: Tue Mar 09, 2010 11:58 am
Location: 101 Watlington, Wimbledon, SW19 5RR, UK

Re: HOWTO LAPACK/CLAPACK for Windows

Postby admin » Thu Mar 18, 2010 1:04 pm

Chris,
Follow the instructions here. http://icl.cs.utk.edu/lapack-for-window ... html#build
Let me know if you have any problem.
You will also need a BLAS library. MKL, Goto BLAS or ATLAS will get you good performance otherwise you will not get any with the BLAS included in the package.
Julie
admin
Site Admin
 
Posts: 490
Joined: Wed Dec 08, 2004 7:07 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby admin » Thu Mar 18, 2010 1:09 pm

AJ Harris,
Which SciPy are you using? The Windows 64 bit unofficial release?
http://www.scipy.org/Download#head-f649 ... f2a7349db0

I believe you would need the Intel MKL Windows compiler at that point.
Best would be to ask for recommendation. Christoph Gohlke seems the one that did the SciPy package for Windows.

Julie
admin
Site Admin
 
Posts: 490
Joined: Wed Dec 08, 2004 7:07 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby patfla » Thu Apr 15, 2010 3:59 pm

Hi,

Am trying to build and test LAPACK/GotoBLAS2 with the instructions at the start of this thread. Building on Windows 7 64 bit (but the build is all in 32 bits) using cygwin (to build GotoBLAS2) and visual studio 2008.

I'm able to build GotoBLAS2 with cygwin. I end up with files libgoto2.lib and libgoto2.dll in the exports subdirectory. I copy the DLL to c:\windows\syswow64. syswow64 is the 32 bit equivalent of system32 (yes, system32 means 64 bits) on 64 bit Windows 7. It links and runs and sysinternals' process explorer tells me the process is mapped to c:\windows\syswow64\libgoto2.dll

All seems fine and good so far. Using the example code at:

http://www.cs.rochester.edu/~bh/cs400/using_lapack.html

I arrive in the debugger at the call to dgesv_; try to step over it; and get a 0 pointer access violation error.

Let me skip over many steps. I finally find (I'm an experienced programmer) that if I 'move the memory map around some', on very rare occasions it will actually run and not crash and produce the correct result. One moves the memory map around by, say, adding another local variable of form:

int test[1000];

And I do this because I suspect there's a memory corruption problem. That the program very occasionally does work tells me that this is likely.

The program itself is very short - don't think the memory corruption problem is there. So I suspect the copy of libgoto2.dll that I built with cygwin.

I'd like to step down into the routines in libgoto2.dll with the debugger but it seems the default build, simply:

make

doesn't build with debug symbols.

Any ideas as to how I can track this down further?

thanx - pat
patfla
 
Posts: 2
Joined: Thu Apr 15, 2010 3:42 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby Xupito » Mon Apr 19, 2010 11:28 am

graphicsRat wrote:
flexo1234 wrote:Is there any way to compile the gotoBLAS without cygwin so the cygwin1.dll isn't needed to use it?


Its been moths since I last compiled it, and when I last did, step 4 of the HOWTO helped to produce a library that' did not dependent on cygwin dlls -- this may have changed since writing the HOWTO, I guess need to compile the latest version of the library to be sure.

In the interim, I suggest you try step 4 and see what happens (I'd like to know). You may also run dependency walker on your gotoblas dll. Dependency walker will show what dlls your gotoblas dlls depends on. Mine depends only on: KERNEL32.DLL, MSVCRT.DLL, and NTDLL.DLL only (no cywing dll :)

Suggestion: if you've done the above and and impatient/can't wait for my update, try compiling gotoblas in (MINGW) MSYS


Although gotoblas2 can be compiled easily with mingw/msys I think it would be useful explaining a couple of cygwin issues.

- As far as I know, by default cygwin always link against the cygwin dll, which is a Unix emulation layer, so it isn't desirable in Windows development.

- To fix this, you can use the -mno-cygwin option with the 3.X branch compilers (gcc, g77). This way you link against microsoft DLL's. It's better and faster. You can edit for example gotoblas2 Makefile.rule and change "COMMON_OPT += -O2" line to "COMMON_OPT += -mno-cygwin -O2" and then do "make".

- The -mno-cygwin option it's no longer supported in 4.X branch (gcc, gfortran).

- Besides Dependency walker, the simplest way to see the DLL's is this line (only sure it works with executables, with or without the "exe" extension):
Code: Select all
objdump -p gotoblas2.a | grep "DLL Name"
objdump -p gotoblas2.dll | grep "DLL Name"
objdump -p hello_lapack.exe | grep "DLL Name"


I think it would be useful to stress these issues, not mentioned in the HOWTO.
Xupito
 
Posts: 6
Joined: Sun Jul 26, 2009 1:02 am

Re: HOWTO LAPACK/CLAPACK for Windows

Postby coinman » Mon May 31, 2010 4:40 pm

admin wrote:AJ Harris,
Which SciPy are you using? The Windows 64 bit unofficial release?
http://www.scipy.org/Download#head-f649 ... f2a7349db0

I believe you would need the Intel MKL Windows compiler at that point.
Best would be to ask for recommendation. Christoph Gohlke seems the one that did the SciPy package for Windows.

Julie


That just might do it.
coinman
 
Posts: 1
Joined: Mon May 31, 2010 4:35 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby Josselin » Thu Jun 24, 2010 12:51 pm

Hello everybody,

I m a beginner in Lapack and I m actually trying to install GoToBlas on a visual studio environment. I followed all the steps you mentioned: I have installed Cygwin, and I launched the command make and I have my lib.a in my folder.
Unfortunately, I don t succeed in making the dll from the Visual Studio Prompt (when I use the command "make dll" in the folder exports)

The message error is the following:
Access is denied
C compile (gcc) is something wrong
1 at ./c_check line 20
make: ***[config.h] Error 1
make: nothing to be done for 'dll'

Do you have any idea of the problem?

Thanks very much.

Josselin
Josselin
 
Posts: 6
Joined: Thu Jun 24, 2010 12:33 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Thu Jun 24, 2010 9:37 pm

Josselin wrote:I followed all the steps you mentioned: I have installed Cygwin, and I launched the command make and I have my lib.a in my folder.
Unfortunately, I don t succeed in making the dll from the Visual Studio Prompt (when I use the command "make dll" in the folder exports)


The original instructions using that require Cygwin is (for the old version of GotoBLAS, and is now therefore) out of date. (I really ought to write a new HOWTO but I'm so busy writing my thesis at the moment.)

In order to compile the current versions of GotoBLAS2, you need MINGW/MSYS.

graphicsRat wrote:Install MINGW first -- http://sourceforge.net/projects/mingw/files/
then MSYS http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe (or the latest version of MSYS)

... then run make in MSYS. (MSYS is a shell.)

PS: it appears the last stage of the build requires Perl, so you may have to install Perl (from activestate Perl for example) and hard link the name "perl" to the bin folder. I'll explain how to do this if its necessary.


Please post your experiences, so we can know what works. (Too often people don't bother to post again when the advise we give is helpful.)
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby Josselin » Fri Jun 25, 2010 5:12 am

Hello and thanks for the reply,

I followed all the steps you adviced me but got the same error when doing "make dll"

Before launching "make dll", I think I got some problems during the compilation. Here is what is displayed at the end of the compilation process:

make[1]: Leaving directory `/D/Documents/Telechargements/GotoBLAS2/lapack'
make -C exports dll
make[1]: Entering directory `/D/Documents/Telechargements/GotoBLAS2/exports'
perl ./gensymbol win2k x86 dummy 0 0 > libgoto2.def
gcc -O2 -Wall -m32 -DF_INTERFACE_G77 -DSMP_SERVER -DMAX_CPU_NUMBER=2 -DASMNAME=_
dllinit -DASMFNAME=_dllinit_ -DNAME=dllinit_ -DCNAME=dllinit -DCHAR_NAME=\"dllin
it_\" -DCHAR_CNAME=\"dllinit\" -DNO_AFFINITY -I.. -c -o dllinit.obj -s dllinit.c

ranlib ../libgoto2_core2p-r1.13.lib
dllwrap -o libgoto2.dll --def libgoto2.def \
--entry _dllinit@12 -s dllinit.obj --dllname libgoto2.dll ../libgoto2_co
re2p-r1.13.lib
lib /machine:i386 /def:libgoto2.def
make[1]: lib: Command not found
make[1]: [libgoto2.dll] Error 127 (ignored)
make[1]: Leaving directory `/D/Documents/Telechargements/GotoBLAS2/exports'

GotoBLAS build complete.

OS ... WINNT
Architecture ... x86
BINARY ... 32bit
C compiler ... GCC (command line : gcc)
Fortran compiler ... G77 (command line : g77)
Library Name ... libgoto2_core2p-r1.13.lib (Multi threaded; Max num-thread
s is 2)

Then the "make dll"in the Visual Studio Prompt gives me the same error message (previous post)

D:\Documents\Telechargements\GotoBLAS2\exports>make dll
Access is denied.
C Compiler (gcc) is something wrong.
1 at ./c_check line 20.
make: *** [config.h] Error 1
make: Nothing to be done for `dll'.

THANKS!!
Josselin
 
Posts: 6
Joined: Thu Jun 24, 2010 12:33 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Fri Jun 25, 2010 9:54 am

Josselin wrote:I followed all the steps you adviced me but got the same error when doing "make dll"


You don't have to run make dll. Just launch MSYS, cd to the source directory and run make.

However, I suggest that as a test, you try running the command perl in MSYS. The GotoBLAS2 build process requires perl, and the test will show if MSYS can find the perl binary.
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

PreviousNext

Return to User Discussion

Who is online

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