<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">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 class="gmail-js-line gmail-log-line" 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 class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2264" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2264" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2264</a><span class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2265" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2265" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2265</a><span class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2266" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2266" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2266</a><span class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2267" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2267" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2267</a><span class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2268" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2268" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2268</a><span class="gmail-ws-pre-wrap" style="box-sizing:border-box;white-space:pre-wrap">/usr/bin/ld: final link failed: Bad value</span></div><div class="gmail-js-line gmail-log-line" 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-L2269" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2269" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2269</a><span class="gmail-ws-pre-wrap" style="box-sizing:border-box;white-space:pre-wrap">collect2: error: ld returned 1 exit status</span></div><div class="gmail-js-line gmail-log-line" 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-L2270" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2270" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2270</a><span class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2271" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2271" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2271</a><span class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2272" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2272" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2272</a><span class="gmail-ws-pre-wrap" style="box-sizing:border-box;white-space:pre-wrap">make[3]: *** Waiting for unfinished jobs....</span></div><div class="gmail-js-line gmail-log-line" 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-L2273" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2273" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2273</a><span class="gmail-ws-pre-wrap" 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 class="gmail-js-line gmail-log-line" 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-L2274" href="https://gitlab.com/petsc/petsc/-/jobs/636864970#L2274" class="gmail-gl-link gmail-d-inline-block gmail-text-right gmail-line-number gmail-flex-shrink-0" 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">2274</a><span class="gmail-ws-pre-wrap" 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">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>