I am new to GNU Octave 6.2.0 on Linux, and I am trying to use the package 'parallel' to make use of 24 threads on my machine.
I have an array (array1
) that has about 500,000 rows or values (1 column) and for each member of the array I want to apply a log10 function, like this:
test = 10*log10(array1.^2); % this works
I tried using the parallel package like so:
test = pararrayfun(24, @(array1) 10*log10(array1.^2), array1, "Vectorized", 1 "ChunksPerProc", 1); % this fails
But I am getting the error (repeating lots of times):
Could not save variable
Could not load variable
I also tried to apply the "smooth" function (from data-smoothing
) to the array using a span of 100 using parallel but that too fails:
test2 = smooth(array1,100); % this works fine
test2 = pararrayfun(24, @(array1) smooth(array1,100), array1); % this fails
Can anyone help me with the proper syntax for using 'parallel' with the above two examples ?
Thanks so much !!
test = pararrayfun(24, @(x) 10*log10(x.^2), array1, "Vectorized", 1 "ChunksPerProc", 1);
? $\endgroup$