Petsc + Matlab Compute Engine

Thomas Fabry thomas.fabry at
Tue Dec 18 06:22:17 CST 2007

I have a problem using the Matlab Compute Engine via Petsc.
The line

	ierr = PetscMatlabEngineCreate(PETSC_COM_WORLD,PETSC_NULL,e);

and using this makefile: 

CFLAGS       = -c -I/usr/local/matlab14.3/extern/include
FFLAGS       = -I${PETSC_DIR}/include/finclude

include ${PETSC_DIR}/bmake/common/base

secondPETScTest: secondPETScTest.o
	-${CLINKER} -o secondPETScTest secondPETScTest.o
	${RM} secondPETScTest.o

secondPETScTestm: secondPETScTest.o chkopts
	-${CLINKER} -O -pthread -shared -m32
.map -o secondPETScTest secondPETScTest.o
-L/usr/local/matlab14.3/bin/glnx86 -lmx -lmex -lmat -lm -lstdc++
	${RM} secondPETScTest.o

gives "/PETSc impl/secondPETScTest.c:38: undefined reference to
`PetscMatlabEngineCreate'" when trying make secondPETScTest, and when I
compile with make secondPETScTestm, compilation works, but running the
program gives a segmentation fault.

I hope someone can help me

Kind regards

Thomas Fabry

More information about the petsc-users mailing list