I have a problem installing lapack 3.1.1 with gfortran. After make, the command ./xlintstc < ctest.in ..... simply halts. Removing optimisation as suggested elsewhere does not help. Everything seems to work perfectly with g77, but again I have problems linking lapack compiled with g77 to my program, which I compile with gfortran.
Here are the make.inc and Makefile, that I use:
- Code: Select all
####################################################################
# LAPACK make include file. #
# LAPACK, Version 3.1.1 #
# February 2007 #
####################################################################
#
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 = g77
OPTS = -funroll-all-loops -O3
DRVOPTS = $(OPTS)
NOOPT =
LOADER = g77
LOADOPTS =
#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
TIMER = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
# TIMER = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
# TIMER = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
# TIMER = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER = NONE
#
# 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 = ranlib
#
# 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
LAPACKLIB = lapack$(PLAT).a
TMGLIB = tmglib$(PLAT).a
EIGSRCLIB = eigsrc$(PLAT).a
LINSRCLIB = linsrc$(PLAT).a
and Makefile
- Code: Select all
#
# Top Level Makefile for LAPACK
# Version 3.1.1
# February 2007
#
include make.inc
all: lapack_install lib lapack_testing blas_testing
#lib: lapacklib tmglib
lib: blaslib lapacklib tmglib
clean: cleanlib cleantesting cleanblas_testing
lapack_install:
( cd INSTALL; $(MAKE); ./testlsame; ./testslamch; \
./testdlamch; ./testsecond; ./testdsecnd; ./testversion )
blaslib:
( cd BLAS/SRC; $(MAKE) )
lapacklib: lapack_install
( cd SRC; $(MAKE) )
tmglib:
( cd TESTING/MATGEN; $(MAKE) )
lapack_testing: lib
( 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 )
cleanlib:
( cd INSTALL; $(MAKE) clean )
( cd BLAS/SRC; $(MAKE) clean )
( cd SRC; $(MAKE) clean )
( cd TESTING/MATGEN; $(MAKE) clean )
cleanblas_testing:
( cd BLAS/TESTING; $(MAKE) -f Makeblat1 clean )
( cd BLAS/TESTING; $(MAKE) -f Makeblat2 clean )
( cd BLAS/TESTING; $(MAKE) -f Makeblat3 clean )
( cd BLAS; rm -f xblat* )
cleantesting:
( cd TESTING/LIN; $(MAKE) clean )
( cd TESTING/EIG; $(MAKE) clean )
( cd TESTING; rm -f xlin* xeig* )
cleanall: cleanlib cleanblas_testing cleantesting
rm -f *.a TESTING/*.out INSTALL/test* BLAS/*.out
The platform I have problems with is Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
which is 64bit.
fortran compiler:
GNU Fortran 95 (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.
I have no problems compiling lapack with gfortran on my laptop, which has pentium M processor.
Any help would be appreciated,
Andres

