[petsc-users] Error linking with DMSETFUNCTION and DMSETJACOBIAN

TAY wee-beng zonexo at gmail.com
Tue Nov 12 02:31:10 CST 2013


Hi,

I am running PETSc 3.4 on windows 7 VS2008, using Intel Fortran.

When I tried to build my code, during linking, it gives the error:

1>PETSc_solvers.obj : error LNK2019: unresolved external symbol 
*DMSETFUNCTION* referenced in function 
PETSC_SOLVERS_mp_P_MATRIX_SOLV_PETSC_MULTIGRID
1>PETSc_solvers.obj : error LNK2019: unresolved external symbol 
*DMSETJACOBIAN* referenced in function 
PETSC_SOLVERS_mp_P_MATRIX_SOLV_PETSC_MULTIGRID

My subroutine is :

#include "finclude/petsc.h90"

PetscErrorCode   ierr

...

call DMSetFunction(da,ComputeRHS,ierr)

...

call DMSetJacobian(da,ComputeMatrix,ierr)

...

I also tried to use

#include <finclude/petscsys.h>
#include <finclude/petscvec.h>
#include <finclude/petscmat.h>
#include <finclude/petscpc.h>
#include <finclude/petscksp.h>
#include <finclude/petscdmda.h>
#include <finclude/petscdmda.h90>
#include <finclude/petscdm.h>

instead of

#include "finclude/petsc.h90"

but it still can't work. I remember it used to work, maybe when I'm 
using petsc-dev.

Please help. Thank you!

-- 
Yours sincerely,

TAY wee-beng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131112/b2e4a062/attachment.html>


More information about the petsc-users mailing list