Cuda illegal memory access(kokkos) when using multiple GPUs

Since GTX 1080 Ti GPUs are consumer grade GPUs there also is a non-zero chance that after a while the GPUs become somewhat unreliable due to sustained generation of heat. This would be consistent with the observation that multiple GPUs are required. If the error also happens with just 2 GPUs, you could use the CUDA_VISIBLE_DEVICES environment variable to try different combinations to identify whether it happens in general with two GPUs or whether perhaps one of the GPUs is “weaker” than the others. After all, it is not that easy to have proper cooling in a case with those 4 GPUs. In general, the internal heat and clock rate adjustments in the GPU’s BIOS should prevent that overheating happens, but the throttling profiles are often tuned toward having a single GPU and not multiple.

Another point to consider is whether you can apply the GPU package instead of KOKKOS. Specifically for consumer GPUs, it can result in much faster computation, if you are willing to (and your required accuracy is compatible with a) switch to mixed precision computations. Since KOKKOS only uses the double precision floating point units which are significantly reduced in consumer GPUs versus the data center GPUs. Using the GPU package could also help to identify, if there is a reliability issue due to the generated heat or whether there could be a bug in the KOKKOS package (well, it may also trigger bugs in the GPU package, but those more often show up right at the initial kernel launches) and are leaning a bit more toward higher performance than reliability. The gaming market is very competitive and a few bad pixels usually do not create a problem with computer games, while some bad computed data can be a disaster with a computer simulation.

1 Like