Re: [AMBER] random number generator in pmemd.CUDA ?

From: Jason Swails <jason.swails.gmail.com>
Date: Thu, 13 Sep 2012 07:27:13 -0400

On Thu, Sep 13, 2012 at 4:10 AM, Marek Maly <marek.maly.ujep.cz> wrote:

> Hello all,
>
> I would like to know in which pmemd.CUDA source file one can find
> implementation of the random generator.
>

There are 2 random generators. The Marsaglia generator used by the CPU
version (and implemented on GPUs), and the actual CUDA random number
generator included as part of the CUDA API/language (curand):
http://developer.nvidia.com/cuda/curand

For learning CUDA, I would suggest leveraging the capabilities of curand
(on the website) rather than implementing your own (which is only done for
testing purposes in pmemd.cuda). The relevant file in pmemd.cuda is rather
cleverly named kRandom.h (in src/pmemd/src/cuda/) ;).

HTH,
Jason

--
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Sep 13 2012 - 04:30:03 PDT
Custom Search