<div dir="ltr"><div><div><div>Hi There,<br></div>I have been trying to use fieldrtip in conjunction with Matlab Distributed Computing Server on a supercomputing resource and have been running into a problem that seems to come from paths/global variables?<br></div>in detail: I use fieldtrip in conjunction with my own code for an analysis. The analysis works fine on a "normal"/non-parallel call. I then set out to parallelize the code and split the analysis to a different node for every subject I have. I have access to a supercomputing cluster (not uniquely for matlab/biomed use), which runs Matlab Distributed Computing Server, so job scheduling etc can happen from within matlab. I believe this is different from the 'peer distributed' approach described in the faq. I prepared a script which is then run with the matlab 'batch' command : job = batch('parscript3b', 'Profile', 'Itasca_MSI', 'Pool', 10); I attach the script in its current form here. This call should pass the script to a top level node that then distributes the loop in 10 nodes, one for each subject. What always happens however is that I get an error at the top level node saying: Error using ft_hastoolbox (line 469) the FREESURFER toolbox is not installed, see <a href="http://surfer.nmr.mgh.harvard.edu/fswiki" target="_blank">http://surfer.nmr.mgh.harvard.edu/fswiki</a><br></div><div>I have read the help/comments text and some of the code in ft_hastoolbox and  ft_defaults (I in fact always call ft_defaults at startup - my startup file is also attached here). This in conjunction with what is mentioned in MATLAB help makes me think that there is something about the way paths and global variables are handled by MDCS that does not agree with Fieldtrip. I have been trying to go around the problem by liberally using ft_defaults in my script code (as can be seen) and I also added some lines to the ft_hastoolbox function (in all its 4 instances in the private folders) to check explicitly for the fieldtrip locations in my system but none of this has worked. <br></div><div>I would be grateful for any insight you might have.<br></div><div>With Thanks and Best Wishes,<br></div><div>Haris<br></div><div><div><div><div><div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych</div><div>Senior Research Associate</div><div>University of Minnesota Dept of Neuroscience</div><div><br></div><div>office:</div><div>Brain Sciences Center</div><div>Minneapolis VA Medical Center</div><div>Tel:612-467-1363</div></div></div>
</div></div></div></div></div></div></div>