3

I have just started to use Linux Mint for academic reasons and ran into an error as I was trying to install openmpi-2.0.1. I am getting following error as I am trying to make check

    make[4]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers'
make[3]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers'
make[2]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers'
Making check in etc
make[2]: Entering directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/etc'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/etc'
Making check in mpi/c
make[2]: Entering directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c'
Making check in profile
make[3]: Entering directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c/profile'
  CC       pstatus_c2f.lo
rm: cannot remove '.libs/pstatus_c2f.o': Permission denied
Assembler messages:
Fatal error: can't create .libs/pstatus_c2f.o: Permission denied
make[3]: *** [pstatus_c2f.lo] Error 1
make[3]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c/profile'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi'
make: *** [check-recursive] Error 1

Earlier I got an error

make[3]: Entering directory `/home/thanhnt/openmpi-1.6/ompi/debuggers'
CCLD predefined_gap_test
libtool: link: cannot find the library `../../ompi/libmpi.la' or unhandled argument `../../ompi/libmpi.la'
make[3]: *** [predefined_gap_test] Error 1
make[3]: Leaving directory `/home/thanhnt/openmpi-1.6/ompi/debuggers'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/home/thanhnt/openmpi-1.6/ompi/debuggers'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/thanhnt/openmpi-1.6/ompi'
make: *** [check-recursive] Error

Even after fixing the permission error above, I still got:

libtool: error: cannot find the library '../../ompi/libmpi.la' or unhandled argument '../../ompi/libmpi.la'

make[3]: *** [predefined_gap_test] Error 1

make[3]: Leaving directory /home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers' make[2]: *** [check-am]

Error 2 make[2]: Leaving directory /home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers' make[1]: *** [check-recursive] Error 1

Kuljeet Keshav
  • 131
  • 1
  • 2
  • 3
    You've some issues with permissions (`Permission denied`). You're probably mixing `sudo` with normal user credentials. Please include the info how do you installing it. You probably need to `make clean`, fix the permissions and try again. – kenorb Dec 19 '16 at 17:24
  • Even after getting permissions and doinfg a make clean... – Kuljeet Keshav Dec 20 '16 at 07:31
  • `libtool: error: cannot find the library '../../ompi/libmpi.la' or unhandled argument '../../ompi/libmpi.la' make[3]: *** [predefined_gap_test] Error 1 make[3]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers' make[1]: *** [check-recursive] Error 1 ` – Kuljeet Keshav Dec 20 '16 at 07:34
  • The above error is what I am getting @kenorb – Kuljeet Keshav Dec 20 '16 at 07:35
  • Can you include the command how are you installing it? Just `make` in the source folder? – kenorb Dec 20 '16 at 10:55

1 Answers1

0

You need to compile it with icc intel compiler. Make sure you're using the recent version, so it's compatible with your gcc. Then you need to configure and compile it by following these instructions suggested by @liqizuiyang:

  1. Copy the source code to $HOME and decompress.

    tar -xf openmpi-2.0.1.bz2
    
  2. Create a new directory named build under your $HOME.

    mkdir build
    

    The 'build' directory is a sub-directory of $HOME, not 'openmpi-1.6.4'. Both 'build' and 'openmpi-1.6.4' are sub-directories of $HOME.

  3. Go to build and set environmental variables.

    cd build
    export CC=icc
    export CXX=icpc
    export FC=ifort
    export F77=ifort
    export CFLAGS=-O2
    export CXXFLAGS=-O2
    export FCFLAGS=-O2
    export FFLAGS=-O2
    
  4. Run configure.

    ../openmpi-2.0.1/configure --prefix="$HOME/code/openmpi-2.0.1
    
  5. Build openmpi.

    make
    
  6. Run the test suite.

    make check
    
  7. Install.

    make install
    

Here are some other guides for building Open MPI:


Another workaround, as suggested in the FAQ, is to build Open MPI as a static library by configuring Open MPI with --disable-shared and --enable-static. This has the same effect as --disable-dlopen, but it also makes libmpi.a (as opposed to a shared library).


If you still got the problem following the official guides, please raise the issue at open-mpi, there could be some issue specific to your Linux distribution.

kenorb
  • 20,250
  • 14
  • 140
  • 164