Netlogo无头错误

时间:2015-02-14 12:12:24

标签: netlogo

我在运行NetLogo时遇到此错误,在HPC上无头。我的工作似乎在继续,但没有写任何东西。

Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
            at org.nlogo.generator.CustomClassLoader.loadClass(CustomClassLoader.scala:27)
            at org.nlogo.generator.CustomClassLoader.loadBytecodeClass(CustomClassLoader.scala:32)
            at org.nlogo.generator.Generator$InstructionGenerator.finish(Generator.scala:241)
            at org.nlogo.generator.Generator$InstructionGenerator.generate(Generator.scala:93)
            at org.nlogo.generator.Generator.org$nlogo$generator$Generator$$recurse(Generator.scala:28)
            at org.nlogo.generator.Generator$$anonfun$generate$1.apply(Generator.scala:24)
            at org.nlogo.generator.Generator$$anonfun$generate$1.apply(Generator.scala:24)
            at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
            at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
            at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
            at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
            at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
            at scala.collection.mutable.ArrayOps.map(ArrayOps.scala:38)
            at org.nlogo.generator.Generator.generate(Generator.scala:24)
            at org.nlogo.compiler.CompilerMain$$anonfun$compile$3.apply(CompilerMain.scala:59)
            at org.nlogo.compiler.CompilerMain$$anonfun$compile$3.apply(CompilerMain.scala:50)
            at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:60)
            at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
            at org.nlogo.compiler.CompilerMain$.compile(CompilerMain.scala:50)
            at org.nlogo.compiler.Compiler$.compileProgram(Compiler.scala:28)
            at org.nlogo.headless.HeadlessModelOpener.openFromMap(HeadlessModelOpener.scala:53)
            at org.nlogo.headless.HeadlessWorkspace.openString(HeadlessWorkspace.scala:525)
            at org.nlogo.headless.HeadlessWorkspace.open(HeadlessWorkspace.scala:507)
            at org.nlogo.headless.Main$.newWorkspace$1(Main.scala:19)
            at org.nlogo.headless.Main$$anonfun$runExperiment$1.apply(Main.scala:24)
            at org.nlogo.headless.Main$$anonfun$runExperiment$1.apply(Main.scala:24)
            at org.nlogo.lab.Lab$$anonfun$1.apply(Lab.scala:33)
            at org.nlogo.lab.Lab$$anonfun$1.apply(Lab.scala:33)
            at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)

1 个答案:

答案 0 :(得分:1)

更改netlogo批处理文件中的内存大小设置可能会解决此问题。由于最大内存的默认值较低,因此当您使用大量代理进行模拟时,通常会发生此问题。

将其更改为1024M是我之前所做的。尝试制作自己的脚本,并使用hpc提供的标准版本,使用本地修改的netlogo批处理提交。