help-octave
[Top][All Lists]
Advanced

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

Re: Building octave with large matrices support


From: Jaroslav Hajek
Subject: Re: Building octave with large matrices support
Date: Fri, 28 Aug 2009 08:18:19 +0200

On Thu, Aug 27, 2009 at 11:24 PM, John W. Eaton<address@hidden> wrote:
> On 27-Aug-2009, Jaroslav Hajek wrote:
>
> | BLAS and LAPACK are already checked against the Fortran conventions,
> | including integer return values (ISAMAX).
>
> Does the check fail if the integer sizes don't match?
>

It doesn't need to. I don't think there's a good way to safely inquire
the integer size used in BLAS, but if your Fortran uses 64bit and BLAS
32bit, you may get garbage in the upper 32bit of the result from
ISAMAX, hence the test will fail. But you may also get zero as a side
effect (if the output is via a 64-bit register that is zeroed first).
Hmmm. Maybe I can improve the test even further. The problem is that
args are passed by pointers, so as long as no argument is actually
outside the 32-bit range, it won't make a difference. And you
certainly don't want a configure test with an 8GB array...

The converse, i.e. 32-bit Fortran calling 64-bit BLAS, is almost bound
to fail in the existing test.


> | I think we should at least check that the Fortran integer matches
> | octave_idx_type, which is an assumption made throughout Octave
> | sources.
>
> Yes, this should be done so that the Fortran code that is distributed
> with Octave will compile correctly, but we also need to check all
> other libraries that we link with and that we pass octave_idx_type
> values to.  What's the best way to do that?  I assume it will require
> running test programs.  Maybe we should move any further discussion to
> the maintainers list?
>
> jwe
>

The problem is most imminent in Fortran 77-style libraries, which
typically don't provide any header files. That includes BLAS and
LAPACK, ARPACK and QRUPDATE. The latter three less likely, because
they will typically be compiled by system's Fortran compiler using
default settings. But there are lots of BLASes. I'll see what I can
do.


-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]