-/* Copyright (c) 2011-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2011-2019. 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 "../colls_private.h"
+#include "../colls_private.hpp"
#include "smpi_status.hpp"
namespace simgrid{
}
else
{
- tmp_buf=(void*)xbt_malloc(nbytes);
-
- /* TODO: Pipeline the packing and communication */
- position = 0;
- if (rank == root) {
- mpi_errno = datatype->pack(buffer, count, tmp_buf, nbytes,
- &position, comm);
- if (mpi_errno) xbt_die("crash while packing %d", mpi_errno);
- }
+ tmp_buf = new unsigned char[nbytes];
+
+ /* TODO: Pipeline the packing and communication */
+ position = 0;
+ if (rank == root) {
+ mpi_errno = datatype->pack(buffer, count, tmp_buf, nbytes, &position, comm);
+ if (mpi_errno)
+ xbt_die("crash while packing %d", mpi_errno);
+ }
}
}
fn_exit:
-/* xbt_free(tmp_buf);*/
- return mpi_errno;
+ /* delete[] static_cast<unsigned char*>(tmp_buf); */
+ return mpi_errno;
}
}