forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it possible to use Salford DLLs with C++.Net Gateway DLLs in Matlab?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
MartinW



Joined: 14 Jun 2005
Posts: 1

PostPosted: Tue Jun 14, 2005 3:39 am    Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs Reply with quote

Hello!

I just upgraded to Salford 4.8. I'm trying to start a Salford DLL from a C++ mex funktion in Matlab 7.0. If I do so in Simulink Matlab crashes imediately without any usefull error message. From the Matlab prompt I recieve this:

??? Unknown Windows exception value=c0000090 in MATLAB.
I looked it up and it's a floating point exception. I could determin the operation causing it on the fortran side by writing a test file.

1. I can pass a constant from fortran to Matlab.
2. I can pass arguments from matlab to fortran and back without a crash.
3. But the moment I try to calculate with Matlab originated data I have problems.

I tested it with integer conversion nint(). The first time I call it from the prompt everything is fine. I get the correct result. But on the second call I get the error mentioned above.

Any idea how to solve my problem with salford? Thank's for your help!
Martin
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Tue Jun 21, 2005 1:46 am    Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs Reply with quote

In principle is it possible to use an FTN95 DLL as a mex function in Matlab.
However, you will need guidelines on how to do this.
I hope to provide details in the Knowledge Base before too long.
You may be able to make some progress given the following two points.

a) You must use F_STDCALL in the declarations of all exported subroutines in your DLL.
b) Currently there is an intialisation bug that causes the first call to the DLL (from Matlab) to raise an exception. Subsequent calls are OK.
Back to top
View user's profile Send private message AIM Address
Anonymous
Guest





PostPosted: Tue Jul 18, 2006 4:20 am    Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs Reply with quote

Hello,

I am experiencing problems too with creating a DLL from a salford fortan mex-function in matlab 704.

I use a salford fortran library subfun.lib which has been created using salford.
I create mex file fun.dll using compaq visual fortran with command "mex fun.f subfun.lib". fun.dll is created
However, calling fun.dll sometimes produce error message (and sometimes result is correct)
??? Unknown Windows exception value=c0000090 in MATLAB.

Is there some information about matlab mex-file compatibilty with salford lib ?

Helene
Back to top
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Tue Jul 18, 2006 5:25 am    Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs Reply with quote

Helene

There is now some information on using MATLAB with FTN95 in the Silverfrost forum KBase.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group