[petsc-users] Unable to Install Kokkos and Find Cuda Compiler

Junchao Zhang junchao.zhang at gmail.com
Sun Nov 14 22:19:22 CST 2021


Hi Ted,
  I saw in configure.log,
      --with-cudac=/usr/local/cuda-11.4/bin/nvcc
--with-cuda-dir=/usr/local/cuda
  I suppose /usr/local/cuda is just a symbol link to /usr/local/cuda-11.4/
  I don't know why this error
      /usr/include/c++/11/cmath:45:15: fatal error: math.h: No such file or
directory
  To know whether it was because petsc did not configure Kokkos correctly,
or there was something wrong with your environment,  you can download
Kokkos and install yourself to see if you can succeed.  Make sure
/usr/local/cuda-11.4/bin/nvcc on your $PATH.

  For example, I download kokkos under my $HOME and install to
$HOME/tmp/kokkos

$ cd $HOME
$ git clone https://github.com/kokkos/kokkos.git
$ cd kokkos
$ mkdir build
$ cd build
$ cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/tmp/kokkos
-DCMAKE_CXX_COMPILER=g++ -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_CUDA=ON
-DKokkos_ARCH_VOLTA75=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON
-DCMAKE_CXX_STANDARD=17
$ make -j install

--Junchao Zhang


On Sun, Nov 14, 2021 at 10:15 AM Ted Kord <teddy.kord at gmail.com> wrote:

> Dear all
>
> I am trying to install PETSc with Kokkos and with the CUDA option but I
> keep getting the following error:
>
> "UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
>
> -------------------------------------------------------------------------------
> Could not find a CUDA compiler. Please set with the option --with-cudac or
> -CUDAC and load the config.compilers module.
> "
> 'nvcc' is on my path and works fine.
>
> I have also tried specifying --with-cudac=/usr/local/cuda/bin/nvcc still
> with the same error.
>
> This is my 'configure line:'
>
> ./configure --download-openmpi --download-kokkos-kernels
> --download-kokkos-kernels-shared=1 --download-kokkos --with-cuda=1
> --with-cudac=/usr/local/cuda/bin/nvcc --with-cuda-dir=/usr/local/cuda
> --download-viennacl --download-fblaslapack --download-adios-shared=1
> --download-hdf5 --download-hdf5-shared-libraries=1 --download-adolc
> --download-colpack --download-hypre --download-hypre-shared=1
> --download-codipack --download-metis --download-slepc --download-libceed
> --download-eigen --download-parmetis --download-ptscotch --download-mumps
> --download-scalapack --download-hwloc --download-pastix
> --download-random123 --download-suitesparse --download-superlu
> --download-superlu-shared=1 --download-superlu_dist
> --download-superlu_dist-shared=1 --download-trilinos
> --download-trilinos-shared=1 --download-ml --download-ml-shared=1
> --download-fftw --download-fftw-shared=1 --download-gsl --download-magma
> --download-radau5 --download-sundials2 --download-tchem
>
>
> --
> Best regards,
>
> Theodore
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211114/e84b2a28/attachment.html>


More information about the petsc-users mailing list