免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 48857 | 回复: 0
打印 上一主题 下一主题

openmpi与ifort设置问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2017-01-08 20:59 |只看该作者 |倒序浏览
本帖最后由 西乡新丰客 于 2017-01-08 21:03 编辑

我的openmpi安装好后,还有几个问题,想请教各位:我将openmpi的路径写入~/.bashrc内source后,把/usr/local/openmpi/example下的*.f90的并行例子cp到主目录~/下用mpifort编译,然后用mpirun运行,是可以正常运行得出正确的进程数的,但是当我在根目录下编译时,是不能用mpifort来编译的,只能用mpif90来编译,而且编译后再用mpirun运行后会出现一个进程重复np次的情况。我又修改了根目录下/etc/profile内openmpi的路径,仍然会出现只有一个进程重复np次的情况。
我并没有在.bashrc或者profile内写入过其他的mpi的环境变量。(只有ifort和openmpi的路径。)
我觉得问题是不是在于在根目录下编译fortran程序时,只能用gfortran,而我的gfortran又并没有安装好,所以只有一个进程,重复了np次,而在主目录~/下,由于我在bashrc中写入来openmpi以及ifort的路径,所以可以用ifort来编译。而现在在根目录下仍然是只能用gfortran来编译串行的fortran程序,而不能用ifort来编译,会提示sudo:ifort找不到命令。我想,是不是只要我在根目录下能用ifort编译串行的fortran程序,就可以正确安装openmpi了。这之前出想的./configure --prefix=/***/ F77=ifort FC=ifort所出现的错误也就会没有了。我已經用root下source了/.bashrc以及/etc/profile还是没有用处。
另外有帖子说:“openmpi设置fortran编译器,通过 man mpif90查到在/usr/share/openmpi/mpif90-wrapper-data.txt里面修改配置,内容的话一看就知道了。”我也试过将mpifort-wrapper-data.txtcompiler中compiler参数修改为ifort也没有效果。

下面就是在用./configure  --prefix=/***/  F77=ifort   FC=ifort出现的提示,但我已經检查了一遍环境配置which ifort是我安装的目录。而且我的ifort可以编译*.f90的fortran文件,为什么还说我的ifort安装有问题?
*** Fortran compiler
checking whether we are using the GNU Fortran compiler... no
checking whether ifort accepts -g... no
configure: WARNING: Open MPI now ignores the F77 and FFLAGS environment variables; only the FC and FCFLAGS environment variables are used.
checking whether ln -s works... yes
checking if Fortran compiler works... no
**********************************************************************
* It appears that your Fortran compiler is unable to produce working
* executables.  A simple test application failed to properly
* execute.  Note that this is likely not a problem with Open MPI,
* but a problem with the local compiler installation.  More
* information (including exactly what command was given to the
* compiler and what error resulted when the command was executed) is
* available in the config.log file in the Open MPI build directory.
**********************************************************************
configure: error: Could not run a simple Fortran program.  Aborting.


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP