Skip to content
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

Feature/hisq fgi #1368

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions include/quda.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ extern "C" {
int return_result_gauge; /**< Return the result gauge field */
int return_result_mom; /**< Return the result momentum field */

int use_fgi; /**< add FGI terms */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)


size_t gauge_offset; /**< Offset into MILC site struct to the gauge field (only if gauge_order=MILC_SITE_GAUGE_ORDER) */
size_t mom_offset; /**< Offset into MILC site struct to the momentum field (only if gauge_order=MILC_SITE_GAUGE_ORDER) */
size_t site_size; /**< Size of MILC site struct (only if gauge_order=MILC_SITE_GAUGE_ORDER) */
Expand Down Expand Up @@ -1373,6 +1375,18 @@ extern "C" {
*/
void momResidentQuda(void *mom, QudaGaugeParam *param);

/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some punctuation in this comment might be nice :P

* For the FGI HMC step
* make a copy of the gauge field
* restore the gauge field
* Zero out the momResident field (after making a copy)
* and restore the momResident field
*/
void copyGaugeQuda();
void restoreGaugeQuda();
void momResidentZeroQuda();
void momResidentRestoreQuda();

/**
* Compute the gauge force and update the momentum field
*
Expand Down
9 changes: 9 additions & 0 deletions include/quda_milc_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,15 @@ extern "C" {
*/
void qudaMomSave(int precision, QudaMILCSiteArg_t *arg);

/**
* Make a device copy of the momentum and gauge fields for FGI
* also restore these fields
*/
void qudaMomZero();
void qudaMomRestore();
void qudaGaugeCopy();
void qudaGaugeRestore();

/**
* Evaluate the momentum contribution to the Hybrid Monte Carlo
* action. MILC convention is applied, subtracting 4.0 from each
Expand Down
2 changes: 2 additions & 0 deletions lib/check_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void printQudaGaugeParam(QudaGaugeParam *param) {
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be set back to 0, I'm guessing?

P(return_result_gauge, 1);
P(return_result_mom, 1);
P(gauge_offset, 0);
Expand All @@ -135,6 +136,7 @@ void printQudaGaugeParam(QudaGaugeParam *param) {
P(use_resident_mom, INVALID_INT);
P(make_resident_gauge, INVALID_INT);
P(make_resident_mom, INVALID_INT);
P(use_fgi, INVALID_INT);// FGI: This needs to be 0, and set to 1 with MILC/QUDA interface
P(return_result_gauge, INVALID_INT);
P(return_result_mom, INVALID_INT);
P(gauge_offset, (size_t)INVALID_INT);
Expand Down
Loading