-/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
constexpr unsigned MPI_REQ_NON_PERSISTENT = 0x2;
constexpr unsigned MPI_REQ_SEND = 0x4;
constexpr unsigned MPI_REQ_RECV = 0x8;
-constexpr unsigned MPI_REQ_RECV_DELETE = 0x10;
+constexpr unsigned MPI_REQ_PROBE = 0x10;
constexpr unsigned MPI_REQ_ISEND = 0x20;
constexpr unsigned MPI_REQ_SSEND = 0x40;
constexpr unsigned MPI_REQ_PREPARED = 0x80;
constexpr unsigned MPI_REQ_GENERALIZED = 0x800;
constexpr unsigned MPI_REQ_COMPLETE = 0x1000;
constexpr unsigned MPI_REQ_BSEND = 0x2000;
+constexpr unsigned MPI_REQ_MATCHED = 0x4000;
+constexpr unsigned MPI_REQ_CANCELLED = 0x8000;
enum class SmpiProcessState { UNINITIALIZED, INITIALIZING, INITIALIZED /*(=MPI_Init called)*/, FINALIZED };
papi_counter_t counter_data;
int event_set;
};
-extern std::map</* computation unit name */ std::string, papi_process_data> units2papi_setup;
+extern std::map</* computation unit name */ std::string, papi_process_data, std::less<>> units2papi_setup;
extern std::unordered_map<std::string, double> location2speedup;
XBT_PRIVATE void private_execute_flops(double flops);
-
#define CHECK_ARGS(test, errcode, ...) \
if (test) { \
- if((errcode) != MPI_SUCCESS) \
+ int error_code_ = (errcode); \
+ if (error_code_ != MPI_SUCCESS) \
XBT_WARN(__VA_ARGS__); \
- return (errcode); \
+ return error_code_; \
}
#define CHECK_MPI_NULL(num, val, err, ptr) \
"%s: param %d %s cannot be negative", __func__, (num), _XBT_STRINGIFY(val));
#define CHECK_COMM2(num, comm) \
CHECK_MPI_NULL((num), MPI_COMM_NULL, MPI_ERR_COMM, (comm))
+#define CHECK_DELETED(num, err, obj) \
+ CHECK_ARGS((obj->deleted() == true), (err), \
+ "%s: param %d %s has already been freed", __func__, (num), _XBT_STRINGIFY(obj));
#define CHECK_COMM(num) \
- CHECK_COMM2((num), comm)
+ CHECK_COMM2((num), comm) \
+ CHECK_DELETED((num), MPI_ERR_COMM, comm)
#define CHECK_REQUEST(num) \
CHECK_ARGS(request == nullptr, MPI_ERR_REQUEST, \
"%s: param %d request cannot be NULL",__func__, (num));