2012-05-22 27 views
2

我一直在使用本教程http://mpjexpress.blogspot.co.nz/2010/05/executing-and-debugging-mpj-express.html(系统找不到指定的路径),文本:步骤1,2,3视频: 0:00之间的步骤,以3:29java.io.FileNotFoundException:空的conf wrapper.conf

引用文件

build path http://iforce.co.nz/i/e3kg0k2h.w0c.png

示例代码(从教程复制粘贴)

import mpi.*; 
public class HelloEclipseWorld { 
vpublic static void main(String[] args) throws Exception { 
MPI.Init(args) ; 
int rank = MPI.COMM_WORLD.Rank(); 
int size = MPI.COMM_WORLD.Size(); 
System.out.println("I am process <"+rank+"> of total <"+ 
size+"> processes."); 
MPI.Finalize(); 
} 
} 

而且我已经有来自http://en.sourceforge.jp/projects/sfnet_mpjexpress/downloads/releases/mpj-v0_38.zip/的MPI和MPJ jar文件(按照教程步骤)

然后我设置运行路径配置(根据教程步骤)

-jar ${MPJ_HOME}/lib/starter.jar 

我还试图在相同的命令但-np 4追加到末尾(根据教程步骤)

-jar ${MPJ_HOME}/lib/starter.jar -np 4 

VM参数

mpi run config http://iforce.co.nz/i/pfpigbiv.l4h.png

MPJ_HOME可变

mpi var http://iforce.co.nz/i/rzl4e0ff.pfi.png

MPJ快速输出

MPJ Express (0.38) is started in the multicore configuration 
I am process <3> of total <4> processes 
I am process <3> of total <4> processes 
I am process <3> of total <4> processes 
I am process <3> of total <4> processes 

一旦我完成设置的一切,我尝试通过Eclipse来执行它,但我发现这些错误:(

编译器错误

java.io.FileNotFoundException: null\conf\wrapper.conf (The system cannot find the path specified) 
at java.io.FileInputStream.open(Native Method) 
at java.io.FileInputStream.<init>(Unknown Source) 
at java.io.FileInputStream.<init>(Unknown Source) 
at runtime.starter.MPJRun.getPortFromWrapper(MPJRun.java:807) 
at runtime.starter.MPJRun.<init>(MPJRun.java:68) 
at runtime.starter.MPJRun.main(MPJRun.java:964) 

Wrapper.conf位置

wrapper loc http://iforce.co.nz/i/g02jjzgk.g5n.png

我对我为什么会得到些许困惑这些错误..我是否想要做别的事情?该教程不告诉我?为了得到这个工作?

我做错了什么?我该如何解决这个JRE错误?关于mpj express上的文件“conf \ wrapper.conf”?我想我错过了一些东西,但是我已经阅读了很多资源并且一遍又一遍地学习了这个教程......但是我还是收到了wrapper.conf的FileNotFoundException异常。

我找到的一些资源(没有回答FileNotFoundException问题)。

如果任何人有关于如何解决的FileNotFoundException异常我会不胜感激感谢任何建议!

回答

1

Preferences菜单中的去跑/调试 - >字符串替换。把你的变量放在那里。在这种情况下,你没有处理环境变量。环境变量会出现在全平台特定的方式在Windows上,你会看到%MJP_HOME%和* nix的它看起来就像$MJP_HOME在这种情况下,你是使用Eclipse的字符串替换机制

你可以读到它here

1

寻址MPJ错误

Error: Could not find or load main class runtime.starter.MulticoreStarter 

得到它的工作..去运行配置 - >类路径,并“引导”,点击“添加外部JAR”下,只是包括了从/ lib /文件夹从mpj,这将使mpj运行,但我不确定如何解决编译器问题。

+0

感谢安德鲁现在mpj正在返回预期的输出,:)我已经更新了这个问题,尝试解决编译器问题。 – Killrawr

0

寻址编译器

java.io.FileNotFoundException:空\的conf \ wrapper.conf(系统找不到指定的路径) 在java.io.FileInputStream.open(本机方法) 是java (Unknown Source) at java.io.FileInputStream。(Unknown Source) at runtime.starter.MPJRun.getPortFromWrapper(MPJRun.java:807) at runtime.starter.MPJRun。(MPJRun.java: 68) at runtime.starter.MPJRun.main(MPJRun.java:964)

我的讲师告诉我,我错过了环境变量“MPJ_HOME”,运行配置 - >环境变量 - >新建“MPJ_HOME”(使用VM参数创建的变量)

相关问题