Multiple Shared objects compiled using OpenACC/PGI

I have two accelerated programs that are in two shared objects that I load at the same time. I can run the first program without problems, but then, when I want to run the second I get a cuModuleGetFunction() 500 Error: Not Found.

is there some issue with running two PGI accelerated programs at the same time? Is there some way to ensure that one of them is cleaned up before running the other?

I found a solution to this mentioned in some other locations on this forum, but it was hard to find. There is a bug out on this, but the workaround appears to be to use -ta:tesla:nordc .