Skip to content
Snippets Groups Projects
Commit 431c6172 authored by Ruonan Wang's avatar Ruonan Wang
Browse files

fixed a size_t / uint64_t problem for macOS 10.12 and Clang 8.1.0

parent 31b7b3cb
No related branches found
No related tags found
1 merge request!223fixed a size_t / uint64_t problem for macOS 10.12 and Clang 8.1.0
...@@ -95,6 +95,8 @@ int main(int argc, char *argv[]) ...@@ -95,6 +95,8 @@ int main(int argc, char *argv[])
// 1D decomposition of the columns, which is inefficient for reading! // 1D decomposition of the columns, which is inefficient for reading!
std::vector<uint64_t> readsize({gndx, gndy / nproc}); std::vector<uint64_t> readsize({gndx, gndy / nproc});
std::vector<uint64_t> offset({0LL, rank * readsize[1]}); std::vector<uint64_t> offset({0LL, rank * readsize[1]});
std::vector<size_t> readsize_size_t({gndx, gndy / nproc});
std::vector<size_t> offset_size_t({0LL, rank * readsize[1]});
if (rank == nproc - 1) if (rank == nproc - 1)
{ {
// last process should read all the rest of columns // last process should read all the rest of columns
...@@ -109,7 +111,7 @@ int main(int argc, char *argv[]) ...@@ -109,7 +111,7 @@ int main(int argc, char *argv[])
double *T = new double[vT->m_AvailableSteps * readsize[0] * readsize[1]]; double *T = new double[vT->m_AvailableSteps * readsize[0] * readsize[1]];
// Create a 2D selection for the subset // Create a 2D selection for the subset
vT->SetSelection(offset, readsize); vT->SetSelection(offset_size_t, readsize_size_t);
vT->SetStepSelection(0, vT->m_AvailableSteps); vT->SetStepSelection(0, vT->m_AvailableSteps);
// Arrays are read by scheduling one or more of them // Arrays are read by scheduling one or more of them
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment