Skip to content

Commit

Permalink
Merge Pull Request #2357 from sstsimulator/sst-elements/cleanup_vanad…
Browse files Browse the repository at this point in the history
…is_warnings

Automatically Merged using SST Pull Request AutoTester
PR Title: b'cleanup various vanadis warnings'
PR Author: jmlapre
  • Loading branch information
sst-autotester committed May 15, 2024
2 parents c93edb7 + 6f91fca commit 1aff94e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/sst/elements/vanadis/decoder/vriscv64decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ class VanadisRISCV64Decoder : public VanadisDecoder
} break;
case 0x1: // SBREAK
{
printf("%#lx %#lx SBREAK\n",ins_address,ins);
printf("%#lx %#x SBREAK\n",ins_address,ins);
assert(0);
} break;
}
Expand Down Expand Up @@ -1362,7 +1362,7 @@ class VanadisRISCV64Decoder : public VanadisDecoder
{
if(LIKELY(op_width != 0)) {
output->verbose(CALL_INFO, 16, 0,
"-----> %s.%s 0x%llx / thr: %" PRIu32 " / %" PRIu16 " <- memory[ %" PRIu16 " ] <- %" PRIu16
"-----> %s.%s 0x%lx / thr: %" PRIu32 " / %" PRIu16 " <- memory[ %" PRIu16 " ] <- %" PRIu16
" / width: %" PRIu32 " / aq: %s / rl: %s\n",
getAMO_name(amo_op).c_str(), getAMO_type( func_code3 ).c_str(),
ins_address, hw_thr, rd, rs1, rs2, op_width, perform_aq ? "yes" : "no", perform_rl ? "yes" : "no");
Expand Down
2 changes: 1 addition & 1 deletion src/sst/elements/vanadis/os/syscall/exit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ VanadisExitSyscall::VanadisExitSyscall( VanadisNodeOSComponent* os, SST::Link* c
printf("node=%d pid=%d tid=%d has exited\n", m_os->getNodeNum(), process->getpid(), process->gettid());
} else {
if ( event->getExitCode() > 0 ) {
printf("pid=%d tid=%d has exited with code %d, Failed\n", process->getpid(), process->gettid(),event->getExitCode());
printf("pid=%d tid=%d has exited with code %lu, Failed\n", process->getpid(), process->gettid(),event->getExitCode());
} else {
printf("pid=%d tid=%d has exited\n", process->getpid(), process->gettid());
}
Expand Down
8 changes: 4 additions & 4 deletions src/sst/elements/vanadis/os/vnodeos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ int VanadisNodeOSComponent::checkpointLoad( std::string dir )
}

// m_coreInfoMap.size() 1
assert( 1 == fscanf(fp,"m_coreInfoMap.size() %d\n",&size) );
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"m_coreInfoMap.size() %d\n",size);
assert( 1 == fscanf(fp,"m_coreInfoMap.size() %zd\n",&size) );
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"m_coreInfoMap.size() %zu\n",size);
assert( size == m_coreInfoMap.size() );

for ( auto i = 0; i < m_coreInfoMap.size(); i++ ) {
Expand All @@ -388,8 +388,8 @@ int VanadisNodeOSComponent::checkpointLoad( std::string dir )
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"core: %d\n",core);
assert( core == i );

assert( 1 == fscanf(fp,"m_hwThreadMap.size(): %d\n",&size) );
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"m_hwThreadMap.size(): %d\n",size);
assert( 1 == fscanf(fp,"m_hwThreadMap.size(): %zd\n",&size) );
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"m_hwThreadMap.size(): %zu\n",size);

for ( auto j = 0; j < size; j++ ) {
int hwThread;
Expand Down
2 changes: 1 addition & 1 deletion src/sst/elements/vanadis/os/vnodeos.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class VanadisNodeOSComponent : public SST::Component {
VanadisSyscall* getSyscall( unsigned hwThread ) { return m_hwThreadMap.at(hwThread).getSyscall(); }

void checkpoint( FILE* fp ) {
fprintf(fp, "m_hwThreadMap.size(): %d\n",m_hwThreadMap.size());
fprintf(fp, "m_hwThreadMap.size(): %zu\n",m_hwThreadMap.size());
for ( auto i = 0; i < m_hwThreadMap.size(); i++ ) {
fprintf(fp, "hwThread: %d\n",i);
m_hwThreadMap[i].checkpoint( fp );
Expand Down
10 changes: 6 additions & 4 deletions src/sst/elements/vanadis/os/vphysmemmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <inttypes.h>
#include <stdio.h>
#include <assert.h>
#include <sstream>

#include "output.h"
#include "vanadisDbgFlags.h"

#define FOUR_KB 4096
Expand Down Expand Up @@ -69,7 +71,7 @@ class PhysMemManager {
}

void checkpoint( FILE* fp ) {
fprintf(fp,"BitMap size: %d\n",m_bitMap.size());
fprintf(fp,"BitMap size: %zu\n",m_bitMap.size());
for ( auto i = 0; i < m_bitMap.size(); i++ ) {
if ( m_bitMap[i] ) {
fprintf(fp,"%d %#018" PRIx64 "\n",i,m_bitMap[i]);
Expand Down Expand Up @@ -143,7 +145,7 @@ class PhysMemManager {

output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"PhysMemManager %s\n", filename.str().c_str());

fprintf(fp,"m_numAllocated %d\n",m_numAllocated);
fprintf(fp,"m_numAllocated %lu\n",m_numAllocated);
m_bitMap.checkpoint(fp);
}
void checkpointLoad( SST::Output* output , std::string dir ) {
Expand All @@ -152,8 +154,8 @@ class PhysMemManager {
auto fp = fopen(filename.str().c_str(),"r");
assert(fp);

assert( 1 == fscanf(fp,"m_numAllocated %d\n",&m_numAllocated) );
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"m_numAllocated %d\n",m_numAllocated);
assert( 1 == fscanf(fp,"m_numAllocated %ld\n",&m_numAllocated) );
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"m_numAllocated %lu\n",m_numAllocated);
m_bitMap.checkpointLoad(output,fp);
}

Expand Down
2 changes: 1 addition & 1 deletion src/sst/elements/vanadis/vanadis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ VANADIS_COMPONENT::tick(SST::Cycle_t cycle)
// if all theads have halted
if ( ! should_process ) {
lsq->tick((uint64_t)cycle);
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT, "checkpointing store=%d load=%d\n", lsq->storeSize(), lsq->loadSize());
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT, "checkpointing store=%zu load=%zu\n", lsq->storeSize(), lsq->loadSize());
if ( 0 == lsq->storeSize() && 0 == lsq->loadSize() ) {
output->verbose(CALL_INFO, 0, VANADIS_DBG_CHECKPOINT,"checkingpoint core %d all threads have halted\n",core_id);
VanadisCheckpointResp* resp = new VanadisCheckpointResp( core_id );
Expand Down

0 comments on commit 1aff94e

Please sign in to comment.