You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As posted to the [http://thread.gmane.org/gmane.comp.python.fipy/3123 mailing list]:
The attached patch was made against the current "develop" branch. The trac issue tracker at matforge would not allow me to register in order to create a ticket for this ("The page you are looking for is temporarily unavailable"), otherwise I would have put a pull request there on a new ticket.
For some reason that I didn't have the time to dig into sufficiently, it turns out that 64-bit python on 64-bit windows still regards "int" as 32-bit, and not, as the other OSs do, 64-bit. This causes numerous problems with error messages about dtype=int64 not matching with dtype=int32. For example (the one that failed tests for me) the numpy function argmin() returns an array of dtype=int64, but if this result is assigned to an array slice that was created with dtype=int, then errors occur on win64 & py64, but not on other x64 OSs.
The attached patch defines a numerix.INT_DTYPE value that is set based on the detected platform. I then changed a handful of dtype=int references in a few other files, to refer to the new definition in numerix.
After making this change, the fipy tests pass (using the scipy solver; pysparse on py+Windows x64 appears to be afflicted by the same issue and I haven't had a chance to look at it yet) although there are some issues with double_scalars() that appear to be unrelated to the int issue:
F:\CalebHattingh\repos\fipy\examples>C:\WinPython-64bit-2.7.5.0\python-2.7.5.amd64\python.exetest.py
................................................................................
...f:\calebhattingh\repos\fipy\fipy\variables\variable.py:1165: RuntimeWarning:
dividebyzeroencounteredindouble_scalarsreturnself._BinaryOperatorVariable(lambdaa,b: a/b, other)
................................................................................
.......................f:\calebhattingh\repos\fipy\fipy\solvers\scipy\linearLUSolver.py:71: RuntimeWarning: invalidvalueencounteredindouble_scalarsif (numerix.sqrt(numerix.sum(errorVector**2)) /error0) <=self.tolerance:
.....F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor1D.py:3: RuntimeWarning: dividebyzeroencounteredinlog##F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor1D.py:18: RuntimeWarning: dividebyzeroencounteredindouble_scalars# of their official duties. Pursuant to title 17 Section 105 of the
.F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor2D.py:3: RuntimeWarning: dividebyzeroencounteredinlog##F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor2D.py:22: RuntimeWarning: dividebyzeroencounteredindouble_scalars# other parties, and makes no guarantees, expressed or implied, about
...
----------------------------------------------------------------------Ran195testsin264.878sOK
Imported from trac ticket #645, created by guyer on 07-03-2013 at 09:52, last modified: 09-30-2013 at 22:27
The text was updated successfully, but these errors were encountered:
As posted to the [http://thread.gmane.org/gmane.comp.python.fipy/3123 mailing list]:
The attached patch was made against the current "develop" branch. The trac issue tracker at matforge would not allow me to register in order to create a ticket for this ("The page you are looking for is temporarily unavailable"), otherwise I would have put a pull request there on a new ticket.
For some reason that I didn't have the time to dig into sufficiently, it turns out that 64-bit python on 64-bit windows still regards "int" as 32-bit, and not, as the other OSs do, 64-bit. This causes numerous problems with error messages about dtype=int64 not matching with dtype=int32. For example (the one that failed tests for me) the numpy function argmin() returns an array of dtype=int64, but if this result is assigned to an array slice that was created with dtype=int, then errors occur on win64 & py64, but not on other x64 OSs.
The attached patch defines a numerix.INT_DTYPE value that is set based on the detected platform. I then changed a handful of dtype=int references in a few other files, to refer to the new definition in numerix.
After making this change, the fipy tests pass (using the scipy solver; pysparse on py+Windows x64 appears to be afflicted by the same issue and I haven't had a chance to look at it yet) although there are some issues with double_scalars() that appear to be unrelated to the int issue:
Imported from trac ticket #645, created by guyer on 07-03-2013 at 09:52, last modified: 09-30-2013 at 22:27
The text was updated successfully, but these errors were encountered: