Conversation
…rrect data then clean up
…ks with 13b367d28d742534bac7ab0881d3876b4c6f11b3 in callat_qcd MILC feature/nested-force-gradient-integrator
| P(use_resident_mom, 0); | ||
| P(make_resident_gauge, 0); | ||
| P(make_resident_mom, 0); | ||
| P(use_fgi, 1);// FGI: This needs to be 0, and set to 1 with MILC/QUDA interface |
There was a problem hiding this comment.
Should be set back to 0, I'm guessing?
| cudaGaugeField *momResident = nullptr; | ||
| cudaGaugeField *extendedGaugeResident = nullptr; | ||
|
|
||
| // These Copy fields are to support the Force Gradient Integrator |
There was a problem hiding this comment.
I'm not sure if I like the term "Copy"... maybe "Backup" would be a better term? "Previous"? I guess that would be best informed by the language of the FGI algorithm --- and if "copy" is the common language, that's good enough to me. (This also isn't a hill I'll die on!)
| QudaReconstructType recon[4] = {gaugeSloppy->Reconstruct(), gaugePrecondition->Reconstruct(), | ||
| gaugeRefinement->Reconstruct(), gaugeEigensolver->Reconstruct()}; | ||
|
|
||
| printfQuda("QudaInvertParam has different precisions than loadGaugeQuda, so recomputing sloppy fields\n"); |
There was a problem hiding this comment.
I like the addition of this for logging reasons---I'd put this in a logQuda(QUDA_VERBOSE, [...]);, I think.
| // recon is always no for fat links, so just use long reconstructs here | ||
| QudaReconstructType recon[4] = {gaugeLongSloppy->Reconstruct(), gaugeLongPrecondition->Reconstruct(), | ||
| gaugeLongRefinement->Reconstruct(), gaugeLongEigensolver->Reconstruct()}; | ||
| printfQuda("QudaInvertParam has different precisions than loadGaugeQuda, so recomputing sloppy fields\n"); |
|
|
||
| // Wilson Links | ||
| //---------------------------------------------------------- | ||
| if(gaugePrecise) { |
There was a problem hiding this comment.
Just confirming --- it's intentional that this doesn't throw an errorQuda if gaugePrecise is unset, right? I see that it's fully safe code on its own.
|
|
||
| // Wilson Links | ||
| //---------------------------------------------------------- | ||
| if(gaugePrecise) gaugePrecise->copy(*gaugeCopyPrecise); |
There was a problem hiding this comment.
if (gaugePrecise && gaugeCopyPrecise)
|
|
||
| if(momResident) delete momResident; | ||
|
|
||
| // Delete MILC FGI fields |
There was a problem hiding this comment.
I know we discussed moving these into freeUniqueGauge, etc, offline --- just adding this comment so it can be marked as "resolved" at some point.
| int return_result_gauge; /**< Return the result gauge field */ | ||
| int return_result_mom; /**< Return the result momentum field */ | ||
|
|
||
| int use_fgi; /**< add FGI terms */ |
There was a problem hiding this comment.
Perhaps this should be a bool instead? (Note that I'm going to kill QudaBoolean at some point, and replace it with bool - this is fine since bool is supported on C99 which we require anyway for the QUDA C interface.)
| */ | ||
| void momResidentQuda(void *mom, QudaGaugeParam *param); | ||
|
|
||
| /** |
There was a problem hiding this comment.
Some punctuation in this comment might be nice :P
|
Nothing controversial in this commit. One thought on the design used here: would it be a better fit to Just a thought. |
This WIP add functionality to allow for offload in the FGI RHMC routines in https://github.com/callat-qcd/milc_qcd/tree/feature/nested-force-gradient-integrator. It simply creates copy gauge and momentum fields consistent with MILC's QUDA offload sequences.