Skip to content

Commit 5d86e47

Browse files
committed
Debugging: print incomplete tasks
Backends TTs may implement print_incomplete_tasks() to print dangling tasks. This has proven helpful in debugging flow problems. Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
1 parent 5e499ce commit 5d86e47

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

ttg/ttg/base/tt.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ namespace ttg {
232232
/// @return World in which this lives
233233
virtual ttg::World get_world() const = 0;
234234

235+
virtual void print_incomplete_tasks() const {
236+
throw std::runtime_error("print_incomplete_tasks not implemented!");
237+
}
238+
235239
/// Returns a pointer to the i'th input terminal
236240
ttg::TerminalBase *in(size_t i) {
237241
if (i >= inputs.size()) throw name + ":TTBase: you are requesting an input terminal that does not exist";

ttg/ttg/parsec/ttg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4158,8 +4158,8 @@ namespace ttg_parsec {
41584158
}
41594159
}
41604160

4161-
void print_incomplete_tasks() {
4162-
parsec_hash_table_for_all(&tasks_table, ht_iter_cb, this);
4161+
virtual void print_incomplete_tasks() const override {
4162+
parsec_hash_table_for_all((parsec_hash_table_t*)&tasks_table, ht_iter_cb, (void*)this);
41634163
}
41644164

41654165
virtual void release() override { do_release(); }

ttg/ttg/tt.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ namespace ttg {
103103
for (auto &op : tts) op->make_executable();
104104
}
105105

106+
virtual void print_incomplete_tasks() const override {
107+
for (auto& tt : tts) {
108+
tt->print_incomplete_tasks();
109+
}
110+
}
111+
106112
private:
107113
void own_my_tts() const {
108114
for (auto &op : tts) op->owning_ttg = this;

0 commit comments

Comments
 (0)