Segmentation fault trying to install openmpi

2019-08-14 05:40发布

I'm trying to install openmpi but after different attempts I still can't use it.

This is the last guide I followed. I simply copied and paste each command line.

Here is what I obtained from my terminal when I run: mpirun

timmy@timmy-Lenovo-G50-80 ~/openmpi-1.8.1 $ mpirun
[timmy-Lenovo-G50-80:21817] *** Process received signal ***
[timmy-Lenovo-G50-80:21817] Signal: Segmentation fault (11)
[timmy-Lenovo-G50-80:21817] Signal code: Address not mapped (1)
[timmy-Lenovo-G50-80:21817] Failing at address: 0x7fab73035000
[timmy-Lenovo-G50-80:21817] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7fab73e20340]
[timmy-Lenovo-G50-80:21817] [ 1] /home/timmy/.openmpi/lib/openmpi/mca_shmem_mmap.so(+0x1886)[0x7fab72e32886]
[timmy-Lenovo-G50-80:21817] [ 2] /home/timmy/.openmpi/lib/libopen-pal.so.13(opal_shmem_base_select+0x38)[0x7fab740d6b38]
[timmy-Lenovo-G50-80:21817] [ 3] /home/timmy/.openmpi/lib/libopen-pal.so.13(opal_init+0x1a2)[0x7fab74057cd2]
[timmy-Lenovo-G50-80:21817] [ 4] mpirun[0x403db1]
[timmy-Lenovo-G50-80:21817] [ 5] mpirun[0x40361d]
[timmy-Lenovo-G50-80:21817] [ 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fab73a6cec5]
[timmy-Lenovo-G50-80:21817] [ 7] mpirun[0x403539]
[timmy-Lenovo-G50-80:21817] *** End of error message ***
Errore di segmentazione

So I reboot and now I obtain only this:

mpirun: error while loading shared libraries: libopen-rte.so.12: cannot open shared object file: No such file or directory

What I have to do to make works mpi on linux?

2条回答
祖国的老花朵
2楼-- · 2019-08-14 06:15

https://www.open-mpi.org/community/lists/users/2011/02/15759.php

quoted from URL:

if you're using a hostfile to launch across multiple machines, ensure that your shell startup files (e.g., .bashrc) are setup to set your LD_LIBRARY_PATH properly.

查看更多
Bombasti
3楼-- · 2019-08-14 06:18

You need to set your LD_LIBRARY_PATH to include /home/timmy/.openmpi/lib. Specifically, you have to put those two lines from the guide you've followed:

export PATH="$PATH:/home/$USER/.openmpi/bin"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/"

into your shell's initialisation file.

As to the first error, it occurs somewhere during the initialisation of the mmap shmem component of Open MPI and could indicate problems with your build. Try removing /home/timmy/.openmpi and rebuilding again. Or even try installing the library using your system's package manager - a more or less recent version of Open MPI is available in the package repository of virtually every distribution.

查看更多
登录 后发表回答