bugGNU Octave - Bugs: bug #64750, execution error pararrayfun :...


bug #64750: execution error pararrayfun : __parcellfun_get_next_result__: could not receive result

Submitter:  None
Submitted:  Thu 05 Oct 2023 05:27:08 PM UTC
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Works For Me Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 6.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 05 Oct 2023 07:04:40 PM UTC, comment #1: 

Les versions récentes du package parallel lancent une session Octave par processeur. Cette nouvelle stratégie, plus fiable à priori, apporte des limitations parmi lesquelles l'impossibilité de passer à pararrayfun (et autres parcellfun, ...) des handle vers des fonctions définies dans des scripts (comme c'est le cas dans l'exemple), car celles ci sont inconnues dans les sessions esclave. Seuls les handle vers des fonctions anonymes et les fonctions définies dans leur propre fichier sont acceptables.

Pour que cet exemple fonctionne dans les versions récentes il suffit de définir la fonction myfun dans son propre fichier myfun.m placé dans le même dossier que le script appelant (ou dans le path) et le tour est joué.

Je cite ci-dessous la doc:

Note that netcellfun, netarrayfun, and rfeval, but even parcellfun and pararrayfun, execute code in separate Octave processes. This causes some limitations.

For the function handles passed as arguments to parcellfun, pararrayfun, netcellfun, netarrayfun, and rfeval, the following limitations may apply:

  • In Octave versions before 5.1, anonymous functions may only be passed if they don’t use varargin and don’t contain nested anonymous functions.
  • If a handle to a named function, written in a function file, is passed, this function must exist on the server machine. This is usually no problem for parcellfun and pararrayfun.
  • Named functions defined in the command line interface or by scripts are not exported to the working sessions used by parcellfun or pararrayfun, and not automatically to the server for remote parallel execution.
  • For handles to subfunctions or to private functions limitations depending on the used Octave version may apply.

Anonymous functions should be usable as usual, since the function specification sent to the server will include the anonymous functions context.

If parcellfun or pararrayfun (and of course the cluster-related functions, too) are called from within a function with subfunctions, the subfunctions won’t be visible in parallel execution.


Pantxo Diribarne <pantxo>
Group Member
Thu 05 Oct 2023 05:27:08 PM UTC, original submission:  

Sous Ubuntu 22.04, GnuOctave 6.4.0, Parallel 4.0.1-3

J'execute (Test_Parallel ci-joint) correspondant à l'exemple donné dans "Examples_of_how_to_use_pararrayfun.pdf"
et obtient un message d'erreur à l'execution

>> Test_Parallel

t2 = 4.8717
execution error
error: _parcellfun_get_next_result_: could not receive result
error: called from
    parcellfun at line 201 column 16
    pararrayfun at line 85 column 28
    Test_Parallel at line 33 column 22

Ce même programme fonctionne parfaitement sous
Ubuntu 20.04, GnuOctave 5.2.0, Parallel 3.1.3



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

Attach Files:

Attached Files
file #55204:  Test_Parallel.m added by None (1KiB - text/x-objcsrc)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)

    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 project members can vote.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-05 pantxo StatusNone Works For Me
    2023-10-05 None Attached File- Added Test_Parallel.m, #55204

    Back to the top

    Powered by Savane 3.12