Skip to content

Commit

Permalink
Splitting screen_output into verbose for environent variables
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Nov 13, 2019
1 parent b996bda commit 1fcba34
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/apex/apex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ uint64_t init(const char * thread_name, uint64_t comm_rank,
top_level_timer = start("OS Thread");
}
}
if (apex_options::use_screen_output() && instance->get_node_id() == 0) {
if (apex_options::use_verbose() && instance->get_node_id() == 0) {
std::cout << version() << std::endl;
apex_options::print_options();
}
Expand Down Expand Up @@ -1283,9 +1283,9 @@ void finalize_plugins(void) {
std::string dump(bool reset) {
// if APEX is disabled, do nothing.
if (apex_options::disable() == true) { return(std::string("")); }
bool old_screen_output = apex_options::use_screen_output();
#ifdef APEX_WITH_JUPYTER_SUPPORT
// force output in the Jupyter notebook
bool old_screen_output = apex_options::use_screen_output();
apex_options::use_screen_output(true);
#endif

Expand All @@ -1299,10 +1299,14 @@ std::string dump(bool reset) {
for (unsigned int i = 0 ; i < instance->listeners.size() ; i++) {
instance->listeners[i]->on_dump(data);
}
#ifdef APEX_WITH_JUPYTER_SUPPORT
apex_options::use_screen_output(old_screen_output);
#endif
return(data.output);
}
#ifdef APEX_WITH_JUPYTER_SUPPORT
apex_options::use_screen_output(old_screen_output);
#endif
return(std::string(""));
}

Expand Down
1 change: 1 addition & 0 deletions src/apex/apex_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ inline unsigned int sc_nprocessors_onln()
macro (APEX_MEASURE_CONCURRENCY, use_concurrency, int, 0) \
macro (APEX_MEASURE_CONCURRENCY_PERIOD, concurrency_period, int, 1000000) \
macro (APEX_SCREEN_OUTPUT, use_screen_output, bool, false) \
macro (APEX_VERBOSE, use_verbose, bool, false) \
macro (APEX_PROFILE_OUTPUT, use_profile_output, int, false) \
macro (APEX_CSV_OUTPUT, use_csv_output, int, false) \
macro (APEX_TASKGRAPH_OUTPUT, use_taskgraph_output, bool, false) \
Expand Down
2 changes: 1 addition & 1 deletion src/apex/profiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class profiler {
//<< " Seconds? seen." << std::endl;
ticks_per_period = CycleB(t1b-t0b)/CycleA(t1a-t0a);
/*
if (apex_options::use_screen_output()) {
if (apex_options::use_verbose()) {
std::cout << "CPU is " << (1.0/ticks_per_period) << " Hz." <<
std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/apex/profiler_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ std::unordered_set<profile*> free_profiles;
throttled_tasks.insert(*(p->get_task_id()));
}
}
if (apex_options::use_screen_output()) {
if (apex_options::use_verbose()) {
cout << "APEX: disabling lightweight timer "
<< p->get_task_id()->get_name()
<< endl;
Expand Down

0 comments on commit 1fcba34

Please sign in to comment.