[MOAB-dev] moab/ParallelComm.hpp include order

Nico Schlömer nico.schloemer at gmail.com
Mon Nov 2 16:49:57 CST 2015


Alright. This
```
#include <mpi.h>
#include <moab/ParallelComm.hpp>

int main() {
  MPI_COMM_WORLD my;
}
```
creates the same
```
 error: ‘MPI_COMM_WORLD’ was not declared in this scope
```
Can you reproduce?

Cheers,
Nico

On Mon, Nov 2, 2015 at 11:38 PM Nico Schlömer <nico.schloemer at gmail.com>
wrote:

> Including <moab/MOABConfig.h> doesn't help. I'll see about creating a
> minimal example...
>
> --Nico
>
> On Mon, Nov 2, 2015 at 10:05 PM Vijay S. Mahadevan <vijay.m at gmail.com>
> wrote:
>
>> Can you try including moab/MOABConfig.h directly in your test before
>> ParallelComm and see if that resolves issues ?
>>
>> ParallelComm includes Interface.hpp which in turn includes
>> MOABConfig.h. If you are including some other MOAB header before
>> these, MOAB_HAVE_MPI might not be defined.
>>
>> Vijay
>>
>> On Mon, Nov 2, 2015 at 3:00 PM, Nico Schlömer <nico.schloemer at gmail.com>
>> wrote:
>> > It's a little convoluted with Trilinos includes right now, I'm trying to
>> > generate a minimal example.
>> >
>> > --Nico
>> >
>> > On Mon, Nov 2, 2015 at 10:00 PM Vijay S. Mahadevan <vijay.m at gmail.com>
>> > wrote:
>> >>
>> >> Nico, can you give an example ? What else did you include before
>> >> ParallelComm to get such an error ? I am guessing this has to do with
>> >> how moab/MOABConfig.h gets included since that's where MOAB_HAVE_MPI
>> >> is defined.
>> >>
>> >> Vijay
>> >>
>> >> On Mon, Nov 2, 2015 at 2:47 PM, Nico Schlömer <
>> nico.schloemer at gmail.com>
>> >> wrote:
>> >> > When playing with MOAB, I found that if I include the header
>> >> > ```
>> >> > #include <moab/ParallelComm.hpp>
>> >> > ```
>> >> > after something that's also using MPI, I'm getting strange
>> compilation
>> >> > errors of the kind
>> >> > ```
>> >> > error: ‘MPI_COMM_WORLD’ was not declared in this scope
>> >> > ```
>> >> > Has anyone else experienced this?
>> >> >
>> >> > Cheers,
>> >> > Nico
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20151102/9155554f/attachment.html>


More information about the moab-dev mailing list