[petsc-users] cudaSetDevice
Harshad Sahasrabudhe
hsahasra at purdue.edu
Tue Jan 14 12:03:01 CST 2014
Hi Karli,
Lazy initialization mechanism looks good. But the problem is that the
initialize will still happen twice if we create Vec in both our Petsc
instances.
Can we have an option for Petsc in which we can specify whether
cudaSetDevice should be run by Petsc or not?
Thanks,
Harshad
On Jan 14, 2014 12:35 PM, "Karl Rupp" <rupp at mcs.anl.gov> wrote:
> Hi Harshad,
>
> > Sometime back we talked about an interface which could handle other
>
>> libraries calling cudaSetDevice simultaneously with PETSc. For example,
>> in our case 2 different instances of PETSc calling cudaSetDevice.
>>
>> >Sure, but how will we actually share the device between libraries? What
>> >if the other library was not PETSc, but something else, and they also
>> >called cudaSetDevice, but with a different default mapping strategy?
>>
>> >We need an interface that handles this case.
>>
>> Do we already have any solution for this? If not, can we start looking
>> at this case?
>>
>
> I offered to provide a lazy initialization mechanism in order to be able
> to deal with such cases - this is still on my todo-list. Due to other
> obligations I couldn't find the time to implement this yet, but finally
> things are getting better so that I can provide the changes soon.
>
> Best regards,
> Karli
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140114/63046146/attachment.html>
More information about the petsc-users
mailing list