MATLAB Answers

0

Why do I get an assertion violation when I port my 32-bit FORTRAN MEX source to a 64-bit MATLAB 7.6 (R2008a) ?

MathWorks Support Team さんによって質問されました 2009 年 6 月 27 日
I have an existing FORTRAN MEX source code which compiles and works fine on a 32-bit MATLAB. This source also compiles fine on 64-bit MATLAB, but it fails when I try to run it.

製品


リリース

R2008a

1 件の回答

回答者: MathWorks Support Team 2009 年 6 月 27 日
 採用された回答

Some legacy FORTRAN code use the following syntax to define the MEXFUNCTION:
SUBROUTINE MEXFUNCTION(NLHS, PLHS, NRHS, PRHS)
INTEGER PLHS(*), PRHS(*)
INTEGER NLHS, NRHS
This might compile and execute on a 32-bit platform, however, the recommended syntax is to use MWPOINTER as shown below (for any platform).
This is essential for the MEX file to execute successfully on a 64-bit platform.
SUBROUTINE MEXFUNCTION(NLHS, PLHS, NRHS, PRHS)
MWPOINTER PLHS(*), PRHS(*)
INTEGER NLHS, NRHS

  0 件のコメント

サインイン to comment.



Translated by