Skip to content
Snippets Groups Projects

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

Merged Podhorszki, Norbert requested to merge github/fork/JasonRuonanWang/size_t into master

Created by: JasonRuonanWang

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: JasonRuonanWang

    @chuckatkins I can change vector<size_t> to adios2::Dims if needed. But there has to be two sets of these variables, because some of the later code requires uint64_t, while some requires size_t. And this is ultimately because ADIOS 1 requires uint64_t and ADIOS 2 requires size_t. Thus it is unfixable without a substantial amount of work.

  • Podhorszki, Norbert
  • Podhorszki, Norbert
  • Podhorszki, Norbert
  • Podhorszki, Norbert
  • Created by: chuckatkins

    I think @williamfgc was also suggesting that by fixing the printData signature you no longer need the separate set of arrays and can just declare readsize and offset as adios2::Dims variables and only use those.

  • Podhorszki, Norbert
  • Created by: JasonRuonanWang

    @chuckatkins I totally understand. But if I do so, then I am essentially moving the problem from heatRead_adios2 to heatRead_adios1. Because, firstly, heatRead_adios1 is based on ADIOS 1 API which requires uint64_t, and secondly, it uses the printData function, which is now changed to size_t. So whichever type I use, I have to keep two sets of these variables in either heatRead_adios1 or heatRead_adios2.

  • Created by: chuckatkins

    Ok, I understand the issue now in trying to marry the code base to work with adios1 and adios2 APIs. I didn't quite see that as I was only looking at it in isolation.

  • Created by: williamfgc

    @JasonRuonanWang See my comment about making PrintData < T > a template function

  • Podhorszki, Norbert
  • Podhorszki, Norbert
  • Created by: JasonRuonanWang

    @williamfgc Yeah, I kind of know this. I am just trying to avoid making too many changes. Because this is not my code, if I make too much modification then it might break something else while fixing the problem I have now. Do you want me to cancel this pull request? I can use Linux temporarily until someone fixes it.

  • Created by: williamfgc

    I don't think @pnorbert would mind if @JasonRuonanWang changes PrintData to PrintData < T > to support uin64_t* and size_t* at the same time as that will solve an issue on Mac that we don't see on Linux. We are not changing the original logic.

  • Created by: JasonRuonanWang

    @williamfgc Then I need to move the printData function from .cpp to .h, or create another .tcc file. In the meantime, there is only one function in the .cpp file, so if I do so, I probable need to remove the .cpp file then. You see, there is a lot of things... which I am not sure any of you would mind.

  • Created by: williamfgc

    @JasonRuonanWang Then overload the function with size_t until @pnorbert checks the template solution, it's a copy and paste thing. Replacing is affecting adios1 example.

  • Created by: JasonRuonanWang

    @williamfgc Done.

  • Created by: williamfgc

    Thanks @JasonRuonanWang !

  • Please register or sign in to reply
    Loading