Question

What is the best way (fast and relatively simple to implement) to send gmp of type mpf_t using MPI (in c)? a simple code will be helpful.

thank you

Was it helpful?

Solution

mpf_t uses several pointers, so you should serialize mpf_t (and other GMP types) before sending via MPI.

There were some letters about MPI in GMP mailing list: https://gmplib.org/list-archives/gmp-discuss/2008-March/003091.html

There is article about MPI wrapper library for GMP (MPIGMP + MPIBNCpack): http://na-inet.jp/na/bnc/brief_intro_mpibncpack.pdf

Also there were solution of mpf_t serialization into file, you can reuse it to serialize into byte array and send it over MPI: How to serialize the GMP mpf type? (explained in https://gmplib.org/list-archives/gmp-discuss/2007-November/002981.html)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top