biginteger library compatible with mpi (message pa

2019-08-30 16:53发布

问题:

I'm searching for a BigInteger library that is compatible with the usual suspects of the Message Passing Interface standard, such as MPI::COMM_WORLD.Send and MPI::COMM_WORLD.Recv.

Unfortunately MPI also stands for multi precision integer, so most search results actually do not match. Several attempts to search this with google using similar queries did not reveal any implementation, but surely someone already did that. So basically the question is: does anyone know an implementation of mpi compatible with MPI?

回答1:

in theory ANY big integer library would be compatible but with some caveats.

The big integer library would not be one of MPI's standard data types, MPI_INT MPI_DOUBLE exc exc...

One approach is to serialize your biginteger into bytes, send/recv it as MPI_BYTE then convert it back