<div dir="ltr">I am pretty sure I've removed stray includes (this did fix one undefined reference), but I am not fixing DMPlexSNESComputeJacobianFEM.<div><br><div><div>DMPlexSNESComputeJacobianFEM is not called from any other source. Just examples. And it is NOT called from the examples that fail:<br></div><div></div><div><div><br></div><div>/home/petsc/builds/KFnbdjNX/0/petsc/petsc/arch-ci-linux-cuda-single-cxx/lib/libpetscdm.so: undefined reference to `DMPlexSNESComputeJacobianFEM'<br>collect2: error: ld returned 1 exit status<br>make[2]: *** [arch-ci-linux-cuda-single-cxx/tests/mat/tests/ex240] Error 1<br></div><div><font color="#ffffff" face="Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace"><span style="white-space:pre-wrap"><br></span></font><div><a href="https://gitlab.com/petsc/petsc/-/jobs/637821856" target="_blank">https://gitlab.com/petsc/petsc/-/jobs/637821856</a><span style="color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;white-space:pre-wrap;background-color:rgb(17,17,17)"><br></span></div><div><a href="https://gitlab.com/petsc/petsc/-/jobs/637821886" target="_blank">https://gitlab.com/petsc/petsc/-/jobs/637821886</a></div><div><a href="https://gitlab.com/petsc/petsc/-/jobs/637821944" target="_blank">https://gitlab.com/petsc/petsc/-/jobs/637821944</a><span style="color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;white-space:pre-wrap;background-color:rgb(17,17,17)"><br></span></div><div><br></div><div></div></div><div>This seems to be saying that libpetscdm can not find my reference to DMPlexSNESComputeJacobianFEM, called from in the lib.</div><div><br></div><div>Maybe DMPlexSNESComputeJacobianFEM is set to be external but I am now using it internally and it would need to be declared differently?</div><div><span style="color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;white-space:pre-wrap;background-color:rgb(17,17,17)"><br></span></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 13, 2020 at 8:19 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 13, 2020 at 7:11 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">$ git grep DMPlexLandFormLandau_Internal<br>
include/petsc/private/dmpleximpl.h:PETSC_INTERN PetscErrorCode DMPlexLandFormLandau_Internal(Vec, Mat, const PetscInt, void *);<br>
src/dm/impls/plex/landau/plexland.c: DMPlexLandFormLandau_Internal - Evaluates Jacobian matrix.<br>
src/dm/impls/plex/landau/plexland.c:PetscErrorCode DMPlexLandFormLandau_Internal(Vec a_X, Mat JacP, const PetscInt dim, void *a_ctx)<br>
src/ts/utils/dmplexts.c:PETSC_INTERN PetscErrorCode DMPlexLandFormLandau_Internal(Vec, Mat, const PetscInt, void *);<br>
src/ts/utils/dmplexts.c: ierr = DMPlexLandFormLandau_Internal(X,ctx->J,dim,(void*)ctx);CHKERRQ(ierr);<br>
src/ts/utils/dmplexts.c: ierr = DMPlexLandFormLandau_Internal(X,ctx->J,dim,(void*)ctx); CHKERRQ(ierr);<br>
<br>
<br>
You'll need the PETSC_EXTERN in include/petsc/private/dmpleximpl.h and remove the duplicate prototype listing from src/ts/utils/dmplexts.c<br></blockquote><div><br></div><div>Thanks, the first error that I got was undefined again:</div><div><br></div><div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><span style="box-sizing:border-box;white-space:pre-wrap">arch-ci-linux-cuda-single-cxx/obj/ts/utils/dmplexts.o: In function `DMPlexLandIFunction':</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2264" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2264" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2264</a><span style="box-sizing:border-box;white-space:pre-wrap">/home/petsc/builds/KFnbdjNX/0/petsc/petsc/src/ts/utils/dmplexts.c:266: undefined reference to `DMPlexLandFormLandau_Internal'</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2265" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2265" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2265</a><span style="box-sizing:border-box;white-space:pre-wrap">arch-ci-linux-cuda-single-cxx/obj/ts/utils/dmplexts.o: In function `DMPlexLandIJacobian':</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2266" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2266" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2266</a><span style="box-sizing:border-box;white-space:pre-wrap">/home/petsc/builds/KFnbdjNX/0/petsc/petsc/src/ts/utils/dmplexts.c:305: undefined reference to `DMPlexLandFormLandau_Internal'</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2267" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2267" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2267</a><span style="box-sizing:border-box;white-space:pre-wrap">/usr/bin/ld: arch-ci-linux-cuda-single-cxx/lib/libpetscts.so.3.013.3: hidden symbol `DMPlexLandFormLandau_Internal' isn't defined</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2268" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2268" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2268</a><span style="box-sizing:border-box;white-space:pre-wrap">/usr/bin/ld: final link failed: Bad value</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2269" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2269" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2269</a><span style="box-sizing:border-box;white-space:pre-wrap">collect2: error: ld returned 1 exit status</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2270" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2270" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2270</a><span style="box-sizing:border-box;white-space:pre-wrap">gmakefile:149: recipe for target 'arch-ci-linux-cuda-single-cxx/lib/libpetscts.so.3.013.3' failed</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2271" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2271" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2271</a><span style="box-sizing:border-box;white-space:pre-wrap">make[3]: *** [arch-ci-linux-cuda-single-cxx/lib/libpetscts.so.3.013.3] Error 1</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2272" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2272" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2272</a><span style="box-sizing:border-box;white-space:pre-wrap">make[3]: *** Waiting for unfinished jobs....</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2273" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2273" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2273</a><span style="box-sizing:border-box;white-space:pre-wrap"> FC arch-ci-linux-cuda-single-cxx/obj/tao/f90-mod/petsctaomod.o</span></div><div style="box-sizing:border-box;padding:1px 8px 1px 55px;min-height:1.25rem;color:rgb(255,255,255);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;background-color:rgb(17,17,17)"><a id="gmail-m_5227204024351703902gmail-m_1994735987709463712gmail-L2274" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2274" style="box-sizing:border-box;color:rgb(119,119,119);background-color:transparent;font-size:0.875rem;padding:0px 1em 0px 8px;min-width:50px;display:inline-block;text-align:right" target="_blank">2274</a><span style="box-sizing:border-box;white-space:pre-wrap">/home/petsc/builds/KFnbdjNX/0/petsc/petsc/lib/petsc/conf/rules:49: recipe for target 'libs' failed</span></div></div><div><br></div><div><br></div><div><a href="https://gitlab.com/petsc/petsc/-/jobs/636864970" target="_blank">https://gitlab.com/petsc/petsc/-/jobs/636864970</a><br></div><div> </div><div><br></div><div>I'll try extern</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Satish<br>
<br>
<br>
> I tried to add code to DMPlexts.c and am getting this error:<br>
> <br>
> <a href="https://gitlab.com/petsc/petsc/-/jobs/636828148" rel="noreferrer" target="_blank">https://gitlab.com/petsc/petsc/-/jobs/636828148</a><br>
> <br>
> dmplexts.c:(.text+0x1a0f): undefined reference to<br>
> `DMPlexLandFormLandau_Internal'<br>
> 1648 <<a href="https://gitlab.com/petsc/petsc/-/jobs/636828148#L1648" rel="noreferrer" target="_blank">https://gitlab.com/petsc/petsc/-/jobs/636828148#L1648</a>><br>
> <br>
> with this code:<br>
> <br>
> PETSC_INTERN PetscErrorCode DMPlexLandFormLandau_Internal(Vec a_X, Mat<br>
> JacP, const PetscInt dim, void *a_ctx);<br>
> /*@<br>
> DMPlexLandIFunction<br>
> @*/<br>
> PetscErrorCode DMPlexLandIFunction(TS ts,PetscReal time_dummy,Vec X,Vec<br>
> X_t,Vec F,void *actx)<br>
> {<br>
> .....<br>
> ierr =<br>
> DMPlexLandFormLandau_Internal(X,ctx->J,dim,(void*)ctx);CHKERRQ(ierr);<br>
> <br>
> I tried with EXTERN also. Any ideas?<br>
> Thanks,<br>
> Mark<br>
> <br>
<br>
</blockquote></div></div>
</blockquote></div>