[petsc-dev] Is there a good reason that BuildSystem's cuda.py requires GNU compilers?

Balay, Satish balay at mcs.anl.gov
Tue Mar 12 22:49:18 CDT 2019


1. You might want to check 'Feature-request: Must use GNU compilers
with CUDA' thread on petsc-maint.

2. what does nvcc use internally on summit?

3. On linux - nvcc defaults to using g++ internally (as far as I know)
- so we added that check. But you might want to remove that check - if
things work on summit

4. -ccbin is a wierd option - which I don't undersstand. 

--compiler-bindir <path>                   (-ccbin)                        
        Specify the directory in which the host compiler executable resides.  The
        host compiler executable name can be also specified to ensure that the correct
        host compiler is selected.  In addition, driver prefix options ('--input-drive-prefix',
        '--dependency-drive-prefix', or '--drive-prefix') may need to be specified,
        if nvcc is executed in a Cygwin shell or a MinGW shell on Windows.

i.e you specify a PATH. But what binary does it pick up from that
PATH? The way I understood is - it looks for an alternate 'g++' in the
specified path. [well - again this is based on the usual linux
installs of cuda]

Satish


On Wed, 13 Mar 2019, Mills, Richard Tran via petsc-dev wrote:

> Fellow PETSc developers,
> 
> If I try to configure PETSc with CUDA support on the ORNL Summit system using non-GNU compilers, I run into an error due to the following code in packages/cuda.py:
> 
>   def configureTypes(self):
>     import config.setCompilers
>     if not config.setCompilers.Configure.isGNU(self.setCompilers.CC, self.log):
>       raise RuntimeError('Must use GNU compilers with CUDA')
>   ...
> 
> Is this just because this code predates support for other host compilers with nvcc, or is there perhaps some more subtle reason that I, with my inexperience using CUDA, don't know about? I'm guessing that I just need to add support for using '-ccbin' appropriately to set the location of the non-GNU host compiler, but maybe there is something that I'm missing. I poked around in the petsc-dev mailing list archives and can find a few old threads on using non-GNU compilers, but I'm not sure what conclusions were reached.
> 
> Best regards,
> Richard
> 
> 
> 



More information about the petsc-dev mailing list