-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-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. */
#include "smpi/smpi.h"
#include "smpi_f2c.hpp"
+#include <memory>
+
namespace simgrid{
namespace smpi{
MPI_Request detached_sender_;
int refcount_;
MPI_Op op_;
- int cancelled_; // tri-state
- smpi_mpi_generalized_request_funcs_t* generalized_funcs;
+ std::unique_ptr<smpi_mpi_generalized_request_funcs_t> generalized_funcs;
MPI_Request* nbc_requests_;
int nbc_requests_size_;
static bool match_common(MPI_Request req, MPI_Request sender, MPI_Request receiver);
int tag() const { return tag_; }
int flags() const { return flags_; }
bool detached() const { return detached_; }
+ std::string name() const override { return std::string("MPI_Request"); }
MPI_Datatype type() const { return old_type_; }
void print_request(const char* message) const;
void start();
static MPI_Request issend(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm);
static MPI_Request irecv(void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm);
- static void recv(void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status* status);
+ static int recv(void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status* status);
static void bsend(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm);
static void send(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm);
static void ssend(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm);