Skip to content

Commit a864f9d

Browse files
committed
Clean up info command
1 parent 6b26c5e commit a864f9d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/sst/core/impl/interactive/simpleDebug.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,13 +548,17 @@ SimpleDebugger::cmd_info(std::vector<std::string>& UNUSED(tokens))
548548
RankInfo info = getRank();
549549
RankInfo nRanks = getNumRanks();
550550
if ( tokens[1] == "current" ) {
551-
std::cout << "Rank " << info.rank << "/" << nRanks.rank << ", Thread " << info.thread << "/" << nRanks.thread
552-
<< std::endl;
551+
std::cout << "Rank " << info.rank << "/" << nRanks.rank
552+
<< ", Thread " << info.thread << "/" << nRanks.thread
553+
<< " (Process " << getppid() << ")"
554+
<< std::endl;
553555
}
554556
else if ( tokens[1] == "all" ) {
555557
if ( nRanks.rank == 1 && nRanks.thread == 1 ) {
556-
std::cout << "Rank " << info.rank << "/" << nRanks.rank << ", Thread " << info.thread << "/"
557-
<< nRanks.thread << std::endl;
558+
std::cout << "Rank " << info.rank << "/" << nRanks.rank
559+
<< ", Thread " << info.thread << "/"<< nRanks.thread
560+
<< " (Process " << getppid() << ")"
561+
<< std::endl;
558562
}
559563
else {
560564
// Return to syncmanager to print summary for all threads

src/sst/core/sync/syncManager.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <atomic>
3232
#include <cinttypes>
3333
#include <sys/time.h>
34+
#include <unistd.h>
3435

3536
namespace SST {
3637

@@ -482,7 +483,8 @@ SyncManager::handleInteractiveConsole()
482483
if ( ic_state == InteractiveConsole::ICretcode::SUMMARY ) { // Print thread info summary
483484
for ( uint32_t tindex = 0; tindex < num_ranks_.thread; tindex++ ) {
484485
if ( rank_.thread == tindex ) {
485-
std::cout << "Rank:" << rank_.rank << " Thread:" << rank_.thread;
486+
std::cout << "Rank:" << rank_.rank << " Thread:" << rank_.thread
487+
<< " (Process:" << getppid() << ") ";
486488
// Print component summary
487489
if ( sim_->interactive_ != nullptr ) {
488490
sim_->interactive_->summary();

0 commit comments

Comments
 (0)