Skip to content
Snippets Groups Projects
Commit 780e0572 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Make test more robust.

parent 7f97d4c1
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,10 @@ int main(int argc, char **argv) {
unsigned * uint_data = calloc(UINT_COUNT, sizeof(*uint_data));
double * dble_data = calloc(DBLE_COUNT, sizeof(*dble_data));
if (!uint_data || !dble_data) {
fputs("failed to allocate buffers\n", stderr);
MPI_Abort(MPI_COMM_WORLD, 1);
}
MPI_Aint uint_pack_size, dble_pack_size;
......@@ -28,7 +32,12 @@ int main(int argc, char **argv) {
MPI_Aint pack_size = uint_pack_size + dble_pack_size;
void * pack_buffer = malloc(pack_size);
void *pack_buffer = malloc((size_t)pack_size);
if (!pack_buffer) {
fprintf(stderr, "failed to allocate pack buffer to %zu chars\n",
(size_t)pack_size);
MPI_Abort(MPI_COMM_WORLD, 1);
}
MPI_Aint position = 0;
#ifndef WITHOUT_PACK_EXTERNAL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment