<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hei,</p>
    <p>I tried to combine CUDA with superlu_dist in petsc using the
      following configure-line:</p>
    <p><i>./configure PETSC_ARCH=mpich-complex-linux-gcc-demo
        --CC=/opt/intel/oneapi/mpi/2021.5.0/bin/mpicc
        --CXX=/opt/intel/oneapi/mpi/2021.5.0/bin/mpicxx
        --FC=/opt/intel/oneapi/mpi/2021.5.0/bin/mpifc --CFLAGS="-mavx2
        -march=native -O3" --CXXFLAGS="-mavx2 -march=native -O3"
        --FFLAGS="-mavx2 -march=native -O3"
        --CUDAFLAGS=-allow-unsupported-compiler --CUDA-CXX=g++
        --prefix=/opt/petsc --with-blaslapack=1 --with-mpi=1
        --with-scalar-type=complex --download-suitesparse=1 --with-cuda
        --with-debugging=0 --with-openmp --download-superlu_dist --force</i></p>
    <p>but the configure-step fails with several errors correlated with
      CUDA and superlu_dist, the first one being</p>
    <p><i>cublas_utils.c:21:37: error: ‘CUDART_VERSION’ undeclared
        (first use in this function); did you mean ‘CUDA_VERSION’?</i><i><br>
      </i><i>   21 |     printf("CUDA version:   v
        %d\n",CUDART_VERSION);</i><i><br>
      </i><i>      |                                     ^~~~~~~~~~~~~~</i><i><br>
      </i><i>      |                                     CUDA_VERSION</i></p>
    <p>Compiling superlu_dist separately works, though (including CUDA).</p>
    <p>Is there a bug somewhere in the configure-routine? I attached the
      full configure-log.<br>
    </p>
    <p>Thanks!</p>
    <p>Regards,</p>
    <p>Roland<br>
    </p>
  </body>
</html>