I’m using CUDA 7.5 on Ubuntu 14.04, and I find when I do cudaMallocHost(), sometimes it will fail (with error code 30, “unknown error”) even though the system still has enough memory (actually way beyond enough, just hundreds of MB allocated out of 100 GB available memory).
Since the problem does not happen all the time, I did a workaround that I added a while loop outside cudaMallocHost() to retry after failure. With those retries, my problem was solved.
However, I’m still a little bit worried about that. Should this be happening at all? Is it appropriate to retry cudaMallocHost()?