Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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,071
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 " <r.sudarshan1990@gmail.com> wrote in message <kiq3q6$mfh$1@newscl01ah.mathworks.com>...
> 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.


(snip)

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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.