diff --git a/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.F90 b/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.F90 index 4ced1c700b..b383a2819b 100644 --- a/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.F90 +++ b/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.F90 @@ -401,7 +401,7 @@ double precision function farahiProbability(self,variance,time,node) if (makeTable) then !$omp critical(farahiProbabilityTabulate) ! Attempt to read the file again now that we are within the critical section. If another thread made the file while we were waiting we may be able to skip building the table. - if (self%useFile.and..not.self%tableInitialized) then + if (self%useFile) then call self%fileNameInitialize() call File_Lock(char(self%fileName),fileLock,lockIsShared=.true.) call self%fileRead() @@ -760,7 +760,7 @@ subroutine farahiRateTabulate(self,varianceProgenitor,time,node) if (makeTable) then !$omp critical(farahiRateTabulate) ! Attempt to read the file again now that we are within the critical section. If another thread made the file while we were waiting we may be able to skip building the table. - if (self%useFile.and.self%tableInitializedRate) then + if (self%useFile) then call File_Lock(char(self%fileName),fileLock,lockIsShared=.true.) call self%fileRead() call File_Unlock(fileLock) diff --git a/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.midpoint.F90 b/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.midpoint.F90 index 9eb58386f6..fb158adbdf 100644 --- a/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.midpoint.F90 +++ b/source/structure_formation.excursion_sets.first_crossing_distribution.Farahi.midpoint.F90 @@ -130,7 +130,7 @@ double precision function farahiMidpointProbability(self,variance,time,node) if (makeTable) then !$omp critical(farahiMidpointProbabilityTabulate) ! Attempt to read the file again now that we are within the critical section. If another thread made the file while we were waiting we may be able to skip building the table. - if (self%useFile.and..not.self%tableInitialized) then + if (self%useFile) then call File_Lock(char(self%fileName),fileLock,lockIsShared=.true.) call self%fileRead() call File_Unlock(fileLock) @@ -436,7 +436,7 @@ subroutine farahiMidpointRateTabulate(self,varianceProgenitor,time,node) if (makeTable) then !$omp critical(farahiMidpointRateTabulate) ! Attempt to read the file again now that we are within the critical section. If another thread made the file while we were waiting we may be able to skip building the table. - if (self%useFile.and..not.self%tableInitialized) then + if (self%useFile) then call File_Lock(char(self%fileName),fileLock,lockIsShared=.true.) call self%fileRead() call File_Unlock(fileLock)