Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

per process output from --osh-time sorted function is mixed together on stdout #92

Open
cwsmith opened this issue Mar 8, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@cwsmith
Copy link

cwsmith commented Mar 8, 2024

Running with more than one rank and --osh-time produces TOP FUNCTIONS output from each rank that gets mixed together on stdout making the results hard to read.

It appears that building with -DOmega_h_DBG=on may resolve this as the TASK_0_cout macro gets defined:

# define TASK_0_cout if(DBG_COMM && (0 == DBG_COMM->rank())) std::cout

But, for collecting performance data, specifically with a run using GPUs, enabling that build option may not work, and, if it does, it may increase runtime. This needs to be tested.

for (auto i : sorted_result) {
auto cflags( std::cout.flags() );
double val = i.second[TOP_AVE];
if (val*100.0/total_runtime_ave >= h.chop) {
TASK_0_cout << std::right
<< std::setw(width) << val*scale << percent
<< std::setw(width) << i.second[TOP_MIN]*scale << percent
<< std::setw(width) << i.second[TOP_MAX]*scale << percent
<< std::setw(width) << i.second[TOP_MAX]/i.second[TOP_MIN] << " ";
std::cout.flags(cflags);
TASK_0_cout << i.first << std::endl;
}
std::cout.flags(coutflags);
}
}

@cwsmith cwsmith added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Mar 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant