1717 * You should have received a copy of the GNU General Public License
1818 * along with tmLQCD. If not, see <http://www.gnu.org/licenses/>.
1919 *
20- * Interface for TM_USE_DDalphaAMG
20+ * Interface for DDalphaAMG
2121 *
2222 *******************************************************************************/
2323
@@ -43,47 +43,47 @@ double mg_dtau_update;
4343double mg_rho_update ;
4444
4545void MG_init (void ) {
46- printf ("ERROR: MG_init called but TM_USE_DDalphaAMG library not included.\n" );
46+ printf ("ERROR: MG_init called but DDalphaAMG library not included.\n" );
4747 exit (1 );
4848}
4949
5050void MG_update_gauge (double step ) {
51- printf ("ERROR: MG_update_gauge called but TM_USE_DDalphaAMG library not included.\n" );
51+ printf ("ERROR: MG_update_gauge called but DDalphaAMG library not included.\n" );
5252 exit (1 );
5353}
5454
5555void MG_update_mu (double mu_tmLQCD , double odd_tmLQCD ) {
56- printf ("ERROR: MG_update_mu called but TM_USE_DDalphaAMG library not included.\n" );
56+ printf ("ERROR: MG_update_mu called but DDalphaAMG library not included.\n" );
5757 exit (1 );
5858}
5959
6060void MG_reset (void ) {
61- printf ("ERROR: MG_reset called but TM_USE_DDalphaAMG library not included.\n" );
61+ printf ("ERROR: MG_reset called but DDalphaAMG library not included.\n" );
6262 exit (1 );
6363}
6464
6565void MG_finalize (void ) {
66- printf ("ERROR: MG_finalize called but TM_USE_DDalphaAMG library not included.\n" );
66+ printf ("ERROR: MG_finalize called but DDalphaAMG library not included.\n" );
6767 exit (1 );
6868}
6969
7070int MG_solver (spinor * const phi_new , spinor * const phi_old , const double precision ,
7171 const int max_iter , const int rel_prec , const int N , su3 * * gf , matrix_mult f ) {
72- printf ("ERROR: MG_solver called but TM_USE_DDalphaAMG library not included.\n" );
72+ printf ("ERROR: MG_solver called but DDalphaAMG library not included.\n" );
7373 exit (1 );
7474}
7575
7676int MG_solver_eo (spinor * const Even_new , spinor * const Odd_new , spinor * const Even ,
7777 spinor * const Odd , const double precision , const int max_iter , const int rel_prec ,
7878 const int N , su3 * * gf , matrix_mult_full f_full ) {
79- printf ("ERROR: MG_solver_eo called but TM_USE_DDalphaAMG library not included.\n" );
79+ printf ("ERROR: MG_solver_eo called but DDalphaAMG library not included.\n" );
8080 exit (1 );
8181}
8282
8383int MG_solver_nd (spinor * const up_new , spinor * const dn_new , spinor * const up_old ,
8484 spinor * const dn_old , const double precision , const int max_iter ,
8585 const int rel_prec , const int N , su3 * * gf , matrix_mult_nd f ) {
86- printf ("ERROR: MG_solver_nd called but TM_USE_DDalphaAMG library not included.\n" );
86+ printf ("ERROR: MG_solver_nd called but DDalphaAMG library not included.\n" );
8787 exit (1 );
8888}
8989
@@ -207,7 +207,7 @@ static inline int MG_check(spinor *const phi_new, spinor *const phi_old, const i
207207 "ERROR: something bad happened... MG converged giving the wrong solution!! Trying to "
208208 "restart... \n" );
209209 printf (
210- "ERROR contd: || s - f_{tmLQC} * f_{TM_USE_DDalphaAMG }^{-1} * s || / ||s|| = %e / %e = "
210+ "ERROR contd: || s - f_{tmLQC} * f_{DDalphaAMG }^{-1} * s || / ||s|| = %e / %e = "
211211 "%e > %e "
212212 "\n" ,
213213 differ [0 ], differ [1 ], differ [0 ] / differ [1 ], precision );
@@ -216,9 +216,8 @@ static inline int MG_check(spinor *const phi_new, spinor *const phi_old, const i
216216 }
217217
218218 if (g_debug_level > 0 && g_proc_id == 0 )
219- printf (
220- "MGTEST: || s - f_{tmLQC} * f_{TM_USE_DDalphaAMG}^{-1} * s || / ||s|| = %e / %e = %e \n" ,
221- differ [0 ], differ [1 ], differ [0 ] / differ [1 ]);
219+ printf ("MGTEST: || s - f_{tmLQC} * f_{DDalphaAMG}^{-1} * s || / ||s|| = %e / %e = %e \n" ,
220+ differ [0 ], differ [1 ], differ [0 ] / differ [1 ]);
222221
223222 return 1 ;
224223}
@@ -259,7 +258,7 @@ static inline int MG_check_nd(spinor *const up_new, spinor *const dn_new, spinor
259258 "ERROR: something bad happened... MG converged giving the wrong solution!! Trying to "
260259 "restart... \n" );
261260 printf (
262- "ERROR contd: || s - f_{tmLQC} * f_{TM_USE_DDalphaAMG }^{-1} * s || / ||s|| = %e / %e = "
261+ "ERROR contd: || s - f_{tmLQC} * f_{DDalphaAMG }^{-1} * s || / ||s|| = %e / %e = "
263262 "%e > %e "
264263 "\n" ,
265264 differ [0 ], differ [1 ], differ [0 ] / differ [1 ], precision );
@@ -268,9 +267,8 @@ static inline int MG_check_nd(spinor *const up_new, spinor *const dn_new, spinor
268267 }
269268
270269 if (g_debug_level > 0 && g_proc_id == 0 )
271- printf (
272- "MGTEST: || s - f_{tmLQC} * f_{TM_USE_DDalphaAMG}^{-1} * s || / ||s|| = %e / %e = %e \n" ,
273- differ [0 ], differ [1 ], differ [0 ] / differ [1 ]);
270+ printf ("MGTEST: || s - f_{tmLQC} * f_{DDalphaAMG}^{-1} * s || / ||s|| = %e / %e = %e \n" ,
271+ differ [0 ], differ [1 ], differ [0 ] / differ [1 ]);
274272
275273 return 1 ;
276274}
@@ -308,7 +306,7 @@ static inline int MG_mms_check_nd(spinor **const up_new, spinor **const dn_new,
308306 "ERROR: something bad happened... MG converged giving the wrong solution!! Trying to "
309307 "restart... \n" );
310308 printf (
311- "ERROR contd: || s - f_{tmLQC} * f_{TM_USE_DDalphaAMG }^{-1} * s || / ||s|| = %e / %e = "
309+ "ERROR contd: || s - f_{tmLQC} * f_{DDalphaAMG }^{-1} * s || / ||s|| = %e / %e = "
312310 "%e > "
313311 "%e \n" ,
314312 differ [0 ], differ [1 ], differ [0 ] / differ [1 ], precision [i ]);
@@ -318,9 +316,8 @@ static inline int MG_mms_check_nd(spinor **const up_new, spinor **const dn_new,
318316 }
319317
320318 if (g_debug_level > 0 && g_proc_id == 0 )
321- printf (
322- "MGTEST: || s - f_{tmLQC} * f_{TM_USE_DDalphaAMG}^{-1} * s || / ||s|| = %e / %e = %e \n" ,
323- differ [0 ], differ [1 ], differ [0 ] / differ [1 ]);
319+ printf ("MGTEST: || s - f_{tmLQC} * f_{DDalphaAMG}^{-1} * s || / ||s|| = %e / %e = %e \n" ,
320+ differ [0 ], differ [1 ], differ [0 ] / differ [1 ]);
324321 }
325322
326323 finalize_solver (check_vect , 2 );
@@ -349,49 +346,49 @@ static int MG_pre_solve(su3 **gf) {
349346 if (mg_initialized == 0 ) {
350347 MG_init ();
351348 mg_initialized = 1 ;
352- if (g_proc_id == 0 ) printf ("TM_USE_DDalphaAMG initialized\n" );
349+ if (g_proc_id == 0 ) printf ("DDalphaAMG initialized\n" );
353350 MPI_Barrier (MPI_COMM_WORLD );
354351 }
355352
356353 if (mg_update_gauge == 1 ) {
357354 DDalphaAMG_set_configuration ((double * )& (gf [0 ][0 ]), & mg_status );
358355 mg_update_gauge = 0 ;
359356 if (mg_status .success && g_proc_id == 0 )
360- printf ("TM_USE_DDalphaAMG cnfg set, plaquette %e\n" , mg_status .info );
357+ printf ("DDalphaAMG cnfg set, plaquette %e\n" , mg_status .info );
361358 else if (g_proc_id == 0 )
362359 printf ("ERROR: configuration updating did not run correctly" );
363360 }
364361
365362 if (mg_do_setup == 1 ) {
366363 if (mg_setup_mu_set ) {
367- if (g_proc_id == 0 ) printf ("TM_USE_DDalphaAMG using mu=%f during setup\n" , mg_setup_mu );
364+ if (g_proc_id == 0 ) printf ("DDalphaAMG using mu=%f during setup\n" , mg_setup_mu );
368365 MG_update_mu (mg_setup_mu , 0 );
369366 } else
370367 MG_update_mu (g_mu , 0 );
371- if (g_proc_id == 0 ) printf ("TM_USE_DDalphaAMG running setup\n" );
368+ if (g_proc_id == 0 ) printf ("DDalphaAMG running setup\n" );
372369 DDalphaAMG_setup (& mg_status );
373370 mg_do_setup = 0 ;
374371 mg_tau = gauge_tau ;
375372 if (mg_status .success && g_proc_id == 0 )
376- printf ("TM_USE_DDalphaAMG setup ran, time %.2f sec (%.2f %% on coarse grid)\n" ,
377- mg_status . time , 100. * (mg_status .coarse_time / mg_status .time ));
373+ printf ("DDalphaAMG setup ran, time %.2f sec (%.2f %% on coarse grid)\n" , mg_status . time ,
374+ 100. * (mg_status .coarse_time / mg_status .time ));
378375 else if (g_proc_id == 0 )
379376 printf ("ERROR: setup procedure did not run correctly" );
380377 }
381378
382379 if (mg_update_setup > 0 ) {
383380 if (mg_setup_mu_set ) {
384- if (g_proc_id == 0 ) printf ("TM_USE_DDalphaAMG using mu=%f during setup\n" , mg_setup_mu );
381+ if (g_proc_id == 0 ) printf ("DDalphaAMG using mu=%f during setup\n" , mg_setup_mu );
385382 MG_update_mu (mg_setup_mu , 0 );
386383 } else
387384 MG_update_mu (g_mu , 0 );
388- if (g_proc_id == 0 ) printf ("TM_USE_DDalphaAMG updating setup\n" );
385+ if (g_proc_id == 0 ) printf ("DDalphaAMG updating setup\n" );
389386 DDalphaAMG_update_setup (mg_update_setup , & mg_status );
390387 mg_update_setup = 0 ;
391388 mg_tau = gauge_tau ;
392389 if (mg_status .success && g_proc_id == 0 )
393- printf ("TM_USE_DDalphaAMG setup ran, time %.2f sec (%.2f %% on coarse grid)\n" ,
394- mg_status . time , 100. * (mg_status .coarse_time / mg_status .time ));
390+ printf ("DDalphaAMG setup ran, time %.2f sec (%.2f %% on coarse grid)\n" , mg_status . time ,
391+ 100. * (mg_status .coarse_time / mg_status .time ));
395392 else if (g_proc_id == 0 )
396393 printf ("ERROR: setup updating did not run correctly" );
397394 }
@@ -401,7 +398,7 @@ static int MG_pre_solve(su3 **gf) {
401398
402399static int MG_solve (spinor * const phi_new , spinor * const phi_old , const double precision ,
403400 const int N , matrix_mult f ) {
404- // for rescaling convention in TM_USE_DDalphaAMG : (4+m)*\delta_{x,y} in tmLQCD: 1*\delta_{x,y} ->
401+ // for rescaling convention in DDalphaAMG : (4+m)*\delta_{x,y} in tmLQCD: 1*\delta_{x,y} ->
405402 // rescale by 1/4+m
406403 double mg_scale = 0.5 / g_kappa ;
407404 double * old = (double * )phi_old ;
@@ -535,7 +532,7 @@ static int MG_solve(spinor *const phi_new, spinor *const phi_old, const double p
535532
536533static int MG_solve_nd (spinor * up_new , spinor * dn_new , spinor * const up_old , spinor * const dn_old ,
537534 const double precision , const int N , matrix_mult_nd f ) {
538- // for rescaling convention in TM_USE_DDalphaAMG : (4+m)*\delta_{x,y} in tmLQCD: 1*\delta_{x,y} ->
535+ // for rescaling convention in DalphaAMG : (4+m)*\delta_{x,y} in tmLQCD: 1*\delta_{x,y} ->
539536 // rescale by 1/4+m moreover in the nd case, the tmLQCD is multiplied by phmc_invmaxev
540537 double mg_scale = 0.5 / g_kappa / phmc_invmaxev ;
541538 double sqnorm ;
@@ -809,7 +806,7 @@ static int MG_solve_nd(spinor *up_new, spinor *dn_new, spinor *const up_old, spi
809806 // 0 and shift
810807 f == Qsw_pm_ndpsi || // (Gamma5 Dh tau1)^2 - Schur complement squared
811808 f == Qsw_pm_ndpsi_shift ) { // (Gamma5 Dh tau1)^2 - Schur complement squared with shift
812- // TM_USE_DDalphaAMG : tau1 gamma5 Dh tau1 gamma5 Dh
809+ // DDalphaAMG : tau1 gamma5 Dh tau1 gamma5 Dh
813810 // tmLQCD: gamma5 Dh tau1 gamma5 Dh tau1
814811 if (init_guess ) {
815812 mul_gamma5 (old1 , VOLUME );
@@ -906,7 +903,7 @@ static int MG_solve_nd(spinor *up_new, spinor *dn_new, spinor *const up_old, spi
906903static int MG_mms_solve_nd (spinor * * const up_new , spinor * * const dn_new , spinor * const up_old ,
907904 spinor * const dn_old , const double * shifts , const int no_shifts ,
908905 double * precision , const int N , matrix_mult_nd f ) {
909- // for rescaling convention in TM_USE_DDalphaAMG : (4+m)*\delta_{x,y} in tmLQCD: 1*\delta_{x,y} ->
906+ // for rescaling convention in DDalphaAMG : (4+m)*\delta_{x,y} in tmLQCD: 1*\delta_{x,y} ->
910907 // rescale by 1/4+m moreover in the nd case, the tmLQCD is multiplied by phmc_invmaxev
911908 double mg_scale = 0.5 / g_kappa / phmc_invmaxev ;
912909 double * old1 = (double * )up_old ;
@@ -1007,7 +1004,7 @@ static int MG_mms_solve_nd(spinor **const up_new, spinor **const dn_new, spinor
10071004 // 0 and shift
10081005 f == Qsw_pm_ndpsi_shift ) { // (Gamma5 Dh tau1)^2 - Schur complement squared with shift
10091006 mg_scale *= mg_scale ;
1010- // TM_USE_DDalphaAMG : tau1 gamma5 Dh tau1 gamma5 Dh
1007+ // DDalphaAMG : tau1 gamma5 Dh tau1 gamma5 Dh
10111008 // tmLQCD: gamma5 Dh tau1 gamma5 Dh tau1
10121009 DDalphaAMG_solve_ms_doublet_squared_odd (new2 , old2 , new1 , old1 , mg_even_shifts , mg_odd_shifts ,
10131010 no_shifts , precision , & mg_status );
@@ -1116,7 +1113,7 @@ void MG_init() {
11161113 mg_params .conf_index_fct = conf_index_fct ;
11171114 mg_params .vector_index_fct = vector_index_fct ;
11181115
1119- /* in TM_USE_DDalphaAMG
1116+ /* in DDalphaAMG
11201117 * Printing level:
11211118 * -1: silent (errors or warnings)
11221119 * 0: minimal //default
0 commit comments