为 Open MPI 构建 Java 接口
Posted
技术标签:
【中文标题】为 Open MPI 构建 Java 接口【英文标题】:Building Java interface for Open MPI 【发布时间】:2015-10-19 09:31:31 【问题描述】:我正在尝试使用this page 上的说明。
一旦我提取并导航到openmpi-1.8.7
目录,我就进入了
./configure --enable-mpi-java
返回的
*** Java compiler
checking OSX locations... not found
checking Linux locations... not found
checking Solaris locations... not found
checking Java support available... no
*** Java MPI bindings
checking if want Java bindings... yes
configure: WARNING: Java bindings requested but no Java support found
configure: error: cannot continue
所以我尝试了
./configure --enable-mpi-java --with-jdk-bindir=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin --with-jdk-headers=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/includecc
返回的
*** Java compiler
checking --with-jdk-bindir value... sanity check ok (/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin)
checking --with-jdk-headers value... sanity check ok (/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/include)
checking for javac... /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/javac
checking for javah... /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/javah
checking for jar... /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/jar
checking jni.h usability... no
checking jni.h presence... no
checking for jni.h... no
checking Java support available... no
*** Java MPI bindings
checking if want Java bindings... yes
configure: WARNING: Java bindings requested but no Java support found
configure: error: cannot continue
我检查了javac
、javah
、jar
和jni.h
文件确实在bin
和include
文件夹下
/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home
为什么构建不起作用?我尝试搜索日志文件,但找不到问题。
【问题讨论】:
也许这会有所帮助:***.com/questions/24996017/… 在'config.log'中可以看到准确的失败测试代码。 【参考方案1】:我遇到了同样的问题,即使我的 Macbook 上有 jdk7 和 jdk7,所以只需运行它即可。:
./configure --enable-mpi-java
我的jdk在下面:
ls /Library/Java/JavaVirtualMachines/
jdk1.7.0_79.jdk jdk1.8.0_91.jdk
你确定你有的是jdk6+吗?不是旧版本,而不仅仅是 jre? javac -version
说什么?
【讨论】:
【参考方案2】:以下命令在使用 Oracle Java 8 构建时有效
./configure --enable-mpi-java --with-jdk-bindir=/usr/lib/jvm/java-8-oracle/bin --with-jdk-headers=/usr/lib/jvm/java-8-oracle/include
【讨论】:
以上是关于为 Open MPI 构建 Java 接口的主要内容,如果未能解决你的问题,请参考以下文章