Skip to content

Commit

Permalink
Fix merge conflicts and some cmakes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Feb 5, 2024
2 parents 54185af + 0c235bf commit 37a4a37
Show file tree
Hide file tree
Showing 33 changed files with 8,807 additions and 64 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ endif()
#------------------------------------------------------------------------------
# External libraries
#------------------------------------------------------------------------------
# This is for compatability with SPACK
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Hermes
find_package(Hermes CONFIG REQUIRED)
message(STATUS "found Hermes at ${Hermes_DIR}")
Expand Down
7 changes: 7 additions & 0 deletions include/common/SQlite.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ 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 @@ -83,6 +87,7 @@ 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 @@ -133,6 +138,7 @@ 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 @@ -207,6 +213,7 @@ 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
4 changes: 4 additions & 0 deletions include/comms/Bucket.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Bucket : public IBucket {
hapi::Bucket bkt;

Bucket(const std::string &bucket_name, coeus::IHermes *h) {

name = bucket_name;
TRACE_FUNC(name);
bkt = h->hermes->GetBucket(bucket_name);
Expand Down Expand Up @@ -59,14 +60,17 @@ class Bucket : public IBucket {
};

std::vector<hermes::BlobId> GetContainedBlobIds() override {
TRACE_FUNC();
return bkt.GetContainedBlobIds();
}

hermes::BlobId GetBlobId(const std::string &blob_name) override {
TRACE_FUNC();
return bkt.GetBlobId(blob_name);
}

std::string GetBlobName(const hermes::BlobId &blob_id) override {
TRACE_FUNC();
return bkt.GetBlobName(blob_id);
}
};
Expand Down
Loading

0 comments on commit 37a4a37

Please sign in to comment.