Problem with parallel package execution

Hello friends, how are you?

I’m getting an error with parallel package. I’m parsing a matrix with 2097152 elements. Setting verbose I’m getting the error below. RAM is ok and is not running out. I’m using Octave 6.2 with parallel package 4.0.1. I got the problem with Ubuntu 18.04.5 LTS and Windows Server Standard 2019. Is something related to number of process?

parcellfun: 16512/2097152 calculations doneexecution 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
    Otimizador at line 121 column 4
    mainOpt at line 95 column 9
    Testes at line 35 column 9

Maybe this is a bug. I can reproduce it with another example from the wiki which must have been working in parallel 4.0.0:

pkg load parallel
nmax = 10000; # Number of points where the function is calculated
function [a,b] = myfun(n); # Function used in this test
 a = pi*(n-2)/n;
 f = @(x) (cos(x).^n + sin(x).^(n-1));
 b = quadgk(f,0,a);
endfunction

# [...]

# Forth method, using parrayfun to call "myfun"
tic
ni = 1:nmax; [a4,b4] = pararrayfun(4,@(n) myfun(n),ni);
t4 = toc
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

I found my problem. It was a problem with my function code. Now is running ok.

1 Like