Petsc + Matlab Compute Engine
Matthew Knepley
knepley at gmail.com
Tue Dec 18 08:02:53 CST 2007
If you want to use the Matlab engine, you must configure PETSc to use
Matlab, --with-matlab-dir=<Matlab directory> --with-matlab-engine.
Thanks,
Matt
On Dec 18, 2007 6:22 AM, Thomas Fabry <thomas.fabry at uz.kuleuven.ac.be> wrote:
> 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
>
>
>
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener
More information about the petsc-users
mailing list