scipy のインストール

結構はまるなあ.環境は相変わらずOpenSolarisPython 2.6はVirtualEnvで~/以下に.

を見ながらがんばる.

BLAS

おとしてきて,解凍して,

% g77  -fno-second-underscore -O2 -c *.f
% ar r libfblas.a *.o
% ranlib libfblas.a
% mv libfblas.a ~/lib

LAPACK

% cp INSTALL/make.inc.SUN4 ./make.inc
% make lapacklib

したら

( cd INSTALL; make; ./testlsame; ./testslamch; \
          ./testdlamch; ./testsecond; ./testdsecnd; ./testversion )
make[1]: Entering directory `/home/sotarok/tmp/lapack-3.2.1/INSTALL'
f77 -dalign -O4 -fast -o testlsame lsame.o lsametst.o
NOTICE: Invoking /usr/bin/f90 -f77 -dalign -O4 -fast -ftrap=%none -o testlsame lsame.o lsametst.o
ld: fatal: file /opt/sunstudio12.1/prod/lib/crti.o: section [9].rela.annotate has invalid type [ SHT_RELA ]
f90: Fatal error in ld: Segmentation Fault (core dumped)
make[1]: *** [testlsame] Error 1
make[1]: Leaving directory `/home/sotarok/tmp/lapack-3.2.1/INSTALL'
/bin/sh[1]: ./testslamch: not found [No such file or directory]
/bin/sh[1]: ./testdlamch: not found [No such file or directory]
/bin/sh[2]: ./testsecond: not found [No such file or directory]
/bin/sh[2]: ./testdsecnd: not found [No such file or directory]
/bin/sh: line 2: ./testversion: not found
make: *** [lapack_install] Error 127

またこれか.

% LD_NOEXEC_64=1 make lapacklib
...
spstrf.f:
        spstrf:

      INTRINSIC          MAX, MIN, SQRT, MAXLOC
                                         ^
"spstrf.f", Line = 102, Column = 42: ERROR: "MAXLOC" is not an intrinsic routine.

f90comp: 366 SOURCE LINES
f90comp: 1 ERRORS, 0 WARNINGS, 0 OTHER MESSAGES, 0 ANSI
make[1]: *** [spstrf.o] Error 1
make[1]: Leaving directory `/home/sotarok/tmp/lapack-3.2.1/SRC'
make: *** [lapacklib] Error 2

よくわからないけど, http://d.hatena.ne.jp/zunpane/20090112#1231763554 を参考に, make.inc の f77 を f95 に変更して解決.

% cp lapack_SUN4.a libflapack.a 
% mv libflapack.a ~/lib

scipy

% BLAS=~/lib/libfblas.a LAPACK=~/lib/libflapack.a python setup.py install

いけた!!!? ... とおもったら

        zneupd:
 f90: Internal Error, code=fw-interface-cexp-277, last src=scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/zneupd.f:673
f90: Warning: The option -xcode=pic32 has no effect on x86
scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/zneupd.f:
        zneupd:
 f90: Internal Error, code=fw-interface-cexp-277, last src=scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/zneupd.f:673
error: Command "/usr/bin/f90 -ftrap=%none -f77 -xcode=pic32 -Iscipy/sparse/linalg/eigen/arpack/ARPACK/SRC -I/home/sotarok/lib/python2.6/site-packages/numpy-1.3.0-py2.6-solaris-2.11-i86pc.egg/numpy/core/include -c -c scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/zneupd.f -o build/temp.solaris-2.11-i86pc-2.6/scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/zneupd.o" failed with exit status 1

とまった(´・ω・`)

ATLAS そういや入れてなかった気もする.

ATLAS

解凍したディレクトリで

% ./configure

ATLAS can no longer be  configured in the exact source directory,
create a subdir such as MyObj.  See ATLAS/INSTALL.txt for help.

いきなりおこられた.

% mkdir tmp
% cd tmp
% ../configure
% make build
...

make[3]: Entering directory `/home/sotarok/tmp/ATLAS/tmp/src/threads'
gcc -DL2SIZE=4194304 -I/home/sotarok/tmp/ATLAS/tmp/include -I/home/sotarok/tmp/ATLAS/tmp/..//include -I/home/sotarok/tmp/ATLAS/tmp/..//include/contrib -DAdd__ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_SunOS -DATL_ARCH_HAMMER -DATL_CPUMHZ=2593 -DSUN_HR -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_3DNow -DATL_USE64BITS -DATL_GAS_x8664  -DATL_NCPU=4 -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -m64 -o ATL_log2tlaunch.o -c /home/sotarok/tmp/ATLAS/tmp/..//src/threads/ATL_log2tlaunch.c
/home/sotarok/tmp/ATLAS/tmp/..//src/threads/ATL_log2tlaunch.c: In function `ATL_log2tlaunch':
/home/sotarok/tmp/ATLAS/tmp/..//src/threads/ATL_log2tlaunch.c:78: error: structure has no member named `aff_set'
make[3]: *** [ATL_log2tlaunch.o] Error 1
make[3]: Leaving directory `/home/sotarok/tmp/ATLAS/tmp/src/threads'
make[2]: *** [IBuildPtlibs0] Error 2
make[2]: Leaving directory `/home/sotarok/tmp/ATLAS/tmp/bin'
   done.




ATLAS install complete.  Examine
ATLAS/bin/<arch>/INSTALL_LOG/SUMMARY.LOG for details.
make[1]: Leaving directory `/home/sotarok/tmp/ATLAS/tmp'
make clean
make[1]: Entering directory `/home/sotarok/tmp/ATLAS/tmp'
rm -f *.o x* config?.out *core*
make[1]: Leaving directory `/home/sotarok/tmp/ATLAS/tmp'

(゚Д゚)

エラーなのかcompleteなのかわからん.


あとで続き.
続き.

エラーだった.
どうやらlapackのパスをしていすべきっぽいことがscipy に書いてあったっぽい *1.configure から再挑戦.一回 tmp/ 削除して,もっかい.

% ../configure  -Fa alg -fPIC --with-netlib-lapack=~/lib/libflapack.a
% make

これでいけたっぽい.make shared は失敗したので放置.

% cp lib/lib* ~/lib

scipy

まだエラー.
エラー変わってない気がする.あいかわらず FORTRAN の zneupd.f でエラー出る.


ちっと.ギブ.
続きは明日.