-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify inverters to return residuals #55
Comments
I imagine we can this fairly easily.
On Mar 21, 2012, at 16:49, jpfoleyreply@reply.github.com wrote:
|
I am in the process of changing the inverter code to optionally return the residuals as well as solution vectors. Will push this afternoon. |
Slight oversight on my part. I had assumed that I could overload functions like invertQuda to return the residual on request, but, since the interface is C, I cannot. Therefore, I would like to replace the interface inverter functions with new functions invertQuda(void h_x, void *h_b, QudaInvertParam *param) --> invertQuda(double final_residual, void *h_x, void *h_b, QudaInvertParam *param), and the residual will only be returned if final_residual is not NULL. Initially, I had thought to copy the residual to param, but I think I prefer the transparency of having an additional parameter. How does this sit with people? |
Correction to the last post. I meant of course invertQuda(double* final_residual...) |
I'm slightly confused. Do you mean to return the L2 norm of the residual, or the residual vector itself? I presume the latter, but I was confused by "the residual". I'm not in favour of modifying the interface this way, I would think it makes much more sense to return the scalar norm in the struct. |
Apologies for the confusing post. I was referring to the residual norm. Well, really the rescaled norm that is used to |
Since the interface has to be ripped up anyway, I'm loath to change the interface in such a small way at moment. I guess we should (finally) start to prototype what the new interface will be exactly…..This email message is for the sole use of the intended recipient(s) and may contain reply email and destroy all copies of the original message. |
Agreed. There are some other changes, however, that Carleton and the MILC folk want now, which will impact on the interface. For example, the ability to use different stopping criteria in the inverters. It's not the most efficient way to proceed, I know... |
At the moment, as I understand it, the QUDA inverter routines do not return residuals. So currently, if you want to pass the inverter residual back to the client program, you call the inverter routine and then use the host source and solution vectors to work out the residual. This seems wasteful. Why not return the residual calculated on the GPU from the inverter routine?
Also, the residual calculated at the moment can be a poor measure of convergence for heavy quark masses.
Since the heavy-quark propagator drops off quickly, you can have a small relative residual and still have large relative error in a heavy-quark propagator. The Fermilab folk use an alternate error estimate. They compute the per-site residual divided by the norm of the solution vector at that site, and average this ratio over the whole lattice. I don't propose that we use the Fermilab residual as a stopping criterion in the inverters, but it would be nice to return this quantity with the standard relative residual from the inverters.
The text was updated successfully, but these errors were encountered: