OK, if yours had load_mgh in the file name, then it is definitely from 
load_mgh.m. Strange that the one below does not have that.

I think know what is going on. The rm command will sometimes ask if you 
want to remove a file, esp if you don't have write permissions. In 
general, if you create a file, you should have write perms, but there 
might be something strange that matlab is doing since it has to run a 
file externally to create the tmp file. Can you check that file to see 
what the perms are.

One fix may be to change each occurance of this line in load_mgh.m from
    if(gzipped >=0) unix(sprintf('rm %s', fname)); end
to
   if(gzipped >=0) unix(sprintf('rm -f %s', fname)); end

There are about 5 places. Is this something that happens reliably so 
that you could test it?

doug


On 12/06/2013 03:02 PM, Marie Schaer wrote:
>
> Many thanks Doug for your reply!
>
> For me it happened every time the lGI was launched, but none of the 
> other freesurfer commands that I used on this system ever resulted in 
> a similar error, everything else is perfectly fine. The process can 
> hang for days without going further, it will never come to the end.
>
> For me the end of the recon-all.log read as reproduced below (with the 
> load_mgh in the file name). If I don't kill it, it will remain stuck 
> at this point. The matlab version may not be the issue, as Kangchen 
> has a 2012 and my unix system has a 2010 version. Freesurfer version 
> is 5.3.
>
> Thanks a lot for your help,
>
> Marie
>
>
>
>
> =================
> make_outer_surface('/mnt/apricot1_share1/freesurfer_marie/UCLA_1_ABIDE/0051201/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz',15,'/mnt/apricot1_share1/freesurfer_marie/UCLA_1_ABIDE/0051201/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer');
>  
> exit
> =================
> Warning: Unable to open display 'iconic'.  You will not be able to 
> display graphics on the screen.
>
>                            < M A T L A B (R) >
>                  Copyright 1984-2010 The MathWorks, Inc.
>                Version 7.11.0.584 (R2010b) 64-bit (glnxa64)
>                              August 16, 2010
>
>
>  To get started, type one of these: helpwin, helpdesk, or demo.
>  For product information, visit www.mathworks.com 
> <http://www.mathworks.com/>.
>
>>> reading filled volume...
> copying file(s) to recycle bin..
> removing file(s)..
> /bin/rm: remove regular file 
> `/tmp/tp9204736418620864.load_mgh.681685.mgh'?
>
>
>
>
>
>
>
> On Dec 6, 2013, at 11:52 AM, Douglas N Greve 
> <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>>
>  wrote:
>
>>
>> How often does it happen? Does the process just hang or does it produce
>> the correct results (eventually)? I don't think it is related to
>> load_mgh.m because the temporary filename would be different. However,
>> it is consistent with the temp files used with nifti reading and
>> writing. Does that happen in the lGI stream?
>> doug
>>
>> On 12/06/2013 01:46 PM, Marie Schaer wrote:
>>>
>>> Hi Kangchen,
>>>
>>> I also had the same error recently on a unix machine, but I
>>> unfortunately did not find the solution and some help would be greatly
>>> appreciated.
>>>
>>> I think that the bug is due to the fact that make_outer_surface.m
>>> calls MRIread.m, which calls load_mgh.m and that something gets wrong
>>> at the point of reading the file (and removing temporary files). But
>>> I'm afraid I can't help more, I tried to edit load_mgh to add -f after
>>> rm and it didn't help.
>>>
>>> Nick or Doug, any idea?
>>>
>>> Many thanks in advance!
>>>
>>> Marie
>>>
>>> On Dec 6, 2013, at 5:31 AM, 王康程 <kangchengwang0...@gmail.com 
>>> <mailto:kangchengwang0...@gmail.com>
>>> <mailto:kangchengwang0...@gmail.com>> wrote:
>>>
>>>> Dear all,
>>>>
>>>> When I run "recon-all -s ${subject} -localGI", it appear "rm: remove
>>>> regular file `/tmp/tmp4653077.mgh'? ". Then, I write yes, however, it
>>>> didn't response anyway. How shold I do next? Thank you!
>>>>
>>>> The echo for the process is followed
>>>>
>>>> --------------------------
>>>> running subject Emotion_xunlian_s12002
>>>> --------------------------
>>>> Subject Stamp: freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0
>>>> Current Stamp: freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0
>>>> INFO: SUBJECTS_DIR is /home/fmri/desktop/test
>>>> Actual FREESURFER_HOME /usr/local/freesurfer
>>>> -rw-rw-r--. 1 root root 544815 Dec  6 20:54
>>>> /home/fmri/desktop/test/Emotion_xunlian_s12002/scripts/recon-all.log
>>>> Linux localhost.localdomain 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct
>>>> 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>>>> /home/fmri/desktop/test/Emotion_xunlian_s12002/surf
>>>> #--------------------------------------------
>>>> #@# Local Gyrification Index lh Fri Dec  6 21:07:40 CST 2013
>>>>
>>>> mris_compute_lgi --i lh.pial
>>>>
>>>> =================
>>>> rm -Rf
>>>> /home/fmri/desktop/test/Emotion_xunlian_s12002/surf/tmp-mris_compute_lgi-lh.pial
>>>> =================
>>>> =================
>>>> mkdir -p
>>>> /home/fmri/desktop/test/Emotion_xunlian_s12002/surf/tmp-mris_compute_lgi-lh.pial
>>>> =================
>>>> =================
>>>> mris_fill -c -r 1 lh.pial
>>>> /home/fmri/desktop/test/Emotion_xunlian_s12002/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz
>>>> =================
>>>> reading surface from lh.pial...
>>>> writing filled volume to
>>>> /home/fmri/desktop/test/Emotion_xunlian_s12002/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('/home/fmri/desktop/test/Emotion_xunlian_s12002/surf/tmp-mris_compute_lgi-lh.pial/lh.pial.filled.mgz',15,'/home/fmri/desktop/test/Emotion_xunlian_s12002/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer');
>>>>  
>>>>
>>>> exit
>>>> =================
>>>> Warning: Unable to open display 'iconic'.  You will not be able to
>>>> display graphics on the screen.
>>>>
>>>> < M A T L A B (R) >
>>>> Copyright 1984-2012 The MathWorks, Inc.
>>>> R2012a (7.14.0.739) 64-bit (glnxa64)
>>>> February 9, 2012
>>>>
>>>> Toolbox Path Cache read in 0.02 seconds.
>>>> MATLAB Path initialized in 0.79 seconds.
>>>>
>>>> To get started, type one of these: helpwin, helpdesk, or demo.
>>>> For product information, visit www.mathworks.com 
>>>> <http://www.mathworks.com>
>>>> <http://www.mathworks.com/>.
>>>>
>>>>>> reading filled volume...
>>>> -------- freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0 --------
>>>> Setting up environment for FreeSurfer/FS-FAST (and FSL)
>>>> FREESURFER_HOME /usr/local/freesurfer
>>>> FSFAST_HOME /usr/local/freesurfer/fsfast
>>>> FSF_OUTPUT_FORMAT nii.gz
>>>> SUBJECTS_DIR /home/fmri/desktop/test
>>>> MNI_DIR /usr/local/freesurfer/mni
>>>> FSL_DIR /opt/fsl
>>>> -------- freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0 --------
>>>> Setting up environment for FreeSurfer/FS-FAST (and FSL)
>>>> FREESURFER_HOME /usr/local/freesurfer
>>>> FSFAST_HOME /usr/local/freesurfer/fsfast
>>>> FSF_OUTPUT_FORMAT nii.gz
>>>> SUBJECTS_DIR /home/fmri/desktop/test
>>>> MNI_DIR /usr/local/freesurfer/mni
>>>> FSL_DIR /opt/fsl
>>>> rm: remove regular file `/tmp/tmp4653077.mgh'?
>>>>
>>>> -- 
>>>> kangcheng Wang
>>>> _______________________________________________
>>>> Freesurfer mailing list
>>>> Freesurfer@nmr.mgh.harvard.edu 
>>>> <mailto:Freesurfer@nmr.mgh.harvard.edu> 
>>>> <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>>
>>>>
>>>> The information in this e-mail is intended only for the person to
>>>> whom it is
>>>> addressed. If you believe this e-mail was sent to you in error and
>>>> the e-mail
>>>> contains patient information, please contact the Partners Compliance
>>>> HelpLine at
>>>> http://www.partners.org/complianceline . If the e-mail was sent to
>>>> you in error
>>>> but does not contain patient information, please contact the sender
>>>> and properly
>>>> dispose of the e-mail.
>>>
>>>
>>>
>>> _______________________________________________
>>> Freesurfer mailing list
>>> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>> -- 
>> Douglas N. Greve, Ph.D.
>> MGH-NMR Center
>> gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>> Phone Number: 617-724-2358
>> Fax: 617-726-7422
>>
>> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>> www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>>
>> _______________________________________________
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to