[petsc-users] ex5k.kokkos compile error

Mark Adams mfadams at lbl.gov
Thu Jun 3 08:30:42 CDT 2021


I am getting this error:

09:22 adams/landau-mass-opt=
/gpfs/alpine/csc314/scratch/adams/petsc/src/mat/tutorials$ make
PETSC_DIR=/gpfs/alpine/csc314/scratch/adams/petsc
PETSC_ARCH=arch-summit-opt-gnu-kokkos-notpl-cuda10 ex5k.kokkos
mpicxx -fPIC -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10
-DPETSC_HAVE_CUDA_ATOMIC -DLANDAU_MAX_Q=4 -O0   -fPIC -g -DLANDAU_DIM=2
-DLANDAU_MAX_SPECIES=10 -DPETSC_HAVE_CUDA_ATOMIC -DLANDAU_MAX_Q=4 -O0
-fPIC    -I/gpfs/alpine/csc314/scratch/adams/petsc/include
-I/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include
-I/sw/summit/cuda/10.1.243/include     ex5k.kokkos.cxx
 -Wl,-rpath,/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/lib
-L/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/lib
-Wl,-rpath,/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/lib
-L/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/lib
-L/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-6.4.0/netlib-lapack-3.8.0-wcabdyqhdi5rooxbkqa6x5d7hxyxwdkm/lib64
-Wl,-rpath,/sw/summit/cuda/10.1.243/lib64 -L/sw/summit/cuda/10.1.243/lib64
-lpetsc -lkokkoskernels -lkokkoscontainers -lkokkoscore -lp4est -lsc -lblas
-llapack -ltriangle -lm -lz -lcudart -lcufft -lcublas -lcusparse -lcusolver
-lcurand -lstdc++ -ldl -o ex5k.kokkos
In file included from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/KokkosCore_Config_SetupBackend.hpp:47:0,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/Kokkos_Macros.hpp:109,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/Kokkos_Core_fwd.hpp:52,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/Kokkos_Core.hpp:51,
                 from ex5k.kokkos.cxx:10:
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/setup/Kokkos_Setup_Cuda.hpp:54:2:
error: #error "KOKKOS_ENABLE_CUDA defined but the compiler is not defining
the __CUDACC__ macro as expected"
 #error \
  ^~~~~
In file included from
/sw/summit/cuda/10.1.243/include/crt/common_functions.h:267:0,
                 from /sw/summit/cuda/10.1.243/include/cuda_runtime.h:115,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/setup/Kokkos_Setup_Cuda.hpp:68,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/KokkosCore_Config_SetupBackend.hpp:47,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/Kokkos_Macros.hpp:109,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/Kokkos_Core_fwd.hpp:52,
                 from
/gpfs/alpine/csc314/scratch/adams/petsc/arch-summit-opt-gnu-kokkos-notpl-cuda10/include/Kokkos_Core.hpp:51,
                 from ex5k.kokkos.cxx:10:
/sw/summit/cuda/10.1.243/include/crt/math_functions.h:8944:72: error: 'int
std::isnan(double)' conflicts with a previous declaration
 __DEVICE_FUNCTIONS_DECL__ __cudart_builtin__ int isnan(double x) throw();
                                                                        ^
Here is my config file:

#!/usr/bin/env python
#  -lnvToolsExt

if __name__ == '__main__':
  import sys
  import os
  sys.path.insert(0, os.path.abspath('config'))
  import configure
  configure_options = [
    '--with-fc=0',
    '--CFLAGS=-fPIC -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10
-DPETSC_HAVE_CUDA_ATOMIC -DLANDAU_MAX_Q=4',
    '--CXXFLAGS=-fPIC -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10
-DPETSC_HAVE_CUDA_ATOMIC -DLANDAU_MAX_Q=4',
    '--COPTFLAGS=-O0',
    '--CXXOPTFLAGS=-O0',
    '--CUDAOPTFLAGS=-O0',
#    'LIBS= -L'+os.environ['CUDAPATH']+'/lib64 -lnvToolsExt',
    '--CUDAFLAGS=-Xcompiler -rdynamic -lineinfo -DLANDAU_DIM=2
-DLANDAU_MAX_SPECIES=10 -DPETSC_HAVE_CUDA_ATOMIC -DLANDAU_MAX_Q=4',
    '--with-ssl=0',
    '--with-batch=0',
    '--with-cxx=mpicxx',
    '--with-mpiexec=jsrun -g1 ',
    '--with-openmp=0',
#    '--with-threadsafety=1',
#    '--with-log=0',
    '--with-cuda=1',
    '--with-cuda-gencodearch=70',
    '--with-cudac=nvcc',
    '--download-p4est=1',
    '--download-zlib',
#    '--download-hdf5=1',
#    '--download-metis',
#    '--download-superlu_dist',
#    '--download-superlu_dist-commit=HEAD',
#    '--download-hypre-configure-arguments=HYPRE_CUDA_SM=70',
    #'--with-hwloc=0',
#    '--download-parmetis',
    #'--download-hypre',
    '--download-triangle',
    #'--download-amgx',
    #'--download-fblaslapack',
    '--with-blaslapack-lib=-L' + os.environ['OLCF_NETLIB_LAPACK_ROOT'] +
'/lib64 -lblas -llapack',
    #'--download-openblas',
    '--with-cc=mpicc',
    #'--with-fc=mpif90',
    '--with-shared-libraries=1',
    #  '--known-mpi-shared-libraries=1',
    '--with-x=0',
    '--with-64-bit-indices=0',
    '--with-debugging=1',
    '--download-kokkos',
    '--with-ctable=0',
    '--with-make-np=8',
    '--download-kokkos-kernels',
#    '--with-kokkos-cuda-arch=VOLTA70',
    '--with-kokkos-kernels-tpl=0',

'--download-kokkos-cmake-arguments=-DKokkos_ENABLE_AGGRESSIVE_VECTORIZATION=ON
-DKokkos_ARCH_POWER9=ON',
#    '--download-kokkos-commit=origin/develop',
#    '--download-kokkos-kernels-commit=origin/develop',
    'PETSC_ARCH=arch-summit-opt-gnu-kokkos-notpl-cuda10',
  ]
  configure.petsc_configure(configure_options)

~
~
~
~
~
~
~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210603/e2c07e24/attachment-0001.html>


More information about the petsc-users mailing list