[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parcellfun gives error while getting the results
From: |
Prasad K |
Subject: |
Re: Parcellfun gives error while getting the results |
Date: |
Thu, 24 May 2018 22:01:59 -0700 (MST) |
Thanks Olaf
The following is the example test program which triggers that error when
uniform output is enabled.
my function:
/"function z = testfun(x,y)
z = x + y;
end
my main code:
pkg load parallel
clc;clear all;close all
Nproc = 8
input1 = repmat(1:500,20,1);
input2 = 1:500;
inputcell1= num2cell(input1,2);
inputcell2 = num2cell(input2,2);
output = parcellfun(Nproc, @testfun,
(inputcell1),(inputcell2),"uniformoutput",true)"/
When uniformoutput is false the program shows no error and executes as
expected.
But when uniformoutput is true it gives following error
"
Nproc = 8
parcellfun: 20/20 jobs done
error: reshape: can't reshape 1x10000 array to 20x1 array
error: called from
parcellfun at line 452 column 21
main at line 20 column 8
"
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html