| View previous topic :: View next topic |
| Author |
Message |
TheMatt
Joined: 06 Jul 2009 Posts: 263 Location: Greenbelt, MD
|
Posted: Mon Apr 05, 2010 5:54 am Post subject: |
|
|
| mkcolg wrote: | | Quote: | | Looks like this is still the case at times. | Nothing's changed here. Though we did add an external utility "pgcudainit" which holds the device open and eliminates the initialization cost. |
Hmm. I might have encountered something with this. I found that I have to call cudaThreadExit() before setting a device sometimes. If I don't, it says there is a context already running or something. Maybe due to the "pre-initialization" routine? |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Mon Apr 05, 2010 1:14 pm Post subject: |
|
|
Hi Matt,
"acc_init" is for the PGI Accelerator model while cudaThreadExit if for CUDA Fortran so I'm not sure how mixing the two effects things. We starting work on allowing the two models to be mixed so please feel free to send me an example of the behavior you're seeing.
Thanks,
Mat |
|
| Back to top |
|
 |
TheMatt
Joined: 06 Jul 2009 Posts: 263 Location: Greenbelt, MD
|
Posted: Tue Apr 06, 2010 10:16 am Post subject: |
|
|
| mkcolg wrote: | Hi Matt,
"acc_init" is for the PGI Accelerator model while cudaThreadExit if for CUDA Fortran so I'm not sure how mixing the two effects things. We starting work on allowing the two models to be mixed so please feel free to send me an example of the behavior you're seeing. |
Oh, no, I'm not mixing them. I was reacting to your comment about "...holds the device open and eliminates the initialization cost". I wondered if I was seeing something like that when I had to cudaThreadExit() before cudaSetDevice'ing. That is, some initialization routine higher than my code had established a context upon, say, "use cudafor" that I had to exit before setting the device. |
|
| Back to top |
|
 |
|