Skip to content
Snippets Groups Projects
Commit e2abdd59 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Truncate large messages to 2GB, improve help

parent f26ba2de
No related branches found
No related tags found
1 merge request!6Version with faked data
......@@ -363,7 +363,7 @@ void mpiuse_log_generate(int nr_nodes, int nr_logs, int size, int random,
for (int k = 0; k < nr_logs; k++) {
/* Set size for this messages. */
int logsize = size;
double logsize = size;
if (random) {
if (cdf || odata) {
/* CDF based randoms. */
......@@ -391,12 +391,18 @@ void mpiuse_log_generate(int nr_nodes, int nr_logs, int size, int random,
}
}
/* Cannot send more than 2^31-1 bytes at a time, so truncate. */
if (logsize > 2147483647.0) {
message("CDF size too large : %f, truncating", logsize);
logsize = 2147483647.0;
}
for (int i = 0; i < nr_nodes; i++) {
for (int j = 0; j < nr_nodes; j++) {
if (i != j) {
mpiuse_log_allocation(i, 1, k, SEND_TYPE, NO_SUBTYPE, 1, logsize, j,
mpiuse_log_allocation(i, 1, k, SEND_TYPE, NO_SUBTYPE, 1, (size_t)logsize, j,
tag);
mpiuse_log_allocation(j, 1, k, RECV_TYPE, NO_SUBTYPE, 1, logsize, i,
mpiuse_log_allocation(j, 1, k, RECV_TYPE, NO_SUBTYPE, 1, (size_t)logsize, i,
tag);
}
}
......
......@@ -391,7 +391,8 @@ static void usage(char *argv[]) {
fprintf(stderr, "Usage: %s [options] nr_messages logfile.dat\n", argv[0]);
fprintf(stderr,
" options: -v verbose, -d data check, -s size (bytes/scale), \n"
"\t -f randomize injection order, \n"
"\t -f <1|2> randomize injection order, 1 == just sends, "
"2 == sends and recvs\n"
"\t[-r uniform random from 1 to size, | \n"
"\t-r -g half gaussian random from 1 with 2.5 sigma size., | \n"
"\t-r -c <file> use cdf from file, size is a scale factor., |\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment