Closed cortner closed 4 years ago
The first type instability was created during the implementation of the DAGEvaluator - this added a new type parameter to PIBasis which should have also been added to RPIBasis. This is now fixed.
made a few tests and little hack-y workaround and it seems to make no difference to the performance. Will close this for now. Maybe worth returning to this once many other things have been fixed.
This appears to go quite deep into an inability to determine the type of the inner basis. It is amazing that the Julia compiler can work with that anyhow, but for sure the
::Int
hack needs to be removed and this type instability fixed properly.JuLIP.MLIPs.forces
the call toevaluate_d!
appears to be type-unstable as well. This has to do with the compiler not being able to infer the type of thetmp
variable. Very strange. Maybe the idea of temporary variable structures need to be revisited; maybe they need to be stored in structs rather than named tuples.