Skip to content

Commit

Permalink
squash -- cpp tr test io more opts
Browse files Browse the repository at this point in the history
  • Loading branch information
burlen committed Aug 30, 2023
1 parent 812a601 commit bf05a56
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions test/test_cpp_temporal_reduction_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ int main(int argc, char **argv)
teca_system_interface::set_stack_trace_on_error();
teca_system_interface::set_stack_trace_on_mpi_error();

if (argc != 22)
if (argc != 25)
{
if (rank == 0)
{
std::cerr << "test_temporal_reduction [files regex]"
" [x axis var] [y axis var] [z axis var] [t axis var]"
" [red var] [first step] [last step]"
" [red threads] [red threads per dev] [red ranks per dev] [red bind threads] [red prop dev]"
" [red threads] [red threads per dev] [red ranks per dev] [red stream size] [red bind threads] [red prop dev]"
" [reduction interval] [reduction operator] [steps per request]"
" [out file] [file layout] [wri threads] [wri threads per dev] [wri ranks per dev]" << std::endl;
" [out file] [file layout]"
" [wri threads] [wri threads per dev] [wri ranks per dev] [wri stream size] [wri bind threads]"
<< std::endl;
}
return -1;
}
Expand All @@ -52,30 +54,34 @@ int main(int argc, char **argv)
int n_red_threads = atoi(argv[9]);
int red_threads_per_dev = atoi(argv[10]);
int red_ranks_per_dev = atoi(argv[11]);
int red_bind_threads = atoi(argv[12]);
int red_prop_dev_id = atoi(argv[13]);
int red_stream_size = atoi(argv[12]);
int red_bind_threads = atoi(argv[13]);
int red_prop_dev_id = atoi(argv[14]);

std::string red_int = argv[14];
std::string red_op = argv[15];
int steps_per_req = atoi(argv[16]);
std::string red_int = argv[15];
std::string red_op = argv[16];
int steps_per_req = atoi(argv[17]);

std::string ofile_name = argv[17];
std::string layout = argv[18];
int n_wri_threads = atoi(argv[19]);
int wri_threads_per_dev = atoi(argv[20]);
int wri_ranks_per_dev = atoi(argv[21]);
std::string ofile_name = argv[18];
std::string layout = argv[19];
int n_wri_threads = atoi(argv[20]);
int wri_threads_per_dev = atoi(argv[21]);
int wri_ranks_per_dev = atoi(argv[22]);
int wri_stream_size = atoi(argv[23]);
int wri_bind_threads = atoi(argv[24]);


if (rank == 0)
{
std::cerr << "n_ranks=" << n_ranks
<< " n_red_threads=" << n_red_threads << " red_threads_per_dev=" << red_threads_per_dev
<< " red_ranks_per_dev=" << red_ranks_per_dev << " red_bind_threads=" << red_bind_threads
<< " red_pro_dev_id=" << red_prop_dev_id << " red_int=" << red_int << " red_op=" << red_op
<< " steps_per_req=" << steps_per_req
<< " red_ranks_per_dev=" << red_ranks_per_dev << "red_stream_size=" << red_stream_size
<< " red_bind_threads=" << red_bind_threads << " red_pro_dev_id=" << red_prop_dev_id
<< " red_int=" << red_int << " red_op=" << red_op << " steps_per_req=" << steps_per_req
<< " layout=" << layout << " n_wri_threads=" << n_wri_threads
<< " wri_threads_per_dev=" << wri_threads_per_dev
<< " wri_ranks_per_dev=" << wri_ranks_per_dev
<< " wri_ranks_per_dev=" << wri_ranks_per_dev << " wri_stream_size=" << wri_stream_size
<< " wri_bind_threads=" << wri_bind_threads
<< std::endl;
}

Expand All @@ -94,6 +100,7 @@ int main(int argc, char **argv)
reduc->set_threads_per_device(red_threads_per_dev);
reduc->set_ranks_per_device(red_ranks_per_dev);
reduc->set_bind_threads(red_bind_threads);
reduc->set_stream_size(red_stream_size);
reduc->set_propagate_device_assignment(red_prop_dev_id);
reduc->set_thread_pool_size(n_red_threads);
reduc->set_interval(red_int);
Expand All @@ -107,6 +114,8 @@ int main(int argc, char **argv)
cfw->set_verbose(1);
cfw->set_threads_per_device(wri_threads_per_dev);
cfw->set_ranks_per_device(wri_ranks_per_dev);
cfw->set_stream_size(wri_stream_size);
cfw->set_bind_threads(wri_bind_threads);
cfw->set_thread_pool_size(n_wri_threads);
cfw->set_file_name(ofile_name);
cfw->set_layout(layout);
Expand Down

0 comments on commit bf05a56

Please sign in to comment.