Hello!

I want to start porting part of our PETSc-based code to GPU through kokkos and 
I want to start with excercises given in tutorials folder.

For that I found two examples of using PETSC with kokkos in folder 
petsc/src/snes/tutorials

I managed to succesfully compile and run ex3k.kokkos.cxx, but I cannot compile 
ex55k.kokkos.cxx.
when I do make i got a following error:


iskander@apollo:~/software/petsc3_20/src/snes/tutorials$ make ex55k
PATH=`dirname 
nvcc`:/local/home/iskander/software/petsc3_20/petsc-3.20-deb/bin:/usr/local/cuda-12.2/bin:/local/home/iskander/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/bin/remote-cli:/local/home/iskander/.local/bin:/local/home/iskander/software/petsc3_20/petsc-3.20-deb/bin:/usr/local/cuda-12.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/paraview/v5.10.0/bin
 
NVCC_WRAPPER_DEFAULT_COMPILER="/local/home/iskander/software/petsc3_20/petsc-3.20-deb/bin"/mpicxx
 /local/home/iskander/software/petsc3_20/petsc-3.20-deb/bin/nvcc_wrapper 
--expt-extended-lambda -ccbin 
/local/home/iskander/software/petsc3_20/petsc-3.20-deb/bin/mpicxx -std=c++17 
-Xcompiler -fPIC -Xcompiler -fvisibility=hidden -g -lineinfo -gencode 
arch=compute_80,code=sm_80  
-I/local/home/iskander/software/petsc3_20/petsc-3.20-deb/include  
-I/local/home/iskander/software/petsc3_20/include 
-I/local/home/iskander/software/petsc3_20/arch-linux-c-debug/include 
-I/local/home/iskander/software/petsc3_20/petsc-3.20-deb/include 
-I/usr/local/cuda-12.2/include    -Wall -Wwrite-strings -Wno-strict-aliasing 
-Wno-unknown-pragmas -Wno-lto-type-mismatch -Wno-psabi -fstack-protector 
-fvisibility=hidden -march=znver2    
-L/local/home/iskander/software/petsc3_20/petsc-3.20-deb/lib -Wl,-rpath 
-Wl,/local/home/iskander/software/petsc3_20/petsc-3.20-deb/lib 
-Wl,--enable-new-dtags  -lmpi   ex55k.kokkos.cxx  
-Wl,-rpath,/local/home/iskander/software/petsc3_20/arch-linux-c-debug/lib 
-L/local/home/iskander/software/petsc3_20/arch-linux-c-debug/lib 
-Wl,-rpath,/local/home/iskander/software/petsc3_20/petsc-3.20-deb/lib 
-L/local/home/iskander/software/petsc3_20/petsc-3.20-deb/lib 
-Wl,-rpath,/opt/amd -L/opt/amd -Wl,-rpath,/usr/local/cuda-12.2/lib64 
-L/usr/local/cuda-12.2/lib64 -L/usr/local/cuda-12.2/lib64/stubs 
-Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11 
-lpetsc -ldmumps -lmumps_common -lpord -lpthread -lscalapack -lsuperlu_dist 
-lkokkoskernels -lkokkoscontainers -lkokkoscore -lkokkossimd -lflame -lblis 
-lptesmumps -lptscotchparmetisv3 -lptscotch -lptscotcherr -lesmumps -lscotch 
-lscotcherr -lparmetis -lmetis -lm -lcudart -lnvToolsExt -lcufft -lcublas 
-lcusparse -lcusolver -lcurand -lcuda -lX11 -lmpi_usempif08 
-lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s 
-lquadmath -lstdc++ -lrt -o ex55k
/usr/bin/ld: 
/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o: in function 
`_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [/local/home/iskander/software/petsc3_20/lib/petsc/conf/rules:218: 
ex55k] Error 1


please let me know on how I can resolve a given error.

I also would be happy if you know more resources and examples on implementation 
of PETSc with kokkos.



Have a nice day!



Regards,

Ibragimov Iskander, PhD student of

Johannes Gutenberg-Universität Mainz
Institute of Geosciences
J.-J.-Becher-Weg 21
D-55128 Mainz
Room: 03-264

Reply via email to