CGNS file (i. e. HDF5) should not be opened from other processes while a process is opening and writing something into the CGNS file.
To avoid such a situation, iriclib now has function iRIC_Check_Lock, iRIC_Write_Sol_Start() and iRIC_Write_Sol_End(), but the implementation of these functions are not very good.
Currently, the implementation is as follows:
iRIC_Check_Lock checks whether the lock file, like "Case1.cgn.lock" exists or not
iRIC_Write_Sol_Start() create lock file, like "Case1.cgn.lock"
iRIC_Write_Sol_End() remove lock file, like "Case1.cgn.lock"
But, these functions do not REALLY lock the files, so locking with these functions fails often, when calculation result saving process is repeated quickly.
To solve the issue, we should add REAL locking of the lock files "Case1.cgn.lock", using:
CGNS file (i. e. HDF5) should not be opened from other processes while a process is opening and writing something into the CGNS file.
To avoid such a situation, iriclib now has function
iRIC_Check_Lock
,iRIC_Write_Sol_Start()
andiRIC_Write_Sol_End()
, but the implementation of these functions are not very good.Currently, the implementation is as follows:
iRIC_Check_Lock
checks whether the lock file, like "Case1.cgn.lock" exists or notiRIC_Write_Sol_Start()
create lock file, like "Case1.cgn.lock"iRIC_Write_Sol_End()
remove lock file, like "Case1.cgn.lock"But, these functions do not REALLY lock the files, so locking with these functions fails often, when calculation result saving process is repeated quickly.
To solve the issue, we should add REAL locking of the lock files "Case1.cgn.lock", using:
LockFileEx()
flock()