I am creating finite element code in Python that relies on numpy and scipy for array, matrix and linear algebra calculations. The initial generated code seems to be working and I am getting the results I need.
However, for some other feature I need to call a function that performs the analysis more than one time and when I review the results they differ completely from the first call although both are called using the same inputs. The only thing I can think of is that the garbage collection is not working and the memory is being corrupted.
Here is the procedure used:
- call setup file to generate model database: mDB = F0(inputs)
- call first analysis with some variable input: r1 = F1(mDB, v1)
- repeat first analysis with the same variable from step2: r2 = F1(mDB, v1)
Since nothing has changed, I would expect that the results from step#2 and step#3 would be the same, however, my code produces different results (verified using matplotlib).
I am using:
Python 2.7 (32bit) on Windows 7 with numpy-1.6.2 and scipy-0.11.0
F1
modifymDB
orv1
at all? Does this irregularity happen consistently and deterministically? I.E. do you get the exact same error each time?