Hi all

I would like to use the GMP library (GNU Multiple Precision Arithmetic Library) with CUDA. So far I have written a CUDA program which currently uses double precision floating point and a seperate CPU (non CUDA) test program which performs multiple precision GMP floating point calculations. Both programs work well, but so far I have not been able to integrate the GMP library into CUDA.

Does anybody know how to compile/link CUDA with GMP? All code in one single .cu file.

At the moment I am working on XP but I would also be happy with a linux solution.

There is a GMP implementation for CUDA from Tsukuba University.

You can download the software at:

Thanks for the Link but I found it myself some time ago. I have tried to use the library but I have had no success. Unfortunately there is no documentation available. Also this library is based on the GMP so I still have to find out how to compile CUDA with GMP. I would need some kind of step by step instruction for the installation and compiling process.

I have added the gmp.h and libgmp.a to the include and lib folder in my CUDA installation folder. For compiling I use following command:

nvcc --compiler-bindir “C:\Programme\Microsoft Visual Studio 10.0\VC\bin” -arch=sm_21

This works properly as long as I do not use GMP commands. Then I get this error message:

error LNK2019: unresolved external symbol “__gmpf_set_default_prec” referenced in function “_main”