chhh / batmass

Mass spectrometry data visualization
https://batmass.org
Apache License 2.0
36 stars 8 forks source link

Problem with launching Batmass on Windows10 #4

Closed toddyocum closed 7 years ago

toddyocum commented 7 years ago

I had a problem launching batmass on the Windows 10

c:\Program Files (x86)\batmass\bin>ver

Microsoft Windows [Version 10.0.14393]

c:\Program Files (x86)\batmass\bin>java -version java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) Client VM (build 25.131-b11, mixed mode)

c:\Program Files (x86)\batmass\bin>

The launcher has determined that the parent process has a console and will reuse it for its own console output. Closing the console will result in termination of the running program. Use '--console suppress' to suppress console output. Use '--console new' to create a separate console window. Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable size.

I removed the -J-Xmx4G from the batmass.conf, and it then launched.

I added the -Xmx4G as a run-time option to my Windows Java.

chhh commented 7 years ago

That is strange. How much free memory was there available? With the -Xmx4G the JVM won't be able to start if there is less than that available (it might be a little worse, because it might still want to leave some memory for the system). I'm running it on Win10 on my laptop also with Hotspot without problems (the laptop has 16GB though).

This one is impossible to debug, unfortunately, as the JVM hasn't started, so there even isn't any log at that point.

The Xmx parameter is no needed per se, but when the JVM is started without it, it will use default logic, which is: Set Xmx automatically as being the smaller than 1/4th of the physical memory or 1GB. I assumed that the most popular machine config for users so far is still having 8GB of RAM, so that translates to 2GB max by default, which is on the lower side. Even though MSFTBX library that is used internally to read files tries to make effective use of memory, you still need to have e.g. all MS1 scans in memory at the same time to make an interactively navigable map of it. 2GB is often not enough for long runs in profile mode. So I chose to add Xmx4G as the default and document that fact in the starter-guide.

In theory memory requirements could be decreased by a factor of 2 if all masses and intensities were stored as floats, but they are stored as doubles to simplify things and not have to maintain 2 versions of MSFTBX - one low precision, one high precision.

chhh commented 7 years ago

@toddyocum has the issue been resolved?