0
我最近在Windows上开始使用MPJExpress。做了文档中windows调用MPI.Init(args)时出现异常
提到的所有配置冉这个小程序: -
import mpi.*;
public class HelloWorld {
public static void main(String args[]) throws Exception {
MPI.Init(args);
int me = MPI.COMM_WORLD.Rank();
int size = MPI.COMM_WORLD.Size();
System.out.println("Hi from <" + me + ">");
MPI.Finalize();
}
}
当我运行此我得到这个错误: -
Exception in thread "main" mpi.MPIException: Usage: java MPI <myrank> <conf_file> <device_name> conf_file can be, ../conf/xdev.conf <Local>OR http://holly.dsg.port.ac.uk:15000/xdev.conf <Remote>
at mpi.MPI.Init(MPI.java:232)
没有XDEV。配置文件在../conf/xdev.conf(我也检查了以前的MPJExpress版本)也http://holly.dsg.port.ac.uk:15000/xdev.conf不可到达
当我看到代码为MPJDev.jav我看如果
(args.length < 3) {
throw new MPJDevException("Usage: " +
"java MPJDev <myrank> <conf_file> <device_name>"
+"conf_file can be, ../conf/xdev.conf <Local>"
+"OR http://holly.dsg.port.ac.uk:15000/xdev.conf <Remote>");
}
我在做什么错误,以获得上述例外。它看起来像args.length小于3,所以我得到了上述例外。我该如何纠正它?
你传递了参数吗? –
不,我使用Run as Java Application直接从Eclipse运行它。我没有具体通过任何论点。 –
好吧,例外情况说它需要一个和作为参数 –