[petsc-dev] C++ error

Mark Adams mfadams at lbl.gov
Mon Jul 13 19:19:46 CDT 2020


On Mon, Jul 13, 2020 at 7:11 PM Satish Balay <balay at mcs.anl.gov> wrote:

> $ git grep DMPlexLandFormLandau_Internal
> include/petsc/private/dmpleximpl.h:PETSC_INTERN PetscErrorCode
> DMPlexLandFormLandau_Internal(Vec, Mat, const PetscInt, void *);
> src/dm/impls/plex/landau/plexland.c:  DMPlexLandFormLandau_Internal -
> Evaluates Jacobian matrix.
> src/dm/impls/plex/landau/plexland.c:PetscErrorCode
> DMPlexLandFormLandau_Internal(Vec a_X, Mat JacP, const PetscInt dim, void
> *a_ctx)
> src/ts/utils/dmplexts.c:PETSC_INTERN PetscErrorCode
> DMPlexLandFormLandau_Internal(Vec, Mat, const PetscInt, void *);
> src/ts/utils/dmplexts.c:    ierr =
> DMPlexLandFormLandau_Internal(X,ctx->J,dim,(void*)ctx);CHKERRQ(ierr);
> src/ts/utils/dmplexts.c:    ierr =
> DMPlexLandFormLandau_Internal(X,ctx->J,dim,(void*)ctx); CHKERRQ(ierr);
>
>
> You'll need the PETSC_EXTERN in include/petsc/private/dmpleximpl.h  and
> remove the duplicate prototype listing from src/ts/utils/dmplexts.c
>

Thanks, the first error that I got was undefined again:

arch-ci-linux-cuda-single-cxx/obj/ts/utils/dmplexts.o: In function
`DMPlexLandIFunction':
2264 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2264>/home/petsc/builds/KFnbdjNX/0/petsc/petsc/src/ts/utils/dmplexts.c:266:
undefined reference to `DMPlexLandFormLandau_Internal'
2265 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2265>arch-ci-linux-cuda-single-cxx/obj/ts/utils/dmplexts.o:
In function `DMPlexLandIJacobian':
2266 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2266>/home/petsc/builds/KFnbdjNX/0/petsc/petsc/src/ts/utils/dmplexts.c:305:
undefined reference to `DMPlexLandFormLandau_Internal'
2267 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2267>/usr/bin/ld:
arch-ci-linux-cuda-single-cxx/lib/libpetscts.so.3.013.3: hidden symbol
`DMPlexLandFormLandau_Internal' isn't defined
2268 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2268>/usr/bin/ld:
final link failed: Bad value
2269 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2269>collect2:
error: ld returned 1 exit status
2270 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2270>gmakefile:149:
recipe for target 'arch-ci-linux-cuda-single-cxx/lib/libpetscts.so.3.013.3'
failed
2271 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2271>make[3]: ***
[arch-ci-linux-cuda-single-cxx/lib/libpetscts.so.3.013.3] Error 1
2272 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2272>make[3]: ***
Waiting for unfinished jobs....
2273 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2273> FC
arch-ci-linux-cuda-single-cxx/obj/tao/f90-mod/petsctaomod.o
2274 <https://gitlab.com/petsc/petsc/-/jobs/636864970#L2274>/home/petsc/builds/KFnbdjNX/0/petsc/petsc/lib/petsc/conf/rules:49:
recipe for target 'libs' failed


https://gitlab.com/petsc/petsc/-/jobs/636864970


I'll try extern


> Satish
>
>
> > I tried to add code to DMPlexts.c and am getting this error:
> >
> > https://gitlab.com/petsc/petsc/-/jobs/636828148
> >
> > dmplexts.c:(.text+0x1a0f): undefined reference to
> > `DMPlexLandFormLandau_Internal'
> > 1648 <https://gitlab.com/petsc/petsc/-/jobs/636828148#L1648>
> >
> > with this code:
> >
> > PETSC_INTERN PetscErrorCode DMPlexLandFormLandau_Internal(Vec a_X, Mat
> > JacP, const PetscInt dim, void *a_ctx);
> > /*@
> >   DMPlexLandIFunction
> > @*/
> > PetscErrorCode DMPlexLandIFunction(TS ts,PetscReal time_dummy,Vec X,Vec
> > X_t,Vec F,void *actx)
> > {
> > .....
> >     ierr =
> > DMPlexLandFormLandau_Internal(X,ctx->J,dim,(void*)ctx);CHKERRQ(ierr);
> >
> > I tried with EXTERN also. Any ideas?
> > Thanks,
> > Mark
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200713/0949bf8a/attachment-0001.html>


More information about the petsc-dev mailing list