octave and Mac OS X

I read in some documentation that people had gotten PTB working with octave on Mac OS X. I'm wondering how that's done. I tried adapting the linux instructions but have yet to achieve success.

Has anyone else tried it?

At our institution there's pretty intense interest in getting off of Matlab. Most new programmers are learning python/scipy or octave. The Matlab licensing restrictions have gotten onerous, especially when we have to outfit large labs of computers.

We'd see an immediate multiplication in the number of PTB users if we didn't have to use Matlab. And maybe, for every 1:1000 (optimistic?) a potential contributor.

John Christie
So you are one of the 17 people that so far voted for Octave support in our poll?

We used to have Octave-2 support since about 2 years under OS/X and Linux, but it was a bit incomplete, a bit difficult to install and Octave-2 is obsolete since at least a year.

Starting with the next ptb beta, we will cancel Octave-2 support and provide Octave-3 support.

The code is pretty much ready for OS/X under IntelMacs and Linux since this weekend.

You can test it already:

1. Download a fresh DownloadPsychtoolbox.m script from the Wiki. Only the latest downloader supports automatic installation.
2. DownloadPsychtoolbox(.........., 'trunk') as the flavor parameter - trunk is the prototype for upcoming betas.
3. Try it. Let us know how it works.

The minimum requirement is Octave 3.2.0 which was just released 1 week ago, older versions won't work. The 3.2 series brings a host of very useful improvements for PTB.
You'll also need to install many of the octave-forge packages to add a few toolboxes, e.g., audio, image, io, general, strings, the signal processing and interpolation stuff etc., otherwise some important commands may be missing.

Due to a bug in their savepath command, it may happen that PTB works immediately after setup, but fails after you've quit and restarted Octave due to a problem with the saved path. In that case, simply type "savepath" to save the path again and then exit and restart Octave. Then it should work persistently.

So far as my testing went, almost all PTB functionality seems to work well and with pretty much the same performance as Matlab 7.4 -- at least for well written, vectorized code or code that interacts with PTB, e.g., calls to Screen, GetSecs, WaitSecs, PsychPortAudio etc.

How much do you pay for typical Matlab research licenses? How many licenses do you have?

> And maybe, for every 1:1000 (optimistic?) a potential contributor.

That's probably a realistic (or sad?) estimate.

best,
-mario

--- In psychtoolbox@yahoogroups.com, "umakegoodcookies" <umakegoodcookies@...> wrote:
>
>
>
> I read in some documentation that people had gotten PTB working with octave on Mac OS X. I'm wondering how that's done. I tried adapting the linux instructions but have yet to achieve success.
>
> Has anyone else tried it?
>
> At our institution there's pretty intense interest in getting off of Matlab. Most new programmers are learning python/scipy or octave. The Matlab licensing restrictions have gotten onerous, especially when we have to outfit large labs of computers.
>
> We'd see an immediate multiplication in the number of PTB users if we didn't have to use Matlab. And maybe, for every 1:1000 (optimistic?) a potential contributor.
>
> John Christie
>
I am the number "18"
Thanks for the instructions, I will try it.

Jiri Lukavsky


--- In psychtoolbox@yahoogroups.com, "Mario Kleiner" <mario.kleiner@...> wrote:
>
> So you are one of the 17 people that so far voted for Octave support in our poll?
>
> We used to have Octave-2 support since about 2 years under OS/X and Linux, but it was a bit incomplete, a bit difficult to install and Octave-2 is obsolete since at least a year.
>
> Starting with the next ptb beta, we will cancel Octave-2 support and provide Octave-3 support.
>
> The code is pretty much ready for OS/X under IntelMacs and Linux since this weekend.
>
> You can test it already:
>
> 1. Download a fresh DownloadPsychtoolbox.m script from the Wiki. Only the latest downloader supports automatic installation.
> 2. DownloadPsychtoolbox(.........., 'trunk') as the flavor parameter - trunk is the prototype for upcoming betas.
> 3. Try it. Let us know how it works.
>
> The minimum requirement is Octave 3.2.0 which was just released 1 week ago, older versions won't work. The 3.2 series brings a host of very useful improvements for PTB.
> You'll also need to install many of the octave-forge packages to add a few toolboxes, e.g., audio, image, io, general, strings, the signal processing and interpolation stuff etc., otherwise some important commands may be missing.
>
> Due to a bug in their savepath command, it may happen that PTB works immediately after setup, but fails after you've quit and restarted Octave due to a problem with the saved path. In that case, simply type "savepath" to save the path again and then exit and restart Octave. Then it should work persistently.
>
> So far as my testing went, almost all PTB functionality seems to work well and with pretty much the same performance as Matlab 7.4 -- at least for well written, vectorized code or code that interacts with PTB, e.g., calls to Screen, GetSecs, WaitSecs, PsychPortAudio etc.
>
> How much do you pay for typical Matlab research licenses? How many licenses do you have?
>
> > And maybe, for every 1:1000 (optimistic?) a potential contributor.
>
> That's probably a realistic (or sad?) estimate.
>
> best,
> -mario
>
> --- In psychtoolbox@yahoogroups.com, "umakegoodcookies" <umakegoodcookies@> wrote:
> >
> >
> >
> > I read in some documentation that people had gotten PTB working with octave on Mac OS X. I'm wondering how that's done. I tried adapting the linux instructions but have yet to achieve success.
> >
> > Has anyone else tried it?
> >
> > At our institution there's pretty intense interest in getting off of Matlab. Most new programmers are learning python/scipy or octave. The Matlab licensing restrictions have gotten onerous, especially when we have to outfit large labs of computers.
> >
> > We'd see an immediate multiplication in the number of PTB users if we didn't have to use Matlab. And maybe, for every 1:1000 (optimistic?) a potential contributor.
> >
> > John Christie
> >
>
I tried to install Octave (OSX binary, 3.2.0) and PTB (trunk) today. I installed PTB without problems and demos worked after the installation procedure.
But when I restarted Octave, it stopped working. In the previous post Mario Kleiner mentioned the bug with savepath.

I reinstalled PTB and typed additional "savepath", but still I can't run e.g. SpriteDemo, which worked. The PTB folders are in the octave "path" (e.g. PsychBasic folder).

The error I get says:
"""
In place of the expected Octave .mex binary plugin file this placeholder file wa
s executed:

Screen.m

This MEX file seems to be missing or inaccessible on your Octave path or it is d
ysfunctional:

Screen.mex

A reason could be some missing 3rd party dynamic link shared libraries on your s
ystem.
Our default installation also only supports 32 bit versions of operating system
and Octave.
Another reason could be some binary incompatibility. You would need to recompile
Psychtoolbox from source!
"""

Does anyone know how to solve this?
Thank you, Mario.
Typing the code below solved the problem.

path("/Applications/Psychtoolbox/PsychBasic/Octave3OSXFiles/",path) % your path...
savepath




--- In psychtoolbox@yahoogroups.com, "Mario Kleiner" <mario.kleiner@...> wrote:
>
> That's because you didn't follow the instructions in the last post correctly. I never said you should reinstall PTB, just that after the failure you should type savepath, then quit and restart Octave.
>
> Each sequence of - start octave, savepath, quit octave - will toggle between "works" and "doesn't work" because the order of directories in the path will be inverted, and the Psychtoolbox/PsychBasic/Octave3OSXFiles/ must be the topmost one.
>
> -mario
>
> --- In psychtoolbox@yahoogroups.com, "jirilukavsky" <jirilukavsky@> wrote:
> >
> > I tried to install Octave (OSX binary, 3.2.0) and PTB (trunk) today. I installed PTB without problems and demos worked after the installation procedure.
> > But when I restarted Octave, it stopped working. In the previous post Mario Kleiner mentioned the bug with savepath.
> >
> > I reinstalled PTB and typed additional "savepath", but still I can't run e.g. SpriteDemo, which worked. The PTB folders are in the octave "path" (e.g. PsychBasic folder).
> >
> > The error I get says:
> > """
> > In place of the expected Octave .mex binary plugin file this placeholder file wa
> > s executed:
> >
> > Screen.m
> >
> > This MEX file seems to be missing or inaccessible on your Octave path or it is d
> > ysfunctional:
> >
> > Screen.mex
> >
> > A reason could be some missing 3rd party dynamic link shared libraries on your s
> > ystem.
> > Our default installation also only supports 32 bit versions of operating system
> > and Octave.
> > Another reason could be some binary incompatibility. You would need to recompile
> > Psychtoolbox from source!
> > """
> >
> > Does anyone know how to solve this?
> >
>