From: Thomas Dietz on 11 May 2010 11:15 Hi Everybody, I am trying to get the LSODAR integrator which is part of ODEPACK running in Matlab as an mex File. I need the root finding capabilities and automatic switching for stiff and nonstiff solution methods features by LSODAR. As compiler I am using open watcom as described in Technical Solution No: 1-155BQG. I am using Matlab 2007a and 2008b on a Win XP 32 machine. I am able to compile and run the yprime.f example of Matlab. However upon linking the Fortran sources of Odepack (opkdmain.f, opkda1.f, opkda2.f) with my gateway c function I am getting the following warnings (Matlab call: mex -f openwatcom.bat -v lsodar.c opkdmain.obj opkda1.obj opkda2.obj): Warning! W1027: file clib3s.lib(mainwnt): redefinition of __Is_DLL ignored Warning! W1027: file clib3s.lib(crwdata): redefinition of _LpDllName ignored Warning! W1027: file clib3s.lib(crwdata): redefinition of _LpwDllName ignored However, the linking does not abort and a .dll is produced. I will not be able to use this dll in Matlab (see below). The warnings show up even if my gateway function is completely empty and occurs only when linking with the object files of ODEPACK. clib3s.lib is apparently a part of the watcom compiler. Upon calling this .dll the following error is issued: ??? Invalid MEX-file 'C:\...\lsodar.dll': Invalid access to memory location This happens for Matlab 2007a with watcom 1.3 and for Matlab 2008b with watcom 1.3 and 1.7 which are supported according to MathWorks. According to the following website I am not the onlyone ever stumbled accros this problem: http://www.mathworks.com/matlabcentral/newsreader/view_thread/110408 However, I could not find any solution to the problem by searching forums. Since I am currently running out of ideas what to try to get ODEPACK running I would be very glad if anybody could give me a hint on what to try to solve the issue. Did anybody ever encounter a similar problem or tried to get ODEPACK running in Matlab? Kind regards, Thomas P.S.: As soon as I find a solution to this problem I will be happy to post the code online.
|
Pages: 1 Prev: Removing axis values from a GUI axis Next: Major vs. Minor grid lines width |