Petsc + Matlab Compute Engine

Thomas Fabry thomas.fabry at uz.kuleuven.ac.be
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);
CHKERRQ(ierr);

and using this makefile: 

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

include ${PETSC_DIR}/bmake/common/base

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

secondPETScTestm: secondPETScTest.o chkopts
	-${CLINKER} -O -pthread -shared -m32
-Wl,--version-script,/usr/local/matlab14.3/extern/lib/glnx86/mexFunction
.map -o secondPETScTest secondPETScTest.o
-Wl,-rpath-link,/usr/local/matlab14.3/bin/glnx86
-L/usr/local/matlab14.3/bin/glnx86 -lmx -lmex -lmat -lm -lstdc++
${PETSC_KSP_LIB}
	${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