I cannot comment on User Defined Functions on this open platform. What I can say is that, If have the cell index of the minimum distance I store it first. Now I do the reduction to have the minimum of all distances. That should be done without any Host or Node restrictions. All nodes transfer that to the host. Now back again on only nodes (all of them), I now create a dummy vector to store the centroid of the cell with the index I found in the first step, ensure that the distance to the input point - dmin is smaller than a very small threshold: if this is true: we store the coordinates and you can do all the rest. Now back on All Nodes and Host, I transfer the vector with cell coordinate using reduction (PRF_GRHIGH) and do transfer from node to host the real vector
Â
I will do the cell loop on all cells not only internals.
Â
Â