Skip to content

Commit

Permalink
fix for issue 132 by propagating even_odd_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
urbach committed Aug 27, 2012
1 parent ecbee05 commit 312d898
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion hmc_tm.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ int main(int argc,char *argv[]) {
if (g_proc_id == 0) {
fprintf(stdout, "#\n# Beginning online measurement.\n");
}
meas->measurefunc(trajectory_counter, imeas);
meas->measurefunc(trajectory_counter, imeas, even_odd_flag);
}
}

Expand Down
2 changes: 1 addition & 1 deletion measurements.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void free_measurements(){



void dummy_meas(const int traj, const int id) {
void dummy_meas(const int traj, const int id, const int ieo) {
if(g_proc_id == 0) {
fprintf(stderr, "dummy_meas was called for measurement with id=%d. Was that really intended?\n", id);
}
Expand Down
4 changes: 2 additions & 2 deletions measurements.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ typedef struct {
int max_source_slice;

/* functions for the measurement */
void (*measurefunc) (const int traj, const int id);
void (*measurefunc) (const int traj, const int id, const int ieo);
} measurement;


Expand All @@ -67,6 +67,6 @@ int init_measurements();
/* free space again */
void free_measurements();

void dummy_meas(const int traj, const int id);
void dummy_meas(const int traj, const int id, const int ieo);

#endif
4 changes: 2 additions & 2 deletions online_measurement.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*
******************************************************/

void online_measurement(const int traj, const int id) {
void online_measurement(const int traj, const int id, const int ieo) {
int i, j, t, tt, t0;
double *Cpp, *Cpa, *Cp4;
double res = 0., respa = 0., resp4 = 0.;
Expand Down Expand Up @@ -94,7 +94,7 @@ void online_measurement(const int traj, const int id) {

invert_eo(g_spinor_field[2], g_spinor_field[3],
g_spinor_field[0], g_spinor_field[1],
1.e-14, measurement_list[id].max_iter, CG, 1, 0, 1, 0, NULL, -1);
1.e-14, measurement_list[id].max_iter, CG, 1, 0, ieo, 0, NULL, -1);

/* now we bring it to normal format */
/* here we use implicitly DUM_MATRIX and DUM_MATRIX+1 */
Expand Down
2 changes: 1 addition & 1 deletion online_measurement.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
#ifndef _ONLINE_MEASUREMENT_H
#define _ONLINE_MEASUREMENT_H

void online_measurement(const int traj, const int t0);
void online_measurement(const int traj, const int t0, const int ieo);

#endif
4 changes: 2 additions & 2 deletions pion_norm.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "measurements.h"
#include "pion_norm.h"

void pion_norm(const int traj, const int id) {
void pion_norm(const int traj, const int id, const int ieo) {
int i, j, z, zz, z0;
double *Cpp;
double res = 0.;
Expand Down Expand Up @@ -88,7 +88,7 @@ void pion_norm(const int traj, const int id) {
/* invert on the stochastic source */
invert_eo(g_spinor_field[2], g_spinor_field[3],
g_spinor_field[0], g_spinor_field[1],
1.e-14, measurement_list[id].max_iter, CG, 1, 0, 1, 0, NULL, -1);
1.e-14, measurement_list[id].max_iter, CG, 1, 0, ieo, 0, NULL, -1);

/* now we bring it to normal format */
/* here we use implicitly DUM_MATRIX and DUM_MATRIX+1 */
Expand Down
2 changes: 1 addition & 1 deletion pion_norm.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef _PION_NORM_H
#define _PION_NORM_H

void pion_norm(const int traj, const int id);
void pion_norm(const int traj, const int id, const int ieo);

#endif

Expand Down
2 changes: 1 addition & 1 deletion polyakov_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ int polyakov_loop_0(const int nstore, _Complex double *pl) {
z- (dir==3) direction
the reduction operation is defined in mpi_init.h
*/
void polyakov_loop_measurement(const int nstore, const int id) {
void polyakov_loop_measurement(const int nstore, const int id, const int ieo) {
polyakov_loop_dir(nstore, measurement_list[id].direction);
}

Expand Down
2 changes: 1 addition & 1 deletion polyakov_loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
void polyakov_loop(_Complex double * pl_, const int mu);
int polyakov_loop_0(const int nstore, _Complex double* pl);
int polyakov_loop_dir(const int nstore, const int dir);
void polyakov_loop_measurement(const int nstore, const int id);
void polyakov_loop_measurement(const int nstore, const int id, const int ieo);

#endif

0 comments on commit 312d898

Please sign in to comment.