octave-maintainers
[Top][All Lists]
Advanced

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

Re: 2.9.12 (2.9.13) chol broken with --enable-64?


From: Fredrik Lingvall
Subject: Re: 2.9.12 (2.9.13) chol broken with --enable-64?
Date: Sun, 12 Aug 2007 12:00:43 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20070804)

John W. Eaton wrote:
On 11-Aug-2007, Fredrik Lingvall wrote:

|  From gcc's man page:
| | `-m32'
| `-m64'
|      Generate code for a 32-bit or 64-bit environment.  The 32-bit
|      environment sets int, long and pointer to 32 bits and generates
|      code that runs on any i386 system.  The 64-bit environment sets
|      int to 32 bits and long and pointer to 64 bits and generates code
|      for AMD's x86-64 architecture.

That doesn't make ints 8 bytes wide (nor is that what you probably
want for the C++ parts of Octave).
OK. What gcc (>=4.1.x) flags are recommended to compile octave for x86_64 (with --enable-64)?

CFLAGS=?
CXXFLAGS=?
FFLAGS=?
| From what I can see (in the liboctave/dbleCHOL.cc), octave's chol and | cholinv also uses dpotrf_(....) and | dpotri_(...). I have assumed, | | extern "C" void dpotrf_(const char *UPLO, const int *N,
|             const double *A, const int *lda,
|             const int *info);
| | extern "C" void dpotri_(const char *UPLO, const int *N,
|             const double *A, const int *lda,
|             const int *info);
| | that is, N and lda are int's. Perhaps, they should be long's instead?
Yes, probably.  Octave uses the typedef octave_idx_type to handle this
so that configure can choose an appropriate type.

| Or, maybe the gfortan
| option -fdefault-integer-8 should be used when compiling LAPACK?

Yes.

jwe
If one sets,

   BINARY64  = 1

and,

   INTERFACE64 = 1

in the Makefile.rule (for GOTO BLAS) then CCOMON_OPT is set to:

># If you need to access over 4GB chunk on 64bit system.
>ifdef BINARY64
>CCOMMON_OPT    += -D__64BIT__
>GETARCH_FLAGS    += -D__64BIT__
>ifdef INTERFACE64
>CCOMMON_OPT    += -DUSE64BITINT
>endif
>endif

which seems to be what is needed for octave with --enable-64. After building GOTO BLAS with the above settings and building LAPACK with -fdefault-integer-8 then chol stopped
complaining.

/Fredrik







reply via email to

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