Hi everybody,
I was installed the parallel package, then loaded and finally run the the following simple code on the latest Octave (9.3.0):
% Simplified stress test
num_cores = nproc();
test_duration = 60;
disp(['Starting stress test on ', num2str(num_cores), ' cores']);
disp(['Duration: ', num2str(test_duration), ' seconds']);
% Simplified stress function
function result = stress_task(~)
A = rand(500, 500); % Smaller matrix
for i = 1:50
A = A * A;
end
result = sum(A(:)); % Dummy result
end
try
tic;
pararrayfun(num_cores, @stress_task, 1:num_cores, "VerboseLevel", 1);
disp('Stress test completed.');
catch err
disp('Error occurred during parallel execution:');
disp(err.message);
end
But I got this error message:
Starting stress test on 4 cores
Duration: 60 seconds
execution error
Error occurred during parallel execution:
__parcellfun_get_next_result__: could not receive result
>>
How can I resolve this problem?
Thank you!