[kepler-users] Kepler 2.3 and MATLAB

Christopher Brooks cxh at eecs.berkeley.edu
Fri Apr 20 15:38:12 PDT 2012


Hi Wade,
I don't think I have a WinXP installation at hand, but I was able to run 
the MatlabExpression demo under Windows Server 2003 with a 32-bit JVM 
from a clean install of Kepler-2.3.  Windows Server 2003 is fairly 
similar to XP.

To determine the bit width of your JVM, start up Kepler, go to Tools -> 
check settings and look at the value of
sun.arch.data.model = 32

When I start a dos shell (Start->Run->cmd), I can start matlab from the 
command line, which works for you.

My path looks like:
> C:\Documents and Settings\cxh.NEWTON>set PATH
> Path=C:\Program Files\MiKTeX 2.7\miktex\bin;C:\Program Files\Windows 
> Resource Ki
> ts\Tools\;C:\PROGRA~1\DZBATC~1/bin;C:\Program Files\MiKTeX 
> 2.6\miktex\bin;c:\cyg
> win\usr\local\bin;c:\cygwin\usr\local\apache-ant-1.8.0\bin;c:\cygwin\bin;c:\Prog
> ram 
> Files\Java\jdk1.6.0_21\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system3
> 2\wbem;C:\Program Files\MATLAB\R2008a\bin;C:\Program 
> Files\MATLAB\R2008a\bin\win
> 32;C:\Program Files\MATLAB\R2006a\bin\win32;C:\Program 
> Files\Dell\SysMgt\RAC5;C:
> \Program Files\Dell\SysMgt\oma\bin;c:\Program Files\Microsoft SQL 
> Server\90\Tool
> s\binn\;C:\Program 
> Files\Hummingbird\Connectivity\11.00\Accessories\;;C:\Program
>  Files\QuickTime\QTSystem\;C:\Program Files\R\R-2.6.2\bin;C:\Program 
> Files\MySQL
> \MySQL Server 5.1\bin;c:\cygwin\bin;C:\Program 
> Files\MaudeFW;C:\Program Files\Ja
> va\j3d\bin;C:\Program Files\MaudeFW\cygwin\bin;C:\Program 
> Files\TortoiseSVN\bin;
> C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program 
> Files\Oracle\Berkeley DB X
> ML 2.5.16\bin

Note that the Matlab bin and bin\win32 directories are in my path.

One thing is that the error message for the first time a matlab model is 
run is usually more informative that the stack trace you submitted.  
After the Matlab interface has failed, then for subsequent runs, the 
stack trace tends to just say that the Matlab class cannot be found.

Another thing to do is to take a look at the mailing list, various 
people have had various issues with Matlab.  Try searching with:
site:lists.nceas.ucsb.edu kepler-users Matlab

I don't have Matlab installed on my Windows Server 2008 R2 64-bit 
machine, but I can work on that.  This machine is fairly similar to 
Windows 7 64-bit.  I would not be able to get a license until Monday.

Hope this helps, let us know how it goes.

_Christopher

On 4/20/12 2:38 PM, Wade Sheldon wrote:
> Hi folks,
>
> I'm trying to test using Kepler 2.3 to execute matlab-based workflows, 
> since we use matlab extensively for environmental data management at a 
> US LTER site. I started with the demo "MatlabExpression.xml", but I 
> haven't been able to get it to run. I confirmed that the relevant 
> matlab directories are in the system path and I can invoke matlab from 
> a command prompt, so that's not the issue. I can also run Python and 
> R-based demos and do other simple things, so there doesn't appear to 
> be anything wrong with my base Kepler installation. I also tried using 
> various matlab versions (R13, R2010a, R2011b, adjusting the path to 
> matlab\bin and matlab\bin\win32 accordingly), disabling security 
> software and running from an admin user account in desperation, but 
> those steps didn't help.
>
> Any advice would be appreciated. I've only tried running this in WinXP 
> SP3 32bit, but I could also try Win7 64bit tomorrow on another 
> workstation. Below is the stack trace of the error I get when running 
> the workflow.
>
> Thanks.
>
> Wade Sheldon
> GCE-LTER
>
>
> ~~~~~~~
> stack trace:
> ptolemy.kernel.util.IllegalActionException: There was a problem 
> invoking the Ptolemy II Matlab interface.
> The interface has been tested under Linux, Mac OS X, and Windows.
> The interface requires that Matlab be installed on the local machine 
> and that the ptmatlab shared library available.
> * Under Linux, you must have the LD_LIBRARY_PATH environment variable 
> set to include the directories that contain libmx.so and libptmatlab.so.
> * Under Mac OS X, you must have the DYLD_LIBRARY_PATH environment 
> variable set to include the directories that contain libmx.dylib and 
> libptmatlab.jnilib.
> * Under Windows, you must have your PATH set to include the Matlab 
> bin/win32 or equivalent directory so that libmex.dll is found and the 
> directory that contains libptmatlab.dll. In addition, if you are 
> running under Windows from the Cygwin bash prompt, then you must start 
> Vergil with the -jni argument: $PTII/bin/vergil -jni. For details, see 
> $PTII/jni/package.html.
> Refer to $PTII/ptolemy/matlab/makefile for more information.
>   in .MatlabExpression.MatlabExpression
> Because:
> Could not initialize class ptolemy.matlab.Engine
>     at ptolemy.matlab.Expression.preinitialize(Expression.java:263)
>     at ptolemy.actor.Director.preinitialize(Director.java:1056)
>     at ptolemy.actor.Director.preinitialize(Director.java:1035)
>     at 
> ptolemy.domains.sdf.kernel.SDFDirector.preinitialize(SDFDirector.java:655)
>     at 
> ptolemy.actor.CompositeActor.preinitialize(CompositeActor.java:1735)
>     at 
> ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:930)
>     at ptolemy.actor.Manager.initialize(Manager.java:636)
>     at ptolemy.actor.Manager.execute(Manager.java:340)
>     at ptolemy.actor.Manager.run(Manager.java:1111)
>     at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1641)
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
> ptolemy.matlab.Engine
>     at ptolemy.matlab.Expression.preinitialize(Expression.java:260)
>     ... 9 more
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
> ptolemy.matlab.Engine
>     at ptolemy.matlab.Expression.preinitialize(Expression.java:260)
>     at ptolemy.actor.Director.preinitialize(Director.java:1056)
>     at ptolemy.actor.Director.preinitialize(Director.java:1035)
>     at 
> ptolemy.domains.sdf.kernel.SDFDirector.preinitialize(SDFDirector.java:655)
>     at 
> ptolemy.actor.CompositeActor.preinitialize(CompositeActor.java:1735)
>     at 
> ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:930)
>     at ptolemy.actor.Manager.initialize(Manager.java:636)
>     at ptolemy.actor.Manager.execute(Manager.java:340)
>     at ptolemy.actor.Manager.run(Manager.java:1111)
>     at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1641)
> ~~~~~~~
>
>
>

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841                                (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670



More information about the Kepler-users mailing list