Example Usage of cuRAND

Dear all,

I would like to kindly request if it possible to be presented with a simple example of how to invoke/call the curand_uniform() function through the nvfortran compiler relatively to the assignment of rand() function of the GNU fortran compiler since I want to recompile a legacy code. I am merely looking for the equivalent usage of:
random_number=rand(seed).

Thank you in advance and happy new year to all!

Documentation on the cuRAND Fortran interface module can be found at: https://docs.nvidia.com/hpc-sdk/compilers/fortran-cuda-interfaces/index.html#cfrand-runtime

And example code for using cuRAND with CUDA Fortran, OpenACC, and OpenMP can be found with the compilers under the the “<base_install>///examples/CUDA-Libraries” directory. The exact path will vary based on where you installed the compilers, which architecture you have, and the compiler release version.

I’m not sure we have an example for exactly what you’re looking for, but hopefully you’ll be able to adapt them to your needs.

-Mat