help > cannot change memory with run-cbstools-mac
Showing 1-2 of 2 posts
Display:
Results per page:
Jul 10, 2017  02:07 AM | Thomas Ernst - University Clinic Essen
cannot change memory with run-cbstools-mac
Hi guys,

Using MIPAV on Mac (10.12.5) I use the script run-cbstools-mac to start up MIPAV with the CBStoolbox included.

I ran into the problem that I cannot change MIPAV memory settings for use with this script. Changing the setting will change the mipav.preferences file in the mipav/plugins directory. However, the preferences will just be ignored on startup with the run-cbstools-mac script. Editing the mipav.command.lax file in the /applications/mipav directory will not have an effect either. Staring Mipav without the script will give me the memory settings I want. However it won't give me acces to the cbs toolbox.

Has anybody got any thoughts on why  this might happen. The mipav/plugins path (where the mipav.preferences file is located) is added to the classpaths by the script(see below). Thank you!

My run-cbstools-mac script in detail:


#!/bin/bash
# location of the JAVA command to use
JAVA=/Applications/mipav/jre/Contents/Home/bin/java
# location of additional JAVA libraries to use
JAVALIB=/Applications/mipav/jre/Contents/Home/lib/ext/
# location of the MIPAV installation to use
MIPAV=/Applications/mipav
# location of the plugin installation to use
PLUGINS=/Users/Thomas/mipav/plugins
# mipav command
$JAVA -classpath $JAVALIB/*:$MIPAV:$MIPAV/lib/*:$PLUGINS:$/library/* -server MipavMain $@



EDIT:
I still have not found why the preferences are not used or how to enforce the use of the preferences, but at least I found an option to explicitly define the memory to be used (an example below with 12 GB memory)

$JAVA -classpath $JAVALIB/*:$MIPAV:$MIPAV/lib/*:$PLUGINS:$/library/* -server -Xms12g -Xmx12g MipavMain  $@
Jul 11, 2017  01:07 PM | Pierre-Louis Bazin
RE: memory with run-cbstools-mac
You found pretty much the main trick, to specify the memory allocation in the file. As you can just set it to your computer's RAM, you don't need to edit it more than once (it will only request that memory amount if it needs it, not by default).

There's also an annoying Mac vs. Dos carriage return formatting issue in the run-cbstools-mac text file, which sometimes is making it fail, by the way (you need to make sure the file gets saved with Mac-only returns).

No idea why the JIST/CBS Tools libraries are not properly set up by the regular MIPAV installation on Mac: it works smoothly on Linux...