We’ve tested the parallel package for Octave and it seems to work fairly well. To install this in your local folder run Octave and type:
pkg install -verbose -local -forge struct pkg install -verbose -local -forge parallel pkg list Package Name | Version | Installation directory --------------+---------+----------------------- parallel *| 3.1.3 | /home/user/octave/parallel-3.1.3 struct *| 1.0.15 | /home/user/octave/struct-1.0.15
From now on each time you launch Octave just type:
pkg load parallel
We ran the following arbitrary code against 10 cores
pkg load parallel A=rand(100); B=rand(100); fun = @(x) A*B + A/B - exp(A) + exp(B); vector_x = 1:100; tic() vector_y = pararrayfun(nproc, fun, vector_x); toc()
Where nproc varied from 1:10 depending on the job requirements specified by ppn. The following speedup was observed: