[kepler-dev] [Bug 3233] - finalize ptolemy matlab actor for 1.0 release

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Wed Apr 23 15:37:37 PDT 2008


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3233


cxh at eecs.berkeley.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|cxh at eecs.berkeley.edu       |berkley at nceas.ucsb.edu




------- Comment #5 from cxh at eecs.berkeley.edu  2008-04-23 15:37 -------
I replaced the kepler/lib/ptmatlab.dll with the $PTII/lib/ptmatlab.dll_msvc
because the previous ptmatlab.dll gave me the following when I tried
to run the MatlabExpression demo.

ptolemy.kernel.util.IllegalActionException: There was a problem invoking the
Ptolemy II Matlab interface.
The interface has been tested under Windows and Linux.
The interface requires that Matlab be installed on the local machine and that
the ptmatlab shared library available.
Refer to $PTII/ptolemy/matlab/makefile for more information.
  in .MatlabExpression.MatlabExpression
Because:
Did not find 'ptolemy/matlab/ptmatlab' in path, searched user.home
(c:\cxh\src\kepler) user.dir (C:\Documents and Settings\cxh) and the classpath
for 'ptolemy/matlab/ptmatlab.dll', but that was not found either.
The Java classpath was:
c:\cxh\src\kepler\build\classes;c:\cxh\src\kepler\build\src;c:\cxh\src\kepler;c:\cxh\src\kepler\configs;c:\cxh\src\kepler\lib;c:\cxh\src\kepler\lib\images;c:\cxh\src\kepler\build\kepler-icons.jar;c:\cxh\ptII\lib\diva.jar;c:\cxh\ptII\build\ptolemy-doc.jar;c:\cxh\ptII\build\classes;c:\cxh\ptII\build\src
In addition, loadLibrary("ptmatlab") was called, the exception for the
loadLibrary() call was: java.lang.UnsatisfiedLinkError:
C:\WINDOWS\system32\ptmatlab.dll: Can't load this .dll (machine code=0x701) on
a IA 32-bit platform
        at ptolemy.matlab.Expression.preinitialize(Expression.java:205)
        at ptolemy.actor.Director.preinitialize(Director.java:865)
        at
ptolemy.domains.sdf.kernel.SDFDirector.preinitialize(SDFDirector.java:527)
        at ptolemy.actor.CompositeActor.preinitialize(CompositeActor.java:1103)
        at ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:913)
        at ptolemy.actor.Manager.initialize(Manager.java:578)
        at ptolemy.actor.Manager.execute(Manager.java:321)
        at ptolemy.actor.Manager.run(Manager.java:1071)
        at ptolemy.actor.Manager$3.run(Manager.java:1112)
Caused by: java.lang.UnsatisfiedLinkError: Did not find
'ptolemy/matlab/ptmatlab' in path, searched user.home (c:\cxh\src\kepler)
user.dir (C:\Documents and Settings\cxh) and the classpath for
'ptolemy/matlab/ptmatlab.dll', but that was not found either.
The Java classpath was:
c:\cxh\src\kepler\build\classes;c:\cxh\src\kepler\build\src;c:\cxh\src\kepler;c:\cxh\src\kepler\configs;c:\cxh\src\kepler\lib;c:\cxh\src\kepler\lib\images;c:\cxh\src\kepler\build\kepler-icons.jar;c:\cxh\ptII\lib\diva.jar;c:\cxh\ptII\build\ptolemy-doc.jar;c:\cxh\ptII\build\classes;c:\cxh\ptII\build\src
In addition, loadLibrary("ptmatlab") was called, the exception for the
loadLibrary() call was: java.lang.UnsatisfiedLinkError:
C:\WINDOWS\system32\ptmatlab.dll: Can't load this .dll (machine code=0x701) on
a IA 32-bit platform
        at
ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:923)
        at ptolemy.matlab.Engine.<clinit>(Engine.java:176)
        at ptolemy.matlab.Expression.preinitialize(Expression.java:202)
        ... 8 more
Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the
library: ptolemy/matlab/ptmatlab
        at java.lang.Runtime.load0(Runtime.java:767)
        at java.lang.System.load(System.java:1005)
        at
ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:807)
        ... 10 more
