[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32120] complex times complex failure
From: |
Michael C. Grant |
Subject: |
[Octave-bug-tracker] [bug #32120] complex times complex failure |
Date: |
Sun, 16 Mar 2014 19:46:42 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) Version/7.0.2 Safari/537.74.9 |
Follow-up Comment #15, bug #32120 (project octave):
I have to admit I am stumped. Looking at config.log, I see signs that
configure is performing the *right* tests to see what to do. Here is the test
that it runs:
program main
double complex zdotu,a(1),b(1),w
external zdotu
a(1) = dcmplx(1d0,1d0)
b(1) = dcmplx(1d0,2d0)
w = zdotu(1,a,1,b,1)
if (w .ne. a(1)*b(1)) stop 1
end
This program *fails* when compiled with "gfortran -framework vecLib", but
succeeds when compiled with "gfortran -ff2c -framework vecLib". Just to make
sure that this test just "got lucky" because it use n=1, I created this:
program main
double complex zdotu,a(3),b(3),w
external zdotu
a(1) = dcmplx(1d0,1d0)
a(2) = dcmplx(2d0,1d0)
a(3) = dcmplx(3d0,1d0)
b(1) = dcmplx(4d0,1d0)
b(2) = dcmplx(5d0,1d0)
b(3) = dcmplx(6d0,1d0)
w = zdotu(3,a,1,b,1)
write(*,*) a(1), b(1), w
end
Sure enough, this test passes with -ff2c, and fails without it. Then I tried
this:
program main
double complex a(3),b(3),w
external xzdotu
a(1) = dcmplx(1d0,1d0)
a(2) = dcmplx(2d0,1d0)
a(3) = dcmplx(3d0,1d0)
b(1) = dcmplx(4d0,1d0)
b(2) = dcmplx(5d0,1d0)
b(3) = dcmplx(6d0,1d0)
call xzdotu(3,a,1,b,1,w)
write(*,*) a(1), b(1), w
end
And I compiled this with the *exact* code used in liboctave/cruft/blas-xtra.
And again, with the -ff2c flag, it works. And this is exactly how it is
compiled in Octave:
libtool: compile: /usr/local/bin/gfortran -ff2c -O -c blas-xtra/xzdotu.f
-fno-common -o blas-xtra/.libs/libcruft_la-xzdotu.o
And yet, I verified, by inserting WRITE statements in xzdotu.f, that it *is*
the call to zdotu that is failing within Octave.
The wrapper is working in isolation, when compiled using the same flags Octave
uses, but it's not working within Octave itself. I don't get it.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32120>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #32120] complex times complex failure, (continued)
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Doug Stewart, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Jordi GutiƩrrez Hermoso, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/12
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Jordi GutiƩrrez Hermoso, 2014/03/13
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/16
- [Octave-bug-tracker] [bug #32120] complex times complex failure,
Michael C. Grant <=
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/16
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/16
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/16
- [Octave-bug-tracker] [bug #32120] complex times complex failure, John W. Eaton, 2014/03/17
- [Octave-bug-tracker] [bug #32120] complex times complex failure, John W. Eaton, 2014/03/17
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/17
- [Octave-bug-tracker] [bug #32120] complex times complex failure, John W. Eaton, 2014/03/17
- [Octave-bug-tracker] [bug #32120] complex times complex failure, John W. Eaton, 2014/03/17
- [Octave-bug-tracker] [bug #32120] complex times complex failure, Michael C. Grant, 2014/03/17
- [Octave-bug-tracker] [bug #32120] complex times complex failure, John W. Eaton, 2014/03/17