CellProfiler on Linux

cellprofiler

#1

Hi,
I have been trying to get CellProfiler to run on a 64-bits Linux machine (Intel Quad-core - 2.6.24) without Matlab installed.
It is that possible at all ? I keep getting :

#bash: ./CellProfiler_1.0.5122_LINUX: cannot execute binary file

(The file is executable and the windows version runs fine…)

Thanks in advance,

Indro Fedrigo.


Problem with remote access from windows
Complile Cellprofiler SplashScreen at 5759
#2

Can you post the results of these two commands?
% file ./CellProfiler_1.0.5122_LINUX
% uname -a

Thanks,
Ray Jones


#3

Hi Ray,

here they are:

file ./CellProfiler_1.0.5122_LINUX

./CellProfiler_1.0.5122_LINUX: POSIX tar archive (GNU)

and

uname -a

Linux bphy0 2.6.24-15-generic #1 SMP Mon Apr 7 16:37:53 UTC 2008 x86_64 GNU/Linux

( I have uncompress the file, but still it seems lacking the mcr environment…)

Thank you,
Indro


#4

It looks like the CellProfiler file has been uncompressed, but not unpacked.

Run this command:
% tar -xvf ./CellProfiler_1.0.5122_LINUX

And you should see it being extracted to a new directory.

Ray Jones


#5

Thanks,
done, but now:

./CellProfiler
./CellProfiler: error while loading shared libraries: libmwmclmcrrt.so.7.6: cannot open shared object file: No such file or directory

Indro.


#6

Looks like the MCR was inadvertently left out of the Linux gz file. Please redownload CellProfiler for linux and reinstall it.

~martha


#7

Thank you Martha.

Indro Fedrigo.


#8

Hello Martha,

I am getting the same error at the end. You advised that we should reinstall CellProfiler for linux, but all I did was extract to the root directory. I have unzipped the MCRLinux.zip file to a folder called MCR.

Is there something else I should be doing? Sorry for the silly questions, but I am not very familiar with Linux commands and the way this particular OS system operates.

Thanks much,
Ulric


#9

I’m guessing that the MCR is stored in a different location from CellProfiler. If that is the case, CellProfiler cannot find the MCR, so you are going to see an error similar to the previously one posted. Is the MCR also in the root directory?
martha


#10

Hello Martha,

Everything is in the /root/CellProfiler folder. I have unzipped the MCRLinux.zip file into its own directory /root/CellProfiler/MCR/ but I still have the same error when I try to launch CellProfiler with ./CellProfiler.

Is there something else I need to do? I only unzipped the CellProfiler.tar.gz file and placed the expanded contents into the /root/CellProfiler directory. Was I supposed to do something else?

Any help would be great.

Thanks so much,
Ulric


#11

Hi Ulric

for me this worked:

find . |grep libmwmclmcrrt.so.7.6

./v76/runtime/glnxa64/libmwmclmcrrt.so.7.6 (it should be there…)
export LD_LIBRARY_PATH=./v76/runtime/glnxa64/

Hope this helps…

Indro.


#12

Hello Indro,

I appreciate the help. I tried what you suggested but unfortunately got a “Segmentation fault (core dumped)” error when I tried to run the library.

Perhaps the problem is that I am using the new Ubuntu 8.0.4?


#13

Hi Ulric,
I am actually using Ubuntu 8.04 myself (amd64)
You can try adding :

/v76/runtime/glnxa64
/v76/bin/glnxa64

to /etc/ld.so.conf and then run

ldconfig

to add the library path…

It made it “somehow” work for me, but maybe someone else could help us here in checking library version etc…

I am still getting some error down the road…

Indro


#14

Hi all,
We believe that you are receiving this error because of your hardware. The linux version of CellProfiler is compiled on an Intel machine and it looks like many of you are using AMD. Unfortunately, we do not have a ‘fix’ for this, since Matlab requires software to be compiled on each individual OS and hardware. What I can suggest is for you to download the developer’s version and compile it on your specific machine. Compiling CellProfiler follows the same instructions as CPCluster, which can be found here Guide to Compiling CPCluster.

