]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Treatment of memory too big cases
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Tue, 9 Sep 2014 11:17:46 +0000 (13:17 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Tue, 9 Sep 2014 11:17:46 +0000 (13:17 +0200)
src/daSalome/daYacsIntegration/daOptimizerLoop.py

index 4d0dac8c3071fae6193f18d49d722458d848a894..60c64168dc356b19a2990317bbcf9d861fccf1d2 100644 (file)
@@ -283,7 +283,10 @@ class AssimilationAlgorithm_asynch(SALOMERuntime.OptimizerAlgASync):
     # get the daStudy
     #print "[Debug] Input is ", input
     str_da_study = input.getStringValue()
-    self.da_study = cPickle.loads(str_da_study)
+    try:
+        self.da_study = cPickle.loads(str_da_study)
+    except ValueError as e:
+        raise ValueError("\n\n  Handling internal error in study exchange (message: \"%s\").\n  The case is probably too big (bigger than the physical plus the virtual memory available).\n  Try if possible to store the covariance matrices in sparse format.\n"%(str(e),))
     #print "[Debug] da_study is ", self.da_study
     self.da_study.initAlgorithm()
     self.ADD = self.da_study.getAssimilationStudy()