If someone wants to help, we need test cases for the cuda mpz functions to be sure that the cuda mpz library works (it's not mine). Also debugging this with gdb (the one from nvidia that can step through gpu execution) would be insightful, to see at which code line it crashes.
Thanks for sharing your code I am also using your base and coding in vs2010 for windows. I will have a git later but I'm on a different approach with a stand alone miner. Not integrated to primecoind. I will keep u posted. Main thing that different is I don't use gmp rather I am staying with bignums for now