[petsc-dev] sm_70

Barry Smith bsmith at petsc.dev
Sun Sep 27 13:20:26 CDT 2020



> On Sep 27, 2020, at 11:55 AM, Zhang, Hong <hongzhang at anl.gov> wrote:
> 
> 
> 
>> On Sep 25, 2020, at 8:09 PM, Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> wrote:
>> 
>> 
>>   Configure by default should find out the available GPU and build for that sm_*  it should not require the user to set this (how the heck is the user going to know what to set?)  If I remember correctly there is a utility available that gives this information. 
>> 
>>   For generic builds like in package distributions I don't know how it should work, ideally all the possibilities would be available in the library and at run time the correct one will be utilized. 
> 
> 
> For package distribution we should add as many possibilities as possible. To have maximum compatibility on CUDA 11, we can add

  Hong

  This is good, I'll add this support. But what about compiling PETSc code that depends on a later feature?  How to have it in the library but not break things when not supported?

 Barry


> 
> -gencode=arch=compute_52,code=sm_52 \ 
> -gencode=arch=compute_60,code=sm_60 \ 
> -gencode=arch=compute_61,code=sm_61 \ 
> -gencode=arch=compute_70,code=sm_70 \ 
> -gencode=arch=compute_75,code=sm_75
> 
> The downside is longer compilation time and fatter binary.
> 
> Hong (Mr.)
> 
> 
> 
>> 
>>   Barry
>> 
>> 
>>> On Sep 25, 2020, at 5:49 PM, Mark Adams <mfadams at lbl.gov <mailto:mfadams at lbl.gov>> wrote:
>>> 
>>>    '--CUDAFLAGS=-arch=sm_70',
>>> 
>>> seems to fix this.
>>> 
>>> On Fri, Sep 25, 2020 at 6:31 PM Mark Adams <mfadams at lbl.gov <mailto:mfadams at lbl.gov>> wrote:
>>> I see kokkos and hyper have a sm_70 flag, but I don't see one for PETSc.
>>> 
>>> It looks like you have to specify this to get modern atomics to work in Cuda. I get:
>>> 
>>> /ccs/home/adams/petsc/include/petscaijdevice.h(99): error: no instance of overloaded function "atomicAdd" matches the argument list
>>>             argument types are: (double *, double)
>>> 
>>> I tried using a Kokkos configuration, thinking I could get these sm_70 flags, but that did not work.
>>> 
>>> Any ideas?
>>> 
>>> Mark
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200927/366e38dd/attachment.html>


More information about the petsc-dev mailing list