Support for Ubuntu 22.04 and ROCm 5.3 (#48)
* Testing and CI support for Ubuntu 22.04
* Fixes for ROCm
- Jammy does not have ROCm installers
* Name, timeout, and python updates
- renamed ubuntu-jammy-external.yml to ubuntu-jammy.yml
- increased all 5 minute timeouts to 10 minutes
- include python 3.10 in testing
* Update dyninst to remove interposed definition of _r_debug
* Rebuild Dyninst + test install script
* Revert container change
* git safe directory
* pushd -> cd
* fix MPI include
* Fix testing step
* OMPI_ALLOW_RUN_AS_ROOT
* Test script changes
* Fix mismatched malloc / delete[]
* Jammy workflow tweaks
* CPack tweak for boost deb deps
* pthread_mutex_gotcha config returns when not enabled
* fix echoing config in CI
* USE_CLANG_OMP
- option to disable using LLVM OpenMP when building OpenMP test executables
- Jammy workflow sets USE_CLANG_OMP=OFF
* Dyninst submodule boost download
- updated containers workflow to include jammy
- updated workflow to use ci
* Updates to workflows + replace test-install.sh
- test-install.sh in this branch was replaced with one in main branch
* Expand jammy test-install.sh args
* Fix openmp-cg-sampling-duration test
* update timemory submodule
- use-after-free violation in popen::pclose
* revert some tweaks to sampling-duration test
* Fix env of test-install.sh
* cmake format
* jammy bash
* CPack install for jammy
* formatting workflow action version bump
* Update timemory submodule
- libunwind submodule via timemory sets SOVERSION to 99 to avoid ABI conflicts with v8
* Fix help menu for omnitrace-sample
* Support other boolean forms in test-install.sh
* Update docker files and build-docker.sh
- consolidated cases in build-docker.sh
- support rocm version of 0.0 (no rocm install)
- support rocm v5.3
- updated centos handling
* update opensuse actions/checkout version
* Tweaks to ubuntu-focal testing
- actions/checkout@v3
- use test-install script
* update cpack
- ubuntu 22.04
- rocm 5.3
- rename os matrix field to os-version
- remove CI_ROCM_VERSION (no longer necessary)
- remove default-rocm-version matrix field (no longer necessary)
- CentOS packaging
* fix argparsing and omnitrace-sample tests in install-tests.sh
* focal rocm test install workflow fix
* Fix omnitrace-sample build
* Dockerfile.centos + build-docker.sh updates
* Update actions/upload-artifact version
* Dockerfile.ubuntu: install rocm-device-libs
* Refactor cpack
* fix cpack if quotes
* Dockerfile.ubuntu rocm < 5 installs rocm-dev
* build-release.sh defaults to boost version 1.79.0
[ROCm/rocprofiler-systems commit: ede6007f9b]
This commit is contained in:
gecommit door
GitHub
bovenliggende
0ec0d18ac8
commit
713d08de6d
@@ -7,6 +7,7 @@
|
||||
add_executable(omnitrace-sample ${CMAKE_CURRENT_LIST_DIR}/omnitrace-sample.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/impl.cpp)
|
||||
|
||||
target_compile_definitions(omnitrace-sample PRIVATE TIMEMORY_CMAKE=1)
|
||||
target_include_directories(omnitrace-sample PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_link_libraries(
|
||||
omnitrace-sample
|
||||
|
||||
@@ -43,6 +43,14 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#if !defined(OMNITRACE_USE_ROCTRACER)
|
||||
# define OMNITRACE_USE_ROCTRACER 0
|
||||
#endif
|
||||
|
||||
#if !defined(OMNITRACE_USE_ROCPROFILER)
|
||||
# define OMNITRACE_USE_ROCPROFILER 0
|
||||
#endif
|
||||
|
||||
namespace color = tim::log::color;
|
||||
using tim::log::stream;
|
||||
using namespace timemory::join;
|
||||
@@ -231,8 +239,12 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
||||
%{INDENT}% 1 do not modify how ROCm is notified about kernel completion)";
|
||||
|
||||
auto _realtime_reqs = (get_env("HSA_ENABLE_INTERRUPT", std::string{}, false).empty())
|
||||
? std::initializer_list<std::string>{ "hsa-interrupt" }
|
||||
: std::initializer_list<std::string>{};
|
||||
? std::vector<std::string>{ "hsa-interrupt" }
|
||||
: std::vector<std::string>{};
|
||||
|
||||
#if OMNITRACE_USE_ROCTRACER == 0 && OMNITRACE_USE_ROCPROFILER == 0
|
||||
_realtime_reqs.clear();
|
||||
#endif
|
||||
|
||||
const auto* _trace_policy_desc =
|
||||
R"(Policy for new data when the buffer size limit is reached:
|
||||
@@ -516,7 +528,7 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
||||
|
||||
parser.add_argument({ "--realtime" }, _realtime_desc)
|
||||
.min_count(0)
|
||||
.requires(_realtime_reqs)
|
||||
.requires(std::move(_realtime_reqs))
|
||||
.action([&](parser_t& p) {
|
||||
auto _v = p.get<std::deque<std::string>>("realtime");
|
||||
update_env(_env, "OMNITRACE_SAMPLING_REALTIME", true);
|
||||
@@ -652,10 +664,30 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
||||
update_env(_env, "HSA_ENABLE_INTERRUPT", p.get<int>("hsa-interrupt"));
|
||||
});
|
||||
|
||||
auto _args = parser.parse_known_args(argc, argv);
|
||||
auto _cerr = std::get<0>(_args);
|
||||
auto _cmdc = std::get<1>(_args);
|
||||
auto* _cmdv = std::get<2>(_args);
|
||||
auto _inpv = std::vector<char*>{};
|
||||
auto _outv = std::vector<char*>{};
|
||||
bool _hash = false;
|
||||
for(int i = 0; i < argc; ++i)
|
||||
{
|
||||
if(_hash)
|
||||
{
|
||||
_outv.emplace_back(argv[i]);
|
||||
}
|
||||
else if(std::string_view{ argv[i] } == "--")
|
||||
{
|
||||
_hash = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_inpv.emplace_back(argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
auto _cerr = parser.parse_args(_inpv.size(), _inpv.data());
|
||||
if(help_check(parser, argc, argv))
|
||||
help_action(parser);
|
||||
else if(_cerr)
|
||||
throw std::runtime_error(_cerr.what());
|
||||
|
||||
if(parser.exists("realtime") && !parser.exists("cputime"))
|
||||
update_env(_env, "OMNITRACE_SAMPLING_CPUTIME", false);
|
||||
@@ -663,14 +695,5 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
||||
throw std::runtime_error(
|
||||
"Error! '--profile' argument conflicts with '--flat-profile' argument");
|
||||
|
||||
if(help_check(parser, _cmdc, _cmdv)) help_action(parser);
|
||||
|
||||
if(_cerr) throw std::runtime_error(_cerr.what());
|
||||
|
||||
std::vector<char*> _argv = {};
|
||||
_argv.reserve(_cmdc);
|
||||
for(int i = 1; i < _cmdc; ++i)
|
||||
_argv.emplace_back(_cmdv[i]);
|
||||
|
||||
return _argv;
|
||||
return _outv;
|
||||
}
|
||||
|
||||
+1
-2
@@ -43,8 +43,7 @@ main(int argc, char** argv)
|
||||
std::vector<char*> _argv = {};
|
||||
if(_has_double_hyphen)
|
||||
{
|
||||
auto _size = _env.size();
|
||||
_argv = parse_args(argc, argv, _env);
|
||||
_argv = parse_args(argc, argv, _env);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2181,7 +2181,7 @@ main(int argc, char** argv)
|
||||
TIMEMORY_PIPE* ldd = tim::popen::popen(cmdv0.c_str());
|
||||
tim::set_env("LD_TRACE_LOADED_OBJECTS", "0", 1);
|
||||
|
||||
strvec_t linked_libraries = tim::popen::read_fork(ldd);
|
||||
strvec_t linked_libraries = tim::popen::read_ldd_fork(ldd);
|
||||
|
||||
auto perr = tim::popen::pclose(ldd);
|
||||
if(perr != 0) perror("Error in omnitrace_fork");
|
||||
@@ -2271,10 +2271,10 @@ main(int argc, char** argv)
|
||||
|
||||
// cleanup
|
||||
for(int i = 0; i < argc; ++i)
|
||||
delete[] _argv[i];
|
||||
free(_argv[i]);
|
||||
delete[] _argv;
|
||||
for(int i = 0; i < _cmdc; ++i)
|
||||
delete[] _cmdv[i];
|
||||
free(_cmdv[i]);
|
||||
delete[] _cmdv;
|
||||
|
||||
verbprintf(0, "End of omnitrace\n");
|
||||
|
||||
@@ -99,6 +99,7 @@ void
|
||||
pthread_mutex_gotcha::configure()
|
||||
{
|
||||
pthread_mutex_gotcha_t::get_initializer() = []() {
|
||||
if(!tim::settings::enabled()) return;
|
||||
if(config::get_trace_thread_locks())
|
||||
{
|
||||
pthread_mutex_gotcha_t::configure(
|
||||
|
||||
@@ -754,19 +754,23 @@ configure_settings(bool _init)
|
||||
if(_config->get_suppress_config()) continue;
|
||||
|
||||
OMNITRACE_BASIC_VERBOSE(1, "Reading config file %s\n", itr.c_str());
|
||||
_config->read(itr);
|
||||
|
||||
if(_main_proc &&
|
||||
if(_config->read(itr) && _main_proc &&
|
||||
((_config->get<bool>("OMNITRACE_CI") && settings::verbose() >= 0) ||
|
||||
settings::verbose() >= 1 || settings::debug()))
|
||||
{
|
||||
std::ifstream _in{ itr };
|
||||
auto fitr = settings::format(itr, _config->get_tag());
|
||||
std::ifstream _in{ fitr };
|
||||
std::stringstream _iss{};
|
||||
while(_in)
|
||||
{
|
||||
std::string _s{};
|
||||
getline(_in, _s);
|
||||
_iss << _s << "\n";
|
||||
std::string _line{};
|
||||
getline(_in, _line);
|
||||
_iss << _line << "\n";
|
||||
}
|
||||
if(!_iss.str().empty())
|
||||
{
|
||||
OMNITRACE_BASIC_PRINT("config file '%s':\n%s\n", fitr.c_str(),
|
||||
_iss.str().c_str());
|
||||
}
|
||||
if(!_iss.str().empty())
|
||||
{
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "library/tracing.hpp"
|
||||
#include "library/config.hpp"
|
||||
#include "library/state.hpp"
|
||||
#include "library/thread_info.hpp"
|
||||
|
||||
namespace omnitrace
|
||||
@@ -67,8 +69,9 @@ void
|
||||
record_thread_start_time()
|
||||
{
|
||||
static thread_local std::once_flag _once{};
|
||||
std::call_once(_once,
|
||||
[]() { thread_info::set_start(comp::wall_clock::record(), true); });
|
||||
std::call_once(_once, []() {
|
||||
thread_info::set_start(comp::wall_clock::record(), get_mode() != Mode::Sampling);
|
||||
});
|
||||
}
|
||||
} // namespace tracing
|
||||
} // namespace omnitrace
|
||||
|
||||
Verwijs in nieuw issue
Block a user