Jonathan Guyer | 1 Jun 18:09

Re: Fipy 2.0a1 with numpy 1.1


On Jun 1, 2008, at 9:52 AM, Tony S Yu wrote:

>
> On May 30, 2008, at 5:30 PM, Jonathan Guyer wrote:
>
>>
>>
>> On May 30, 2008, at 4:49 PM, Tony S Yu wrote:
>>
>>> Are there plans to make FiPy compatible with numpy 1.1?
>>
>> Of course, but it was only released yesterday.
>
> Yeah, I guess I was a little over eager :).

Much better that than disinterested!

> In any case, I just read over the release notes for numpy 1.1, and  
> it turns out they support the old masked array API (this change is  
> what caused most of the breakages) in the module  
> numpy.oldnumeric.ma. Changing to this import statement in the fipy  
> numerix module led to 4 failures;  3 of which are just due to a  
> change in representation of floats near integer values; for example:
>
> Expected:
>   (3-4j)
> Got:
>   (3.0+-4.0j)
>
> which isn't really important (to me at least).

Yeah, just annoying. I just fixed these in r2457.

> The 4th failure is actually from examples/diffusion/anisotropy.py,  
> which failed for me before the numpy upgrade. Should this be failing?

It passes for us on Linux, but it fails for me too on a Mac. I don't  
know why, yet. It turns out that it's been failing on Macs all along,  
but we didn't notice because there were enough other garbage errors  
being thrown. There at least used to be some oddball floating point  
failures in scipy on the Mac in functions like erf() that caused FiPy  
to be correct but the analytical results to be wrong, but we're not  
using any of that here AFAICT.

Btw, we've recently implemented the Bitten continuous integration tool  
to automate our tests, so you can now compare your test results with  
ours at http://www.matforge.org/fipy/build

Presently, there's only a Mac build slave properly configured to run  
the tests, and it doesn't have Trilinos. We'll hopefully get the  
"sandbox" (Linux) machine configured properly this week some time. If  
anybody would like to contribute a build slave to the effort  
(particularly a Windows machine), please contact me.

>
> Also, I was able to confirm that my fixes didn't break FiPy for the  
> older numpy implementation of masked arrays. Most importantly,  
> access to the old implementation allowed me to fix two more pieces  
> that were broken. This means all the major failures listed in my  
> first email have been fixed (at least on my setup), with the  
> exception of the anisotropy example and the roundtrip through cPickle.
>
> Here's a summary of all the changes:
> <numpy1.1_changes.diff>

This is great! Thank you very much. I've committed your changes in  
r2550.

In fipy/meshes/numMesh/mesh.py, (with the notable exception of  
_calcFaceToCellDistances), the changes are just for readability,  
correct?

> And if I haven't mentioned it to the FiPy developers before: thanks  
> for a great PDE solver.

You're quite welcome. We really appreciate your contributions.

- Jon

--

-- 
Jonathan E. Guyer, PhD
Metallurgy Division
National Institute of Standards and Technology
<http://www.metallurgy.nist.gov/>


Gmane