Skip to content
Snippets Groups Projects
Commit 64771629 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

[Warnings] Fix MPI 1 deprecation warnings (by switching to MPI 2).

This fixes warnings of the following form about functions deprecated in MPI 2.
```
/home/joe/Projekte/dune-simd/dune-istl/dune/istl/paamg/test/parallelamgtest.cc: In function ‘int main(int, char**)’:
/home/joe/Projekte/dune-simd/dune-istl/dune/istl/paamg/test/parallelamgtest.cc:217:3: warning: ‘int MPI_Errhandler_create(void (*)(ompi_communicator_t**, int*, ...), ompi_errhandler_t**)’ is deprecated: MPI_Errhandler_create is superseded by MPI_Comm_create_errhandler in MPI-2.0 [-Wdeprecated-declarations]
   MPI_Errhandler_create(MPI_err_handler, &handler);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/joe/Projekte/dune-simd/dune-common/dune/common/parallel/mpitraits.hh:23:0,
                 from /home/joe/Projekte/dune-simd/dune-common/dune/common/parallel/plocalindex.hh:9,
                 from /home/joe/Projekte/dune-simd/dune-istl/dune/istl/paamg/test/anisotropic.hh:8,
                 from /home/joe/Projekte/dune-simd/dune-istl/dune/istl/paamg/test/parallelamgtest.cc:7:
/usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:1345:20: note: declared here
 OMPI_DECLSPEC  int MPI_Errhandler_create(MPI_Handler_function *function,
                    ^~~~~~~~~~~~~~~~~~~~~
```
parent 3d1547ed
Branches
Tags
1 merge request!125[Warnings] Fix MPI 1 deprecation warnings (by switching to MPI 2).
Pipeline #
......@@ -214,8 +214,8 @@ int main(int argc, char** argv)
{
MPI_Init(&argc, &argv);
MPI_Errhandler handler;
MPI_Errhandler_create(MPI_err_handler, &handler);
MPI_Errhandler_set(MPI_COMM_WORLD, handler);
MPI_Comm_create_errhandler(MPI_err_handler, &handler);
MPI_Comm_set_errhandler(MPI_COMM_WORLD, handler);
int N=100;
......
......@@ -120,8 +120,8 @@ int main(int argc, char** argv)
{
MPI_Init(&argc, &argv);
MPI_Errhandler handler;
MPI_Errhandler_create(MPI_err_handler, &handler);
MPI_Errhandler_set(MPI_COMM_WORLD, handler);
MPI_Comm_create_errhandler(MPI_err_handler, &handler);
MPI_Comm_set_errhandler(MPI_COMM_WORLD, handler);
int procs;
MPI_Comm_size(MPI_COMM_WORLD, &procs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment