[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem in octave



On 23-Jul-2007, Thomas Weber wrote:

| Am Montag, den 23.07.2007, 21:38 +0530 schrieb Goudar Vishwanathappa
| Manu:
| > Hello
| > I don't know whether this is a right place to ask this question. I am
| > using octave 2.9.9 version present in Testing. I just tried out the
| > following multiplication and was surprised.
| > 
| > 
| > >>a=[3+6i, 1+5i]                   ! complex vector a is defined
| > >>a*a'                                  ! It is multiplied by its conjugate
| > ans =  0.50000 + 0.50000i     ! I get this answer
| 
| It's a bug. ATLAS is built with g77 as Fortran compiler, while Octave
| (2.9.9) was built with gfortran. This results in bugs when working with
| complex numbers.
| 
| There's not much we as maintainers can currently do. We are waiting for
| Octave 2.9.12 to migrate to testing (it's waiting for an ARM build on a
| machine with enough ram[1], but mails to arm@buildd.debian.org yield no
| result).

As long as the libraries are built with g77, then couldn't we use the
-ff2c option for gfortran so the calling conventions are the same?

Also, here is a Fortran-only test case that shows the problem:

      program foo
      double complex zdotu, zx(3), zy(3)
      zx(1) = dcmplx (1.0, 1.0);
      zx(2) = dcmplx (2.0, 1.0);
      zx(3) = dcmplx (3.0, 1.0);
      zy(1) = dcmplx (4.0, 1.0);
      zy(2) = dcmplx (5.0, 1.0);
      zy(3) = dcmplx (6.0, 1.0);
      print *, zdotu (3, zx, 1, zy, 1)
      end

On a current Debian testing system, if I compile with g77 it works.
With gfortran it fails.  With gfortran -ff2c it works.

If Debian transitions to the gfortran calling conventions for
libraries like ATLAS, then will that break programs compiled with g77?
Sorry if this is a FAQ, but I haven't been following the discussion
closely.

Thanks,

jwe



Reply to: