From 8cd72b6341675fa657bc9d393913b6cf3388d52c Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Tue, 9 Sep 2014 13:17:46 +0200 Subject: [PATCH] Treatment of memory too big cases --- src/daSalome/daYacsIntegration/daOptimizerLoop.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/daSalome/daYacsIntegration/daOptimizerLoop.py b/src/daSalome/daYacsIntegration/daOptimizerLoop.py index 4d0dac8..60c6416 100644 --- a/src/daSalome/daYacsIntegration/daOptimizerLoop.py +++ b/src/daSalome/daYacsIntegration/daOptimizerLoop.py @@ -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() -- 2.39.2