ANN: hmpfr-0.3.2 (requires integer-simple, supports mpfr 3.0.0)
Dear all, I am pleased to announce hmpfr-0.3.2, a new version of Aleš Bizjak's bindings to the MPFR arbitrary precision floating point arithmetic library. The changes in this version are quite small but significant: - support for MPFR 3.0.0 as well as MPFR 2.4.* - dependency on integer-simple instead of integer-gmp The latter is most significant because unfortunately it makes it rather more difficult to install hmpfr. Currently almost all binary distributions of ghc have integer-gmp compiled in to provide the Integer type via the standard GMP library. Also haskell platform 2010.2.0.0 assumes that ghc has been compiled with integer-gmp although it makes no specific use of it. Instructions on how to compile ghc and haskell platform with integer-simple instead of integer-gmp are on: http://code.google.com/p/hmpfr/wiki/GHCWithoutGMP The rationale for this change is the fact that despite much effort hmpfr is very unreliable on ghc that includes integer-gmp due to ghc deallocating GMP data that was allocated by MPFR at unpredictable times. Aleš and I hope that hmpfr can return to using integer-gmp once the proposal http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinRepla... to replace gmp with a modified gmp in ghc is implemented and made the default. Best regards, Michal -- |o| Michal Konecny <mikkonecny@gmail.com> |o| http://www-users.aston.ac.uk/~konecnym/ |o| office: (+42) (0)121 204 3462 |o| PGP key http://www-users.aston.ac.uk/~konecnym/ki.aston
Woohoo! I tried to fix up the hmpfr bindings myself before the integer-simple/integer-gmp split was done, but it was impossible given the way GHC hooks into the gmp allocator. The main issue appears to be the fact that as mpfr has matured it has come to do more internal allocation to handle corner cases that it was handling incorrectly, and as these are not on slabs of memory you explicitly allocated, the GMP allocation hook causes them to vanish willy nilly. I'm glad I can finally pick up some of my interval arithmetic/taylor model code again. =) I have a half-dozen or so packages that were blocked by this. -Edward Kmett 2011/3/3 Michal Konečný <mik@konecny.aow.cz>
Dear all,
I am pleased to announce hmpfr-0.3.2, a new version of Aleš Bizjak's bindings to the MPFR arbitrary precision floating point arithmetic library. The changes in this version are quite small but significant:
- support for MPFR 3.0.0 as well as MPFR 2.4.* - dependency on integer-simple instead of integer-gmp
The latter is most significant because unfortunately it makes it rather more difficult to install hmpfr. Currently almost all binary distributions of ghc have integer-gmp compiled in to provide the Integer type via the standard GMP library. Also haskell platform 2010.2.0.0 assumes that ghc has been compiled with integer-gmp although it makes no specific use of it. Instructions on how to compile ghc and haskell platform with integer-simple instead of integer-gmp are on:
http://code.google.com/p/hmpfr/wiki/GHCWithoutGMP
The rationale for this change is the fact that despite much effort hmpfr is very unreliable on ghc that includes integer-gmp due to ghc deallocating GMP data that was allocated by MPFR at unpredictable times.
Aleš and I hope that hmpfr can return to using integer-gmp once the proposal
http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinRepla...
to replace gmp with a modified gmp in ghc is implemented and made the default.
Best regards, Michal -- |o| Michal Konecny <mikkonecny@gmail.com> |o| http://www-users.aston.ac.uk/~konecnym/ |o| office: (+42) (0)121 204 3462 |o| PGP key http://www-users.aston.ac.uk/~konecnym/ki.aston
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Have you submitted a bug report to GHC of why it can't work with the current integer-gmp binding? I know that GHC's collector is collecting MPFR's temporary data, but maybe it'd be good to get a discussion going on what can be done to stop it from doing this even in the context of the existing integer-gmp + GHC's allocator (even if this needs to be a patch to MPFR to talk to GHC a bit here and there). Might it help to go through CMM like the GMP binding does, for example? I'd really like to see libraries that use GMP work nicely with GHC, without going and reimplementing GMP more slowly and so on. Dan 2011/3/3 Michal Konečný <mik@konecny.aow.cz>
Dear all,
I am pleased to announce hmpfr-0.3.2, a new version of Aleš Bizjak's bindings to the MPFR arbitrary precision floating point arithmetic library. The changes in this version are quite small but significant:
- support for MPFR 3.0.0 as well as MPFR 2.4.* - dependency on integer-simple instead of integer-gmp
The latter is most significant because unfortunately it makes it rather more difficult to install hmpfr. Currently almost all binary distributions of ghc have integer-gmp compiled in to provide the Integer type via the standard GMP library. Also haskell platform 2010.2.0.0 assumes that ghc has been compiled with integer-gmp although it makes no specific use of it. Instructions on how to compile ghc and haskell platform with integer-simple instead of integer-gmp are on:
http://code.google.com/p/hmpfr/wiki/GHCWithoutGMP
The rationale for this change is the fact that despite much effort hmpfr is very unreliable on ghc that includes integer-gmp due to ghc deallocating GMP data that was allocated by MPFR at unpredictable times.
Aleš and I hope that hmpfr can return to using integer-gmp once the proposal
http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinRepla...
to replace gmp with a modified gmp in ghc is implemented and made the default.
Best regards, Michal -- |o| Michal Konecny <mikkonecny@gmail.com> |o| http://www-users.aston.ac.uk/~konecnym/ |o| office: (+42) (0)121 204 3462 |o| PGP key http://www-users.aston.ac.uk/~konecnym/ki.aston
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
According to Duncan Coutts (whom I asked about this issue in #ghc), the solution here is to use the new foreign import prim machinery to talk to MPFR. This prevents GC from occurring during the MPFR calls and will make everything work nicely without reimplementing GMP. Dan On Fri, Mar 4, 2011 at 3:09 PM, Daniel Peebles <pumpkingod@gmail.com> wrote:
Have you submitted a bug report to GHC of why it can't work with the current integer-gmp binding? I know that GHC's collector is collecting MPFR's temporary data, but maybe it'd be good to get a discussion going on what can be done to stop it from doing this even in the context of the existing integer-gmp + GHC's allocator (even if this needs to be a patch to MPFR to talk to GHC a bit here and there). Might it help to go through CMM like the GMP binding does, for example?
I'd really like to see libraries that use GMP work nicely with GHC, without going and reimplementing GMP more slowly and so on.
Dan
2011/3/3 Michal Konečný <mik@konecny.aow.cz>
Dear all,
I am pleased to announce hmpfr-0.3.2, a new version of Aleš Bizjak's bindings to the MPFR arbitrary precision floating point arithmetic library. The changes in this version are quite small but significant:
- support for MPFR 3.0.0 as well as MPFR 2.4.* - dependency on integer-simple instead of integer-gmp
The latter is most significant because unfortunately it makes it rather more difficult to install hmpfr. Currently almost all binary distributions of ghc have integer-gmp compiled in to provide the Integer type via the standard GMP library. Also haskell platform 2010.2.0.0 assumes that ghc has been compiled with integer-gmp although it makes no specific use of it. Instructions on how to compile ghc and haskell platform with integer-simple instead of integer-gmp are on:
http://code.google.com/p/hmpfr/wiki/GHCWithoutGMP
The rationale for this change is the fact that despite much effort hmpfr is very unreliable on ghc that includes integer-gmp due to ghc deallocating GMP data that was allocated by MPFR at unpredictable times.
Aleš and I hope that hmpfr can return to using integer-gmp once the proposal
http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinRepla...
to replace gmp with a modified gmp in ghc is implemented and made the default.
Best regards, Michal -- |o| Michal Konecny <mikkonecny@gmail.com> |o| http://www-users.aston.ac.uk/~konecnym/ |o| office: (+42) (0)121 204 3462 |o| PGP key http://www-users.aston.ac.uk/~konecnym/ki.aston
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
I'd be more than willing to tackle flipping things over to use foreign prims, so that I have something I can build on top without requiring the contortions to get a ghc build with integer-simple. Dan has a cabal buildable library with foreign prims to use as a model. Is the google code repository up to date? -Edward Kmett On Fri, Mar 4, 2011 at 3:27 PM, Daniel Peebles <pumpkingod@gmail.com> wrote:
According to Duncan Coutts (whom I asked about this issue in #ghc), the solution here is to use the new foreign import prim machinery to talk to MPFR. This prevents GC from occurring during the MPFR calls and will make everything work nicely without reimplementing GMP.
Dan
On Fri, Mar 4, 2011 at 3:09 PM, Daniel Peebles <pumpkingod@gmail.com>wrote:
Have you submitted a bug report to GHC of why it can't work with the current integer-gmp binding? I know that GHC's collector is collecting MPFR's temporary data, but maybe it'd be good to get a discussion going on what can be done to stop it from doing this even in the context of the existing integer-gmp + GHC's allocator (even if this needs to be a patch to MPFR to talk to GHC a bit here and there). Might it help to go through CMM like the GMP binding does, for example?
I'd really like to see libraries that use GMP work nicely with GHC, without going and reimplementing GMP more slowly and so on.
Dan
2011/3/3 Michal Konečný <mik@konecny.aow.cz>
Dear all,
I am pleased to announce hmpfr-0.3.2, a new version of Aleš Bizjak's bindings to the MPFR arbitrary precision floating point arithmetic library. The changes in this version are quite small but significant:
- support for MPFR 3.0.0 as well as MPFR 2.4.* - dependency on integer-simple instead of integer-gmp
The latter is most significant because unfortunately it makes it rather more difficult to install hmpfr. Currently almost all binary distributions of ghc have integer-gmp compiled in to provide the Integer type via the standard GMP library. Also haskell platform 2010.2.0.0 assumes that ghc has been compiled with integer-gmp although it makes no specific use of it. Instructions on how to compile ghc and haskell platform with integer-simple instead of integer-gmp are on:
http://code.google.com/p/hmpfr/wiki/GHCWithoutGMP
The rationale for this change is the fact that despite much effort hmpfr is very unreliable on ghc that includes integer-gmp due to ghc deallocating GMP data that was allocated by MPFR at unpredictable times.
Aleš and I hope that hmpfr can return to using integer-gmp once the proposal
http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinRepla...
to replace gmp with a modified gmp in ghc is implemented and made the default.
Best regards, Michal -- |o| Michal Konecny <mikkonecny@gmail.com> |o| http://www-users.aston.ac.uk/~konecnym/ |o| office: (+42) (0)121 204 3462 |o| PGP key http://www-users.aston.ac.uk/~konecnym/ki.aston
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
On Friday 04 Mar 2011 21:06:45 Edward Kmett wrote:
I'd be more than willing to tackle flipping things over to use foreign prims, so that I have something I can build on top without requiring the contortions to get a ghc build with integer-simple.
Dan has a cabal buildable library with foreign prims to use as a model.
Is the google code repository up to date?
Hi Ed, Yes, it is up to date. Moreover, I am not planning to do any development on it in the next few weeks. I would be very happy if you would experiment with the foreign prims in hmpfr. Michal -- |o| Michal Konecny <mikkonecny@gmail.com> |o| http://www-users.aston.ac.uk/~konecnym/ |o| office: (+42) (0)121 204 3462 |o| PGP key http://www-users.aston.ac.uk/~konecnym/ki.aston
participants (3)
-
Daniel Peebles -
Edward Kmett -
Michal Konečný