Thanks for the quick response Kersten.
I tried all the potential suggestions mentioned in your post but still no luck.
Here’s the summary:
lhstats = lme_mass_fit_vw(X,[1 2],Y,ni,lhcortex,[],1) Undefined function or variable 'matlabpool'.
Error in lme_mass_fit (line 124) if (matlabpool('size') > 0)
Error in lme_mass_fit_vw (line 73) [stats1,st1] = lme_mass_fit(X,[],Xrows,Zcols,Y,ni,prs,e);
lhstats = lme_mass_fit_vw(X,[1 2],Y,ni,lhcortex,[],2) Undefined function or variable 'matlabpool'.
Error in lme_mass_fit (line 123) if (prs==1) || (matlabpool('size') ~= prs)
Error in lme_mass_fit_vw (line 73) [stats1,st1] = lme_mass_fit(X,[],Xrows,Zcols,Y,ni,prs,e);
The "automatically create a parallel pool" was already deselected in my case.
Also, I am using freesurfer 5.3 with LME toolbox downloaded from the freesurfer website.
Mayank
On Mar 5, 2018, at 9:12 AM, Diers, Kersten /DZNE Kersten.Diers@dzne.de wrote:
ATTENTION: This email originated from a sender outside of MCW. Use caution when clicking on links or opening attachments. ________________________________
Hi,
you might try supplying an additional command-line argument while calling the 'lme_mass_fit_vw' function:
lhstats = lme_mass_fit_vw(X,[1 2],Y,ni,lhcortex,[],1)
This will tell Matlab to use only one worker. Further documentation on this additional argument can be obtained by typing 'help lme_mass_fit_vw' at the Matlab prompt.
To get this working with my Matlab installation, I additionally had to deselect the "Automatically create parallel pool (if one doesn't already exist) when parallel keywords (e.g., parfor) are executed." option. This can be found in Matlab's preferences menu (--> see the Parallel Computing toolbox section).
As an alternative, using two workers might also be an option in your case:
lhstats = lme_mass_fit_vw(X,[1 2],Y,ni,lhcortex,[],2)
To get this alternative approach working, I did not have to change the Matlab preferences.
Hope this helps,
Kersten
-----Original Message----- From: "Kaushal, Mayank" mkaushal@mcw.edu Reply-to: Freesurfer support list freesurfer@nmr.mgh.harvard.edu To: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Running Linear Mixed Effects (LME) Model Date: Sun, 4 Mar 2018 23:56:03 +0100
Dear Freesurfer Community,
Running lhstats = lme_mass_fit_vw(X,[1 2],Y,ni,lhcortex); gives the following error, Starting parallel pool (parpool) using the 'local' profile ... Error using parpool (line 104) You requested a minimum of 8 workers, but the cluster "local" has the NumWorkers property set to allow a maximum of 2 workers. To run a communicating job on more workers than this (up to a maximum of 512 for the Local cluster), increase the value of the NumWorkers property for the cluster. The default value of NumWorkers for a Local cluster is the number of cores on the local machine.
Error in lme_mass_fit (line 137) parpool(prs);
Error in lme_mass_fit_vw (line 73) [stats1,st1] = lme_mass_fit(X,[],Xrows,Zcols,Y,ni,prs,e);
I am running Matlab on a personal MacBook Pro, 2.4 GHz Intel Core i5, 8 GB 1600 MHz DDR3.
I have researched the forum on how to stop the function from trying to initiate parallel processing but so far haven’t been able figure out how to overcome this.
Any help would be much appreciated.
Mayank Kaushal MD MBA Postdoctoral Fellow Department of Neurosurgery Medical College of Wisconsin
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.ed...
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.partners.org_complia... . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.ed...