We will clarify that we are using an intel machine on the website.
Martha


#15

Hello,
To compile CellProfiller on linux, Do I need to create CompileWizardText.m ?
Thank you for your answer.
Regards,
Marie Laure


#16

Hi,
In fact, we have to do the same protocole than in Windows with CompileWizardText.m.
Question :
What is “run_CellProfiler.sh” aimed to do ?
Regards,
Marie Laure


#17

Hi Marie et al.

When you compile a matlab function like CellProfiler.m, make sure to read the readme.txt file - there really is important info in there! One important feature in readme.txt is to set your path to various libraries, which is what the run_XXX.sh file attempts to set. I believe this is what is causing the above “libxxxx.so.7.6 not found” errors above. You need to know where your MCR is installed, as it is the input argument to the run_CellProfiler.sh command.

See this Mathworks page for more info:
mathworks.com/access/helpdes … g8v-1.html

And yes, you should run CompileWizard on all architectures. Below is the basic CellProfiler compiling procedure (which appears not to have been included in the last few CP Developer’s Version downloads - we are updating and validating this information for the next release).


Directions to compile CellProfiler.m into CellProfiler.exe:
Compilation will destroy your copy of CellProfiler.m - MAKE A COPY and place it somewhere safe.

Open Matlab, cd to the CellProfiler source directory, and run CompileWizard.m by typing in the command line:

cd ~/CellProfiler % change this to wherever your code is
CompileWizard

CompileWizard produces two sets of files:
In the Modules directory, each .m file generates a matching .txt file. In the same directory as CellProfiler.m, a new file, CompileWizard_CellProfiler.m, modified for compilation.

Rename CompileWizard_CellProfiler.m to CellProfiler.m (overwriting the old version).
% mv CompileWizard_CellProfiler.m CellProfiler.m

In Matlab, compile CellProfiler:

mcc -m CellProfiler.m -a ‘CPsubfunctions\CPsplash.jpg’
(replace the \ with / on Mac or Linux)
This will produce CellProfiler and CellProfiler.ctf

Create a new directory to hold the compiled version of CellProfiler, with a subdirectory called Modules:

mkdir ~/CompiledCP % change to the desired path
mkdir ~/CompiledCP/Modules

In the shell, change to the CellProfiler source directory, and copy CellProfiler and CellProfiler.ctf to the destination directory (from the first step above), and the .txt files in the Modules directory to the destination’s Modules subdirectory:

cd ~/CellProfiler
cp CellProfiler CellProfiler.ctf ~/CompiledCP
cp Modules/*.txt ~/CompiledCP/Modules

Clean up the source directory:

rm CellProfiler.m Modules/*.txt
restore your copy of CellProfiler.m


Hope this helps,
David


#18

Hi David,
escuse me for spaming you about compiling CellProfiler.

Question :
In my case, CompileWizardText.m is generated, is it the same than CompileWizard_CellProfiler.m ?
I don’t know if we have to modify the CellProfiler.m with the information generated by CompileWizard.m on CompileWizardText.m.

I had tryied to compile exactly with your procedure (without changing CellProfiler.m):

At the end, I had the error :
./CellProfiler
??? Error using ==> sprintf
Invalid format.

Error in ==> CellProfiler at 4

MATLAB:badformat_mx
tlpl08 CompiledCP]$

Thank you for your help.

Marie Laure


#19

Hi Marie,

I don’t know why yours is generating CompileWizardText.m. There’s nothing in CompileWizard which should generate that. There are a few temporary files created with similar names, but they should be deleted toward the end of CompileWizard.m:
delete(‘CompileWizardText_function.m’);
delete(‘CompileWizardText_help.m’);
delete(‘CompileWizardText_listbox.m’);

Does your CompileWizardText.m look like CellProfiler.m in its contents?

David