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 graphicsRat » Mon Oct 19, 2009 5:27 pm

vitaly333 wrote:I have already read it and tried the options suggested there (namely running make dll through the command prompt ). But problems remained


What do you mean by "command prompt"? ... You're supposed to use the "Visual Studio command prompt", not the ordinary command prompt. Which did you use?

- Launch the Visual Studio command prompt from:
Start Menu -> Programs -> Microsoft Visual Studio -> Visual Studio Tools -> Visual Studio Command prompt

BTW, you may wish to first run "make clean" in the exports directory before repeating "make dll" in order to get rid of any gunk from the previous process.
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby vitaly333 » Tue Oct 20, 2009 5:22 am

Which did you use?

I use Visual studio 2008 command prompt.
Maybe that I don't get a dll because compiling the library does not reach the end, but the library gotoblas_athlon-r1.06.a created.
When I built it under cygwin command prompt using gnu gfortran:
Code: Select all
$ make BINARY=32 USE_THREAD=0 CC=GCC-4 FC=gfortran-4

When the compilation comes to tests I get an error:
Code: Select all
cblas_strmm PASSED THE TEST OF ERROR-EXITS
 ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
 EXPECTED RESULT COMPUTED RESULT
1      -0.412587     0.00000
THE ARE THE RESULTS FOR COLUMN 1
******* cblas_strmm FAILED ON CALL NUMBER:
At line 1405 of file с_sblat3.f
Fortran runtime error: Bad unit number in OPEN statement
make[1]:*** [all3] Error 2
make[1]: Leaving directoey '/home/gotoblas/ctest'
make: *** [tests] Error 2


But the library libgoto_athlon-r1.06.a was created.
And then, when i try to create the export libraries using Visual studio command promt i get the error:
Code: Select all
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
C:\Program Files\Microsoft Visual Studio 9.0\VC>cd C:\cygwin\home\gotoblas
C:\cygwin\home\GotoBLAS>cd exports
C:\cygwin\home\GotoBLAS\exports>make dll
cat: ftest.s: No such file or directory
make: *** No rule to make target `../libgoto_athlon-r1.06.a', needed by `libgoto.dll'.  Stop.


When I built it under windows cmd using intel fortran compiler:
Code: Select all
make BINARY=32 USE_THREAD=0 CC=GCC-4 FC=ifort

I get:
Code: Select all
....................
make -C test all
make[1]: Entering directory `/home/GotoBLAS/test'
ifort -O2  -c sblat1.f  -o sblat1.o
ifort: command line warning #10161: unrecognized source type 'sblat1.o'; object
file assumed
-out:sblat1.exe
-subsystem:console
sblat1.o
../libgoto_athlon-r1.06.a
LINK : fatal error LNK1181: cannot open input file 'sblat1.o'
make[1]: *** [sblat1] Error 157
make[1]: Leaving directory `/home/GotoBLAS/test'
make: *** [tests] Error 2

But the library libgoto_athlon-r1.06.a was created.
And then, when i try to create the export libraries using Visual studio command promt i get the same error:
Code: Select all
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
C:\Program Files\Microsoft Visual Studio 9.0\VC>cd C:\cygwin\home\gotoblas
C:\cygwin\home\GotoBLAS>cd exports
C:\cygwin\home\GotoBLAS\exports>make dll
cat: ftest.s: No such file or directory
make: *** No rule to make target `../libgoto_athlon-r1.06.a', needed by `libgoto.dll'.  Stop.
vitaly333
 
Posts: 16
Joined: Mon Oct 19, 2009 9:57 am

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Tue Oct 20, 2009 8:21 am

vitaly333 wrote:I use Visual studio 2008 command prompt.


Just to be sure, can you describe how you launched the visual studio command prompt? I'm asking because based on past experiences, the sort of error messages you're getting were due to a problem with the visual studio environment i.e. the visual studio command prompt was not used.

vitaly333 wrote:hen I built it under cygwin command prompt using gnu gfortran ...


