<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I have pprocess working on Mac OSX for searchlights. The trick is that it fails when checking the number of cores, so you have to specify nproc. </div><div><br></div><div>Jonas<br><br>On Feb 4, 2013, at 9:57 AM, Meng Liang <<a href="mailto:meng.liang@hotmail.co.uk">meng.liang@hotmail.co.uk</a>> wrote:<br><br></div><blockquote type="cite"><div>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<div dir="ltr">
Hi Nick,<br><br>Thanks so much for your reply! Following your suggestion, I downloaded and installed the pprocess on Neurodebian virtual machine on a Windows 7 PC and now the script runs much faster! <br><br>However, it does not work on Mac. I googled but didn't find much relevant info about it - I got the feeling that pprocess is not supported in Mac. Is it true? If so, doesn't that mean running pymvpa on Mac machines cannot utilize multi-core computation?<br><br>Finally, an irrelevant question: is the value of 'radius' parameter in the Searchlight command in millimeter? It says so in Pymvpa documentation ( <a href="http://www.pymvpa.org/modref/mvpa.measures.searchlight.html">http://www.pymvpa.org/modref/mvpa.measures.searchlight.html</a> ). But in a given example on Pymvpa website, it seems to suggest that the value of 'radius' means the number of voxels ( <a href="http://www.pymvpa.org/examples/searchlight_minimal.html">http://www.pymvpa.org/examples/searchlight_minimal.html</a> ): "<span class="c"># setup searchlight with 2 voxels radius</span>" and "<span class="n">sl</span> <span class="o">=</span> <span class="n">sphere_searchlight</span><span class="p">(</span><span class="n">cv</span><span class="p">,</span> <span class="n">radius</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">space</span><span class="o">=</span><span class="s">'myspace'</span><span class="p">,...</span>". It's a bit confusing to me...<br><br>Also, do you know if multi-core support is also available for other commands other than searchlight? I find that cross-validation with large number of permutations is also quite slow - it would be good if multi-core support is also implemented in the permutation scenario. <br><br>Best,<br>Meng<br><br><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Mon, 4 Feb 2013 14:17:10 +0100<br>> From: <a href="mailto:nikolaas.oosterhof@unitn.it">nikolaas.oosterhof@unitn.it</a><br>> To: <a href="mailto:pkg-exppsy-pymvpa@lists.alioth.debian.org">pkg-exppsy-pymvpa@lists.alioth.debian.org</a><br>> Subject: Re: [pymvpa] how to do multiprocessing in pymvpa?<br>> <br>> On 4 February 2013 14:09, Meng Liang <<a href="mailto:meng.liang@hotmail.co.uk">meng.liang@hotmail.co.uk</a>> wrote:<br>> > I'm trying to run a searchlight analysis using the whole brain mask but I<br>> > found it impossible to finish within a reasonable time - it has been running<br>> > three days for one two-way classification task in one subject, and it still<br>> > hasn't finished. To make the computing faster, would multiprocessing be an<br>> > option? I didn't see any part of the tutorial mentioning multiprocessing -<br>> > is it because it is already embedded/implemented in pymvpa commands?<br>> <br>> Yes, multi-core support is already part of pyMVPA's searchlight<br>> implementation. It requires, however, the presence of pprocess [1].<br>> The Searchlight constructor has an optional parameter 'nproc' that<br>> controls the number of parallel processes to use. By default<br>> (nproc=None) it uses the number of cores of the machine - unless<br>> pprocess is not available, in which case nproc=1.<br>> <br>> As per the example (doc/examples/searchlight.py) it is recommended to<br>> enable the searchlight debug messages - these include messages related<br>> to  parallelization.<br>> <br>> In my experience it's easy to use pprocess with neurodebian. On a mac<br>> (OS X Lion) I did not get it to work, although I have to admit I did<br>> not try very hard.<br>> <br>> [1] <a href="http://pypi.python.org/pypi/pprocess">http://pypi.python.org/pypi/pprocess</a><br>> <br>> <br>> <br>> ><br>> > Best,<br>> > Meng<br>> ><br>> > _______________________________________________<br>> > Pkg-ExpPsy-PyMVPA mailing list<br>> > <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>> > <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>> <br>> _______________________________________________<br>> Pkg-ExpPsy-PyMVPA mailing list<br>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br></div>                                    </div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Pkg-ExpPsy-PyMVPA mailing list</span><br><span><a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a></span><br><span><a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a></span></div></blockquote></body></html>