-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontrol.c
82 lines (62 loc) · 1.82 KB
/
control.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/***************** control.c *********************************/
/* MIMD version 7 */
/* Main procedure for SU3 wilson spectrum, including hybrids */
#define CONTROL
#include "cl_hyb_includes.h"
int main(int argc,char *argv[]){
int prompt;
int m_iters = 0,spect_iters = 0;
double dtime;
double g_time ;
/*** ---------------------------------------- ****/
initialize_machine(&argc,&argv);
/* Remap standard I/O */
if(remap_stdio_from_args(argc, argv) == 1)terminate(1);
g_sync();
/* set up */
prompt = setup();
/* loop over input sets */
while( readin(prompt) == 0)
{
dtime = -dclock();
if(source_start==0)
{
/* generate a pseudofermion configuration */
if (boundary_flag == ANTI_PERIODIC_IN_TIME ) boundary_flip(MINUS);
/** m_iters = f_measure2(); **/
if (boundary_flag == ANTI_PERIODIC_IN_TIME ) boundary_flip(PLUS);
}
if( fixflag == COULOMB_GAUGE_FIX)
{
if(this_node == 0)
printf("Fixing to Coulomb gauge\n");
g_time = -dclock();
gaugefix(TUP,(Real)1.8,500,GAUGE_FIX_TOL);
g_time += dclock();
if(this_node==0)printf("Time to gauge fix = %e sec\n",g_time);
invalidate_this_clov(gen_clov);
}
else
{
if(this_node == 0)printf("COULOMB GAUGE FIXING SKIPPED.\n");
}
if (boundary_flag == ANTI_PERIODIC_IN_TIME ) boundary_flip(MINUS);
spect_iters = spectrum_hybrids();
if (boundary_flag == ANTI_PERIODIC_IN_TIME ) boundary_flip(PLUS);
fflush(stdout);
if(this_node==0)
{
printf("RUNNING COMPLETED\n");
printf("cg/mr iters for spectrum = %d\n", spect_iters);
printf("cg/mr iters f_measure2 = %d\n", m_iters);
}
dtime += dclock();
if(this_node==0)
{
printf("Time = %e seconds\n",dtime);
printf("total_iters = %d\n",total_iters);
}
fflush(stdout);
}
return 0 ;
} /*** end of main ***/