octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #61650] [parallel package]function pararrayfun


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #61650] [parallel package]function pararrayfun gives wrong result when dealing with graphics handles
Date: Thu, 9 Dec 2021 12:35:05 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Follow-up Comment #3, bug #61650 (project octave):

The parallel package basically instantiates multiple Octave sessions to do
computations in parallel, and return the result. With this approach, the
handles (double value) to graphics object that were built in another session
than the master are not usable. This is expected.
 
Here is a simplified example of what you are trying to do:


## Function to be executed in parallel
fcn = @(n) line ("xdata", 1:10, "ydata", 1:10, "displayname", sprintf ("line
%d", n))

N = 1:10;
nproc = 4;

## With arrayfun it works
hlines = arrayfun (fcn, N);
ishghandle (hlines)
legend


## With pararrayfun it doesn't work
hlines = pararrayfun (nproc, fcn, N);
ishghandle (hlines)


None of the handles in hlines is valid because the objects don't belong to the
graphics system of the master Octave session.

I think this is not expected to work and this report would qualify as "won't
fix" but I am not an expert of the parallel package though.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61650>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

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