Running OpenACC for x86 on Optimus laptops


I noticed a strange requirement.

I have a code I have compiled using OpenACC for x86 using ta=multicore.

Since I am running on a laptop (with optimus), when I compile using ta=tesla, I am required to use optirun or primusrun to launch the code in order for the GPU to be activated as expected (I use bumblebee instead of nvidia-prime).

What is not expected is that for some reason, I STILL need to invoke primusrun when launching the code compiled with ta=multicore.

This is not much of an issue, but I was wondering why the x86 openacc code is requiring the nvidia driver to be loaded?

  • Ron

This issue seems to be the case even when I compile without any TA flags and run on 1 core in serial. I still require loading the nvidia driver with optirun or primusrun to run the code. Strange.

Hi Ron,

Sorry, I have no experience with Optimus so don’t know why this would occur. Especially with pure x86 code. Though, maybe your code is calling an OpenACC runtime routine, such as “acc_init”?

  • Mat


I am not using the Openacc API at all.

My guess is that the PGI compiler is linking to the openacc and/or cuda runtime that somehow is getting initialized even with ta=multicore?

  • Ron