Years ago, I ported two basic RNGs to work with multi-threaded applications. "Port" is a strong word: I just encapsulated the global variables in structs and changed the functions to take in structs. Over the years, people have used these and linked to them, so I keep them here.
Don't ask me questions about these. I did not write the original RNG code and I'm no longer interested in supporting anything on this page.
Warning and Disclaimer:I have not extensively tested this parallel implementation--I know that it generates the same values as the original sequences for a few iterations. I have reason to believe they are identical but I do not claim or gaurantee any level of functionality.
I ported the psuedo RNG Mersenne Twister, a.k.a. mt19937 http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html, to work on parallel machines. If you want to use it, download mt19937p.tar which contains mt19937p.c, mt19937p.h, and example-mt.c. To use, simply
#include "mt19937p.h"
struct mt19937p myMT19937p;
sgenrand(seed,&myMT19937p);
randomNumber = genrand(&myMT19937p);
I also ported a Sobol' sequence (a quasi random number generator). To use, download sobolp.tar which contains sobolp.c, sobolp.h, and example-s.c. Then,
#include "sobolp.h"
struct sobolp sp;
double values[2];
sobolp_init(&sp,dimensions,seed);
sobolp_generateSamples(&sp,values);