View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Thu Aug 18, 2005 5:34 am Post subject: Using MatLab 6.5 (and later versions) with FTN95 |
|
|
I have successfully used the Knowledge base solution with Matlab R14SP2. It works very well. However I have a question about debugging.
I have added the debug flag to the mexopts.bat file under COMPFLAGS and generated a .dll which should have debug symbols. How do I debug this file though
I have tried to attach to the matlab.exe process in VS2003 IDE but when the dll is loaded it says no symbols were loaded.
Where am I going wrong, or is there a better source level debugging approach??
Any suggestions greatly appreciated...
Thanks,
Andrew Hutchinson |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Mon Aug 22, 2005 12:57 am Post subject: Using MatLab 6.5 (and later versions) with FTN95 |
|
|
I hava not tried to debug and I don't see how you can debug into the Fortran source.
You are probably the first to try to do this. If you have any success please let us know. |
|
Back to top |
|
|
jjgermis
Joined: 21 Jun 2006 Posts: 404 Location: Nürnberg, Germany
|
Posted: Mon Jul 17, 2006 12:38 am Post subject: Using MatLab 6.5 (and later versions) with FTN95 |
|
|
Hi,
I am also trying to use FTN95 with MATLAB but it could not get it working. Salford FTN95 is not a default list of compilers that is automatically supported by MATLAB. Even trying the MATLAB documentation example does not work. The is no refenerenece to an external library. Below
are 2 lines form the example. engOpen must be the instruction to open the MATLAB engine.
integer engOpen, engGetVariable, mxCreateDoubleMatrix
ep = engOpen('matlab ')
Question: How do I connect my Salford fortran program to the MATLAB engine?
Thanks
Jacques |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Mon Jul 17, 2006 2:24 am Post subject: Using MatLab 6.5 (and later versions) with FTN95 |
|
|
Jacques
Have you looked at the item on MATLAB in the Silverfrost forum knowledge base (KBASE)?
|
|
Back to top |
|
|
jjgermis
Joined: 21 Jun 2006 Posts: 404 Location: Nürnberg, Germany
|
Posted: Mon Jul 17, 2006 3:01 am Post subject: Using MatLab 6.5 (and later versions) with FTN95 |
|
|
Hi Paul,
I have already found and tried the knowledgebase entry (Using MATLAB 6.5 and later versions with FTN95). This only explains how to create a mex subroutine that can be called as a MATLAB-function within MATLAB.
What I would like to do is the other way around, to call a MATLAB math routine from my fortran program. For this purpose MALTAB provides a so called "MATLAB engine". The engine library commands are explained well, but I do not know how to connect with the engine library.
A small tipp as to where to start searching would help a lot.
Thanks!
Jacques |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Tue Jul 18, 2006 12:40 am Post subject: Using MatLab 6.5 (and later versions) with FTN95 |
|
|
Jacques
I do not know how to do this. However you should note that MATLAB uses the STDCALL protocol so your Fortran code will probably need to take account of this. |
|
Back to top |
|
|
|