1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Description: Update code to MPI > 1
MPI_Errhandler_set is deprecated since MPI2, removed since MPI3 replaced by
MPI_Comm_set_errhandler.
Author: Thibaut Paumard <thibaut@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952104
Forwarded: https://github.com/LLNL/yorick/pull/27
Last-Update: 2020-02-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/mpy/mpy.c
+++ b/mpy/mpy.c
@@ -12,6 +12,12 @@
#define MPY_MPI_H 1
#include "mpy.h"
+#if defined(MPI_VERSION) && MPI_VERSION > 1
+# define MPY_Comm_set_errhandler MPI_Comm_set_errhandler
+#else
+# define MPY_Comm_set_errhandler MPI_Errhandler_set
+#endif /* defined(MPI_VERSION) && MPI_VERSION > 1 */
+
#include "yapi.h"
#include "pstdlib.h"
#include <string.h>
@@ -166,7 +172,7 @@
|| mpy_size < 2
|| MPI_Comm_dup(MPI_COMM_WORLD, &mpy_world) != MPI_SUCCESS
|| MPI_Comm_rank(mpy_world, &mpy_rank) != MPI_SUCCESS
- || MPI_Errhandler_set(mpy_world, MPI_ERRORS_RETURN) != MPI_SUCCESS) {
+ || MPY_Comm_set_errhandler(mpy_world, MPI_ERRORS_RETURN) != MPI_SUCCESS) {
if (mpy_initdone) MPI_Finalize(); /* may be a mistake - no return? */
mpy_world = MPI_COMM_NULL;
mpy_size = mpy_rank = 0;
|