bugGNU Octave - Bugs: bug #61650, [octave forge] (parallel) function...

 
 

bug #61650: [octave forge] (parallel) function pararrayfun gives wrong result when dealing with graphics handles

Submitter:  None
Submitted:  Thu 09 Dec 2021 02:02:24 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Razdvizh Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 12 Dec 2021 10:06:15 AM UTC, comment #6: 

Yes, your comments are correct and probably sufficient as an explanation for the OP, thanks. Closing as 'Wont Fix'.

Olaf Till <i7tiol>
Group Member
Fri 10 Dec 2021 08:59:48 AM UTC, comment #5: 

This is probably not possible to be fixed in the parallel package atm.
It would probably require that several instances of the interpreter can be run in the same Octave session (which is not possible atm IIUC). And even then, I'm not sure how those instances would interact with each other and if they would share the graphics toolkit.

CC'ing the package maintainer because he will probably have a better understanding of the current situation.

Markus Mützel <mmuetzel>
Group administrator
Thu 09 Dec 2021 06:15:04 PM UTC, comment #4: 

 comment #3
Close as won't fix?

Razdvizh <razdvizh>
Thu 09 Dec 2021 05:35:05 PM UTC, comment #3: 

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.

Pantxo Diribarne <pantxo>
Group Member
Thu 09 Dec 2021 02:23:19 PM UTC, comment #2: 
Razdvizh <razdvizh>
Thu 09 Dec 2021 02:19:04 PM UTC, comment #1: 

Forgot main data

Razdvizh <razdvizh>
Thu 09 Dec 2021 02:02:24 PM UTC, original submission:  

error: set: invalid handle (= -2338.39)
When using arrayfun everything works fine


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52464:  ex1.m added by None (1022B - text/x-objcsrc)
file #52465:  c2.bin added by None (8KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by mmuetzel
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by razdvizh (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-12 i7tiol StatusNone Wont Fix
        Open/ClosedOpen Closed
    2021-12-10 mmuetzel Release4.0.1 dev
        Operating SystemGNU/Linux Any
        Summary[parallel package]function pararrayfun gives wrong result when dealing with graphics handles [octave forge] (parallel) function pararrayfun gives wrong result when dealing with graphics handles
        Carbon-Copy- Added i7tiol
    2021-12-09 None Attached File- Added ex1.m, #52464
        Attached File- Added c2.bin, #52465

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code