How to use cudaDeviceSetFlags in an OpenACC program?

Hi,

I was curious if/how I could call “cudaDeviceSetFlags” in an OpenACC program (to set the cudaDeviceScheduleBlockingSync, cudaDeviceMapHost, etc. flags for instance).

Thanks.

Hi stw,

Sure, you can do that.

In Fortran, just include “use cudafor” and compile with “-Mcuda”. See: https://www.pgroup.com/resources/docs/19.10/x86/cuda-fortran-prog-guide/index.htm#dm-cudasetdeviceflags

With C/C++, include “cuda_runtime.h” and compile with “-Mcuda”.

Hope this helps,
Mat

Thank you very much.