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

 
 

bug #58329: [octave forge] (parallel) parcellfun function fails with nargout less than expected

Submitted by:  None
Submitted on:  Thu 07 May 2020 08:01:19 PM UTC  
 
Category:  Octave Forge Package Severity:  1 - Wish
Priority:  3 - Low Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Gord Gray Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  5.2.0
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sun 27 Sep 2020 08:19:22 AM UTC, comment #6: 
Olaf Till <i7tiol>
Project Member
Sun 20 Sep 2020 10:29:20 AM UTC, comment #5: 

Reproduced it under Octave 5.2.0, only tried 6.0.90 before. There is probably a real buggy behaviour behind this, so I change the 'Item Group'.

Olaf Till <i7tiol>
Project Member
Sun 13 Sep 2020 09:15:19 AM UTC, comment #4: 

I can't reproduce the original problem (wrong number of outputs). Can you provide a complete example, including your callback function and the sequence of commands before the error? I suspect there is an incorrectly initialized slave process for some reason.

Olaf Till <i7tiol>
Project Member
Sun 10 May 2020 11:04:21 AM UTC, comment #3: 

Yes, please report a short general description of the other bug, without too much effort, just as a reminder for me. It won't be reproducible, but at first glance there could be an issue with wrapped-around process ids, leading to an attempt to kill the wrong process. I probably should make this safer.

Olaf Till <i7tiol>
Project Member
Thu 07 May 2020 08:39:03 PM UTC, comment #2: 

I was unaware that a '~' could be used as a place holder.  (newbie mistake I'm sure).

You are correct, this is about calling parcellfun with fewer output variables than the function normally returns.

There is another bug, but I have no idea how to report it.  It says a can't terminate a child process as it is pointing to a parent, but that has only happened after 8 hours of repeated executions.  If I can figure out a cause/solution, should I report it?

Anonymous
Thu 07 May 2020 08:20:28 PM UTC, comment #1: 

So to clarify, this bug report is about calling parcellfun with fewer output variables than the function normally returns, is that right?

As a workaround, you can easily silence the remaining return values with the '~' placeholder, for example

[A, B, ~, ~] = parcellfun (nproc, fn, ...)

But it is true that most Octave functions will silently ignore additional return values when the caller doesn't use them, and it would probably be nice for parcellfun / pararrayfun to behave the same way.

Mike Miller <mtmiller>
Project Administrator
Thu 07 May 2020 08:01:19 PM UTC, original submission:  

I'm a newbie to Octave, so be nice if I get this wrong.

If I have fun = @(c) FunctionThatReturns3Fields

[Result1, Result2] = cellfun(fun, ACell, "UniformOutput", false)

works fine, but:

[Rslt1, Rslt2] = parcellfun(fun, ACell, "UniformOutput", false)

fails.

If I change parcellfun, line 209 to read:
      results(idx, :) = res(1,nargout);
then it works.  I'm sure there is a better way to accomplish this and possibly this is wrong.  But it looks like it fixes a problem.  I think the same fix might apply to line 203, but I barely know how I found this, let alone being able to test that.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-27 i7tiol StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2020-09-20 i7tiol Item GroupFeature Request => Unexpected Error or Warning
        StatusNeed Info => In Progress
    2020-09-13 i7tiol StatusConfirmed => Need Info
    2020-05-07 mtmiller Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 3 - Low
        Item GroupIncorrect Result => Feature Request
        StatusNone => Confirmed
        Operating SystemMicrosoft Windows => Any
        Summaryparallel package, parcellfun function fails => [octave forge] (parallel) parcellfun function fails with nargout less than expected

    Back to the top


    Powered by Savane 3.5