+/* Copyright (c) 2012-2014. 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. */
+
/**
* MESSAGE PASSING INTERFACE TEST CASE SUITE
*
retval =
MPI_Scatter(sndbuf, sendcount, MPI_DOUBLE, &rcvd, recvcount,
MPI_DOUBLE, root, MPI_COMM_WORLD);
+ if (root == rank) {
+ free(sndbuf);
+ }
if (retval != MPI_SUCCESS) {
fprintf(stderr, "(%s:%d) MPI_Scatter() returned retval=%d\n", __FILE__,
__LINE__, retval);
}
// verification
if ((double) rank != rcvd) {
- fprintf(stderr, "[%d] has %lf instead of %d\n", rank, rcvd, rank);
+ fprintf(stderr, "[%d] has %f instead of %d\n", rank, rcvd, rank);
success = 0;
}
return (success);