help-octave
[Top][All Lists]
Advanced

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

Re: parcellfun and global data


From: Fredrik Lingvall
Subject: Re: parcellfun and global data
Date: Tue, 07 Dec 2010 11:59:36 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101125 Lightning/1.0b3pre Thunderbird/3.1.6

On 12/07/10 09:21, Olaf Till wrote:
> On Tue, Dec 07, 2010 at 08:55:28AM +0100, Fredrik Lingvall wrote:
>> Can the functions called by parcellfun access global data?
>>
>> Background: I want to plot multi-channel audio data (time plots and
>> spectrograms) but the printing is rather slow so I want to do this in
>> parallel if possible. I don't want each "print-function" to reload the
>> large dataset though (or copy it) so is it possible to access it
>> globally in some way?
>>
>> /Fredrik
> If the global data is ready before calling parcellfun and if it is not
> changed during the parcellfun run, you should be able to access it as
> usual. (As a global variable, or with an anonymous function as
> [output] = parcellfun (nproc, @ (x) user_function (x, global_data),
> input);
>
> Olaf
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Thanks! I can read global data (using both parcellfun and pararrayfun).
However, pararrayfun freezes when I try to call plot in the user
function. I have something like:

figure(1,'visible','off');
plot(1:100)
print -dpng test.png

in the user function which I test with

octave:8> pararrayfun(1,@time_plot,[1]);
parcellfun: 0/1 jobs done

where Octave just freezes.

/Fredrik


reply via email to

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