External Email - Use Caution        

Hi Annchen,

 

freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0 has a release date of May 2013. All your individual programs reported BuildTimeStamp: Dec 19 2017 00:02:05.

 

Here is the information for mris_anatomical_stats. It also shows the program was built from ‘mris_anatomical_stats.c,v 1.79 2016/03/14 15:15:34’. It is newer than the release date. I think the correct version should be ‘mris_anatomical_stats.c,v 1.72 2011/03/02 00:04:26’.

 

ProgramName: mris_anatomical_stats  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2023/06/02-13:56:44-GMT  BuildTimeStamp: Dec 19 2017 00:02:05  CVS: $Id: mris_anatomical_stats.c,v 1.79 2016/03/14 15:15:34 greve Exp $  User: ark19  Machine: dcc-youlab-01  Platform: Linux  PlatformVersion: 4.18.0-408.el8.x86_64  CompilerName: GCC  CompilerVersion: 40800

 

There seems to be a mismatch between your recon-all and all the programs.

 

Can you try the following:

1. exit your current terminal, restart a new one

2. source correct Freesurfer environment

3. run ‘which recon-all’ to check the environment has been sourced correctly

4. resubmit recon-all  (you don’t need the full path to recon-all if Freesurfer environment is set up correctly)

 

Best,

 

Yujing

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Annchen Knodt
Sent: Sunday, June 4, 2023 9:22 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3

 

        External Email - Use Caution        

Thank you for looking into this, Yujing!  here's my stats dir:

 

$ ls -l /work/long/freesurfer_v5.3_DBIS/sub-0223_mprage/stats

total 77

-rwxrwxrwx. 1 ark19 root   972 Jun  3 17:03 lh.aparc.stats

-rwxrwxrwx. 1 ark19 root 49236 Jun  3 16:22 lh.curv.stats

-rw-rw-r--. 1 ark19 root  6606 Jun  3 17:03 lh.w-g.pct.stats

 

 FWIW I confirmed that I'm running the original version of recon-all (freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0 from 2013)


From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@mgh.harvard.edu>
Sent: Friday, June 2, 2023 4:23 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3

 

        External Email - Use Caution        

I followed 5.3 recon-all a little bit. rh will be processed after lh. Your recon-all stopped while it was still processing lh.

 

The error ‘MRISread(/work/long/freesurfer_v5.3_DBIS/sub-0223_mprage/surf/rh.white): could not open file’ happened when recon-all was doing Parcellation Stats lh:

 

mris_anatomical_stats -mgz -cortex ../label/lh.cortex.label -f ../stats/lh.aparc.stats -b -a ../label/lh.aparc.annot -c ../label/aparc.annot.ctab sub-0223_mprage lh white

 

I don’t understand why it tried to read rh.white while it was doing lh white.

 

I’m wondering maybe it was actually complaining about ../stats/lh.aparc.stats.  Can you do ‘ls -l’ of your stats directory?

 

Yujing

 

 

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Huang, Yujing
Sent: Friday, June 2, 2023 3:31 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3

 

        External Email - Use Caution        

Hi Annchen,

 

It seems that recon-all only processed lh. By default, it should process both lh and rh. Original recon-all have this line ‘set hemilist = (lh rh);’ at the beginning of the script. Can you make sure the one you are running is the original?

 

Best,

 

Yujing

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Annchen Knodt
Sent: Friday, June 2, 2023 2:53 PM
To: Freesurfer support list <
freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3

 

        External Email - Use Caution        

Hi Yujing,

 

Thanks so much for your response!  I tried copying $FREESURFER_HOME/subjects/fsaverage and $FREESURFER_HOME/subjects/${hemi}.EC_average to $SUBJECTS dir before running, and this time I ran with the original recon-all instead of the one that had been edited to remove links (recon-all_noLink).  I was sure this would solve the problem, but I ended up getting the same error:

 

Command:

 

/cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all -all -s sub-0223_mprage -openmp 1 -i /cifs/hariri-long/Studies/DBIS_P52/Imaging/sourcedata/sub-0223/anat/sub-0223_T1w.nii.gz

 

Error: 

 

      MRISread(/work/long/freesurfer_v5.3_DBIS/sub-0223_mprage/surf/rh.white): could not open file

 

Did I need to copy them somewhere besides $SUBJECTS_DIR ?  I’m not seeing any “failed to create symbolic link” messages which I interpret as the script having found the files and not need to run the ‘ln -s’ commands.

 

Attaching the log file from this latest run.

 

Thanks!

 

Annchen

 

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@mgh.harvard.edu>
Date: Thursday, June 1, 2023 at 3:06 PM
To: Freesurfer support list <
freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3

        External Email - Use Caution        

Hi Annchen,

 

Your cp commands are missing destination file operands, see the errors in recon-all.log.

 

ln -s $FREESURFER_HOME/subjects/fsaverage and ln -s $FREESURFER_HOME/subjects/${hemi}.EC_average create symbolic links to directory. You will have to copy those two directories for your subject. I think if you copy them before recon-all, it won’t go through the codes to create the link.

 

Best,

 

Yujing

 

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Annchen Knodt
Sent: Thursday, June 1, 2023 2:10 PM
To:
freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3

 

        External Email - Use Caution        

Hello,

 

I'm trying to run freesurfer v5.3 recon-all and running into an error I'm not sure how to troubleshoot.  I'm using essentially the same commands that i've successfully used to run version 6.0 recently, and that i've also successfully run 5.3 with in the past.  

 

On my first pass, I attempted to run this full recon-all command: 

 

/cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all_noLink -all -s sub-0223_mprage -openmp 1 -i /cifs/hariri-long/Studies/DBIS_P52/Imaging/sourcedata/sub-0223/anat/sub-0223_T1w.nii.gz

 

And eventually got the error: 

 

      MRISread(/work/long/freesurfer_v5.3_DBIS/sub-0223_mprage/surf/rh.white): could not open file

 

Lots of lh surf files were produced as well as 3 of the lh stats files (aparc, curv, w-g), but nothing for rh, and I could not find the rh.white file.  I then tried running rh using:

 

/cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all_noLink -all -s sub-0223_mprage -openmp 1 -hemi rh

 

And eventually got the error:

 

      MRISread(/work/long/freesurfer_v5.3_DBIS/rh.EC_average/surf/rh.sphere.reg): could not open file

 

One thing that seems weird about the second error is that it is looking in $SUBJECTS_DIR instead of $SUBJECTS_DIR/<subject> for the rh.sphere file, when the file does exist in $SUBJECTS_DIR/<subject>/surf (but not the top dir where it's looking)

 

Also wanted to note that i'm running this a slightly tweaked version to remove symlinks which aren't allowed on the cluster i'm working on (which is running CentOS 8):

 

$ diff /cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all_noLink /cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all

3447c3447

<           cp $subj1 ${diffsubj}_tmp

---

>           ln -s $subj1 ${diffsubj}_tmp

3753c3753

<     cp $subj1 ${diffsubj}_tmp

---

>     ln -s $subj1 ${diffsubj}_tmp

3911c3911

<         set cmd=(cp $FREESURFER_HOME/subjects/fsaverage)

---

>         set cmd=(ln -s $FREESURFER_HOME/subjects/fsaverage)

4028c4028

<       set cmd=(cp $FREESURFER_HOME/subjects/fsaverage)

---

>       set cmd=(ln -s $FREESURFER_HOME/subjects/fsaverage)

4157c4157

<       set cmd=(cp $FREESURFER_HOME/subjects/${hemi}.EC_average)

---

>       set cmd=(ln -s $FREESURFER_HOME/subjects/${hemi}.EC_average)

 

Any tips on how I can troubleshoot this?  Attaching recon-all.log file.  Thanks!!

 

Annchen