Blame test/mpi/errors/rma/win_sync.h
|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
* (C) 2012 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifndef WIN_SYNC_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define WIN_SYNC_H_INCLUDED
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#define CHECK_ERR(stmt) \
|
|
Packit Service |
c5cf8c |
do { \
|
|
Packit Service |
c5cf8c |
int err_class, err, rank; \
|
|
Packit Service |
c5cf8c |
MPI_Comm_rank(MPI_COMM_WORLD, &rank;; \
|
|
Packit Service |
c5cf8c |
err = stmt; \
|
|
Packit Service |
c5cf8c |
if (err == MPI_SUCCESS) { \
|
|
Packit Service |
c5cf8c |
printf("%d: Operation succeeded, when it should have failed\n", rank); \
|
|
Packit Service |
c5cf8c |
errors++; \
|
|
Packit Service |
c5cf8c |
} else { \
|
|
Packit Service |
c5cf8c |
MPI_Error_class(err, &err_class); \
|
|
Packit Service |
c5cf8c |
if (err_class != MPI_ERR_RMA_SYNC) { \
|
|
Packit Service |
c5cf8c |
char str[MPI_MAX_ERROR_STRING]; \
|
|
Packit Service |
c5cf8c |
int len; \
|
|
Packit Service |
c5cf8c |
MPI_Error_string(err, str, &len;; \
|
|
Packit Service |
c5cf8c |
printf("%d: Expected MPI_ERR_RMA_SYNC, got:\n%s\n", rank, str); \
|
|
Packit Service |
c5cf8c |
errors++; \
|
|
Packit Service |
c5cf8c |
} \
|
|
Packit Service |
c5cf8c |
} \
|
|
Packit Service |
c5cf8c |
} while (0)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#endif /* WIN_SYNC_H_INCLUDED */
|