raven
raven copied to clipboard
[DEFECT] Batch realizations caused the crash of HDF5
Defect Description
Describe the defect
What did you expect to see happen?
What did you see instead?
When run GA optimization with HDF5, the code crashed with the following error message:
Traceback (most recent call last):
File "/home/users/psimonovic/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/h5py/_hl/attrs.py", line 217, in create
h5a.rename(self._id, self._e(tempname), self._e(name))
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5a.pyx", line 118, in h5py.h5a.rename
RuntimeError: Can't rename attribute (object header message is too large)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/users/psimonovic/workspace/install/raven/framework/Driver.py", line 313, in <module>
raven()
File "/home/users/psimonovic/workspace/install/raven/framework/Driver.py", line 266, in raven
simulation.run()
File "/home/users/psimonovic/workspace/install/raven/framework/Simulation.py", line 751, in run
stepInstance.takeAstep(stepInputDict)
File "/home/users/psimonovic/workspace/install/raven/framework/Steps.py", line 337, in takeAstep
self._localTakeAstepRun(inDictionary)
File "/home/users/psimonovic/workspace/install/raven/framework/Steps.py", line 695, in _localTakeAstepRun
myLambda([finishedJob,outputs[outIndex]])
File "/home/users/psimonovic/workspace/install/raven/framework/Steps.py", line 629, in <lambda>
self._outputCollectionLambda.append( (lambda x: inDictionary['Model'].collectOutput(x[0],x[1]), outIndex) )
File "/home/users/psimonovic/workspace/install/raven/framework/Models/Code.py", line 764, in collectOutput
output.addRealization(evaluation)
File "/home/users/psimonovic/workspace/install/raven/framework/Databases/HDF5.py", line 158, in addRealization
self.database.addGroup(rlz)
File "/home/users/psimonovic/workspace/install/raven/framework/h5py_interface_creator.py", line 261, in addGroup
self.__addGroupRootLevel(groupName,rlz)
File "/home/users/psimonovic/workspace/install/raven/framework/h5py_interface_creator.py", line 406, in __addGroupRootLevel
self.__populateGroup(grp, groupName, rlz)
File "/home/users/psimonovic/workspace/install/raven/framework/h5py_interface_creator.py", line 375, in __populateGroup
group.attrs[name + '_dataOther'] = _dumps(np.concatenate( list(dataOther.values())).ravel().tolist())
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/home/users/psimonovic/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/h5py/_hl/attrs.py", line 100, in __setitem__
self.create(name, data=value)
File "/home/users/psimonovic/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/h5py/_hl/attrs.py", line 220, in create
h5a.delete(self._id, self._e(tempname))
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5a.pyx", line 141, in h5py.h5a.delete
KeyError: "Unable to delete attribute (can't locate attribute)"
Do you have a suggested fix for the development team?
Describe how to Reproduce Steps to reproduce the behavior: 1. 2. 3. 4.
Screenshots and Input Files A test will be created to replicate the error.
Platform (please complete the following information):
- OS: [e.g. iOS]
- Version: [e.g. 22]
- Dependencies Installation: [CONDA or PIP]
For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.
- [ ] 1. Is it tagged with a type: defect or task?
- [ ] 2. Is it tagged with a priority: critical, normal or minor?
- [ ] 3. If it will impact requirements or requirements tests, is it tagged with requirements?
- [ ] 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
- [ ] 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)
For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.
- [ ] 1. If the issue is a defect, is the defect fixed?
- [ ] 2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
- [ ] 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
- [ ] 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
- [ ] 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?