I’m developing a program in Fortran CUDA and trying to use/access multiple GPUs from a single host thread. The original code (single GPU only) was using global and constant memory and when adding support for multiple GPUs I could not find a way to specify on which device to place Fortran variables with the “constant” attribute.
I have tried this:
integer, constant :: iconst
DO dev = 0, maxdev
ignore = cudaSetDevice(dev)
iconst = 1
and this compiles and runs but trying to access iconst from a kernel launched on the higher numbered devices results in “unspecified launch failure”.
Is there a way to specify the placement of variables in the constant memory on specific device? I looked through the user manual and “CUDA Fortran for Scientists and Engineers” but there is little information on supporting multile-gpus in general.