I have a Pollard Rho code in GMP for Elliptic Curve Discrete logarithmic problem (ECDLP) which I wanted to parallelize using MPI. Kindly guide me whether it is possible to use both libraries simultaneous in the same C code OR do I have to convert my entire code into MPI syntax.
Asked
Active
Viewed 237 times
0
-
@Dario: This doesn't seem like a request for code to me. – Richard Jan 25 '17 at 18:01
-
Well, you have more experience. My impression was that the OP was asking for code using both libraries. But now I see that perhaps what was asked for was some _generic example_ code somebody might already have written, not specific code for this problem. I deleted my previous comment. I am sorry for the misunderstanding. – Dario Jan 25 '17 at 18:14
1 Answers
3
GMP is a multi-precision arithmetic library.
MPI's a library and set of tools that enables you to run your code in different processes (though some versions of MPI used threads, this is not common).
Since processes do not share memory, anything you're doing with GMP in one process will not affect another.
Your only worry is that GMP is doing some kind of internal multithreading to speed things up (I don't think it does). If so, allocate fewer processes in MPI than you otherwise might or disable GMP's multithreading.

Richard
- 56,349
- 34
- 180
- 251