<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:'Times New Roman',Times,serif;" dir="ltr">
<p>Hello!<br>
<br>
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.<br>
<br>
For that I found two examples of using PETSC with kokkos in folder petsc/<span>src/snes/tutorials</span></p>
<p><span><br>
I managed to succesfully compile and run ex3k.kokkos.cxx, but I cannot compile ex55k.kokkos.cxx.<br>
when I do make i got a following error:</span></p>
<p><span><br>
</p>
<div>iskander@apollo:~/software/petsc3_20/src/snes/tutorials$ make ex55k</div>
<div>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</div>
<div>/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':</div>
<div>(.text+0x1b): undefined reference to `main'</div>
<div>collect2: error: ld returned 1 exit status</div>
<div>make: *** [/local/home/iskander/software/petsc3_20/lib/petsc/conf/rules:218: ex55k] Error 1</div>
<p><span><br>
</span></p>
please let me know on how I can resolve a given error.<br>
<br>
I also would be happy if you know more resources and examples on implementation of PETSc with kokkos.</span>
<p></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><span>Have a nice day!<br>
<br>
</span></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p></p>
<p style="margin:0cm; margin-bottom:.0001pt; background:white"><span lang="EN-US" style="font-family:"Arial Narrow",sans-serif; color:black">Regards,</span></p>
<p style="margin:0cm; margin-bottom:.0001pt; background:white; orphans:2; text-align:start; widows:2; word-spacing:0px">
<span lang="EN-US" style="font-family:"Arial Narrow",sans-serif; color:black">Ibragimov Iskander, PhD student of</span></p>
<p style="margin:0cm; margin-bottom:.0001pt; background:white"><span lang="EN-US" style="font-size:11.5pt; font-family:"Arial Narrow",sans-serif; color:#212121">Johannes Gutenberg-Universität Mainz<br>
Institute of Geosciences<br>
J.-J.-Becher-Weg 21<br>
D-55128 Mainz<br>
Room: 03-264</span><span lang="EN-US" style="font-family:"Arial Narrow",sans-serif; color:black"></span></p>
<p><span style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px"></span><br>
</p>
</div>
</div>
</div>
</body>
</html>