Built what? LAPACK or GotoBLAS? The only Fortran code that is distributed with GotoBLAS is for test purposes, and is in the test directory (there is one other Fortran file in /level1/others). You do not need to compile LAPACK either. You can simply get binaries from http://icl.cs.utk.edu/lapack-for-windows/ . That's what I did.

Are you trying to compile LAPACK, or GotoBLAS or both?
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby vitaly333 » Tue Oct 20, 2009 10:04 am

Just to be sure, can you describe how you launched the visual studio command prompt?

Start->Programs->Microsoft Visual Studio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt

Built what? LAPACK or GotoBLAS?

GotoBlas.

Are you trying to compile LAPACK, or GotoBLAS or both?

No. I need to use several functions from gotoBlas only. I don't need Lapack.
vitaly333
 
Posts: 16
Joined: Mon Oct 19, 2009 9:57 am

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Tue Oct 20, 2009 10:52 am

vitaly333 wrote:No. I need to use several functions from gotoBlas only. I don't need Lapack.


If you're compiling GotoBLAS, why then are you explicitly calling the gnu gfortran? That's what your comment suggest.

Perhaps you should run "make clean" in the GotoBLAS root directory, and repeat the HOWTO from the beginning, and let's know how each step goes. (There's no point progressing to the next step if the previous step fails.)
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby vitaly333 » Tue Oct 20, 2009 12:38 pm

If you're compiling GotoBLAS, why then are you explicitly calling the gnu gfortran?

Because if I don't explicitly calling the gfortran by default will be used the intel fortran, which is not correctly in the cygwin command prompt.
When I don't set the following key under cygwin command prompt in the make command:
Code: Select all
 FC = gfortran-4

I get an error in the begin of compilation:
Code: Select all
link: invalid option -- o
make: ***[getarch] Error1
..................................
..................................
catastrophic error: could not open source file "unistd.h"
compilation aborted for axpy.c <code 4>
make[1]: *** [saxpy.o] Error4
make[1]: Leaving directory '/home/gotoBLAS/interface'
make:*** [Libs] Error 1

Most likely this is because Intel compilers in Windows use the symbol "/" to specify the keys in the compilation of a Cygwin uses the symbol '-'.
vitaly333
 
Posts: 16
Joined: Mon Oct 19, 2009 9:57 am

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Tue Oct 20, 2009 1:18 pm

vitaly333 wrote:
If you're compiling GotoBLAS, why then are you explicitly calling the gnu gfortran?

Because if I don't explicitly calling the gfortran by default will be used the intel fortran, which is not correctly in the cygwin command prompt.


GotoBLAS compiles well under Cygwin without any tweaking whatsoever (see the file "01Readme.txt" in the GotoBLAS top level directory). Why not just compile it as I explained? ... You don't have to use the Intel Fotran (IFort) compiler to produce compile the library.

What happens when you run "make" (without any arguments) on the original Makefile in the GotoBLAS home?

PS: If however, you chose to use Ifort, the place to inform GotoBLAS about this preference is the file Makefile.rule (also in the GotoBLAS home). But bear in mind that, if you're compiling GotoBLAS under Cygwin as I suggested, you will have to register *all* the paths to the various directories that Ifort will require e.g. its header and lib files -- not an easy task. It would be a lot simpler if you used the Makefile as is, but do remember to undo all the changes you made to Makefile.rule before you proceed.
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby vitaly333 » Thu Oct 22, 2009 7:13 am

What happens when you run "make" (without any arguments) on the original Makefile in the GotoBLAS home?

Then there are the same errors related with incorrect work ifort under Cygwin command prompt as when I run make without any arguments in this case in my system as a Fortran compiler is used Intel Fortran.

you will have to register *all* the paths to the various directories that Ifort will require e.g. its header and lib files -- not an easy task.

It already done.
vitaly333
 
Posts: 16
Joined: Mon Oct 19, 2009 9:57 am

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Thu Oct 22, 2009 7:42 am

vitaly333 wrote:
What happens when you run "make" (without any arguments) on the original Makefile in the GotoBLAS home?

Then there are the same errors related with incorrect work ifort under Cygwin command prompt as when I run make without any arguments in this case in my system as a Fortran compiler is used Intel Fortran.


I don't understand why your build process is calling Ifort. I've got Ifort on both of my systems, yet the GotoBLAS build does not use it.

vitaly333 wrote:
you will have to register *all* the paths to the various directories that Ifort will require e.g. its header and lib files -- not an easy task.

It already done.


Why not remove all Ifort paths from your Cygwin environment? Ifort is not required to compile GotoBLAS.The gnu compilers are sufficient.

(BTW, I'm not entirely sure I know which step you're having difficulty with.)
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby vitaly333 » Thu Oct 22, 2009 8:31 am

Why not remove all Ifort paths from your Cygwin environment?

Why do it, when can explicitly specify what fortan compiler will be used to compile gotoBlas (FC=gfortran-4)?

I'm not entirely sure I know which step you're having difficulty with.

In both cases, the library is not fully assembled . Everything is falling apart (step 2 in instruction), when the compilation process comes to tests.
vitaly333
 
Posts: 16
Joined: Mon Oct 19, 2009 9:57 am

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Thu Oct 22, 2009 10:01 am

vitaly333 wrote:
Why not remove all Ifort paths from your Cygwin environment?

Why do it, when can explicitly specify what fortan compiler will be used to compile gotoBlas (FC=gfortran-4)?


I recommend that you try the proven technique, which I have used twice (on both machines that I work on). The other person that originally wrote the HOWTO for also successfully used the gnu fortran compiler. I'm sure Ifort can also work, but the process will probably require considerable tweaking that I cannot help you with. If you find a way to make Ifort work, please share your results.

BTW, the build process is not mine. It was devised by Mr Goto himself. As I said before, your best bet may be to start on with a clean installation of Cygwin and new copy of the GotoBLAS source.

vitaly333 wrote:
I'm not entirely sure I know which step you're having difficulty with.

In both cases, the library is not fully assembled . Everything is falling apart (step 2 in instruction), when the compilation process comes to tests.


I've considered the off chance that GotoBLAS does not support your processor type. However, information on the GotoBLAS FAQ page suggests that this may not be the case. You may wish to get confirmation and further guidance from Mr Goto.
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby Julie » Thu Oct 22, 2009 10:53 am

Moreover, if you want to use Intel compiler, why don't you use the MKL library.
MKL is providing a native Windows version that will get you the best performance on you machine.
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Re: HOWTO LAPACK/CLAPACK for Windows

Postby vitaly333 » Sun Oct 25, 2009 5:05 am

Moreover, if you want to use Intel compiler, why don't you use the MKL library.
MKL is providing a native Windows version that will get you the best performance on you machine.

1. MKL is not free.
2. Goto better then MKL.
vitaly333
 
Posts: 16
Joined: Mon Oct 19, 2009 9:57 am

Re: HOWTO LAPACK/CLAPACK for Windows

Postby graphicsRat » Sun Oct 25, 2009 10:27 am

vitaly333 wrote:
Moreover, if you want to use Intel compiler, why don't you use the MKL library.
MKL is providing a native Windows version that will get you the best performance on you machine.

1. MKL is not free.
2. Goto better then MKL.


What Julie is saying is that MKL is distributed with IFort. So, if you've purchased MKL or have the evaluation version, you've already got the MKL library.

You can however compile GotoBLAS if you chose to, but you need to follow the steps exactly as described. In the past few days, at least one more person I know of has successfully followed the process described in the HOWTO.
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Re: HOWTO LAPACK/CLAPACK for Windows

Postby flexo1234 » Fri Nov 06, 2009 9:34 am

Is there any way to compile the gotoBLAS without cygwin so the cygwin1.dll isn't needed to use it? Because I'm having troubles to call the gotoBLAS library in a MEX file in Matlab, it crashes Matlab when I run it. I think it's because of the cygwin1.dll because calling the standard BLAS library does work.
flexo1234
 
Posts: 7
Joined: Mon Sep 28, 2009 8:18 am

PreviousNext

Return to User Discussion

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 3 guests

cron