尝试在群集上无头运行NetLogo时出现Java错误 [英] Java error when trying to run NetLogo headlessly on a cluster

查看:100
本文介绍了尝试在群集上无头运行NetLogo时出现Java错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了将作业发送到集群,我正在尝试使用Linux无头运行Netlogo.我以前从未使用过Linux,但是我尝试按照此处的说明进行操作(

I am attempting to run Netlogo headlessly using linux in order to send a job to a cluster. I have never used linux before, but I am attempting to follow the directions here (http://netlogo-users.18673.x6.nabble.com/Running-NetLogo-Headless-in-Behaviorspace-Sample-code-td4862232.html).

我的脚本是:

#!/bin/bash
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -c 7
java -Xmx1024m -Dfile.encoding=UTF-8 -cp /opt/shared/netlogo/5.3.1-64/app/NetLogo.jar \
org.nlogo.headless.main \
--model /cluster/home/rfuda01/UM_model.nlogo \
--experiment UM \
--table /cluster/home/rfuda01/UM_test.csv

在输出文件中,我收到以下错误消息:

In the output file, I am receiving the following error message:

Exception in thread "main" java.lang.NoClassDefFoundError: org/nlogo/headless/main
Caused by: java.lang.ClassNotFoundException: org.nlogo.headless.main
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.nlogo.headless.main. Program will exit.

任何想法意味着什么或如何解决?

Any ideas what this means or how to fix this?

推荐答案

"main"应大写:"Main".因此脚本应为:

"main" should be capitalized: "Main". So the script should be:

#!/bin/bash
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -c 7
java -Xmx1024m -Dfile.encoding=UTF-8 -cp /opt/shared/netlogo/5.3.1-64/app/NetLogo.jar \
org.nlogo.headless.Main \
--model /cluster/home/rfuda01/UM_model.nlogo \
--experiment UM \
--table /cluster/home/rfuda01/UM_test.csv

这篇关于尝试在群集上无头运行NetLogo时出现Java错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