P.S.:
huiguang@hhg-linux:/mnt/freesurfer/subjects/dinghai_4/surf$ cat
/tmp/mos_25794_.m|/usr/local/bin/matlab -display iconic -nojvm -nosplash Warning: Unable to open display iconic, MATLAB is starting without a display. You will not be able to display graphics on the screen.
< M A T L A B > Copyright 1984-2007 The MathWorks, Inc. Version 7.4.0.336 (R2007a) January 29, 2007
Warning: Duplicate directory name: /home/huiguang/matlab.
To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com.
reading filled volume...
closing volume... morphological closing done. writing outer surface...
huiguang@hhg-linux:/mnt/freesurfer/subjects/dinghai_4/surf$ ls tmp-mris_compute_lgi-lh.pial/ lh.pial.filled.mgz lh.pial-outer
On Thu, Aug 27, 2009 at 9:12 PM, leemon albert albertleemon@gmail.comwrote:
Hi,everyone. The debug output is followed. I think the problem is "$MLF | ${MATLAB} -display iconic -nojvm -nosplash" cat /tmp/mos_12142_.m /usr/local/bin/matlab -display iconic -nojvm -nosplash this command is not implemented rightly. However, when I run only the matlab cmd, it's seem to be right. Any help will be appreciated!
huiguang@hhg-linux:/mnt/freesurfer/subjects/dinghai_4/surf$ mris_compute_lgi --i lh.pial --debug set verbose = 1 breaksw breaksw
end end while ( $#argv != 0 ) while ( 0 != 0 ) goto parse_args_return ; goto parse_args_return
goto check_params ; goto check_params if ( ! $?FREESURFER_HOME ) then if ( ! 1 ) then if ( ! -e $FREESURFER_HOME ) then if ( ! -e /usr/local/freesurfer ) then if ( ! $?input ) then if ( ! 1 ) then if ( ! -e ${input} ) then if ( ! -e lh.pial ) then goto check_params_return ; goto check_params_return
set MATLAB = `getmatlab` ; set MATLAB = `getmatlab` getmatlab if ( $status ) then if ( 0 ) then
set tmpdir = ( $PWD/tmp-mris_compute_lgi-${input} ) set tmpdir = ( /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial ) set cmd= ( rm -Rf $tmpdir ) set cmd= ( rm -Rf /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial ) echo "=================" echo ================= ================= echo "$cmd" echo rm -Rf /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial rm -Rf /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial echo "=================" echo ================= ================= if ( $RunIt ) $cmd if ( 1 ) rm -Rf /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial rm -Rf /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial set cmd= ( mkdir -p $tmpdir ) set cmd= ( mkdir -p /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial ) echo "=================" echo ================= ================= echo "$cmd" echo mkdir -p /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial mkdir -p /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial echo "=================" echo ================= ================= if ( $RunIt ) $cmd if ( 1 ) mkdir -p /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial mkdir -p /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial
set cmd= ( mris_fill -c -r 1 ${input} ${tmpdir}/${input}.filled.mgz ) set cmd= ( mris_fill -c -r 1 lh.pial /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz ) echo "=================" echo ================= ================= echo "$cmd" echo mris_fill -c -r 1 lh.pial /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz mris_fill -c -r 1 lh.pial /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz echo "=================" echo ================= ================= if ( $RunIt ) $cmd if ( 1 ) mris_fill -c -r 1 lh.pial /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz mris_fill -c -r 1 lh.pial /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz conforming output volume setting resolution for intermediate calculations to 1.0000 reading surface from lh.pial... writing filled volume to /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz... if ( $status ) then if ( 0 ) then
set MLF = /tmp/mos"_$$_".m set MLF = /tmp/mos_12142_.m set arg1 = ${tmpdir}/${input}.filled.mgz set arg1 = /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz set arg2 = ${closespheresize} set arg2 = 15 set arg3 = ${tmpdir}/${input}-outer set arg3 = /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer rm -f ${arg3} rm -f /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer echo "make_outer_surface('${arg1}',${arg2},'${arg3}'); exit" > $MLF echo make_outer_surface('/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz',15,'/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer'); exit echo "=================" echo ================= ================= echo "`cat $MLF`" echo `cat /tmp/mos_12142_.m` cat /tmp/mos_12142_.m make_outer_surface('/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz',15,'/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer'); exit echo "=================" echo ================= ================= if ( $RunIt ) then if ( 1 ) then cat $MLF | ${MATLAB} -display iconic -nojvm -nosplash cat /tmp/mos_12142_.m /usr/local/bin/matlab -display iconic -nojvm -nosplash if: Expression Syntax. endif endif echo "" echo
rm -f ${MLF} rm -f /tmp/mos_12142_.m if ( $RunIt && ! -e ${arg3} ) then if ( 1 && ! -e /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer ) then echo "ERROR: make_outer_surface did not create output file '${arg3}'!" echo ERROR: make_outer_surface did not create output file '/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer'! ERROR: make_outer_surface did not create output file '/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer'! exit 1 exit 1
huiguang@hhg-linux:/mnt/freesurfer/subjects/dinghai_4/surf$ /usr/local/bin/matlab -display iconic -nojvm -nosplash Warning: Unable to open display iconic, MATLAB is starting without a display. You will not be able to display graphics on the screen.
< M A T L A B > Copyright 1984-2007 The MathWorks, Inc. Version 7.4.0.336 (R2007a) January 29, 2007Warning: Duplicate directory name: /home/huiguang/matlab.
To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com.
On Wed, Aug 26, 2009 at 1:52 AM, Nick Schmansky <nicks@nmr.mgh.harvard.edu
wrote:
Albert,
It appears to be failing when the mris_compute_lgi script first attempts a call to matlab. To debug, try this:
cd $SUBJECTS_DIR/dinghai_4/surf mris_compute_lgi --i lh.pial --debug
and follow the output to trace where it is failing. notice that mris_compute_lgi creates a temporary .m file off the /tmp directory, which is then called by matlab. So you will need to figure out where in that sequence it is failing. It calls matlab from the script by 'catting' and piping the file through matlab, ie, something like this:
cat /tmp/mos_26429_.m | /usr/local/bin/matlab -display iconic -nojvm -nosplash
Nick
On Tue, 2009-08-25 at 10:21 +0800, leemon albert wrote:
Dear all,
I am trying to compute the local gyrification index but unfortunately encounter the problem below. Matlab Version ( R2007a) and also the Image Processing Toolbox are installed on my computer (Ubuntu 9.04,32-bit).
I think the matlab isn't rightly called by the script. But the "make_outer_surface.m" is not a bash command. Here, how does it invoke the Matlab?
Any help is greatly appreciated!
Best wishes,
/mnt/freesurfer/subjects$ recon-all -s dinghai_4 -localGI Subject Stamp: freesurfer-Linux-centos4-stable-pub-v4.5.0 Current Stamp: freesurfer-Linux-centos4-stable-pub-v4.5.0 INFO: SUBJECTS_DIR is /mnt/freesurfer/subjects Actual FREESURFER_HOME /usr/local/freesurfer -rw-rw-r-- 1 huiguang huiguang 803627 Aug 25 09:44 /mnt/freesurfer/subjects/dinghai_4/scripts/recon-all.log Linux hhg-linux 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux /mnt/freesurfer/subjects/dinghai_4/surf #-------------------------------------------- #@# Local Gyrification Index lh Tue Aug 25 09:54:08 CST 2009
mris_compute_lgi --i lh.pial
================= rm
-Rf /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial
================= mkdir
-p /mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial
================= mris_fill -c -r 1 lh.pial
/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz
================= reading surface from lh.pial... writing filled volume to
/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz...
conforming output volume setting resolution for intermediate calculations to 1.0000 =================
make_outer_surface('/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz',15,'/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer'); exit
================= if: Expression Syntax.
ERROR: make_outer_surface did not create output file
'/mnt/freesurfer/subjects/dinghai_4/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer'!
Linux hhg-linux 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux
recon-all exited with ERRORS at Tue Aug 25 09:54:18 CST 2009
Then I open the matlab ,there is a warning: "Executing startup failed in matlabrc.',... 'This indicates a potentially serious problem in your MATLAB setup,',... 'which should be resolved as soon as possible. "
-- Albert Lab of Complex System and Artificial Intelligence, Institute of Automation,Chinese Academy of Sciences(CASIA) Beijing, 100190,P.R.CHINA
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Albert Lab of Complex System and Artificial Intelligence, Institute of Automation,Chinese Academy of Sciences(CASIA) Beijing, 100190,P.R.CHINA