This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
RE: optimization/6368: ia64 bad code for LAPACK with -O2 -funroll-all-loops
- From: "Billinghurst, David \(CRTS\)" <David dot Billinghurst at riotinto dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 19 Apr 2002 01:06:02 -0000
- Subject: RE: optimization/6368: ia64 bad code for LAPACK with -O2 -funroll-all-loops
- Reply-to: "Billinghurst, David \(CRTS\)" <David dot Billinghurst at riotinto dot com>
The following reply was made to PR optimization/6368; it has been noted by GNATS.
From: "Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com>
To: <janis187@us.ibm.com>,
<gcc-gnats@gcc.gnu.org>
Cc:
Subject: RE: optimization/6368: ia64 bad code for LAPACK with -O2 -funroll-all-loops
Date: Fri, 19 Apr 2002 11:00:16 +1000
Janis,
I have attached one of tools for tracking down LAPACK errors.
It is cruse, but it saves my time.
You will need to adapt the makefile for the particular binary
under test, but it is just cut and paste from the TESTING/*/Makefile
The basic idea is to use a know good LAPACK library with each
individual file from the bad LAPACK library. Then by=20
comparing the .out files, the bad routine(s) can be identified. =20
make xeigtst-lapack-routines.txt
for f in `cat xeigtst-lapack-routines.txt`
do
make F=3D${f} ssep-${f}.out
rm xeigtsts-${f} core
done
################### Makefile########################
# LAPACK source tree
SRC =3D /usr/local/imports/LAPACK
# Bad LAPACK object tree
L =3D /exd4/billingd/obj/LAPACK-gcc
# Good LAPACK object tree
L0 =3D /exd4/billingd/obj/LAPACK-gcc-O0
vpath %.o $(L0)/TESTING/EIG:$(L0)/SRC
vpath %.in .:$(SRC)/TESTING
BLAS =3D $(L0)/blas.a
LAPACK =3D $(L0)/lapack.a
TMGLIB =3D $(L0)/tmglib.a
LIBS =3D $(TMGLIB) $(LAPACK) $(BLAS)
# GCC object tree under test
SS =3D /exd4/billingd/obj/gcc
# These options produce the failure
FC =3D $(SS)/gcc/g77 -B$(SS)/gcc/ -L$(SS)/mips-sgi-irix6.5/libf2c
FFLAGS =3D -O3 -funroll-loops
LD =3D $(FC)
LDFLAGS =3D -L$(SS)/mips-sgi-irix6.5/libf2c \
-L$(SS)/mips-sgi-irix6.5/libf2c/.libs=20
ENV =3D =
LD_LIBRARYN32_PATH=3D$(SS)/mips-sgi-irix6.5/libf2c/.libs:$(SS)/gcc
# Object files for xeigtst
XOBJS =3D schkee.o sbdt01.o sbdt02.o sbdt03.o schkbb.o schkbd.o schkbk.o =
\
schkbl.o schkec.o schkgg.o schkgk.o schkgl.o schkhs.o schksb.o \
schkst.o sckglm.o sckgqr.o sckgsv.o scklse.o sdrges.o sdrgev.o \
sdrgsx.o sdrgvx.o sdrvbd.o sdrves.o sdrvev.o sdrvgg.o sdrvsg.o \
sdrvst.o sdrvsx.o sdrvvx.o serrbd.o serrec.o serred.o serrgg.o \
serrhs.o serrst.o sget02.o sget10.o sget22.o sget23.o sget24.o \
sget31.o sget32.o sget33.o sget34.o sget35.o sget36.o sget37.o \
sget38.o sget39.o sget51.o sget52.o sget53.o sget54.o sglmts.o \
sgqrts.o sgrqts.o sgsvts.o shst01.o slarfy.o slarhs.o slatm4.o \
slctes.o slctsx.o slsets.o sort01.o sort03.o ssbt21.o ssgt01.o \
sslect.o sspt21.o sstt21.o sstt22.o ssyt21.o ssyt22.o slafts.o \
slahd2.o slasum.o slatb9.o sstech.o sstect.o ssvdch.o ssvdct.o \
ssxt1.o alahdg.o alasum.o alasvm.o alareq.o ilaenv.o xerbla.o \
xlaenv.o chkxer.o
xeigtsts: $(XOBJS)
$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)
ssep%.out: xeigtsts sep%.in
$(ENV) $(filter xeigtsts%, $+) < $(filter %.in, $+) > $@
xeigtsts-$(F): $(F).o $(XOBJS)
$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)
ssep-$(F).out: xeigtsts-$(F) sep.in
$(ENV) $(filter xeigtsts%, $+) < $(filter %.in, $+) > $@
ssg-$(F).out: xeigtsts-$(F) ssg.in
$(ENV) $(filter xeigtsts%, $+) < $(filter %.in, $+) > $@
#----------------------------------------
lapack-routines.txt:
(cd $(L)/SRC; ls ) | sed -e 's/\.o//' > $@
xeigtst-nm.txt: $(L)/TESTING/xeigtsts
nm $+ > $@
xeigtst-routines.txt: xeigtst-nm.txt=20
grep FUNC $+ | sed -e 's/|/ /g' \
| gawk '{print $$8}' | sed -e 's/_$$//' | sort > $@
xeigtst-lapack-routines.txt: lapack-routines.txt xeigtst-routines.txt
comm -12 $+ > $@
%.o: %.f
$(FC) $(FFLAGS) -c -o $@ $+