Presentation of the computational code
This code is used to numerically validate the order of convergence of some asymptotic preserving schemes for stochastic ODEs. The error used to compute the order of convergence is the result of a Monte-Carlo method. In order to get meaningfull results, a huge number of Monte-Carlo iterations (number of ODE solved) is mandatory. The CUDA code uses cuRAND to generate random values. The code allocates as many random number generators as possible depending on the total amount of memory available on the GPU.
Each CUDA kernel is called with as many threads as there are random number generators and during this call, each thread solves one Stochastic ODE. Thus, the iterations of the Monte-Carlo method are divided in as many batches as necessarily to fit in a kernel call.
Additional information
- The code is available here.