[kepler-users] Kepler, Matlab & Mac. How?

Jianwu Wang jianwu at sdsc.edu
Mon Feb 15 21:13:00 PST 2010


Hi Anil,

     The exception is still 64 bit problem. To work with Matlab 64 bit,  
DYLD_LIBRARY_PATH need to be export as 
/Applications/MATLAB_R2008b.app/bin/maci64, not the usual 
/Applications/MATLAB_R2008b.app/bin/maci. Please re-export 
DYLD_LIBRARY_PATH and try Kepler again.

     Also from the exception message, you used the latest release Kepler 
version, namely 1.0, not the latest developing version which can be 
gotten by instructions in 
https://dev.kepler-project.org/developers/teams/build/systems/build-system/extension-build-system. 
I'm not quite sure the location of the libptmatlab.dylib in Kepler 1.0. 
Please first replace the new libptmatlab.dylib I attached last email 
with the 
/Applications/Kepler-1.0.0/Kepler.app/Kepler/lib/libptmatlab.dylib. If 
it doesn't work, try create a new directory, namely ptolemy/matlab/, in 
$Kepler/lib and put the new libptmatlab.dylib there.

Best wishes

Sincerely yours

Jianwu Wang
jianwu at sdsc.edu
http://users.sdsc.edu/~jianwu/

Scientific Workflow Automation Technologies (SWAT) Laboratory
San Diego Supercomputer Center
University of California, San Diego
San Diego, CA, U.S.A.


On 2/15/2010 10:06 PM, Anil Deane wrote:
> Hi Jianwu,
>
> thanks for the response. I did just that, and it didn't work. I also copied it to the suitable Matlab directory (the place that the UG says to make the link to). And the error says:
>
> 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 'ptmatlab' in path, searched user.home (/Applications/Kepler-1.0.0/Kepler.app/Kepler) user.dir (/Users/deane) and the classpath for 'ptmatlab.dylib', but that was not found either.
> classpath was: .:./configs:./lib:./lib/images:./build/kepler.jar:./build/kepler-icons.jar Also tried loadLibrary("ptmatlab", exception for loadLibrary was: java.lang.UnsatisfiedLinkError: /Applications/Kepler-1.0.0/Kepler.app/Kepler/lib/libptmatlab.dylib:  Library not loaded: @loader_path/libeng.dylib   Referenced from: /Applications/MATLAB_R2008b.app/bin/maci/libptmatlab.dylib   Reason: no suitable image found.  Did find:  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture
> 	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 'ptmatlab' in path, searched user.home (/Applications/Kepler-1.0.0/Kepler.app/Kepler) user.dir (/Users/deane) and the classpath for 'ptmatlab.dylib', but that was not found either.
> classpath was: .:./configs:./lib:./lib/images:./build/kepler.jar:./build/kepler-icons.jar Also tried loadLibrary("ptmatlab", exception for loadLibrary was: java.lang.UnsatisfiedLinkError: /Applications/Kepler-1.0.0/Kepler.app/Kepler/lib/libptmatlab.dylib:  Library not loaded: @loader_path/libeng.dylib   Referenced from: /Applications/MATLAB_R2008b.app/bin/maci/libptmatlab.dylib   Reason: no suitable image found.  Did find:  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture
> 	at ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:894)
> 	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:1020)
> 	at ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:781)
> 	... 10 more
> Caused by: java.lang.UnsatisfiedLinkError: Did not find 'ptmatlab' in path, searched user.home (/Applications/Kepler-1.0.0/Kepler.app/Kepler) user.dir (/Users/deane) and the classpath for 'ptmatlab.dylib', but that was not found either.
> classpath was: .:./configs:./lib:./lib/images:./build/kepler.jar:./build/kepler-icons.jar Also tried loadLibrary("ptmatlab", exception for loadLibrary was: java.lang.UnsatisfiedLinkError: /Applications/Kepler-1.0.0/Kepler.app/Kepler/lib/libptmatlab.dylib:  Library not loaded: @loader_path/libeng.dylib   Referenced from: /Applications/MATLAB_R2008b.app/bin/maci/libptmatlab.dylib   Reason: no suitable image found.  Did find:  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture  /Applications/MATLAB_R2008b.app/bin/maci/libeng.dylib: mach-o, but wrong architecture
> 	at ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:894)
> 	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:1020)
> 	at ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:781)
> 	... 10 more
>
>
> Kepler runs fine otherwise (ie. other than the Matlab).
>
> Anil
>
>
>
>
> On Feb 15, 2010, at 6:05 PM, Jianwu Wang wrote:
>
>    
>> Hi Anil,
>>
>>    So you have Mac OS 10.6 Snow Leopard and Kepler downloaded from Kepler repository by instructions of https://dev.kepler-project.org/developers/teams/build/systems/build-system/extension-build-system? So your java and Matlab is also 64 bit?
>>
>>    As far as I know, Mac 10.6 is 64 bit system and Kepler mainly support 32 bit system. We met the similar problem when running Matlab actor on a Mac Snow Leopard machine, which is because of the library compiled in 32 bit system does not work with Matlab 64 bit.
>>
>>   We got the lib working with 64 bit system (see attachment). Please replace this lib with the one in $Kepler/common/lib/ptolemy/matlab/  and try again.
>>
>>   Please let me know whether it works for you. Thanks.
>>
>> Best wishes
>>
>> Sincerely yours
>>
>> Jianwu Wang
>> jianwu at sdsc.edu
>> http://users.sdsc.edu/~jianwu/
>>
>> Scientific Workflow Automation Technologies (SWAT) Laboratory
>> San Diego Supercomputer Center
>> University of California, San Diego
>> San Diego, CA, U.S.A.
>>
>>
>> On 2/15/2010 5:13 PM, Anil Deane wrote:
>>      
>>> [First Post. I have looked in  the user guide and in the Kepler matlab example]
>>>
>>> Could anyone please tell me how to get Kepler run a Matlab example on the Mac. The example and the user guide indicate that one just needs to have the dynamic library path (to maci) set properly. But that doesn't do it. I do have Matlab able to be run from the command prompt incidentally.
>>>
>>> I searched and found - quite inscrutable - "directions" for patches that someone contributed (because Mac's install of Java is "nonstandard"). I have the latest Mac OS, and the latest Kepler. There are references to Ptolemy and a ptmatlab file when Kepler fails - but nowhere does Kepler user guide or site say that you need to install Ptolemy or that an installation of "ptmatlab" is needed.
>>>
>>> Thanks in advance,
>>>
>>> Anil Deane
>>> [IntelMac 10.6.2]
>>> _______________________________________________
>>> Kepler-users mailing list
>>> Kepler-users at kepler-project.org
>>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>>>
>>>        
>> <libptmatlab.dylib>
>>      



More information about the Kepler-users mailing list