Heap memory error only in batch mode

Hello,

I have a strange memory problem with JAVA:

I wrote a pipeline that processes all the images in a directory. In some directories I have “small” images (1000 X 1000) and in others I have “big” images (12000 X 12000).
When I use the GUI of CellProfiler, it works flawlessly on both small and large images (I work on the “big PC of the lab” with 64 GB and I gave 60GB to Java in CellProfiler preferences).
But when I run CellProfiler with a batch file, it works perfectly for small images but I get: “JavaException: Java heap space” for large images. :open_mouth::cry:
Can you tell me why it works like a charm when I use the GUI and not when I use command line mode and how to allow the batch version to do what the GUI session does.
Thks a lot
Phil

Some additional information:
PC: i7 8700k, 64 GB ram
Win10
CellProfiler 3.18
My batch command:
cd C: / Program Files (x86) / CellProfiler /
cellprofiler -p C: \ Users \ home \ Desktop \ Super_macro \ arrives_petit \ super_macro_1.cppipe -c -r -i C: \ Users \ home \ Desktop \ Super_macro \ arrives_small \ FIJI_results / OK_10K / -o C: \ Users \ home \ Desktop \ Super_macro \ arrivee_petit \ CP_results

you need to increase the java heap space separate from CP. For unix an example command looks like this: export _JAVA_OPTIONS="-Xms64000m -Xmx64000m"

not sure how it works in windows, but a quick internet search seems to indicate it can be done in the control panel. runtime parameters perhaps?

Hi,
Thank you for your advice.

I tried that yesterday evening but it did not solve my problem :grimacing:
Any other idea ???

If you can run one image at a time without issues then write a script to create and submit a command like the one you show above, one for each image. That’s how I run batches of big images.

OK,
I’ll try this solution :slight_smile:
thks