Commit eb41d247 authored by Burlen Loring's avatar Burlen Loring

oscilators detect too few blocks

DIY assumes that all ranks have data detect when the user
requests fewer blocks than ranks and abort. resolves issue #1.
parent 07370295
......@@ -100,7 +100,7 @@ int main(int argc, char** argv)
std::string out_prefix = "";
Options ops(argc, argv);
>> Option('b', "blocks", nblocks, "number of blocks to use")
>> Option('b', "blocks", nblocks, "number of blocks to use. must greater or equal to number of MPI ranks.")
>> Option('s', "shape", shape, "domain shape")
>> Option('t', "dt", dt, "time step")
......@@ -130,6 +130,16 @@ int main(int argc, char** argv)
return 1;
if (nblocks < world.size())
if (world.rank() == 0)
fmt::print("Error: too few blocks\n");
fmt::print("Usage: {} [OPTIONS] OSCILLATORS.txt\n\n{}\n", argv[0], ops);
return 1;
timer::SetLogging(log || shortlog);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment