Added a javaMemoryLimit option for cases where the java -Xmx memory should be lower than the bsub memory limit.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4778 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
e09d6ee56b
commit
c7dbf66d41
|
|
@ -9,8 +9,20 @@ trait JavaCommandLineFunction extends CommandLineFunction {
|
|||
*/
|
||||
def javaExecutable: String
|
||||
|
||||
/**
|
||||
* Memory limit for the java executable, or if None will use the default memoryLimit.
|
||||
*/
|
||||
var javaMemoryLimit: Option[Int] = None
|
||||
|
||||
override def freezeFieldValues = {
|
||||
super.freezeFieldValues
|
||||
|
||||
if (javaMemoryLimit.isEmpty && memoryLimit.isDefined)
|
||||
javaMemoryLimit = memoryLimit
|
||||
}
|
||||
|
||||
def javaOpts = "%s -Djava.io.tmpdir=%s"
|
||||
.format(optional(" -Xmx", memoryLimit, "g"), jobTempDir)
|
||||
.format(optional(" -Xmx", javaMemoryLimit, "g"), jobTempDir)
|
||||
|
||||
def commandLine = "java%s %s"
|
||||
.format(javaOpts, javaExecutable)
|
||||
|
|
|
|||
Loading…
Reference in New Issue