adamantine-sim / adamantine

Software to simulate heat transfer for additive manufacturing
https://adamantine-sim.github.io/adamantine/
Other
39 stars 11 forks source link

Make MaterialProperty dependent on the memory space #125

Closed Rombur closed 2 years ago

Rombur commented 3 years ago

With this PR the underlying data in MaterialProperty can be on the host or the device. Because it changes where the material property are stored, it affects virtually every thing else. That's why the PR is huge. The most interesting thing in the PR is the removal of ArrayMD and its replacement with two new classes MemoryBlock and MemoryBlockView. MemoryBlock allocates a block of memory and MemoryBlockView allows to access it. This makes it easier to use lambda function with CUDA. Note that we now need the flag --extended-lambda to use CUDA. I will fix the build system so that we don't need to set this flag manually in a different PR.

stvdwtt commented 3 years ago

@Rombur, just as a heads-up, I might not be able to get to this review until next week. I have a string of all-day meetings coming up to prep for and attend.

Rombur commented 3 years ago

OK no problem. Thanks for letting me know.

Rombur commented 2 years ago

OK this is ready to be merged. The tests were failing for two reasons:

  1. I forgot that I was developing the code using a modified version of deal.II where ArrayView worked like BlockMemoryView in 1D
  2. I forgot to pass the flag --expt-relaxed-constexpr to the CI. We actually don't need this flag if we slightly change the code but I will do it in a different PR.