Closed GiovanniBussi closed 4 months ago
@gtribello I found where this is done in the serial code. Basically, in the serial code we set the positions using a standard C++ loop in (ip->mydata)->share_data
.
So, if I understand correctly:
I would suggest fixing this. Perhaps adding a functionality in Value to allows to set multiple (all?) elements of the vector with a single call. Then it should be not even necessary to inline it.
I will try to have benchmarks with MPI, but to me it's quite evident that the current implementation is slowing down things.
@GiovanniBussi I am looking into this issue and the other one you raised at the moment. I think I might have a solution to this one. I hope to have something to share by the end of the morning though. I am telling you this so that we are not working on the same thing at the same time.
Closed by #1027
@gtribello this is another possible slow-down. For this I don't have timings, but I can produce them.
I am confused by the following code in DomainDecomposition:
It looks like there’s a large loop (over all shared atoms) in which we call a quite expensive function (
void set(const std::size_t& n, const double& v );
) which is not inlined and has quite a few if’s:I think this is suboptimal (and might affect timings with MPI, that we stopped doing at some point). Is there a way to avoid this sequence of calls?
I also do not understand where's the equivalent call for the serial version. For comparison, in the old code what we were doing was something like this:
which is just accessing the elements of an array.