ERROR Building MPI, already tried setting CC FC

question

#1

Hello,
I am stuck on my second round of installing MPI for julia (already installed it on my bionic Ubuntu computer but I need it on the xenial Ubuntu server). I exported the CC and FC and FF and CXX variable over commandline, which made it possible for me to install it on my computer, yet it seems to be more complicated than that to install it on the server. The mpi compilers available in /usr/bin are mpiCC, mpiCC.openmpi, mpic++, mpic++.openmpi, mpicc, mpicc.openmpi, mpicxx, mpicxx.openmpi, mpiexec, mpiexec.openmpi, mpif77, mpif77.openmpi, mpif90, mpif90.openmpi, mpifort, mpifort.openmpi.

Both me and the server have mpi-default-dev and libopenmpi-dev installed.

I have the build log here:

 Building MPI → `~/.julia/dev/MPI/deps/build.log`
 Resolving package versions...
┌ Error: Error building `MPI`: 
-- The Fortran compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working Fortran compiler: /usr/bin/mpif90.openmpi
-- Check for working Fortran compiler: /usr/bin/mpif90.openmpi  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/mpif90.openmpi supports Fortran 90
-- Checking whether /usr/bin/mpif90.openmpi supports Fortran 90 -- yes
-- Check for working C compiler: /usr/bin/mpicc.openmpi
-- Check for working C compiler: /usr/bin/mpicc.openmpi -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /usr/bin/git (found version "2.7.4") 
-- Found MPI_C: /usr/lib/openmpi/lib/libmpi.so  
-- Found MPI_Fortran: /usr/lib/openmpi/lib/libmpi_usempif08.so;/usr/lib/openmpi/lib/libmpi_usempi_ignore_tkr.so;/usr/lib/openmpi/lib/libmpi_mpifh.so;/usr/lib/openmpi/lib/libmpi.so  
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- Looking for MPI_Comm_c2f
-- Looking for MPI_Comm_c2f - found
-- Configuring done
-- Generating done
-- Build files have been written to: /lscr_los/cm/qrf654/.julia/dev/MPI/deps/build
Scanning dependencies of target gen_constants
[ 11%] Building Fortran object CMakeFiles/gen_constants.dir/gen_constants.f90.o
/lscr_los/cm/qrf654/.julia/dev/MPI/deps/gen_constants.f90:43:43:

   call output("MPI_NO_OP       ", MPI_NO_OP)
                                           1
Error: Symbol ‘mpi_no_op’ at (1) has no IMPLICIT type
CMakeFiles/gen_constants.dir/build.make:62: recipe for target 'CMakeFiles/gen_constants.dir/gen_constants.f90.o' failed
make[2]: *** [CMakeFiles/gen_constants.dir/gen_constants.f90.o] Error 1
CMakeFiles/Makefile2:209: recipe for target 'CMakeFiles/gen_constants.dir/all' failed
make[1]: *** [CMakeFiles/gen_constants.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
[ Info: Attempting to create directory /lscr_los/cm/qrf654/.julia/dev/MPI/deps/build
[ Info: Changing directory to /lscr_los/cm/qrf654/.julia/dev/MPI/deps/build
ERROR: LoadError: failed process: Process(`make`, ProcessExited(2)) [2]
Stacktrace:
 [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
 [2] pipeline_error at ./process.jl:705 [inlined]
 [3] #run#504(::Bool, ::Function, ::Cmd) at ./process.jl:663
 [4] run(::Cmd) at ./process.jl:661
 [5] macro expansion at ./logging.jl:308 [inlined]
 [6] run(::BinDeps.SynchronousStepCollection) at /lscr_los/cm/qrf654/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:518
 [7] macro expansion at ./logging.jl:308 [inlined]
 [8] run(::BinDeps.SynchronousStepCollection) at /lscr_los/cm/qrf654/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:518
 [9] macro expansion at ./logging.jl:308 [inlined]
 [10] run(::BinDeps.SynchronousStepCollection) at /lscr_los/cm/qrf654/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:518
 [11] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /lscr_los/cm/qrf654/.julia/packages/BinDeps/ZEval/src/dependencies.jl:944
 [12] satisfy!(::BinDeps.LibraryDependency) at /lscr_los/cm/qrf654/.julia/packages/BinDeps/ZEval/src/dependencies.jl:922
 [13] top-level scope at /lscr_los/cm/qrf654/.julia/packages/BinDeps/ZEval/src/dependencies.jl:977
 [14] include at ./boot.jl:317 [inlined]
 [15] include_relative(::Module, ::String) at ./loading.jl:1041
 [16] include(::Module, ::String) at ./sysimg.jl:29
 [17] include(::String) at ./client.jl:388
 [18] top-level scope at none:0
in expression starting at /lscr_los/cm/qrf654/.julia/dev/MPI/deps/build.jl:54
@ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069

I saw header files mpi.h and mpif.h in /usr/lib/openmpi/include but I am not sure if it helps and if so to which enviroment variable it would belong to.


#2

Try running mpicc -v to see what version of MPI you are using. MPI_NO_OP was introduced in MPI 3, so my guess is you are using an older version. MPI.jl really needs a versioning system so it only tries to get the values of constants that actually exist.

Please post the output of the command and we will figure out what to do next.


#3
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 

it seems to be showing the version of the compiler? when i type in thos mpirun -V it gives me 1.10.2 on the server and 2.1.1 on my computer.


#4

yes you are absolutely right i just finished installing an updated open mpi version in my home directory and julia mpi got installed


#5

Thanks for verifying the problem. I have added a comment to this issue about MPI versions.