[Top][All Lists]

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

Re: oct (and mex) files for different architectures

From: Richard Crozier
Subject: Re: oct (and mex) files for different architectures
Date: Mon, 12 Sep 2011 15:04:38 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1

 On 12/09/2011 14:53, Jordi Gutiérrez Hermoso wrote:
> 2011/9/12 Richard Crozier <address@hidden>:
>>  On 12/09/2011 14:30, Jordi Gutiérrez Hermoso wrote:
>>> On 12 September 2011 08:14, Richard Crozier <address@hidden> wrote:
>>>> On Matlab, I can compile several different mex files for different machine
>>>> architectures and Matlab will call the appropriate one for the local setup.
>>>> The compiled mex files are given appropriate extensions e.g. mexa64 for
>>>> 64bit linux, mexglx for 32 bit linux, mexw32 for 32 bit windows etc.
>>>> Is the equivalent possible for oct files (or mex files created in Octave)?
>>> Not currently, no. I find that putting the architecture in the
>>> filename extension is a little weird to begin with. Why don't you see
>>> .exe64 and .exe extensions for Windows executables? Can't you just
>>> recompile and distribute your oct files for the architecture you need
>>> them? I get the feeling that Matlab lets you do that because people
>>> don't like recompiling and/or don't like source code.
>> I have matlab instances running on several different platforms all
>> accessing the same code directory simultaneously (hosted on a SAMBA file
>> share).
> And what do you do about the Octave instances? Do you have
> octave.exe64 and octave.exe32 running as well?
> Also, the architecture is not the biggest problem. Even for the same
> architecture, you would have to recompile your octfiles if your
> machines have slightly different libraries on the OS you're compiling
> for. So you would need .oct64deb-6.0, oct64ubu-11.08, .oct64fedora-13
> and .oct64suse-5.
> I just don't see how filename extensions can solve this problem. It
> might solve it for Windows, but I don't see how it would work for
> other things. Octave runs on a lot more architectures than Matlab too;
> and we compile it for all 11 architectures of Debian; coming up with a
> filename extension per architecture seems unwieldy.
> I think the solution for now, even if it's inconvenient, is to put
> your oct files in directories that have a filename extension specific
> to the architecture you care about and in your m-scripts you
> conditionally pick to load the directory based on system information
> (perhaps after running system("uname -a") or similar).
> - Jordi G. H.

OK, but won't the main difference in performance be the difference
between code compiler optimised for 64bit and 32 bit? I would actually
like to know this.

In my university the library files in linux will be the same across all
the machines in the pool, as dictated by the IT department. There are a
couple of pools of machines, and all Linux machines for instance run
Scientific Linux.


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

reply via email to

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