diff --git a/Source/EMsoftOOLib/mod_crystallography.f90 b/Source/EMsoftOOLib/mod_crystallography.f90 index b877f44..c899349 100644 --- a/Source/EMsoftOOLib/mod_crystallography.f90 +++ b/Source/EMsoftOOLib/mod_crystallography.f90 @@ -2631,7 +2631,10 @@ recursive subroutine readDataHDF_(self, SG, EMsoft, useHDF, useXtalName) else xtalname = trim(EMsoft%generateFilePath('EMXtalFolderpathname',self%xtalname)) end if -hdferr = me%openFile(xtalname) +! we use the readonly optional parameter to make sure that HDF does not lock +! the file; this could cause conflicts if multiple program simultaneously try to +! acces the same crystal structure file [MDG, 4/10/24] +hdferr = me%openFile(xtalname, readonly=.TRUE.) groupname = SC_CrystalData hdferr = me%openGroup(groupname) @@ -2753,8 +2756,6 @@ recursive subroutine readDataHDF_(self, SG, EMsoft, useHDF, useXtalName) ! space groups, so this needs to remain at .FALSE. always. call SG%setSpaceGroupsecond(.FALSE.) -! if (openHDFfile) call me%closer() - end subroutine readDataHDF_ !--------------------------------------------------------------------------