计算化学公社

 找回密码 Forget password
 注册 Register
Views: 4966|回复 Reply: 9
打印 Print 上一主题 Last thread 下一主题 Next thread

[综合交流] 编译OpenMPI4.1.1时出现错误

[复制链接 Copy URL]

21

帖子

0

威望

199

eV
积分
220

Level 3 能力者

跳转到指定楼层 Go to specific reply
楼主
小白在按照 http://bbs.keinsci.com/thread-11697-1-1.html 的方法安装OpenMPI4.1.1时,运行make all install 后出现以下错误:

collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1880: opal_wrapper] Error 1
make[2]: Leaving directory '/home/ubuntu/Downloads/openmpi-4.1.1/opal/tools/wrappers'
make[1]: *** [Makefile:2383: all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/Downloads/openmpi-4.1.1/opal'
make: *** [Makefile:1901: all-recursive] Error 1

请问该如何解决?谢谢!

5万

帖子

99

威望

5万

eV
积分
112353

管理员

公社社长

2#
发表于 Post on 2021-10-19 06:09:11 | 只看该作者 Only view this author
看编译过程产生的日志文件末尾提示的信息试图判断
北京科音自然科学研究中心http://www.keinsci.com)致力于计算化学的发展和传播,长期开办高质量的各种计算化学类培训:初级量子化学培训班中级量子化学培训班高级量子化学培训班量子化学波函数分析与Multiwfn程序培训班分子动力学与GROMACS培训班CP2K第一性原理计算培训班,内容介绍以及往届资料购买请点击相应链接查看。这些培训是计算化学从零快速入门以及进一步全面系统性提升研究水平的高速路!培训各种常见问题见《北京科音办的培训班FAQ》
欢迎加入“北京科音”微信公众号获取北京科音培训的最新消息、避免错过网上有价值的计算化学文章!
欢迎加入人气非常高、专业性特别强的综合性理论与计算化学交流QQ群“思想家公社QQ群”:1号:18616395,2号:466017436,3号:764390338,搜索群号能搜到哪个说明目前哪个能加,合计9000人。北京科音培训班的学员在群中可申请VIP头衔,提问将得到群主Sobereva的最优先解答。
思想家公社的门口Blog:http://sobereva.com(发布大量原创计算化学相关博文)
Multiwfn主页:http://sobereva.com/multiwfn(十分强大的量子化学波函数分析程序)
ResearchGate:https://www.researchgate.net/profile/Tian_Lu
Money and papers are rubbish, get a real life!

21

帖子

0

威望

199

eV
积分
220

Level 3 能力者

3#
 楼主 Author| 发表于 Post on 2021-10-19 08:20:33 | 只看该作者 Only view this author
文件末尾如下:
make[2]: Entering directory '/home/ubuntu/Downloads/openmpi-4.1.1/opal/tools/wrappers'
  CCLD     opal_wrapper
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_last'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_evthread_use_pthreads'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_get_support'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_base_loop'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_dup'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_isincluded'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_set_area_membind'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_copy'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_destroy'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_list_asprintf'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_or'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_obj_type_string'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_set'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_add'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_obj_type_snprintf'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_export_xmlbuffer'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_isfull'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_get_type_depth'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_base_free'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_shmem_topology_adopt'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_base_loopbreak'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_load'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_set_xml'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_set_membind'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_isset'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_iszero'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `mca_event_libevent2022_component'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_list_sscanf'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_intersects'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_get_depth_type'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_priority_set'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_init'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_snprintf'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_get_depth'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_free'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_set_flags'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_del'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_first'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_assign'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_obj_attr_snprintf'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_alloc'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_get_obj_by_depth'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_distances_release'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_set_io_types_filter'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_base_priority_init'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_distances_get_by_depth'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_zero'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `mca_hwloc_hwloc201_component'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_dup'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_topology_set_xmlbuffer'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_get_nbobjs_by_depth'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_get_cpubind'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_libevent2022_event_reinit'
/usr/bin/ld: ../../../opal/.libs/libopen-pal.so: undefined reference to `opal_hwloc201_hwloc_bitmap_weight'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1880: opal_wrapper] Error 1
make[2]: Leaving directory '/home/ubuntu/Downloads/openmpi-4.1.1/opal/tools/wrappers'
make[1]: *** [Makefile:2383: all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/Downloads/openmpi-4.1.1/opal'
make: *** [Makefile:1901: all-recursive] Error 1

不懂是什么原因导致。

3806

帖子

4

威望

7994

eV
积分
11880

Level 6 (一方通行)

MOKIT开发者

4#
发表于 Post on 2021-10-20 01:14:58 | 只看该作者 Only view this author
试试用Intel编译器编译openmpi,即一开始
./configure --prefix=你要的安装路径 FC=ifort F77=ifort CC=icc CXX=icpc
自动做多参考态计算的程序MOKIT

5万

帖子

99

威望

5万

eV
积分
112353

管理员

公社社长

5#
发表于 Post on 2021-10-20 03:09:21 | 只看该作者 Only view this author
andycheng2026 发表于 2021-10-19 08:20
文件末尾如下:
make[2]: Entering directory '/home/ubuntu/Downloads/openmpi-4.1.1/opal/tools/wrapper ...

说明当前用的是什么编译器
北京科音自然科学研究中心http://www.keinsci.com)致力于计算化学的发展和传播,长期开办高质量的各种计算化学类培训:初级量子化学培训班中级量子化学培训班高级量子化学培训班量子化学波函数分析与Multiwfn程序培训班分子动力学与GROMACS培训班CP2K第一性原理计算培训班,内容介绍以及往届资料购买请点击相应链接查看。这些培训是计算化学从零快速入门以及进一步全面系统性提升研究水平的高速路!培训各种常见问题见《北京科音办的培训班FAQ》
欢迎加入“北京科音”微信公众号获取北京科音培训的最新消息、避免错过网上有价值的计算化学文章!
欢迎加入人气非常高、专业性特别强的综合性理论与计算化学交流QQ群“思想家公社QQ群”:1号:18616395,2号:466017436,3号:764390338,搜索群号能搜到哪个说明目前哪个能加,合计9000人。北京科音培训班的学员在群中可申请VIP头衔,提问将得到群主Sobereva的最优先解答。
思想家公社的门口Blog:http://sobereva.com(发布大量原创计算化学相关博文)
Multiwfn主页:http://sobereva.com/multiwfn(十分强大的量子化学波函数分析程序)
ResearchGate:https://www.researchgate.net/profile/Tian_Lu
Money and papers are rubbish, get a real life!

21

帖子

0

威望

199

eV
积分
220

Level 3 能力者

6#
 楼主 Author| 发表于 Post on 2021-10-20 05:18:56 | 只看该作者 Only view this author
sobereva 发表于 2021-10-20 03:09
说明当前用的是什么编译器

应该是gcc和g++,因为编译过程中提示安装了。

21

帖子

0

威望

199

eV
积分
220

Level 3 能力者

7#
 楼主 Author| 发表于 Post on 2021-10-20 05:23:25 | 只看该作者 Only view this author
zjxitcc 发表于 2021-10-20 01:14
试试用Intel编译器编译openmpi,即一开始
./configure --prefix=你要的安装路径 FC=ifort F77=ifort CC=ic ...

会出现如下报错:
*** Startup tests
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in `/home/ubuntu/Downloads/openmpi-4.1.1':
configure: error: C compiler cannot create executables
See `config.log' for more details

3806

帖子

4

威望

7994

eV
积分
11880

Level 6 (一方通行)

MOKIT开发者

8#
发表于 Post on 2021-10-20 10:31:59 | 只看该作者 Only view this author
andycheng2026 发表于 2021-10-20 05:23
会出现如下报错:
*** Startup tests
checking build system type... x86_64-pc-linux-gnu

你能截图说明你的运行命令么?我感觉你不是按我说的那么运行的。另外,先运行
ifort --version
icc --version
icpc --version
如果这三个显示找不到,说明你机子上没有intel编译器,自然也就没法使用其编译openmpi
自动做多参考态计算的程序MOKIT

50

帖子

0

威望

2076

eV
积分
2126

Level 5 (御坂)

游街小商贩

9#
发表于 Post on 2023-3-31 20:26:38 | 只看该作者 Only view this author
本帖最后由 九曜 于 2023-3-31 20:35 编辑
zjxitcc 发表于 2021-10-20 10:31
你能截图说明你的运行命令么?我感觉你不是按我说的那么运行的。另外,先运行
ifort --version
icc --v ...
请问师兄:
1.如果编译openmpi的时候,module load 加载了 gcc/gcc-8.3.0 是不是就已经默认指定了CC=gcc CXX=g++ FC=gfortran。
2.如果这时候我再想编译一个xxx.f90文件,指定了FC=mpi90,他会报错Fatal Error: File 'mpi.mod' opened at (1) is not a GNU Fortran module file。mpi90 --show 显示使用的是gfortran,是不是用gfortran就无法加载这个mpi.mod库呢,需要改成ifort才可以么。具体应该怎么修改呢,需要重新编译openmpi 指定FC=ifort么。
3.我已经用现在的openmpi安装了block2,如果用intel 编译器重新编译openmpi,我的block2还需要重新编译一次么。

3806

帖子

4

威望

7994

eV
积分
11880

Level 6 (一方通行)

MOKIT开发者

10#
发表于 Post on 2023-4-2 09:48:06 | 只看该作者 Only view this author
本帖最后由 zjxitcc 于 2023-4-2 09:49 编辑
九曜 发表于 2023-3-31 20:26
请问师兄:
1.如果编译openmpi的时候,module load 加载了 gcc/gcc-8.3.0 是不是就已经默认指定了CC=gcc C ...

1. 不是。
2. 我没见过指定FC=mpif90的,一般来说比较完善的程序的configure/Makefile/CMakeLists.txt会认MPIF90之类变量的值为MPI编译器,而FC变量仍留给ifort或gfortran。另外,FC与MPIF90的值建议具有一致性,例如当FC=ifort时,MPIF90最好采用Intel编译器编译的openmpi,而非GNU编译的openmpi。
建议阅读一下程序安装说明。(当然,如果是自己写的程序,那是想怎么指定就怎么指定,只不过不太符合传统约定)
3. 是的。但我没见过/试过用Intel编译的openmpi去编译block2是否可以。所以比较好的办法是将环境变量写在提交任务的脚本里,要啥写啥。安装block2可参考我写的《block2的编译和安装
自动做多参考态计算的程序MOKIT

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2024-11-23 20:43 , Processed in 0.172839 second(s), 21 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list