]> https://gitweb.dealii.org/ - dealii.git/commit
Include mpi.h in base/config.h to avoid Intel compile error 271/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 25 Nov 2014 08:07:16 +0000 (09:07 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 25 Nov 2014 08:07:16 +0000 (09:07 +0100)
commit7c0171f0ee22b381de6ff108f124ad48c2fd897b
tree33edff8e7ceffd5f6ae4954e87b6a20c0a642f93
parent3f9dc4eddffda26708f71c8a8c70b1f389393b31
Include mpi.h in base/config.h to avoid Intel compile error

On my system with Intel compiler, I used to get the following error:
In file included from /lrz/sys/intel/mpi_41_3_048/intel64/include/mpi.h(1279),
                 from [...]/deal.II/include/deal.II/base/mpi.h(23),
                 from [...]/deal.II/include/deal.II/base/utilities.h(21),
                 from [...]/deal.II/include/deal.II/base/index_set.h(20),
                 from [...]/deal.II/include/deal.II/lac/vector.h(24),
                 from [...]/deal.II/source/numerics/data_out_faces.cc(18):
/lrz/sys/intel/mpi_41_3_048/intel64/include/mpicxx.h(99): error: #error directive: "SEEK_CUR is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
  #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
   ^

This is Intel compiler 15.0 with Intel MPI. The solution to this problem is to include mpi.h early enough, which for us means to include it in base/config.h before we include types.h.
include/deal.II/base/config.h.in
include/deal.II/base/mpi.h

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.