[Nirfast] Error using matlabpool
Hamid Dehghani
h.dehghani at cs.bham.ac.uk
Wed Nov 16 10:01:42 EST 2016
As the error states, it is an issue with matlab back compatibility.
You can either fix this yourself, by manually updating the command of
matlabpool.
Alternatively, you can replace parellel_init.m with the following function
function result = parallel_init()
% parallel_init()
%
% Initializes the parallel workers if the toolbox is available
%
% result is 1 if succesful, 0 otherwise
if (exist('matlabpool')) % Start labs if necessary.
sz = matlabpool('size');
if (sz ==0)
matlabpool('open');
end
% Check we got some now.
sz = matlabpool('size');
if (sz ==0)
error('Failed to open parallel workers');
result = 0;
else
fprintf('Running on %d workers\n', sz);
result = 1;
end
else
result = 0;
end
On 15/11/2016 22:40, Xin Sun wrote:
> To whom it might concern,
>
> I tried to run the forward solver in NIRfast under MATLAB R2015b on
> Linux workstation, however I got the following error
>
> "Error using matlabpool (line 27)
> matlabpool has been removed.
> To query the size of an already started parallel pool, query the
> 'NumWorkers' property of the pool.
> To check if a pool is already started use 'isempty(gcp('nocreate'))'.
>
> And I tried to run the forward solver in MATLAB R2016b on Macbook, no
> error has been showed.
>
> Could you please give me some suggestions to figure this out?
>
> Best,
> Xin Sun
>
>
> _______________________________________________
> Nirfast mailing list
> Nirfast at public.kitware.com
> http://public.kitware.com/mailman/listinfo/nirfast
>
--
--------------------------
Hamid Dehghani, PhD, MIPEM
School of Computer Science
Acting Director, Physical Sciences for Health Doctoral Training Centre
University of Birmingham
B15 2TT
0121 414 8728
https://www.cs.bham.ac.uk/~dehghanh/mi-lab.html
More information about the Nirfast
mailing list