]> https://gitweb.dealii.org/ - dealii.git/commit
Add missing MPI function instantiations. 2744/head
authorDavid Wells <wellsd2@rpi.edu>
Sat, 2 Jul 2016 01:24:22 +0000 (21:24 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 2 Jul 2016 01:24:22 +0000 (21:24 -0400)
commit6e68bf8dd51d5e9f310c056b681b44129cd642b7
tree365299bfc7f45fca344dd2205011c32879a07699
parent7a8c3af2b82878bf91439f10d79f148502425810
Add missing MPI function instantiations.

The fixed-length array (i.e., things declared like T(&values)[N])
versions of MPI::sum, MPI::max, etc, all live in the header file mpi.h
since the length (N) is a compile-time constant. Those functions all
call Utilities::MPI::internal::all_reduce, which is declared in
mpi.templates.h, so that function (all_reduce) must be present in the
compiled library.

Note for the curious: it turns out that most compilers and most compiler
settings will not inline this function, meaning that it consistently
shows up in the shared object files without this explicit instantiation
in debug mode and usually in release mode. In particular, GCC 6 does not
inline it (so this instantiation is not necessary) but clang 3.8 does (so
this instantiation is necessary). Some versions of GCC (5.3 but not 4.8)
seem to inline it with the '-march=native' flag.
source/base/mpi.inst.in

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.