[kepler-users] Kepler 2.3 and MATLAB
Christopher Brooks
cxh at eecs.berkeley.edu
Fri Apr 20 20:30:43 PDT 2012
I saw that error message on my Windows Server 2008 R2 64-bit machine:
C:\Program Files
(x86)\Kepler-2.3\common-2.3.0\lib\ptolemy\matlab\ptmatlab.dll: Can't
load IA 32-bit .dll on a AMD 64-bit platform
However, the machine does not have Matlab installed, so I thought I
would focus on that problem first.
One workaround would be to build Ptolemy II from source and generate a
ptmatlab.dll file for the different platforms.
See http://chess.eecs.berkeley.edu/ptexternal for details.
_Christopher
On 4/20/12 8:14 PM, Wade Sheldon wrote:
> No joy under Win7/64 either with a clean install of Kepler 2.3 and the
> proper Matlab paths (albeit R2010a 64bit). However this time I get an
> error related to running 32bit libraries on the system:
> C:\Program Files
> (x86)\Kepler-2.3\common-2.3.0\lib\ptolemy\matlab\ptmatlab.dll: Can't
> load IA 32-bit .dll on a AMD 64-bit platform
>
> (This is an Intel Core i7, not AMD cpu, BTW).
>
> Sigh. Harder than I'd hoped. Python and R work fine as on WinXP/32 -
> the problem is just related to the MatlabExpression actor, which is
> what I'm particularly interested in using.
>
> -Wade
>
>
> On 4/20/2012 10:41 PM, Wade Sheldon wrote:
>> Also, I updated Java to the latest version (1.6.0_31-b05),
>> uninstalled Kepler, and reinstalled from a full admin account. Same
>> results. From what I can find on the web, that "The operating system
>> cannot run %1" is a generic error that implies a path issue. Anything
>> I can check regarding the Kepler classpath or libraries come to mind?
>>
>> Thanks again for your help.
>>
>> -Wade
>>
>> On 4/20/2012 10:02 PM, Wade Sheldon wrote:
>>> Thanks, Christopher. I had already perused the mailing list archives
>>> via Google and just saw references to the same issue without
>>> solutions. I confirmed that the JVM bit width is 32 (Java version
>>> 1.6.0_20).
>>>
>>> I set up a simpler workflow with just a SDF director,
>>> MatalbExpression actor and text display actor, and configured the
>>> expression: "rand(100,1);", but I got the same error. Here's the
>>> trace from the first time it was invoked, which yielded a little
>>> more info as you indicated, specifically "C:\Program
>>> Files\Kepler-2.3\common-2.3.0\lib\ptolemy\matlab\ptmatlab.dll: The
>>> operating system cannot run %1". Hope that points to a specific issue.
>>>
>>> Thanks.
>>>
>>> -Wade
>>>
>>> complete stack dump:
>>> 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 .Unnamed1.MatlabExpression
>>> Because:
>>> C:\Program
>>> Files\Kepler-2.3\common-2.3.0\lib\ptolemy\matlab\ptmatlab.dll: The
>>> operating system cannot run %1
>>> 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.UnsatisfiedLinkError: C:\Program
>>> Files\Kepler-2.3\common-2.3.0\lib\ptolemy\matlab\ptmatlab.dll: The
>>> operating system cannot run %1
>>> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>> at java.lang.ClassLoader.loadLibrary0(Unknown Source)
>>> at java.lang.ClassLoader.loadLibrary(Unknown Source)
>>> at java.lang.Runtime.load0(Unknown Source)
>>> at java.lang.System.load(Unknown Source)
>>> at
>>> ptolemy.data.expr.UtilityFunctions._loadLibrary(UtilityFunctions.java:2068)
>>> at
>>> ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:927)
>>> at ptolemy.matlab.Engine.<clinit>(Engine.java:176)
>>> at ptolemy.matlab.Expression.preinitialize(Expression.java:260)
>>> ... 9 more
>>> Caused by: java.lang.UnsatisfiedLinkError: C:\Program
>>> Files\Kepler-2.3\common-2.3.0\lib\ptolemy\matlab\ptmatlab.dll: The
>>> operating system cannot run %1
>>> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>> at java.lang.ClassLoader.loadLibrary0(Unknown Source)
>>> at java.lang.ClassLoader.loadLibrary(Unknown Source)
>>> at java.lang.Runtime.load0(Unknown Source)
>>> at java.lang.System.load(Unknown Source)
>>> at
>>> ptolemy.data.expr.UtilityFunctions._loadLibrary(UtilityFunctions.java:2068)
>>> at
>>> ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:927)
>>> at ptolemy.matlab.Engine.<clinit>(Engine.java:176)
>>> 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)
>>>
>>>
>>> On 4/20/2012 6:38 PM, Christopher Brooks wrote:
>>>> 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.
>>>
>>
>
--
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