Skip to content

Commit

Permalink
clean up debug printouts
Browse files Browse the repository at this point in the history
  • Loading branch information
philippwindischhofer committed Feb 22, 2024
1 parent 27100fd commit 7e9a36d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
14 changes: 1 addition & 13 deletions src/CylindricalWeightingFieldCalculator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -384,20 +384,14 @@ void CylindricalWeightingFieldCalculator::Calculate(std::filesystem::path outdir
}

cld.ind_t = stepcnt++;
std::cout << "entering saving chunkloop" << std::endl;
m_f -> loop_in_chunks(meep::eisvogel_saving_chunkloop, static_cast<void*>(&cld), m_f -> total_volume());
std::cout << "exit saving chunkloop" << std::endl;

if((stepcnt % 400) == 0) {
std::cout << "start chunk merging" << std::endl;
fstor -> MergeChunks(0, 400);
std::cout << "end chunk merging" << std::endl;
}
}

std::cout << "start chunk merging" << std::endl;
fstor -> MergeChunks(0, 400);
std::cout << "end chunk merging" << std::endl;

// TODO: again, will get better once the three separate arrays are gone
// TODO: for large weighting fields, will have to move chunks to the permanent location continuously throughout the calculation so as not to fill up local storage
Expand All @@ -418,13 +412,7 @@ void CylindricalWeightingFieldCalculator::Calculate(std::filesystem::path outdir

if(meep::am_master()) {
std::shared_ptr<CylindricalWeightingField> cwf = std::make_shared<CylindricalWeightingField>(outdir, *m_start_coords, *m_end_coords);
cwf -> MakeMetadataPersistent();

// Sometimes need to wait for all files to show up?
// std::this_thread::sleep_for(std::chrono::milliseconds(1000));

std::cout << "start defragmentation" << std::endl;
cwf -> MakeMetadataPersistent();
cwf -> RebuildChunks(requested_chunk_size);
std::cout << "end defragmentation" << std::endl;
}
}
8 changes: 4 additions & 4 deletions src/NDArrayOperations.hh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace NDArrayOps {
template <class T, std::size_t dims>
DenseNDArray<T, dims> concatenate(const DenseNDArray<T, dims>& arr_1, const DenseNDArray<T, dims>& arr_2, std::size_t axis) {

std::cout << " ---> START CONCATENATE <---" << std::endl;
// std::cout << " ---> START CONCATENATE <---" << std::endl;

if(axis >= dims) {
throw std::runtime_error("Error: 'axis' out of bounds");
Expand Down Expand Up @@ -39,7 +39,7 @@ namespace NDArrayOps {

DenseNDArray<T, dims> retval(final_shape_crutch, 0.0);

std::cout << " ---> MIGRATE ARR_1 <---" << std::endl;
// std::cout << " ---> MIGRATE ARR_1 <---" << std::endl;

// Migrate contents of arr_1
{
Expand All @@ -51,7 +51,7 @@ namespace NDArrayOps {
}
}

std::cout << " ---> MIGRATE ARR_2 <---" << std::endl;
// std::cout << " ---> MIGRATE ARR_2 <---" << std::endl;

// Migrate contents of arr_2
{
Expand All @@ -68,7 +68,7 @@ namespace NDArrayOps {
}
}

std::cout << " ---> FINISH CONCATENATE <---" << std::endl;
// std::cout << " ---> FINISH CONCATENATE <---" << std::endl;

return retval;
}
Expand Down

0 comments on commit 7e9a36d

Please sign in to comment.