"%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));
static int f2c_id_;
static f2c_lookup_type::size_type num_default_handles_;
int my_f2c_id_ = -1;
-
+ bool deleted_ = false;
protected:
static void allocate_lookup()
{
}
static int f2c_id() { return f2c_id_; }
static void f2c_id_increment() { f2c_id_++; }
-
+ void mark_as_deleted(){deleted_=true;};
public:
+ bool deleted(){return deleted_;}
static f2c_lookup_type* lookup() { return f2c_lookup_.get(); }
F2C();
virtual ~F2C() = default;