Closed GoogleCodeExporter closed 9 years ago
This occurs in Unix and windows.
Original comment by duncan.g...@gmail.com
on 16 Mar 2012 at 5:40
I ran TS_haz33MR.py individually with;
Then in check scenarios TS_haz31MR.py failed.
I rang TS_haz31MR.py individually and TS_haz30MR.py failed.
So I ran TS_haz30MR.py individually.
Then check scenarios passed.
Original comment by duncan.g...@gmail.com
on 16 Mar 2012 at 6:13
I think this is due to the current_event_set dir not being made before trying
to make the source_model dir.
Original comment by duncan.g...@gmail.com
on 16 Mar 2012 at 6:47
Event_Set.save and Event_Activity.save both call out to File_Store._save which
uses the following code to create the save directory and intermediate
directories if needed
# Make save dir if necessary
save_dir = os.path.join(dir, self._name)
if not os.path.exists(save_dir):
os.makedirs(save_dir)
Source_Model.save, uses os.mkdir which will raise an exception if the
intermediate directories are not present.
The interesting thing here is that
./implementation_tests/current/TS_haz33MR/current_event_set/ should have been
created by Event_Set.save before Source_Model.save is called, but that does not
appear to be the case here.
Will make a change to the Source_Model.save method to also create intermediate
directories if needed.
Original comment by b...@girorosso.com
on 18 Mar 2012 at 9:25
Original comment by b...@girorosso.com
on 18 Mar 2012 at 9:26
Caused by r999, that is making check_scenarios not use file based arrays by
default.
The intermediate directories are not created by Event_Set.save and
Event_Activity.save as there are no file arrays to save:
def _save(self, dir=None):
"""Save the associated .npy files in the given dir."""
if len(self._array_files) > 0:
...
Original comment by b...@girorosso.com
on 18 Mar 2012 at 9:29
The difference with Source_Model is that the object is pickled to disk rather
than using numpy's save function.
Original comment by b...@girorosso.com
on 18 Mar 2012 at 9:34
Revision 1006 contains a temporary fix for this:
- Source_Model save method now creates intermediate directories
- Return event set objects when generating the event set so that the first node
always has the objects, even if they aren't file based.
This means that if SAVE_METHOD is None then running in parallel could cause
problems. File based arrays are still fine. When SAVE_METHOD is moved into
eqrm_flags this outstanding issue will be resolved.
Original comment by b...@girorosso.com
on 18 Mar 2012 at 10:12
Original issue reported on code.google.com by
duncan.g...@gmail.com
on 16 Mar 2012 at 5:39