I recently upgraded form gcc-3.4.4 to 4.0.2 on an athlon-mp box.   I have a c++
program that links to lapack (which was built some time ago under the 3.4.x
series).  I use g77 to link the final objects together; however after
upgrading, (and switching g77->gfortran) the link died, basically because of
unresolved externals in lapack (things like s_copy s_cmp).   I'm pretty sure
that this is merely something changed in gfortran's libraries.  

I've tried rebuilding lapack using gfortran (both as the compiler and as a
loader).  I'm getting large numbers of testsuite failuers and worse, SIGSEGV's
on some of the test 
routines. 

Here's my make.inc file for lapack (I've played around with some of the
optimization flags, but so far, no differences have shown up):

####################################################################
#  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  = /usr/bin/gfortran
#OPTS     = -O2 -march=athlon-mp -funroll-loops -fomit-frame-pointer
OPTS     = -O3 -march=athlon-mp -funroll-loops -fomit-frame-pointer
DRVOPTS  = $(OPTS)
NOOPT    =
LOADER   = /usr/bin/gfortran -lm -lieee
LOADOPTS =
#
#  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.)
#
BLASDIR      = /home/ronis/Project/notar/LAPACK/BLAS/SRC
#BLASLIB      = $(BLASDIR)/strsm.o $(BLASDIR)/dtrsm.o $(BLASDIR)/ctrsm.o
$(BLASDIR)/ztrsm.o -lcblas -lf77blas -latlas
BLASLIB      = -lcblas -lf77blas -latlas
LAPACKLIB    = lapack$(PLAT).a
TMGLIB       = tmglib$(PLAT).a
EIGSRCLIB    = eigsrc$(PLAT).a
LINSRCLIB    = linsrc$(PLAT).a

Here's some relevant information for the test:

Testing COMPLEX LAPACK linear equation routines
./xlintstc < ctest.in > ctest.out 2>&1
/bin/sh: line 1: 21807 Segmentation fault      (core dumped) ./xlintstc
<ctest.in >ctest.out 2>&1

ctest.out is empty.   There are other testsuite failures:

grep fail *.out gives:

cgd.out: CGV drivers:     62 out of   1092 tests failed to pass the threshold
dgd.out: DGV drivers:      9 out of   1092 tests failed to pass the threshold
dgd.out: DXV drivers:    200 out of   5000 tests failed to pass the threshold
dgg.out: DGG:    1 out of  2177 tests failed to pass the threshold
sgd.out: SGV drivers:     10 out of   1092 tests failed to pass the threshold
sgd.out: SXV drivers:     37 out of   5000 tests failed to pass the threshold
ssep.out: SST drivers:      1 out of  14256 tests failed to pass the threshold
ssvd.out: SBD:      1 out of   5510 tests failed to pass the threshold
zgd.out: ZGV drivers:     63 out of   1092 tests failed to pass the threshold


This may be related to the flags I've used.


-- 
           Summary: LAPACK builds but dies in the testsuite
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ronis at ronispc dot chem dot mcgill dot ca


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24993

Reply via email to