Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed package mpi-default-dev 1.0.1 with libopenmpi-dev 1.4.3-2.1ubuntu3 as dependency.

When I tried to compile code with -Wall flag I got compilation errors:

In file included from /usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h:288:0,
                 from /usr/lib/openmpi/include/mpi.h:1886,
                 from ../Pole/main.cpp:20:
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:644:1: warning: unused parameter 'oldcomm' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:644:1: warning: unused parameter 'comm_keyval' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:644:1: warning: unused parameter 'extra_state' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:644:1: warning: unused parameter 'attribute_val_in' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:644:1: warning: unused parameter 'attribute_val_out' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:671:1: warning: unused parameter 'comm' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:671:1: warning: unused parameter 'comm_keyval' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:671:1: warning: unused parameter 'attribute_val' [-Wunused-parameter]
/usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/comm_inln.h:671:1: warning: unused parameter 'extra_state' [-Wunused-parameter]

After that in linking phase there are many "undefined reference" errors. Full compiler output: http://pastebin.com/tThfEiL6

Is it a bug in header and should be reported? Where can I find proper package with Long Term Support?

share|improve this question
    
Can you try a basic "hello world" type test? For example, there's one in bugs.launchpad.net/ubuntu/+source/openmpi/+bug/949044 An error on its own does not necessarily indicate a bug. You need to be sure that the bug is in the openmpi package, and not in your program. If you can establish this, then please file a bug with the command ubuntu-bug libopenmpi-dev with details. Version 1.4.3-2.1ubuntu3 is indeed the version shipped with 12.04, so is LTS. But note that openmpi is in universe, which means that it has community support only. –  Robie Basak Jan 14 '13 at 15:10
    
@robie-basak compilation of yours source works well but linking not.Output for gcc mpicc --showme:link` -o helloworld helloworld.o`:helloworld.o: In function main': helloworld.c:(.text+0x17): undefined reference to MPI_Init' helloworld.c:(.text+0x26): undefined reference to ompi_mpi_comm_world' helloworld.c:(.text+0x2b): undefined reference to MPI_Comm_rank' helloworld.c:(.text+0x3a): undefined reference to ompi_mpi_comm_world' helloworld.c:(.text+0x3f): undefined reference to MPI_Comm_size' helloworld.c:(.text+0x61): undefined reference to MPI_Finalize' collect2: ld returned 1 e...` –  mat Jan 14 '13 at 16:21
    
@RobieBasak Compilation using mpicc helloworld.c works without errors. I think that there is sth missing in output of mpicc --showme:link. Currently it returns: -pthread -L/usr/lib/openmpi/lib -lmpi -lopen-rte -lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl –  mat Jan 14 '13 at 17:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.