Hi Andy, that's probably my fault. When I have been rewriting sections of recon-all, I often don't respect the the -parallel flag, so it may very well be broken. doug
On 1/20/2021 10:21 AM, Andy Worth wrote:
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.HSo 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 https://secure-web.cisco.com/1dc5h6q_BNNnkKvP366xprYw_CVHClTguAez02XCpx-7Av8eKKhu_Hx3W6nh4Dwg9LrLwI8A0H1YvJh6s_b8Vr85hRIL3uPlCua-YdKaIkguyxEkT8qWmnZlj3xwr-TrcyrfjmJGccX4o-Fm0gLJh7zCxNoYV2Iffys-NM8I-s0nm3Ct0D1ZrHk0aM77GzI7eoJ1eN06yOKVcpLH_-dCus-zLQTHrysqPdyo1YE9r4b0HUBqALO1LDlE3BBQV_WPtsFlwdwUKOKxBgxji9okoKg/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fblob%2Fdev%2Fscripts%2Frecon-all%23L3556.
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 https://secure-web.cisco.com/11sboSdXnmw-2AXpA7TQo4FAGJ0L-yc5Y3JHpAK8m7yfRV6fLk62ulE3lqarFR4VYeuf6ZVckptU3N4v49m8r0W3ayz6TPilh01hyBD-iuFzk_SS4GDqm7dcshbv5NDVuj0AVvaDAMWxsFYDjzrbAJ2kI76mHe1_ub7zDxm4nHgRS7UcAT7_EKB2KClKvmY0Fo2c_puV4QGyu81CbgALey8XrqLcTXOR8n6PCeWNJLREgTy6xpzGbEExURA9F8RmBiCTpPFIWlvPCmBGaBRnFFw/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fblob%2Fdev%2Fscripts%2Freconbatchjobs%23L67), 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 mailto: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 <mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu <mailto: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 <mailto: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 <https://secure-web.cisco.com/1kFmpUflCYrLlkn0X825hErhILvuejPNzV2WrombAVtg_sM4GT1g_2GUF6a8ZpRLVYi6pkG1WL5R_6FXRwzi6naGRJeM7eDTmdEF-qJnBHyt5W5477N06HJUDcSZV4VKP4uEWN7jv5UaPYN359YbKBW5yzUfr9B0_s3qNTfysJplHplUIbwiqmCVwtIfKMz7yXNuZZXM4FoZcbX1-iJQn_WZ-OrPOy86L9-F_bHcRD-NMim4sO1ulpWfa_sOXqCEpXur17Xf6obk1monjfSBi3A/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fblob%2Fdev%2Fscripts%2Frecon-all%23L3610>. 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, Andy Worth Scientific Solutions Engineer he, him, his <http://secure-web.cisco.com/1KxdUXSlflua-8jA7AL5CzR1vwNWqcPAt_z76LcUsPIdfrRmC2dUPKB5OQjPwfI_jJhAZe2cqlldgaNHGreNViKQUc8HWIh1UnI4eQW4PHcuCADZ_aF04n5OnjAwF_LEoRNv0nXMW3oxAUuH3CTQlGSfM9hl2zeEho-vAJ01wD1qhOrci0dfnp4FgfjX8QDdjl7x9By5VVtEj02Q5ED4l7TeC286ILTihn0s4abzLg_CLEKV4JUAvu6bDSQD7FMzVt_OR0Sr6Px4kg4nS-Be7NA/http%3A%2F%2Fwww.flywheel.io%2F> _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu <mailto: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 <https://secure-web.cisco.com/1wohJGgc_aU45md44Iut44aJYfKI-Al82H1PqFPwYX09J2v4byUqotfZmKxU5wVsjb8sNJFDu94_xVYNAMxRufU36bHNVXx-2_YIrxsKi_dr9mGLXGpRJ3-4sbYRnFRDcwzPOOc_SStDz1veXjXSfx-xerHoBMvCpu2qZPQjsPlXKSa3BV7k2s2lF818bSRpals6E8xEv67JmXaqReLMt0uYzzG0LzJsAa8zbYYr9VrOUwmRrF_EVA8YbodZoHVA8DaFHQEGTe6VdkuGGzuuM_w/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer