Dear Jerome,
I have modified spm_jobman.m to allow non-gui batch jobs. Maybe this is what you need. You can
run the jobmanager with:
spm_jobman('run_nogui',jobs)
I have attached an example matlab file which was written for the VBM5 toolbox and can be
adapted for your purpose. Matlab should be called with the "-nodisplay -nojvm -nosplash" option.
However, you can also try the attached bash script.
Best,
Christian
--
____________________________________________________________________________
Christian Gaser, Ph.D.
Assistant Professor of Computational Neuroscience
Department of Psychiatry
Friedrich-Schiller-University of Jena
Philosophenweg 3, D-07743 Jena, Germany
Tel: ++49-3641-935805 Fax: ++49-3641-935280
e-mail: [log in to unmask]
http://dbm.neuro.uni-jena.de
On Thu, 22 Mar 2007 15:08:14 +0100, Jérôme Redouté <[log in to unmask]> wrote:
>Thanks for your help,
>We have an access to a Computing Center allowing us to submit jobs to a
>batch farm.
>The problem is that there is no X11 nor VNCserver installed on these
>computers (Actually, we access to the center through an interactive
>machine which then sends the jobs to the computer farm).
>It is why a 'nodisplay' version of SPM functions would be very useful .
>Do I really need to modify every SPM functions containing graphic outputs?
>
>thanks again
>Best regards
>Jerome
>
>Thomas Nichols a écrit :
>> Jérôme ,
>>
>> Another solution is to use VNC. Start a VNC session with the command
>> "vncserver", set the DISPLAY environment variable accordingly, and
>> then start Matlab and fire off your script. SPM will send windows to
>> the VNC display and be happy, and you never even have to look at it.
>> I use this for my scripts with no problem.
>>
>> To automatically set the DISPLAY from vncserver I used this Bourne
>> shell snippet
>> /usr/bin/vncserver > /tmp/$$
>> export DISPLAY=`grep desktop /tmp/$$ | awk '{print $NF}'`
>> bin/rm /tmp/$$
>> though it might not work as is with all vncserver implimentations,
>> depending on the format of the messages printed.
>>
>> -Tom
>>
>> On 3/21/07, * Jérôme Redouté* <[log in to unmask]
>> <mailto:[log in to unmask]>> wrote:
>>
>> Dear SPMers,
>> I need to run saved SPM5 jobs (model estimation) without the GUI,
>> but I
>> can't find the way to turn off all the graphic outputs and I get the
>> following error:
>>
>> ??? Error using ==> figure
>> Width and height must be > 0.
>> Error in ==> spm at 1142
>> Finter = figure('IntegerHandle','off',...
>> Error in ==> spm_figure at 257
>> F = spm('CreateIntWin');
>> Error in ==> spm at 1753
>> Finter = spm_figure('GetWin','Interactive');
>> Error in ==> spm_jobman>run_struct1 at 1456
>> [Finter,unused,CmdLine] = spm('FnUIsetup', c.name
>> <http://c.name>);
>> Error in ==> spm_jobman>run_struct1 at 1482
>> run_struct1(c.val{i});
>> Error in ==> spm_jobman>run_struct1 at 1482
>> run_struct1(c.val{i});
>> Error in ==> spm_jobman>run_job at 417
>> run_struct1(c);
>> Error in ==> spm_jobman at 79
>> run_job(varargin{2});
>> Error in ==> specify_model_perso_JR_smalltest at 175
>> spm_jobman ('run', jobs)
>>
>>
>> Is there a way to run these jobs using a matlab -nodisplay function?
>> Thanks for your help
>> Jerome
>>
>> --
>> ---------------------------------
>> Jerome Redouté, Ph. D.
>> Centre de Neuroscience Cognitive
>> CNRS-UMR 5229
>> 67, Bd. Pinel. 69675 Bron
>> Tel: 04 37 91 12 44
>> [log in to unmask] <mailto:[log in to unmask]>
>> ---------------------------------
>>
>>
>>
>>
>> --
>> -Tom
>>
>> ____________________________________________
>> Thomas Nichols, PhD
>> Director, Modelling & Genetics
>> GlaxoSmithKline Cinical Imaging Centre
>>
>> Senior Research Fellow
>> Oxford University FMRIB Centre
>
>--
>---------------------------------
>Jerome Redouté, Ph. D.
>Centre de Neuroscience Cognitive
>CNRS-UMR 5229
>67, Bd. Pinel. 69675 Bron
>Tel: 04 37 91 12 44
>[log in to unmask]
>---------------------------------
>===========================================================
=============
|