@@ -47,6 +47,8 @@ SimpleDebugger::SimpleDebugger(Params& params) :
4747 [this ](std::vector<std::string>& tokens) { cmd_help (tokens); } },
4848 { " verbose" , " v" , " [mask]: set verbosity mask or print if no mask specified" , ConsoleCommandGroup::GENERAL,
4949 [this ](std::vector<std::string>& tokens) { cmd_verbose (tokens); } },
50+ { " rankinfo" , " ri" , " print current rank and thread IDs" , ConsoleCommandGroup::GENERAL,
51+ [this ](std::vector<std::string>& tokens) { cmd_rankInfo (tokens); } },
5052 { " confirm" , " cfm" , " <true/false>: set confirmation requests on (default) or off" , ConsoleCommandGroup::GENERAL,
5153 [this ](std::vector<std::string>& tokens) { cmd_setConfirm (tokens); } },
5254 { " pwd" , " pwd" , " print the current working directory in the object map" , ConsoleCommandGroup::NAVIGATION,
@@ -395,6 +397,15 @@ SimpleDebugger::cmd_verbose(std::vector<std::string>& tokens)
395397 }
396398}
397399
400+ SimpleDebugger::cmd_rankInfo (std::vector<std::string>& UNUSED (tokens)) {
401+
402+ RankInfo info = getRank ();
403+ RankInfo nRanks = getNumRanks ();
404+ std::cout << " Rank " << info.rank << " /" << nRanks.rank
405+ << " , Thread " << info.thread << " /" << nRanks.thread << std::endl;
406+ }
407+
408+
398409// pwd: print current working directory
399410void
400411SimpleDebugger::cmd_pwd (std::vector<std::string>& UNUSED (tokens))
0 commit comments