[Greater-commits] r3725 - in branches/3.0.0-usf/GREAT-ERModel: . GreaterModel/Worker
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jul 27 18:34:27 CEST 2011
Author: aheinecke
Date: 2011-07-27 18:34:27 +0200 (Wed, 27 Jul 2011)
New Revision: 3725
Modified:
branches/3.0.0-usf/GREAT-ERModel/
branches/3.0.0-usf/GREAT-ERModel/ChangeLog
branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/simpletreatmodel.py
branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/worker.py
branches/3.0.0-usf/GREAT-ERModel/start_scheduler.py
branches/3.0.0-usf/GREAT-ERModel/start_worker.py
Log:
Merged revisions 3690-3698,3707 via svnmerge from
svn+ssh://wald.intevation.org/greater/branches/3.0.0-all-models/GREAT-ERModel
................
r3690 | aheinecke | 2011-07-26 12:24:30 +0200 (Tue, 26 Jul 2011) | 3 lines
Initialized merge tracking via "svnmerge" with revisions "1-216" from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
................
r3691 | aheinecke | 2011-07-26 12:29:17 +0200 (Tue, 26 Jul 2011) | 9 lines
Merged revisions 321 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
........
r321 | aheinecke | 2011-06-30 11:46:17 +0200 (Thu, 30 Jun 2011) | 2 lines
Use numpy instead of deprecated numeric module
........
................
r3692 | aheinecke | 2011-07-26 12:32:58 +0200 (Tue, 26 Jul 2011) | 10 lines
Blocked revisions 369 via svnmerge
Path issues can be resolved again after the greater 3.0 directory
layout is cleared
........
r369 | aheinecke | 2011-07-07 15:24:51 +0200 (Thu, 07 Jul 2011) | 2 lines
Expand Syspath to search for modules in GREAT-ER/Lib
........
................
r3693 | aheinecke | 2011-07-26 12:36:03 +0200 (Tue, 26 Jul 2011) | 10 lines
Merged revisions 3583 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
........
r3583 | aheinecke | 2011-07-14 16:56:44 +0200 (Thu, 14 Jul 2011) | 3 lines
Correctly use the string expansion before this codepath lead
to a TypeError
........
................
r3694 | aheinecke | 2011-07-26 12:37:02 +0200 (Tue, 26 Jul 2011) | 9 lines
Merged revisions 3584 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
........
r3584 | aheinecke | 2011-07-14 16:57:16 +0200 (Thu, 14 Jul 2011) | 2 lines
Correctly use the representation of the tuple, as intended
........
................
r3695 | aheinecke | 2011-07-26 12:38:18 +0200 (Tue, 26 Jul 2011) | 12 lines
Merged revisions 3587 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
........
r3587 | aheinecke | 2011-07-14 16:58:56 +0200 (Thu, 14 Jul 2011) | 5 lines
Sum Numpy updates:
use float64 now instead of Float
use linalg.solve instead of solve_linear_equations which is equivalent
according to http://mathesaurus.sourceforge.net/numeric-numpy.html
........
................
r3696 | aheinecke | 2011-07-26 12:40:01 +0200 (Tue, 26 Jul 2011) | 9 lines
Merged revisions 3601 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
........
r3601 | aheinecke | 2011-07-15 11:02:30 +0200 (Fri, 15 Jul 2011) | 2 lines
Use lowercase float for calulactions there is no Float in numpy
........
................
r3697 | aheinecke | 2011-07-26 12:41:37 +0200 (Tue, 26 Jul 2011) | 9 lines
Merged revisions 3602 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
........
r3602 | aheinecke | 2011-07-15 11:03:32 +0200 (Fri, 15 Jul 2011) | 2 lines
Convert Numpy floats to regular python floats for jelling
........
................
r3698 | aheinecke | 2011-07-26 12:42:45 +0200 (Tue, 26 Jul 2011) | 9 lines
Merged revisions 3603 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ERModel
........
r3603 | aheinecke | 2011-07-15 11:06:01 +0200 (Fri, 15 Jul 2011) | 2 lines
Revert commit 3600 because it is an uneccerssary loss of accuracy
........
................
r3707 | aheinecke | 2011-07-26 16:32:14 +0200 (Tue, 26 Jul 2011) | 3 lines
Add Lib to searchpath as a place where third party dependencies can
be placed
................
Property changes on: branches/3.0.0-usf/GREAT-ERModel
___________________________________________________________________
Name: svnmerge-integrated
- /branches/3.0.0-all-models/GREAT-ERModel:1-3641
+ /branches/3.0.0-all-models/GREAT-ERModel:1-3724
Name: svn:mergeinfo
-
Modified: branches/3.0.0-usf/GREAT-ERModel/ChangeLog
===================================================================
--- branches/3.0.0-usf/GREAT-ERModel/ChangeLog 2011-07-27 16:31:17 UTC (rev 3724)
+++ branches/3.0.0-usf/GREAT-ERModel/ChangeLog 2011-07-27 16:34:27 UTC (rev 3725)
@@ -1,3 +1,10 @@
+2011-07-26 Andre Heinecke <aheinecke at intevation.de>
+
+ * GreaterModel/Worker/simpletreatmodel.py: Use numpy instead of Numeric.
+ * GreaterModel/Worker/worker.py: Correct Type error by using string representation
+ of a Tuple.
+ Convert Numpy floats to regular python floats for jelling
+
2009-12-11 Nina Hueffmeyer <nhueffme at usf.uos.de>
* GreaterModel/Worker/dischargemodels.py: Differentiate between different types
of plants for all complexity modes.
Modified: branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/simpletreatmodel.py
===================================================================
--- branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/simpletreatmodel.py 2011-07-27 16:31:17 UTC (rev 3724)
+++ branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/simpletreatmodel.py 2011-07-27 16:34:27 UTC (rev 3725)
@@ -15,8 +15,10 @@
from string import upper, lower, atof, split
from math import exp, sqrt
-from Numeric import *
-from LinearAlgebra import *
+from numpy import *
+from numpy.linalg import *
+from numpy import float64 as Float
+from numpy.linalg import solve as solve_linear_equations
from stochasticresult import StochasticResult
from parameter import Parameter
Modified: branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/worker.py
===================================================================
--- branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/worker.py 2011-07-27 16:31:17 UTC (rev 3724)
+++ branches/3.0.0-usf/GREAT-ERModel/GreaterModel/Worker/worker.py 2011-07-27 16:34:27 UTC (rev 3725)
@@ -16,6 +16,8 @@
from twisted.python.failure import Failure
import sys
+import numpy
+
import session
from calculation import Calculation
@@ -124,16 +126,25 @@
# get_descriptives method to get a tuple representation
# of the instance variables (which can be combined with
# other results for the same segment later)
+ # Some numpy calculations also return numpy floats which
+ # also can not be jellied and have to be converted
result = calculation.get_results()
for seg in result.values():
for key, value in seg.items():
- seg[key] = value.get_raw()
+ raw = value.get_raw()
+ if isinstance(raw, tuple):
+ raw = list(raw)
+ for i, element in enumerate(raw):
+ if isinstance(element, numpy.float64):
+ raw[i] = float(element)
+ raw = tuple(raw)
+ seg[key] = raw
deferred.callback(result)
else:
# An unknown status of the calculation. Return an error to
# the caller of the start_calculation method.
- err = ValueError("Unknown calculation status %r"
- % (status, progress))
+ err = ValueError("Unknown calculation status %s"
+ % repr((status, progress)))
deferred.errback(err)
except:
log.err(Failure())
Modified: branches/3.0.0-usf/GREAT-ERModel/start_scheduler.py
===================================================================
--- branches/3.0.0-usf/GREAT-ERModel/start_scheduler.py 2011-07-27 16:31:17 UTC (rev 3724)
+++ branches/3.0.0-usf/GREAT-ERModel/start_scheduler.py 2011-07-27 16:34:27 UTC (rev 3725)
@@ -19,6 +19,7 @@
_dir = os.path.abspath(os.path.join(os.path.dirname(GreaterModel.__file__),
os.pardir))
sys.path.append(os.path.join(_dir, "Lib"))
+sys.path.append(os.path.join(_dir, os.pardir, "Lib"))
sys.path.append(os.path.join(_dir, os.pardir, "GREAT-ER-DB"))
import GreaterModel.Scheduler.run
Modified: branches/3.0.0-usf/GREAT-ERModel/start_worker.py
===================================================================
--- branches/3.0.0-usf/GREAT-ERModel/start_worker.py 2011-07-27 16:31:17 UTC (rev 3724)
+++ branches/3.0.0-usf/GREAT-ERModel/start_worker.py 2011-07-27 16:34:27 UTC (rev 3725)
@@ -19,6 +19,7 @@
os.pardir))
sys.path.append(os.path.join(dir, "Lib"))
sys.path.append(os.path.join(dir, os.pardir, "GREAT-ER-DB"))
+sys.path.append(os.path.join(dir, os.pardir, "Lib"))
import GreaterModel.Worker.workerpb
GreaterModel.Worker.workerpb.run()
More information about the Greater-commits
mailing list