Caused by: java.lang.UnsatisfiedLinkError: Did not find
'ptolemy/matlab/ptmatlab' in path, searched user.home (c:\cxh\src\kepler)
user.dir (C:\Documents and Settings\cxh) and the classpath for
'ptolemy/matlab/ptmatlab.dll', but that was not found either.
The Java classpath was:
c:\cxh\src\kepler\build\classes;c:\cxh\src\kepler\build\src;c:\cxh\src\kepler;c:\cxh\src\kepler\configs;c:\cxh\src\kepler\lib;c:\cxh\src\kepler\lib\images;c:\cxh\src\kepler\build\kepler-icons.jar;c:\cxh\ptII\lib\diva.jar;c:\cxh\ptII\build\ptolemy-doc.jar;c:\cxh\ptII\build\classes;c:\cxh\ptII\build\src
In addition, loadLibrary("ptmatlab") was called, the exception for the
loadLibrary() call was: java.lang.UnsatisfiedLinkError:
C:\WINDOWS\system32\ptmatlab.dll: Can't load this .dll (machine code=0x701) on
a IA 32-bit platform
        at
ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:923)
        at ptolemy.matlab.Engine.<clinit>(Engine.java:176)
        at ptolemy.matlab.Expression.preinitialize(Expression.java:202)
        at ptolemy.actor.Director.preinitialize(Director.java:865)
        at
ptolemy.domains.sdf.kernel.SDFDirector.preinitialize(SDFDirector.java:527)
        at ptolemy.actor.CompositeActor.preinitialize(CompositeActor.java:1103)
        at ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:913)
        at ptolemy.actor.Manager.initialize(Manager.java:578)
        at ptolemy.actor.Manager.execute(Manager.java:321)
        at ptolemy.actor.Manager.run(Manager.java:1071)
        at ptolemy.actor.Manager$3.run(Manager.java:1112)
Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the
library: ptolemy/matlab/ptmatlab
        at java.lang.Runtime.load0(Runtime.java:767)
        at java.lang.System.load(System.java:1005)
        at
ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:807)
        ... 10 more

I also updated the demo to include a little more info about JNI.
I also updated build.xml so that kepler.sh works under Cygwin

The one remaining thing is that kepler/lib/ptmatlab.dll has the wrong 
permissions, it needs to be changed to executable.

cxh at DOPLAP35 ~/src/kepler-1.0.0
$ rm lib/ptmatlab.dll

cxh at DOPLAP35 ~/src/kepler-1.0.0
$ cvs update lib/ptmatlab.dll
cvs update: warning: lib/ptmatlab.dll was lost
U lib/ptmatlab.dll

cxh at DOPLAP35 ~/src/kepler-1.0.0
$ ls -l lib/ptmatlab.dll
-rw-r--r-- 1 cxh Administrators 53356 Apr 23 15:31 lib/ptmatlab.dll

cxh at DOPLAP35 ~/src/kepler-1.0.0

The solution is to log on to the CVS server and do
chmod a+x lib/ptmatlab.dll.


I suggest fixing the permissions for the java and other
files in the cvs repository

chmod -R a+rX .
find . -name "*.dll,v" -exec chmod a-x {} \;
find . -name "*.java,v" -exec chmod a-x {} \;
find . -name "*.htm,v" -exec chmod a-x {} \;
find . -name "*.html,v" -exec chmod a-x {} \;
find . -name "*makefile,v" -exec chmod a-x {} \;
find . -name "*.tcl,v" -exec chmod a-x {} \;
find . -name "*.xml,v" -exec chmod a-x {} \;

I'm assigning this to Chad because either he can access the CVS
repository and make kepler/lib/ptmatlab.dll executable, or he
knows someone who can.

Once the permissions on ptmatlab.dll are changed, this bug can be closed.


More information about the Kepler-dev mailing list