New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve benchmark for distributed tree #78
Improve benchmark for distributed tree #78
Conversation
CMakeLists.txt
Outdated
@@ -13,7 +13,7 @@ if(ArborX_ENABLE_MPI) | |||
find_package(MPI REQUIRED) | |||
target_link_libraries(ArborX INTERFACE MPI::MPI_CXX) | |||
endif() | |||
#target_compile_features(ArborX INTERFACE cxx_std_14) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we want here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, we are running into our old friend
CMake Error in test/CMakeLists.txt:
No known features for CXX compiler
"GNU"
version 7.4.0.
@masterleinad Can you please post the output before and after? |
before:
after:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is fine to use C++14. You just cannot use the target_compile_feature()
for now because of nvcc_wrapper
. The build arguments passed to the Kokkos generate_makefile.bash
script will need to be adjusted in the .jenkins
file.
// Initialize with length of "Timer Name" | ||
std::size_t max_section_length = 10; | ||
|
||
for (unsigned int i = 0; i < n_timers; ++i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning comparison between signed and unsigned
{ | ||
std::rotate(kokkos_argv, help_it + 1, kokkos_argv + kokkos_argc); | ||
--kokkos_argc; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you decide to rotate rather than swapping with the last argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swapping now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wasted a bunch of time checking that swap(x, x)
was safe (will happen if you only have the help flag passed has argument) :/
Anyway that's fine
@@ -110,10 +122,11 @@ class TimeMonitor | |||
n_timers, MPI_DOUBLE, comm); | |||
if (comm_rank == 0) | |||
{ | |||
os << "========================================\n\n"; | |||
os << std::string(max_section_length + 46, '=') << "\n\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the 46 come from?
if (comm_size == 1) | ||
{ | ||
os << "========================================\n\n"; | ||
os << std::string(max_section_length + 15, '=') << "\n\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the 15 come from?
Also the name of the PR is misleading. Please, at the very least, edit the description and make a list or an enumeration to emphasize the changes for controlling the overlap between regions. |
BTW #78 (comment) demonstrates something interesting I had already ran into. The hash returned by the runtime is garbage if you do not reconfigure. |
|
||
// Initialize with length of "Timer Name" | ||
std::size_t const max_section_length = std::accumulate( | ||
_data.begin(), _data.end(), std::size_t(10), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The length of "Timer name".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment to avoid question. Say "The initial value of the sum (3rd argument) correspond to the length of ..."
Or define a variable that holds the label and get its size.
std::string const header_without_timer_name = " | GlobalTime"; | ||
int const header_width = | ||
max_section_length + std::max<int>(header_without_timer_name.size(), | ||
std::cout.precision() + 9); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's 9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The width we need to print a floating point number in scientific
format apart from the precision assuming the exponent needs two characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment or update code to make it obvious
@@ -30,7 +31,8 @@ struct HelpPrinted | |||
{ | |||
}; | |||
|
|||
// Poor man's replacement for Teuchos::TimeMonitor | |||
// The TimeMonitor class can be used to measure for a series of events, i.e. it | |||
// represents a set of timers of type Timer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think the original comment was better because it gives context on the design of TimeMonitor
|
||
// Initialize with length of "Timer Name" | ||
std::size_t const max_section_length = std::accumulate( | ||
_data.begin(), _data.end(), std::size_t(10), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment to avoid question. Say "The initial value of the sum (3rd argument) correspond to the length of ..."
Or define a variable that holds the label and get its size.
std::string const header_without_timer_name = " | GlobalTime"; | ||
int const header_width = | ||
max_section_length + std::max<int>(header_without_timer_name.size(), | ||
std::cout.precision() + 9); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment or update code to make it obvious
c083ae2
to
f478e4b
Compare
|
||
// Initialize with length of "Timer Name" | ||
std::size_t const max_section_length = std::accumulate( | ||
_data.begin(), _data.end(), std::string("Timer Name").size(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Minor comment) I would have defined a variable for the label and reuse below.
Merge when you are ready. You may chose to ignore my last comment. I would be fine with you adding the |
Since you are requesting changes to the |
Changes:
overlap
byshift
such that values different from one and zero have a more intuitive meaning.