diff --git a/src/interface/data_collection.cpp b/src/interface/data_collection.cpp index f28305b5411a..fe1eb634d32e 100644 --- a/src/interface/data_collection.cpp +++ b/src/interface/data_collection.cpp @@ -44,6 +44,17 @@ std::string DataCollection::GetKey(const std::string &stage_label, return key; } +template +std::string DataCollection::GetKey(const std::string &stage_label, + const std::shared_ptr &in) { + auto key = stage_label; + if (in->grid.type == GridType::two_level_composite) + key = key + "_gmg-" + std::to_string(in->grid.logical_level); + for (const auto &pmb : in->block_list) + key += "_" + std::to_string(pmb->gid); + return key; +} + template <> std::shared_ptr> & DataCollection>::GetOrAdd(const std::string &mbd_label, diff --git a/src/kokkos_abstraction.hpp b/src/kokkos_abstraction.hpp index 068940265cf6..91da43dfd65d 100644 --- a/src/kokkos_abstraction.hpp +++ b/src/kokkos_abstraction.hpp @@ -1034,6 +1034,7 @@ par_reduce_inner(team_mbr_t team_member, const int il, const int iu, const Funct function(i, lreduce); }, reduction); +} // reused from kokoks/core/perf_test/PerfTest_ExecSpacePartitioning.cpp // commit a0d011fb30022362c61b3bb000ae3de6906cb6a7 diff --git a/src/parthenon_manager.cpp b/src/parthenon_manager.cpp index 464da30d0309..c8855600c74f 100644 --- a/src/parthenon_manager.cpp +++ b/src/parthenon_manager.cpp @@ -191,7 +191,6 @@ void ParthenonManager::ParthenonInitPackagesAndMesh( } else if (arg.res_flag == 0) { pmesh = std::make_unique(pinput.get(), app_input.get(), packages, arg.mesh_flag); - pmesh->analysis_flag = false; } else { // Open restart file // Read Mesh from restart file and create meshblocks @@ -215,12 +214,6 @@ void ParthenonManager::ParthenonInitPackagesAndMesh( // close hdf5 file to prevent HDF5 hangs and corrupted files // if code dies after restart restartReader = nullptr; - - if (arg.analysis_flag == 1) { - pmesh->analysis_flag = true; - } else { - pmesh->analysis_flag = false; - } } // add root_level to all max_level @@ -296,7 +289,7 @@ void ParthenonManager::RestartPackages(Mesh &rm, RestartReader &resfile) { } // Allocate space based on largest vector - int max_blocksize = 0; + int max_vlen = 1; int num_sparse = 0; size_t nCells = 1; for (const auto &v_info : all_vars_info) { @@ -361,13 +354,7 @@ void ParthenonManager::RestartPackages(Mesh &rm, RestartReader &resfile) { pmb->meshblock_data.Get()->GetVarPtr(label)->dealloc_count = dealloc_count; } else { // nothing to read for this block, advance reading index - const int te_length = (v_info->metadata().Where() == MetadataFlag(Metadata::Face) || - v_info->metadata().Where() == MetadataFlag(Metadata::Edge)) ? rm.ndim : 1; - const int te_offset = (v_info->metadata().Where() == MetadataFlag(Metadata::Face) || - v_info->metadata().Where() == MetadataFlag(Metadata::Edge) || - v_info->metadata().Where() == MetadataFlag(Metadata::Node)) ? 1 : 0; - const int nPoints = (bsize[0] + te_offset) * (bsize[1] + te_offset) * (bsize[2] + te_offset); - index += nPoints * vlen * te_length; + index += nCells * vlen; continue; } }