Use caliper in distributed benchmarks#1274
Conversation
|
I simplified the Caliper code a bit. The specific options can be passed through |
|
I looked into this closer. The only absolutely necessary thing from Caliper in ArborX is that we need to link to and I haven't found a way to avoid that by using any of the environment options. |
|
Caliper only requires additional linking on non-Linux systems. See llnl/Caliper#737. |
|
|
||
| # In certain scenarios, using Caliper may require additional linking. | ||
| # See https://github.com/llnl/Caliper/issues/737 | ||
| if(UNIX AND NOT APPLE) |
There was a problem hiding this comment.
I'm not 100% certain this is the right way to indicate any Linux system. But I think it is close enough.
| # See https://github.com/llnl/Caliper/issues/737 | ||
| if(UNIX AND NOT APPLE) | ||
| if(ARBORX_ENABLE_CALIPER) | ||
| message(WARNING "ARBORX_ENABLE_CALIPER was set to ON, but this is a non-Apple system. Forcing to OFF.") |
There was a problem hiding this comment.
This message is confusing if you don't know that there is no need to link Caliper on Linux. It reads as you cannot use Caliper on non-Apple system
There was a problem hiding this comment.
Fair point. What would you suggest?
There was a problem hiding this comment.
Maybe we can rename the variable to sth like ARBORX_ENABLE_CALIPER_MACOS, since that's what it does. It's also clear that you shouldn't use it on linux
There was a problem hiding this comment.
Is there any harm linking with Caliper so that yoiou have to disable it or error out?
There was a problem hiding this comment.
There's no harm. The main point is that we don't want anyone to think they have to do that if they want to use Caliper on Linux.
| option(ARBORX_ENABLE_CALIPER "Enable Caliper instrumentation" OFF) | ||
| if(ARBORX_ENABLE_CALIPER) | ||
| option(ARBORX_ENABLE_CALIPER "Enable Caliper instrumentation" OFF) | ||
| if(ARBORX_ENABLE_CALIPER) |
There was a problem hiding this comment.
Is it possible for a user to set ARBORX_ENABLE_CALIPER=OFF and at the same time ARBORX_ENABLE_CALIPER_LINKING=ON or is ARBORX_ENABLE_CALIPER_LINKING only internal?
There was a problem hiding this comment.
Good point. Need to check that it does not happen.
There was a problem hiding this comment.
I changed the code so that ARBORX_ENABLE_CALIPER_LINKING is always set by us.
The only absolutely necessary thing from Caliper in ArborX is that we need to link to
libcaliperon Mac. Otherwise, I'm gettingSee llnl/Caliper#737.