About Installing LAPACK for Windows users

| コメント(1)

1. Requirement: cygwin ( gcc, g++, g77, make, gdb )

2. Access to http://www.netlib.org/lapack/ and obtain lapack-3.1.1.gz.

3. After downloading lapack-3.1.1.gz in /cygwin/home/***/, unzip lapack-3.1.1.gz, when the command line is

$ gunzip -c lapack-3.1.1.gz | tar xv

or

$ tar xvfz lapack-3.1.1.gz

Since current directory is /cygwin/home/***/, move it to /cygwin/home/***/lapack-3.1.1/, when the command line is

$ cd lapack-3.1.1

5. Copy and modify make.inc.LINUX, when the command line is given below.

$ cp INSTALL/make.inc.LINUX ./make.inc

6. Modify make.inc, using your text editor.

     <EXAMPLE>
     NOOPT = -ffloat-store
     # The above line is necessary when using g95.
     BLASLIB = $(HOME)/lapack-3.1.1/blas$(PLAT).a
     LAPACKLIB = lapack$(PLAT).a
     TMGLIB = tmglib$(PLAT).a
     EIGSRCLIB = eigsrc$(PLAT).a
     LINSRCLIB = linsrc$(PLAT).a

7. Build BLAS library and LAPACK library, when the command lines are

$ make blaslib

and

$ make lapacklib

If neither blas_LINUX.a nor lapack_LINUX.a were made in your current directory, modify make.inc appropriately.

8. Copy and modify blas_LINUX.a and lapack_LINUX.a, when the command lines are

$ cp blas_LINUX.a /lib/libblas.a
$ cp lapack_LINUX.a /lib/liblapack.a
$ ranlib /lib/libblas.a
$ ranlib /lib/liblapack.a

9. Now you can use LAPACK, when the command line is

$ g77 -o file01 file01.f -llapack -lblas -lg2c -lm

where file01.f were an example and you can use other fortran77 programs.

コメント(1)

How to cope with "/bin///ld: cannot find -lg2c" for win users

  When I used lapack library with g95, the error message
was displayed to indicate that ld.exe couldn't find
libg2c.a. To solve the problem, I typed in
cp /lib/gcc/i686-pc-cygwin/3.4.4/libg2c.a /lib/libg2c.a
at the command line and could compile *.f90 and create *.exe
using lapack library with g95. Then, the command line was
g95 -o * *.f90 -llapack -lblas -lg2c -lm.

コメントする

My Photo
プロフィール!
2016・11・15 改訂
spacer01
rssspacer01foaf
spacer01
atom.xml
spacer01

この記事について

このページは、Suzuki TakashiがMarch 24, 2007 11:50 PMに書いた記事です。

ひとつ前の記事は「正式にスコアが公開された模様。」です。

次の記事は「水道橋の高校にて。」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

June 2024

Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30

月別 アーカイブ

OpenID対応しています OpenIDについて