<div dir="ltr"><div>Hi</div><div><br></div><div>I'm trying to build my application code (which includes C and Fortran files) with a Makefile based off $PETSC_DIR/share/petsc/Makefile.basic.user by using the variables and rules defined in ${PETSC_DIR}/lib/petsc/conf/variables. My application uses petsc as well as another library, and hence I have to add some extra include statements pointing at  the other library during compilation. Currently I have been doing:</div><div><br></div><div><div style="color:rgb(204,204,204);background-color:rgb(31,31,31);font-family:"Droid Sans Mono","monospace",monospace;font-weight:normal;font-size:9.6px;line-height:12px;white-space:pre"><div><span style="color:rgb(106,153,85)"># Read in the petsc compile/linking variables and makefile rules</span></div><div><span style="color:rgb(197,134,192)">include</span><span style="color:rgb(204,204,204)"> </span><span style="color:rgb(206,145,120)">${</span><span style="color:rgb(156,220,254)">PETSC_DIR</span><span style="color:rgb(206,145,120)">}</span><span style="color:rgb(204,204,204)">/lib/petsc/conf/variables</span></div><div><span style="color:rgb(197,134,192)">include</span><span style="color:rgb(204,204,204)"> </span><span style="color:rgb(206,145,120)">${</span><span style="color:rgb(156,220,254)">PETSC_DIR</span><span style="color:rgb(206,145,120)">}</span><span style="color:rgb(204,204,204)">/lib/petsc/conf/rules</span></div><div><span style="color:rgb(204,204,204)"><br></span></div><div><div style="color:rgb(204,204,204);background-color:rgb(31,31,31);font-family:"Droid Sans Mono","monospace",monospace;font-weight:normal;font-size:9.6px;line-height:12px;white-space:pre"><div><span style="color:rgb(106,153,85)"># Add the extra include files</span></div><div><span style="color:rgb(156,220,254)">PETSC_FC_INCLUDES</span><span style="color:rgb(204,204,204)"> += </span><span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(206,145,120)"></span><span style="color:rgb(206,145,120)"></span><span style="color:rgb(156,220,254)">INCLUDE_OTHER_LIB</span><span style="color:rgb(206,145,120)">)</span></div><div><span style="color:rgb(156,220,254)">PETSC_CC_INCLUDES</span><span style="color:rgb(204,204,204)"> += </span><span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(206,145,120)"></span><span style="color:rgb(156,220,254)">INCLUDE_OTHER_LIB</span><span style="color:rgb(206,145,120)">)</span></div></div><br></div></div></div><div><br></div><div>which works very well, with the correct include flags from INCLUDE_OTHER_LIBS being added to the compilation of both fortran and C files. </div><div><br></div><div>If however I try and compile a kokkos file, named adv_1dk.kokkos.cxx (by calling "make adv_1dk"), the extra flags are not included. If I instead call "make adv_1dk.kokkos", the rule for cxx files is instead triggered and correctly includes the include flags, but this just calls the c++ wrapper, rather than the nvcc_wrapper and therefore breaks when kokkos has been built with  cuda (or hip, etc).</div><div><br></div><div>Just wondering if there is something I have missed, from what I can tell the kokkos rules don't use the PETSC_CC_INCLUDES during compilation.</div><div><br></div><div>Thanks for all your help</div><div>Steven</div></div>