Re: [petsc-dev] calling petsc from a mex file

2018-05-10 Thread Vaclav Hapla
I confirm the same problem. But I also don't know how to fix this systematically in the buildsystem. I found hard-coded -L options here https://bitbucket.org/petsc/petsc/src/9e21ac129fc054b3abeb584f186c61369f6d442a/config/BuildSystem/config/packages/MatlabEngine.py#lines-39 but I'm in doubts I

Re: [petsc-dev] calling petsc from a mex file

2018-05-09 Thread Munson, Todd
There is some issue with my matlab installation. I also tried it on linux and the simple Petsc initialize and finalize work fine. When I start setting up and using TaoSolve, I get a segmentation violation. I am going to switch to using the PetscMatlabEngine, which is what I should have done

Re: [petsc-dev] calling petsc from a mex file

2018-05-09 Thread Smith, Barry F.
Huh $ matlab -nodisplay < M A T L A B (R) > Copyright 1984-2018 The MathWorks, Inc. R2018a (9.4.0.813654) 64-bit (maci64)

Re: [petsc-dev] calling petsc from a mex file

2018-05-08 Thread Munson, Todd
Its in tmunson/tao-pounders-matlab-interface Most of the code is commented out or otherwise inactive. There is a hacked command in src/tao/leastsquares/examples/matlab that I use to compile the mex file. To test, you should be able to start matlab and say "taopounders(); exit". Todd. > On

Re: [petsc-dev] calling petsc from a mex file

2018-05-08 Thread Smith, Barry F.
Push the branch that does this or send me the code and I'll debug it. I now have some vague memory about this behavior. Barry > On May 8, 2018, at 1:53 PM, Munson, Todd wrote: > > > >> On May 8, 2018, at 1:02 PM, Smith, Barry F. wrote: >>

Re: [petsc-dev] calling petsc from a mex file

2018-05-08 Thread Munson, Todd
> On May 8, 2018, at 1:02 PM, Smith, Barry F. wrote: > > > >> On May 8, 2018, at 12:30 PM, Munson, Todd wrote: >> >> >> Hi, >> >> I wonder if anyone has experience calling petsc from matlab using mex. I >> have the >> simplest possible

Re: [petsc-dev] calling petsc from a mex file

2018-05-08 Thread Smith, Barry F.
> On May 8, 2018, at 12:30 PM, Munson, Todd wrote: > > > Hi, > > I wonder if anyone has experience calling petsc from matlab using mex. I > have the > simplest possible mexFunction that just calls PetscInitialize() and > PetscFinalize(). That part seems to work

[petsc-dev] calling petsc from a mex file

2018-05-08 Thread Munson, Todd
Hi, I wonder if anyone has experience calling petsc from matlab using mex. I have the simplest possible mexFunction that just calls PetscInitialize() and PetscFinalize(). That part seems to work fine, but when I exit from matlab I get a segmentation violation and a petsc error message. I