[petsc-users] petsc and matlab

Barry Smith bsmith at mcs.anl.gov
Fri Aug 27 22:02:37 CDT 2010


    sopen is compiled by the PETSc makefiles and then put into the directory bin/matlab/

    Did you ./configure PETSc with the option --with-matlab? If not then you will need to run ./configure again and then make again.

   If you did run ./configure with --with-matlab  then please send configure.log and make.log to petsc-maint at mcs.anl.gov  and we'll determine the problem.


   Barry



On Aug 27, 2010, at 7:28 PM, Benjamin Sanderse wrote:

> Hello all,
> 
> I am trying to let Matlab communicate to Petsc and vice versa. I have compiled petsc-3.1 successfully and have looked at example ex41.m in /src/ksp/ksp/examples/tutorials/ex41.m. After compiling ex41.c I tried to run ex41.m, e.g. by typing ex41(1) in Matlab. Then I get the following error:
> 
> ??? Undefined function or variable 'sopen'
> Error in ==> PetscOpenSocket.PetscOpenSocket at 10
> S = struct('fd',sopen());
> 
> Error in ==> ex41 at 10
> p = PetscOpenSocket;
> 
> 
> It seems that sopen() is not recognized. I have googled a bit around and checked this mailing list, but I could not find out where sopen() should be located. Does anyone have suggestions? Or am I doing something completely wrong?
> 
> Thanks,
> 
> Benjamin



More information about the petsc-users mailing list