[ome-devel] OME and matlab - trouble connecting

Arpun R Nagaraja arpun at MIT.EDU
Thu Aug 10 20:38:31 BST 2006


Are you licensed to use MATLAB?  Try running matlab on the command  
line - if it
gives
you a license manager error, then you need to fix  this issue before you can
execute a
chain.

-Arpun

Quoting debartolomeo at ece.ucsb.edu:

> Hi Arpun,
>
> Thanks for your suggestions.  I think that the setPixels problem is solved
> with the switch to GCC 4.0.  However, I am still getting the error message
> (both from running the Matlab Test Chain in the UI and from the command
> line):
> "Cannot open a connection to Matlab! at /usr/share/perl/5.8/CGI/Carp.pm
> line 314."
>
> I've altered the MatlabHandler.pm file per your suggestion and reinstalled
> OME (and added some print statements to check that the modified .pm was
> being used) with no luck.
>
> Any suggestions?
>
> Melissa
>
>> I ran into the setPixels problem as well.  There was also a lazy
>> symbol binding problem that I solved by switching to GCC 4.0.  Here
>> is what worked for me:
>>
>> Modify the Makefile in your src/matlab/OMEIS directory.  Change the
>> MEX_FLAGS line to this:
>>
>> MEX_FLAGS = -O -inline -I../../C/omeis-http/ -L../../C/omeis-http  -
>> lcurl -lhttpOMEISMATLAB CC=gcc-4.0 LD=gcc-4.0
>>
>> You should remove all the *.mexglx files.  Then reinstall OME - when
>> it installs the matlab connection, it should compile with these new
>> flags.
>>
>> The Web UI problems are a whole different story.  We have been
>> working to fix them, and the only real solution we found was to
>> modify the _openEngine function in the src/perl2/OME/Analysis/
>> Handlers/MatlabHandler.pm
>>
>> There is a line in _openEngine that looks something like this:
>> $_engine = OME::Matlab::Engine->open("$matlab_exec $matlab_flags");
>>
>> Modify it so that it looks like this:
>> $_engine = OME::Matlab::Engine->open("env PATH=/usr/bin:/bin
>> $matlab_exec $matlab_flags");
>>
>> You may have to reinstall OME at this point, to make sure it's using
>> this copy of the MatlabHandler.  For reasons I haven't been able to
>> discern, it sometimes doesn't use your modified version of the
>> Handler.  It might be helpful to put some print statements around
>> these calls to make sure everything is doing what it's supposed to do.
>>
>> I'm not certain this will work on Linux.  One of the reasons we
>> haven't committed this stuff is because we didn't get a chance to
>> test it on non-Mac systems.  Looks like you'll be our guinea pig.
>>
>> Let us know how things turn out.  Good luck!
>>
>> -Arpun
>>
>> On Jul 28, 2006, at 6:30 PM, debartolomeo at ece.ucsb.edu wrote:
>>
>>> Hi,
>>>
>>> I'm trying to get Matlab working with ome and am running into
>>> problems.
>>>
>>> When I try to use the UI to run the analysis chain, I get the
>>> following
>>> error in the UI:
>>> "Cannot open a connection to Matlab! at /usr/share/perl/5.8/CGI/
>>> Carp.pm
>>> line 314"
>>>
>>> But, when I try this from the command line:
>>> ome execute -d "MyDataset" -a "Matlab Test Chain", I get the following
>>> error in the UI:
>>> "ERROR saving pixels to omeis w/ command:
>>> 	ome_output_9_PixelsArray_pix =
>>> setPixels(openConnectionOMEIS('http://claw/cgi-bin/omeis'), 686,
>>> ome_output_9_PixelsArray);
>>>>> ??? Invalid MEX-file
>>> '/home/omedev/OME/src/matlab/OMEIS/setPixels.mexglx':
>>> /home/matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version
>>> `GCC_3.3' not found (required by /usr/lib/libstdc++.so.6)."
>>>
>>> Again, running "Histogram Equalization Preprocessing Chain" from
>>> the UI, I
>>> get:
>>> "Cannot open a connection to Matlab! at /usr/share/perl/5.8/CGI/
>>> Carp.pm
>>> line 314."
>>>
>>> But, when I try:
>>> ome execute -d "MyDataset" -a "Histogram Equalization Preprocessing
>>> Chain", I get:
>>> "getROI/getPixels failed for pixels 482. The returned MATLAB array has
>>> dimensions (0, 0, 1, 1, 1) at
>>> /usr/local/share/perl/5.8.4/OME/Analysis/Handlers/MatlabHandler.pm
>>> line
>>> 562,  line 1."
>>>
>>> I'm new at this system, so there may be something very fundamental
>>> that
>>> I'm not yet understanding, but any suggestions on how to proceed
>>> would be
>>> very appreciated.
>>>
>>>
>>> _______________________________________________
>>> ome-devel mailing list
>>> ome-devel at lists.openmicroscopy.org.uk
>>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>>
>
>




More information about the ome-devel mailing list