From f1ffc1de9db600afc0681f56e62e5c380e95a4fe Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Wed, 20 Nov 2019 00:46:48 -0500 Subject: [PATCH] Fixed the decoder deadlock caused by waiting for the lockfile after a decode, which resulted in a deadlock on back-to-back decodes when a CPU was slow to decode TURBO within its 6 second cycle. Most of the time this was highly unlikely, but every now and then the timing was just right that the lock was created and removed before the decoder could observe that it was created. Sad panda. --- lib/jt9a.f90 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/jt9a.f90 b/lib/jt9a.f90 index 9729e08..eef5904 100644 --- a/lib/jt9a.f90 +++ b/lib/jt9a.f90 @@ -63,11 +63,8 @@ subroutine jt9a() call timer('decoder ',0) call multimode_decoder(shared_data%ss,shared_data%id2,local_params,12000) call timer('decoder ',1) - -100 inquire(file=trim(temp_dir)//'/.lock',exist=fileExists) - if(fileExists) go to 10 - call sleep_msec(msdelay) - go to 100 + call sleep_msec(100) + go to 10 999 call timer('decoder ',101)