June Co. juneco at
Fri Mar 21 12:58:58 CET 2008

Hi, Mitesh.

On 2008/03/20, at 22:33, Mitesh Gupta wrote:
> HI,
> Kindly help me in how can i send mpf_t over MPI Send and also how  
> to receive it.

The struct of GMP''s mpf_t is constructed to be separated mantissa  
and other parts (exponent, sign and precision). So, it is necessary  
to pack them before you'll use mpi_send.

I wish that such "packing" functions are officially supported in GMP  
and MPFR.

There are two ways I've already known.

1.  convert mpf_t's bits to text string by using mpf_get_str function.

2. use memcpy to pack like "pack_mpf" function in my BNCpack -> .

Sample source is If you  
want to use pure gmp without mpfr, you delete lines of "#define  
USE_MPFR" and "#include "mpfr.h" and then compile it.

I hope you'll success to mpi_send with gmp.

More information about the gmp-discuss mailing list