The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Segmentation violation in fortran source MEX file
Replies: 1   Last Post: Mar 25, 2013 5:20 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
James Tursa

Posts: 2,326
Registered: 8/5/09
Re: Segmentation violation in fortran source MEX file
Posted: Mar 25, 2013 5:20 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Sudarshan " <> wrote in message <kiq3q6$mfh$>...
> Hey guys,
> I am new to MEX-ing and using an MEX function written by somebody else a long time back. I have gotten it to compile and link correctly. However, on execution of the main program, MATLAB crashes and i get an error saying that there was a "segmentation violation while the MEX file was running". I don't know what to do. Any help in this regard would be really awesome.


Are you running 32-bit or 64-bit?
What version of MATLAB are you using?

I see potential problems with your use of "integer" as a pointer (will need to be integer*8 on 64-bit systems ... i.e. should use mwPointer instead).

Also the mxCreateFull function is deprecated, and has been for quite some time, so this must be very old code.

Is it your intent to simply call the pr_equil function with MATLAB inputs & outputs? If so, this can probably be done much simpler.

James Tursa

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.