This avoids demangling need for leak check (and should fix tests, as freebsd has a broken demangler on our ci system).
int rank() const;
int id() const;
void get_name(char* name, int* len) const;
+ std::string name() const;
void set_name(const char* name);
MPI_Info info();
void set_info( MPI_Info info);
Datatype(const Datatype&) = delete;
Datatype& operator=(const Datatype&) = delete;
~Datatype() override;
-
- const char* name() const { return name_.c_str(); }
+ std::string name() const {return name_;}
size_t size() const { return size_; }
MPI_Aint lb() const { return lb_; }
MPI_Aint ub() const { return ub_; }
explicit Errhandler(MPI_File_errhandler_fn *function):file_func_(function){};
explicit Errhandler(MPI_Win_errhandler_fn *function):win_func_(function){};
void ref();
+ std::string name() const {return "MPI_Errhandler";}
void call(MPI_Comm comm, int errorcode) const;
void call(MPI_Win win, int errorcode) const;
void call(MPI_File file, int errorcode) const;
int f2c_id() { return my_f2c_id_; }
static int global_f2c_id() { return f2c_id_; }
static void f2c_id_increment() { f2c_id_++; }
- void mark_as_deleted() { deleted_ = true; };
public:
+ void mark_as_deleted() { deleted_ = true; };
bool deleted() const { return deleted_; }
static f2c_lookup_type* lookup() { return f2c_lookup_.get(); }
F2C();
virtual ~F2C() = default;
+ virtual std::string name() const = 0;
int add_f();
static void free_f(int id) { if(id!=-1) f2c_lookup_->erase(id); }
int get_position_shared(MPI_Offset* offset) const;
int flags() const;
MPI_Comm comm() const;
+ std::string name() const {return file_ ? std::string("MPI_File:" + file_->get_path()): std::string("MPI_File");}
+
int sync();
int seek(MPI_Offset offset, int whence);
int seek_shared(MPI_Offset offset, int whence);
void set_mapping(s4u::Actor* actor, int rank);
int rank(int index);
s4u::Actor* actor(int rank);
+ std::string name() const {return std::string("MPI_Group");}
int rank(s4u::Actor* process);
void ref();
static void unref(MPI_Group group);
static void unref(MPI_Info info);
void set(const char* key, const char* value) { map_[key] = value; }
int get(const char* key, int valuelen, char* value, int* flag) const;
+ std::string name() const {return std::string("MPI_Info");}
int remove(const char* key);
int get_nkeys(int* nkeys) const;
int get_nthkey(int n, char* key) const;
bool is_predefined() const { return is_predefined_; }
bool is_fortran_op() const { return is_fortran_op_; }
int allowed_types() const { return types_; }
+ std::string name() const {return std::string("MPI_Op");}
// tell that we were created from fortran, so we need to translate the type to fortran when called
void set_fortran_op() { is_fortran_op_ = true; }
void apply(const void* invec, void* inoutvec, const int* len, MPI_Datatype datatype) const;
int tag() const { return tag_; }
int flags() const { return flags_; }
bool detached() const { return detached_; }
+ std::string name() const {return std::string("MPI_Request");}
MPI_Datatype type() const { return old_type_; }
void print_request(const char* message) const;
void start();
int attach (void *base, MPI_Aint size);
int detach (const void *base);
void get_name(char* name, int* length) const;
+ std::string name() const {return name_;}
void get_group( MPI_Group* group);
void set_name(const char* name);
int rank() const;
if (xbt_log_no_loc) {
XBT_WARN("Leaked handle of type %s", boost::core::demangle(typeid(*p.second).name()).c_str());
} else {
- XBT_WARN("Leaked handle of type %s at %p", boost::core::demangle(typeid(*p.second).name()).c_str(), p.second);
+ XBT_WARN("Leaked handle of type %s at %p", p.second->name().c_str(), p.second);
}
}
if (truncate)
}
}
+std::string Comm::name() const
+{
+ int size;
+ char name[MPI_MAX_NAME_STRING];
+ this->get_name(name, &size);
+ return std::string(name);
+}
+
+
void Comm::set_name (const char* name)
{
if (this == MPI_COMM_UNINITIALIZED){
#define APPLY_END_OP_LOOP(op) \
{ \
- xbt_die("Failed to apply " _XBT_STRINGIFY(op) " to type %s", (*datatype)->name()); \
+ xbt_die("Failed to apply " _XBT_STRINGIFY(op) " to type %s", (*datatype)->name().c_str()); \
}
static void max_func(void *a, void *b, int *length, MPI_Datatype * datatype)