Print

Print


A big bottleneck of SPM is the read/write and estimate on slice by slice basis. With newer versions of matlab and with processors with more RAM, the whole brain can be estimated outside of the loop across slices. In the gPPI toolbox, the file spm_spm_WB.m is configured this way.

Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.


On Tue, Jan 28, 2014 at 12:57 PM, Pierre Bellec <[log in to unmask]> wrote:
Hi Bruno,

Looks like Donald got you covered. For future reference, if you can't avoid using files for a simulation and want to be as efficient as possible, the simplest hack is to store those files on a virtual partition in memory instead of a hard drive. If you are using a high-performance computing infrastructure, chances are this is available to you or can be arranged with the staff. You would have to make sure that the intermediate outputs fit in the virtual partition, but if we are talking about one parameter map at a time this will be no problem.

Also, if you are writing all files in the local drive of your compute node (the tmp), you won't be clogging the grid (because you don't put any load on the shared file system). 

Finally, the computation time you will save by not using the disk may not actually be that large. You may want to start doing a bit of profiling (with the profile command) on a small simulation to check how big the overhead of using files actually is, rather than assume it will be large. Matlab is a weird beast, and computational bottlenecks are not necessarily where you would expect them to be. 

I hope this helps,

Pierre Bellec, PhD
Researcher / Chercheur, Research Centre of the Montreal Geriatric Institute
Professeur adjoint sous octroi, Department of Computer Science and Operations Research
University of Montreal, Québec, Canada


2014-01-28 Bruno L. Giordano <[log in to unmask]>

Hello,

I am planning to run some permutation analysis by permuting condition labels in the first-level model.

I wonder whether someone managed to hack the first-level model routines so that they take in input and give in output variables stored in the workspace rather than stored on the disk (I would actually need only the parameter estimates, and not the stats, which should make things much easier). I suspect that in the case of a permutation analysis disk access is going to be a considerable limiting factor for the speed of the computations, and I wouldn't like to overload the parallel grid with unnecessary overheads.

Thank you for any tip.

        Bruno

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bruno L. Giordano, PhD
Institute of Neuroscience and Psychology
58 Hillhead Street, University of Glasgow
Glasgow, G12 8QB, Scotland
T +44 (0) 141 330 5484
Www: http://www.brunolgiordano.net