mistake in location of header files

Bug #188185 reported by iman brouwer
4
Affects Status Importance Assigned to Milestone
openmpi (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

 /usr/include/mpi.h line 1757: #include "ompi/mpi/cxx/mpicxx.h"

It looks inside "/usr/include/" for the "ompi" directory that is not there. The file it is looking for is inside "/usr/include/openmpi"
So when you try to compile a c++ file including mpi.h it ends up with a "no such file..." error.

Iman

P.S. I solved the problem for me with a symbolic links.

Revision history for this message
Koen (koen-beek) wrote :

What version of openmpi are you using ?
could you include the output of

dpkg -l | grep openmpi

thanks,

    Koen

Changed in openmpi:
assignee: nobody → koen-beek
status: New → Incomplete
Revision history for this message
iman brouwer (iman-brouwer) wrote : Re: [Bug 188185] Re: mistake in location of header files

Hoi Koen,

Here's the output:

~ $dpkg -l | grep openmpi
ii openmpi-bin 1.1-2.5
high performance message passing library
ii openmpi-common 1.1-2.5
high performance message passing library
ii openmpi-dbg 1.1-2.5
high performance message passing library
ii openmpi-dev 1.1-2.5
high performance message passing library
ii openmpi-libs0 1.1-2.5
high performance message passing library

Iman

On Feb 6, 2008 5:20 PM, Koen Beek <email address hidden> wrote:

> What version of openmpi are you using ?
> could you include the output of
>
> dpkg -l | grep openmpi
>
> thanks,
>
> Koen
>
> ** Changed in: openmpi (Ubuntu)
> Assignee: (unassigned) => Koen Beek (koen-beek)
> Status: New => Incomplete
>
> --
> mistake in location of header files
> https://bugs.launchpad.net/bugs/188185
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Koen (koen-beek) wrote :

Could you try to install 1.1-2.5ubuntu1 as 1.1-2.5 has some issues with incorrect directories

to do this you'll can activate the updates repository in the software sources : System->Administration->Software Sources->Updates->activate gutsy-updates

Revision history for this message
iman brouwer (iman-brouwer) wrote :

Hi Koen,

I've updated to the new version:
ii openmpi-bin 1.1-2.5ubuntu1
high performance message passing library
ii openmpi-common 1.1-2.5ubuntu1
high performance message passing library
ii openmpi-dbg 1.1-2.5ubuntu1
high performance message passing library
ii openmpi-dev 1.1-2.5ubuntu1
high performance message passing library
ii openmpi-libs0 1.1-2.5ubuntu1
high performance message passing library

But it is still giving me the following error:
In file included from /home/brouwer/qform/iman/mpi_test/src/main.cpp:4:
/usr/include/mpi.h:1757:33: error: ompi/mpi/cxx/mpicxx.h: No such file or
directory

In '/usr/include/openmpi/', the following symbolic link used to solve the
problem for me: cxx -> ompi/mpi/cxx

Iman

P.S. I'm on a kubuntu system.

On Feb 7, 2008 12:42 PM, Koen Beek <email address hidden> wrote:

> Could you try to install 1.1-2.5ubuntu1 as 1.1-2.5 has some issues with
> incorrect directories
>
> to do this you'll can activate the updates repository in the software
> sources : System->Administration->Software Sources->Updates->activate
> gutsy-updates
>
> --
> mistake in location of header files
> https://bugs.launchpad.net/bugs/188185
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Koen (koen-beek) wrote :

Hi iman,

  could you include a example cpp source file that causes the issue and how to reproduce the error ?

    thanks,

       Koen

Revision history for this message
iman brouwer (iman-brouwer) wrote :

Hi Koen,

This simple executable produces the error below:
 --------------------------

#include <mpi.h>

 int main(int argc, char *argv[])
 {
   MPI_Status stat;
   MPI_Init(&argc,&argv);
   MPI_Finalize();
   return 0;
 }

-----------------------------
Error when building the executable:

In file included from /home/iman/code/mpitest/src/main.cpp:1:
/usr/include/mpi.h:1757:33: error: ompi/mpi/cxx/mpicxx.h: No such file or
directory

Hope that helps,

Iman

On Feb 9, 2008 10:25 AM, Koen Beek <email address hidden> wrote:

> Hi iman,
>
> could you include a example cpp source file that causes the issue and
> how to reproduce the error ?
>
> thanks,
>
> Koen
>
> --
> mistake in location of header files
> https://bugs.launchpad.net/bugs/188185
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Koen (koen-beek) wrote :

Hi Iman,

   I tried the following on a gutsy amd64 with

ii openmpi-bin 1.1-2.5ubuntu1 high performance message passing library
ii openmpi-common 1.1-2.5ubuntu1 high performance message passing library
ii openmpi-dev 1.1-2.5ubuntu1 high performance message passing library
ii openmpi-libs0 1.1-2.5ubuntu1 high performance message passing library

   mpic++ main.cpp

this produced an a.out executable without any error messages on my system

I do have
/*
 * Conditional MPI 2 C++ bindings support. Include if:
 * - The user does not explicitly request us to skip it (when a C++ compiler
 * is used to compile C code).
 * - We want C++ bindings support
 * - We are not building OMPI itself
 * - We are using a C++ compiler
 */
#if !defined(OMPI_SKIP_MPICXX) && OMPI_WANT_CXX_BINDINGS && !OMPI_BUILDING
#if defined(__cplusplus) || defined(c_plusplus)
#include "ompi/mpi/cxx/mpicxx.h"
#endif
#endif

at the end of /usr/include/mpi.h

but this include does not seem to be included when I use mpic++

   Koen

Koen (koen-beek)
Changed in openmpi:
assignee: koen-beek → nobody
Revision history for this message
ilmarw (ilmar-wilbers) wrote :

I have the same problem running Version: 1.1-2.5.
The following command fixed it:
cd /usr/include/
sudo ln -s openmpi/ompi ompi

I'm using normal ubuntu.

ilmar

Revision history for this message
ilmarw (ilmar-wilbers) wrote :

I'm using 1.1-2.5ubuntu1.

ilmar

Revision history for this message
ilmarw (ilmar-wilbers) wrote :

After fixing some other problem with openmpi, see my posts of today at https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/152273, things seem to be working now.

ilmar

Revision history for this message
ilmarw (ilmar-wilbers) wrote :

This is a bug, it happens when a normal c++ compiler is used instead of mpicxx. Seems to be fixed in Hardy.

ilmar

Revision history for this message
iman brouwer (iman-brouwer) wrote :

Switched to Hardy, and it works perfectly now.

In Gutsy I had the problem with CMake even with the mpic++ compiler
specified, e.g.
SET( CMAKE_CXX_COMPILER "mpic++" )

In Hardy the problem is solved.

Thanks guys!

Iman

P.S. Sorry for the late response, I had some serious computer issues and
was away for a week.

On Mon, Feb 25, 2008 at 6:58 AM, ilmarw <email address hidden> wrote:

> This is a bug, it happens when a normal c++ compiler is used instead of
> mpicxx. Seems to be fixed in Hardy.
>
> ilmar
>
> --
> mistake in location of header files
> https://bugs.launchpad.net/bugs/188185
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Following comment #12, setting this as fix released.

Changed in openmpi:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.