help-octave
[Top][All Lists]
Advanced

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

Re: Octave with Mac OS X and Fink seems slow


From: Michael Pender
Subject: Re: Octave with Mac OS X and Fink seems slow
Date: Sun, 9 Nov 2014 09:43:44 -0500

I agree that the question about modifying the Fink package should be taken to the Fink mailing lists.  To get to the essence of my question though, if there are compiler optimization settings that are necessary for clang on the Mac OS X to run well compared to gcc -- there seems to be a big performance sensitivity change -- then how can I set compiler flags so that external C++ routines linked into Octave through the mkoctfile interface are optimized properly?

I've tried setting options in .bashrc and it did not seem to help.  I think the .bashrc options are ignored under certain circumstances when the compiler/linker are invoked by the GUI, possibly using the system shell instead of bash.  My attempts to research this on my own suggest that I need to set CFLAGS and CXXFLAGS variables somewhere that will be invoked by the GUI and or CLI Octave clients, but I am not sure where and how to set those variables.

Transitioning from Octave on Linux to the Mac OS X has been a steeper learning curve than I expected because of the transition from gcc to clang.

Thanks, Mike

On Sat, Nov 8, 2014 at 12:34 PM, Alexander Hansen <address@hidden> wrote:

On Nov 8, 2014, at 9:06 AM, mpender <address@hidden> wrote:

> I installed Octave 3.8.2 on Mac OS X 10.9.4 using Fink on a machine with very
> similar specifications (processor, memory, bus architecture, etc.) to a
> similar machine I built running Ubuntu Linux 12.04, and the Fink
> installation seems about 30-50% slower.   If anything, I would have expected
> the Mac OS X machine to have a speed advantage.
>
> I'm wondering if the difference stems from the use of the clang compiler
> instead of gcc and either MPI instructions or the use of a lower level of
> optimization when building the packages for Mac OS X.  Is there a way to
> change the compiler options (e.g. -march=native) and rebuild Octave on Mac
> OS X to improve the speed?
>
> Thanks, Mike
>
>
>

There are a couple of  options under Fink:

1)  You can try adding tweaking compiler options by editing the package description file (/sw/fink/dists/stable/main/finkinfo/sci/octave-3.8.2.info for a default installation)  — though we generally recommend that people work with a copy in a local tree — most of the build process for Octave is contained in a sh script, so most of the optimization settings and the like are visible in that.

2)  Fink uses compiler wrapper scripts which allow you to append flags directly to the compiler invocation.

Since this isn’t really specific to Octave, but rather to Fink, how about we move this discussion over to one of the Fink mailing lists?  The Fink Developer List at address@hidden is probably the best, since you’re talking about tweaking builds and packaging.

--
Alexander Hansen, Ph.D.
Fink User Liaison



reply via email to

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