External Email - Use Caution
Hi Bruce,
From recon-all.log:
mris_curvature -w -seed 1234 rh.white.preaparc
setting seed for random number generator to 1234
total integrated curvature = 21.097*4pi (265.116) --> -20 handles
ICI = 150.9, FI = 1460.6, variation=23079.795
writing Gaussian curvature to ./rh.white.preaparc.K...done.
writing mean curvature to ./rh.white.preaparc.H...done.
rm -f rh.white.H
ln -s rh.white.preaparc.H rh.white.H
rm -f rh.white.K
ln -s rh.white.preaparc.K rh.white.K
mris_curvature -seed 1234 -thresh .999 -n -a 5 -w -distances 10 10 rh.inflated
setting seed for random number generator to 1234
normalizing curvature values.
averaging curvature patterns 5 times.
sampling 10 neighbors out to a distance of 10 mm
252 vertices thresholded to be in k1 ~ [-0.15 0.35], k2 ~ [-0.07 0.04]
total integrated curvature = 0.687*4pi (8.638) --> 0 handles
ICI = 1.5, FI = 8.6, variation=149.492
128 vertices thresholded to be in [-0.01 0.01]
writing Gaussian curvature to ./rh.inflated.K...thresholding curvature at 99.90% level
curvature mean = 0.000, std = 0.001
132 vertices thresholded to be in [-0.09 0.18]
done.
writing mean curvature to ./rh.inflated.H...curvature mean = -0.015, std = 0.022
done.
PIDs (2310 2313 2316 2319 2322 2325 2328 2331 2334 2337 2340 2343) completed and logs appended.
/usr/local/freesurfer/subjects/sub-TOME3024/surf
Cannot find rh.white.H
So mris_curvature writes rh.white.preaparc.H and then the ln command creates the symbolic link, "rh.white.H". See this line of recon-all.
It is hard to see how this works at all when using the -parallel flag since reconbatchjobs runs all these commands in parallel. The commands are all launched in sequence using "exec" (see here), but since they are run in the background, the quicker jobs will finish first. I wrote a short test script to check that. I suppose it could work if mris_curvature creates the file when it starts up. Then the symbolic link could be created. Perhaps there is a race between creating rh.white.preaparc.H and when the ln -s rh.white.preaparc.K rh.white.K command. Or am I missing something here?
Andy.On Tue, Jan 19, 2021 at 5:37 PM Fischl, Bruce <BFISCHL@mgh.harvard.edu> wrote:
_______________________________________________Hi Andy
I think the rh.white.H is generated by mris_curvature. Does that help?
Cheers,
Bruce
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Andy Worth
Sent: Tuesday, January 19, 2021 5:29 PM
To: Freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Cannot find rh.white.H
External Email - Use Caution
Hello,
We're seeing this error a lot: "Cannot find rh.white.H" which is generated here.
It does not occur if -parallel is turned off.
I see that reconbatchjobs does "exec" on the commands sequentially in the order of the list, but it runs each in the background:
exec $JOB >> $LOG 2>&1 &
so I thought it might just be slightly possible that these two commands:
set cmd1 = (rm -f $hemi.white.$suffix)
set cmd2 = (ln -s $hemi.white.preaparc.$suffix $hemi.white.$suffix)
could end up in a race condition where the file is linked and then immediately removed if somehow the ln command is executed before the rm command.
However, I tried reproducing this behavior with a test script but the rm always happens before the ln.
Any help would be appreciated!
Thanks,
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be 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