Print

Print


Dear Chun-Ting
I am sorry to hear you had this problem - especially after estimating DCMs for so many days. Did you use the batch or a script? If we can find the save function which failed, it can then be updated to:

save(filename,variables,'-v7.3');

Yes, you can make the DCM estimation work in parallel, assuming you have the Matlab parallel computing toolbox. In future, we will provide this option with a simple setting. For now, I attach a modified version of spm_dcm_fit.m. Please place this in your SPM directory (or in a directory higher up on your Matlab path than the SPM directory). By default, Matlab will parallelize over the CPUs in your computer (typically 4-8 cores).

Out of interest, what kind of DCMs are these? How many DCMs do you have per subject? And which estimation option are you using? Six days is an unusually long time and I want to confirm that there isn't a quicker way to estimate your models.

Best
Peter

-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Chun-Ting Hsu
Sent: 06 February 2017 17:55
To: [log in to unmask]
Subject: [SPM] DCM Estimation - GCM.mat cannot be saved; Parallelization

Dear SPM users,

I ran a group DCM estimation using the PEB-BMR option which would result in a GCM.mat file that has DCM structure of all subjects in it. I use spm12 (v6906) on Matlab 2016a on a HPC. 
In the spm_defaults.m file, I have already changed the default mat file format.
defaults.mat.format     = '-v7.3';
However, in this estimation, the following massage appeared, and the GCM.mat was not saved after 6 days of estimation.

[Warning: Variable 'GCM' cannot be saved to a MAT-file whose version is older than 7.3.
To save this variable, use the -v7.3 switch.
Skipping...]

Would you be so kind to point to me where the code assigning the format of GCM.mat file is, and why the GCM.mat file was not saved using the -v7.3 set in the spm default file?

I am also wondering if there is a possibility to parallelize the group DCM estimation process. Currently it is done subject by subject sequentially for the full model. I think it should be possible to run estimation for the full model of all subjects in parallel, taking advantage of the HPC, but I'm not so sure where the code of the loop to run estimation over subjects/models are .

Thank you very much.

Best regards,
Chun-Ting Hsu
Postdoctoral Scholar
Brain, Language, and Computation Lab
Department of Psychology
Pennsylvania State University