* under the terms of the license (GNU LGPL) which comes with this package. */
#include "private.hpp"
+#include "simgrid/host.h"
#include "simgrid/instr.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
} else if (not datatype->is_valid()) {
return MPI_ERR_TYPE;
} else {
- size_t size = datatype->size();
- if (size == 0) {
+ if (datatype->size() == 0) {
*count = 0;
- } else if (status->count % size != 0) {
+ } else if (status->count % datatype->size() != 0) {
*count = MPI_UNDEFINED;
} else {
*count = simgrid::smpi::Status::get_count(status, datatype);