Skip to content

Commit

Permalink
Clean cout and remove CMake flag (#51)
Browse files Browse the repository at this point in the history
* remove the flag definition in src/CMakeList

* clean cout and flag in CMake

---------

Co-authored-by: unknown <wardhsu7@gmail.com>
  • Loading branch information
hxu65 and waugh2010 authored Feb 6, 2024
1 parent 6f86cbc commit b1003e8
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 21 deletions.
16 changes: 0 additions & 16 deletions include/common/SQlite.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class SQLiteWrapper {
char* errMsg = 0;
int rc = sqlite3_exec(db, sql.c_str(), callbackFunc, data, &errMsg);
if (rc != SQLITE_OK) {
std::cerr << "MDM: SQL error: " << errMsg << std::endl;
sqlite3_free(errMsg);
return false;
}
Expand All @@ -55,13 +54,9 @@ class SQLiteWrapper {
}

void createTables(){
std::cout << "MDM: table creation: " << getpid() << " "<< dbName << std::endl;
createAppsTable();
std::cout << "MDM: table APPS: " << getpid() << " " << dbName << std::endl;
createBlobLocationsTable();
std::cout << "MDM: table LOCATION: " << getpid() << " "<< dbName << std::endl;
createVariableMetadataTable();
std::cout << "MDM: table METADATA: " << getpid() << " "<< dbName << std::endl;
}

~SQLiteWrapper() {
Expand All @@ -87,7 +82,6 @@ class SQLiteWrapper {
}

void UpdateTotalSteps(const std::string& appName, int step) {
std::cout << "MDM: UpdateTotalSteps" << std::endl;
sqlite3_stmt* stmt;
const std::string insertOrUpdateSQL = "INSERT OR REPLACE INTO Apps (appName, TotalSteps) VALUES (?, ?);";
sqlite3_prepare_v2(db, insertOrUpdateSQL.c_str(), -1, &stmt, 0);
Expand Down Expand Up @@ -138,7 +132,6 @@ class SQLiteWrapper {
}

void InsertBlobLocation(int step, int mpi_rank, const std::string& varName, const BlobInfo& blobInfo) {
std::cout << "MDM: InsertBlobLocation" << std::endl;
sqlite3_stmt* stmt;
const std::string insertOrUpdateSQL = "INSERT OR REPLACE INTO BlobLocations (step, mpi_rank, name, bucket_name, blob_name) VALUES (?, ?, ?, ?, ?);";
sqlite3_prepare_v2(db, insertOrUpdateSQL.c_str(), -1, &stmt, 0);
Expand Down Expand Up @@ -194,14 +187,6 @@ class SQLiteWrapper {
auto start = VariableMetadata::serializeVector(metadata.start);
auto count = VariableMetadata::serializeVector(metadata.count);

// if(mpi_rank == 0) {
// std::cout << "Inserting metadata for " << metadata.name
// << " with shape " << shape
// << " with start " << start
// << " with count " << count
// << std::endl;
// }

sqlite3_prepare_v2(db, insertOrUpdateSQL.c_str(), -1, &stmt, 0);
sqlite3_bind_int(stmt, 1, step);
sqlite3_bind_int(stmt, 2, mpi_rank);
Expand All @@ -213,7 +198,6 @@ class SQLiteWrapper {
sqlite3_bind_text(stmt, 8, metadata.dataType.c_str(), -1, SQLITE_STATIC);
sqlite3_step(stmt);
sqlite3_finalize(stmt);
std::cout << "MDM: InsertVariableMetadata done" << std::endl;
}

VariableMetadata GetVariableMetadata(int step, int mpi_rank, const std::string& name) {
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set(HERMES_ENGINE_SRCS
#------------------------------------------------------------------------------
# Libraries
#------------------------------------------------------------------------------
add_definitions(-DMeta_enabled)
add_library(hermes_engine ${HERMES_ENGINE_SRCS} ../include/coeus/MetadataSerializer.h)
add_dependencies(hermes_engine spdlog)
add_dependencies(hermes_engine coeus_mdm)
Expand Down
1 change: 0 additions & 1 deletion tasks/coeus_mdm/include/coeus_mdm/coeus_mdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class Client : public TaskLibClient {
const TaskNode &task_node,
const DomainId &domain_id,
DbOperation db_op) {
std::cout << "MDM: insert fire" << std::endl;
HRUN_CLIENT->ConstructTask<Mdm_insertTask>(
task, task_node, domain_id, id_, db_op);

Expand Down
1 change: 0 additions & 1 deletion tasks/coeus_mdm/src/coeus_mdm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class Server : public TaskLib {
db->InsertBlobLocation(db_op.step, db_op.rank, db_op.name, db_op.blobInfo);

} else if (db_op.type == OperationType::UpdateSteps) {
std::cout << "MDM: Hermes update MDM: " << db->getName() << ", step:" << db_op.currentStep <<std::endl;
db->UpdateTotalSteps(db_op.uid, db_op.currentStep);

}
Expand Down
2 changes: 0 additions & 2 deletions tasks/rankConsensus/include/rankConsensus/rankConsensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class Client : public TaskLibClient {
AsyncCreateRoot(std::forward<Args>(args)...);

task->Wait();
//std::cout << "root wait: " << task->id_ << std::endl;
Init(task->id_, HRUN_ADMIN->queue_id_);
HRUN_CLIENT->DelTask(task);
}
Expand All @@ -74,7 +73,6 @@ class Client : public TaskLibClient {

GetRankTask *task = get_task->get();
uint choosen_rank = task->rank_;
//std::cout << "root rank " << choosen_rank << std::endl;
HRUN_CLIENT->DelTask(get_task);
return choosen_rank;
}
Expand Down

0 comments on commit b1003e8

Please sign in to comment.