Hi,
I am trying to implement my model on my computer and I need to install lapack. However I really don't know how to compile the library very well and I have a very basic knowledge in compiling stuff.
I have downlowaded the LAPACK version 3.0 as described below:
file lapack-3.0.tgz
for LAPACK, version 3.0 + UPDATES
, This is the COMPLETE package
, (installation, testing, and timing) in tar gzip
, form (4991992 bytes). All revisions included.
, This cannot be retrieved via email.
, Updated: May 31, 2000
The fortran compiler I have is Portland (pgf77), so I have made minor modifications in the make.inc and Makefile files as shown below:
[1] make.inc
####################################################################
# LAPACK make include file. #
# LAPACK, Version 3.0 #
# June 30, 1999 #
####################################################################
#
SHELL = /bin/sh
#
# The machine (platform) identifier to append to the library names
#
PLAT = _LINUX
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
# refers to the compiler options desired when NO OPTIMIZATION is
# selected. Define LOADER and LOADOPTS to refer to the loader and
# desired load options for your machine.
#
FORTRAN = pgf77
#OPTS = -O4 -u -f -mt
#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
OPTS = -v -fast -Minform=inform
DRVOPTS = $(OPTS)
NOOPT = -u -f
#NOOPT = -u -f -mt
LOADER = pgf77
#LOADOPTS = -mt
#LOADOPTS = -f -dalign -native -xO5 -xarch=v8plusa
LOADOPTS = -v -fast -Minform=inform
#
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
#
ARCH = ar
ARCHFLAGS= cr
RANLIB = echo
#
# The location of the libraries to which you will link. (The
# machine-specific, optimized BLAS library should be used whenever
# possible.)
#
#BLASLIB = ../../blas$(PLAT).a
#BLASLIB = -xlic_lib=sunperf_mt
BLASLIB = -xlic_lib=sunperf
LAPACKLIB = lapack$(PLAT).a
TMGLIB = tmglib$(PLAT).a
EIGSRCLIB = eigsrc$(PLAT).a
LINSRCLIB = linsrc$(PLAT).a
[2] Makefile
#
# Top Level Makefile for LAPACK
# Version 3.0
# June 30, 1999
#
include make.inc
all: install lib testing blas_testing timing blas_timing
#lib: lapacklib tmglib
lib: blaslib lapacklib tmglib
clean: cleanlib cleantesting cleantiming
install:
( cd INSTALL; $(MAKE); ./testlsame; ./testslamch; \
./testdlamch; ./testsecond; ./testdsecnd; \
cp lsame.f ../BLAS/SRC/; cp lsame.f ../SRC; \
cp slamch.f ../SRC/; cp dlamch.f ../SRC/; \
cp second.f ../SRC/; cp dsecnd.f ../SRC/ )
blaslib:
( cd BLAS/SRC; $(MAKE) )
lapacklib:
( cd SRC; $(MAKE) )
tmglib:
( cd TESTING/MATGEN; $(MAKE) )
testing:
( cd TESTING ; $(MAKE) )
blas_testing:
( cd BLAS/TESTING; $(MAKE) -f Makeblat1 )
( cd BLAS; ./xblat1s > sblat1.out; \
./xblat1d > dblat1.out; \
./xblat1c > cblat1.out; \
./xblat1z > zblat1.out )
( cd BLAS/TESTING; $(MAKE) -f Makeblat2 )
( cd BLAS; ./xblat2s < sblat2.in ; \
./xblat2d < dblat2.in ; \
./xblat2c < cblat2.in ; \
./xblat2z < zblat2.in )
( cd BLAS/TESTING; $(MAKE) -f Makeblat3 )
( cd BLAS; ./xblat3s < sblat3.in ; \
./xblat3d < dblat3.in ; \
./xblat3c < cblat3.in ; \
./xblat3z < zblat3.in )
timing:
( cd TIMING; $(MAKE) )
blas_timing:
( cd TIMING/LIN; $(MAKE) )
( cd TIMING; ./xlintims < sblasa.in > sblasa.out ; \
./xlintims < sblasb.in > sblasb.out ; \
./xlintims < sblasc.in > sblasc.out )
( cd TIMING; ./xlintimd < dblasa.in > dblasa.out ; \
./xlintimd < dblasb.in > dblasb.out ; \
./xlintimd < dblasc.in > dblasc.out )
( cd TIMING; ./xlintimc < cblasa.in > cblasa.out ; \
./xlintimc < cblasb.in > cblasb.out ; \
./xlintimc < cblasc.in > cblasc.out )
( cd TIMING; ./xlintimz < zblasa.in > zblasa.out ; \
./xlintimz < zblasb.in > zblasb.out ; \
./xlintimz < zblasc.in > zblasc.out )
cleanlib:
( cd INSTALL; $(MAKE) clean )
( cd BLAS/SRC; $(MAKE) clean )
( cd SRC; $(MAKE) clean )
( cd TESTING/MATGEN; $(MAKE) clean )
cleantesting:
( cd TESTING/LIN; $(MAKE) clean )
( cd TESTING/EIG; $(MAKE) clean )
( cd TESTING; rm xlin* xeig* )
cleantiming:
( cd TIMING/LIN; $(MAKE) clean )
( cd TIMING/LIN/LINSRC; $(MAKE) clean )
( cd TIMING/EIG; $(MAKE) clean )
( cd TIMING/EIG/EIGSRC; $(MAKE) clean )
( cd TIMING; rm xlin* xeig* )
So, when I run make I get the following error message:
: undefined reference to `ssymv_'
../../lapack_LINUX.a(ssyrfs.o)(.text+0x103d): In function `ssyrfs_':
: undefined reference to `saxpy_'
../../lapack_LINUX.a(ssytf2.o)(.text+0x20d): In function `ssytf2_':
.
.
.
and the list grows infinitely up to the point below
.
.
.
../../lapack_LINUX.a(slauu2.o)(.text+0x409): In function `slauu2_':
: undefined reference to `sscal_'
pgf77-Fatal-linker completed with exit code 1
make[2]: *** [../xlintsts] Error 2
make[2]: Leaving directory `/home/penguin/rafael/lapack-3.0/LAPACK/TESTING/LIN'
make[1]: *** [xlintsts] Error 2
make[1]: Leaving directory `/home/penguin/rafael/lapack-3.0/LAPACK/TESTING'
make: *** [testing] Error 2
I'd really appreciate it if someone could help me with this!
Thank you,
Rafael

