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

Karl Rupp rupp at iue.tuwien.ac.at
Thu Mar 14 02:16:47 CDT 2019

Hi Richard,

the check for the GNU compilers is mostly a historic relic. We haven't 
done any systematic tests with other compilers, so that test has just 
remained in place.

It would certainly be good if you could update the check to also work 
well with the default environment on Summit.

Thanks and best regards,

On 3/13/19 4:40 AM, 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