From 579215e2a24bf09b773b1139aede9a0c6e914dfd Mon Sep 17 00:00:00 2001 From: Carsten Urbach Date: Thu, 1 Feb 2007 18:18:59 +0000 Subject: [PATCH] some defines are variables now --- Makefile.in | 2 +- README.bgl | 3 ++- benchmark.c | 17 ++++++++++++++++- global.h | 27 +++++++-------------------- hmc_tm.c | 16 +++++++--------- invert.c | 8 ++++++++ phmc_tm.c | 16 ++++++++++------ 7 files changed, 51 insertions(+), 38 deletions(-) diff --git a/Makefile.in b/Makefile.in index 521861681..dbd7f66e7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,7 @@ SOPTARGS = @SOPTARGS@ DEFS = @DEFS@ INCLUDES = @INCLUDES@ -LINK = $(CCLD) -o $@ ${LDFLAGS} ${SOPTARGS} +LINK = $(CCLD) -o $@ ${LDFLAGS} LINKLIBS = ${top_builddir}/linalg/liblinalg.a \ ${top_builddir}/solver/libsolver.a COMPILE = ${CC} $(DEFS) $(INCLUDES) -o $@ ${CFLAGS} diff --git a/README.bgl b/README.bgl index 8a28bb37e..45d1348f4 100644 --- a/README.bgl +++ b/README.bgl @@ -11,6 +11,7 @@ path-to-the-sources/configure --host=ppc-ibm-blrts --build=ppc64-ibm-linux \ some comments are important: - if option --with-bgldram is used, then the executables have to be relinked with /bgl/local/bin/blrts_gcc -Xlinker --script=./elf32ppcblrts.x . + The linker is now replaced automatically. the file elf32ppcblrts.x can be obtained from blrts-gnu/powerpc-bgl-blrts-gnu/lib/ldscripts/elf32ppcblrts.x and it needs the change of the line @@ -29,4 +30,4 @@ some comments are important: - running should be done with something like -env "BGLMPI_EAGER=500000000 BGLMPI_PACING=n" - as options to mpirun. \ No newline at end of file + as options to mpirun. diff --git a/benchmark.c b/benchmark.c index 1849d9253..cc7de9a0a 100644 --- a/benchmark.c +++ b/benchmark.c @@ -72,6 +72,12 @@ int main(int argc,char *argv[]) #ifdef MPI static double dt2; int rlxd_state[105]; + + DUM_DERI = 6; + DUM_SOLVER = DUM_DERI+2; + DUM_MATRIX = DUM_SOLVER+6; + NO_OF_SPINORFIELDS = DUM_MATRIX+2; + MPI_Init(&argc, &argv); #endif @@ -107,12 +113,21 @@ int main(int argc,char *argv[]) #ifdef _USE_HALFSPINOR printf("# The code was compiled with -D_USE_HALFSPINOR\n"); #endif +#ifdef _USE_SHMEM + printf("# the code was comiled with -D_USE_SHMEM\n"); +# ifdef _PERSISTENT + printf("# the code was comiled for persistent MPI calls (halfspinor only)\n"); +# endif +#endif +#ifdef MPI +# ifdef _NON_BLOCKING + printf("# the code was comiled for non-blocking MPI calls (spinor and gauge)\n"); +# endif printf("\n"); fflush(stdout); } - #ifdef _GAUGE_COPY init_gauge_field(VOLUMEPLUSRAND + g_dbw2rand, 1); #else diff --git a/global.h b/global.h index 38c3b4544..2028847a2 100644 --- a/global.h +++ b/global.h @@ -24,27 +24,7 @@ #include"su3.h" #include"su3adj.h" -#define DUM_DERI 6 -#define DUM_SOLVER (DUM_DERI+7) -#define DUM_MATRIX (DUM_SOLVER+6) -/* if you want to include bicgstabell */ -/* #define DUM_MATRIX (DUM_SOLVER+11) */ -/* IF PHMC need dum_matrix + 8 instead of + 6 */ -#define NO_OF_SPINORFIELDS (DUM_MATRIX+8) -/* END IF PHMC */ - - -/* IF PHMC: - Define here how many bispinors and chi`s one needs ... = Pol degree */ -#define DUM_BI_DERI 6 -#define DUM_BI_SOLVER (DUM_BI_DERI+7) -#define DUM_BI_MATRIX (DUM_BI_SOLVER+6) -/* if you want to include bicgstabell */ -/* #define DUM_BI_MATRIX DUM_BI_SOLVER+11 */ -#define NO_OF_BISPINORFIELDS (DUM_BI_MATRIX+6) - -/* End IF PHMC*/ /* Here you can define antiperiodic */ @@ -77,6 +57,13 @@ # define ALIGN #endif +EXTERN int DUM_DERI, DUM_SOLVER, DUM_MATRIX; +EXTERN int NO_OF_SPINORFIELDS; + +EXTERN int DUM_BI_DERI, DUM_BI_SOLVER, DUM_BI_MATRIX; +EXTERN int NO_OF_BISPINORFIELDS; + + /* IF PHMC */ EXTERN double Cpol; EXTERN double cheb_evmin, cheb_evmax; diff --git a/hmc_tm.c b/hmc_tm.c index 6fd07e1ce..2efa22248 100644 --- a/hmc_tm.c +++ b/hmc_tm.c @@ -101,6 +101,11 @@ int main(int argc,char *argv[]) { #pragma pomp inst begin(main) #endif + DUM_DERI = 6; + DUM_SOLVER = DUM_DERI+7; + DUM_MATRIX = DUM_SOLVER+6; + NO_OF_SPINORFIELDS = DUM_MATRIX+6; + verbose = 0; g_use_clover_flag = 0; g_nr_of_psf = 1; @@ -316,7 +321,7 @@ int main(int argc,char *argv[]) { if(startoption == 3) { if( (j = read_rlxd_state(gauge_input_filename, rlxd_state, rlxdsize)) == -1) { if(g_proc_id == 0) { - printf("%s does not exist, switching to restart...\n", rlxd_input_filename); + printf("no rlxd_state found in %s, switching to restart...\n", gauge_input_filename); fflush(stdout); } startoption = 2; @@ -345,7 +350,7 @@ int main(int argc,char *argv[]) { read_lime_gauge_field_singleprec(gauge_input_filename); } if (g_proc_id == 0){ - printf("done!\n"); fflush(stdout); + printf("# done!\n"); fflush(stdout); } } else if (startoption == 1) { @@ -394,13 +399,6 @@ int main(int argc,char *argv[]) { fclose(parameterfile); } - /* compute the energy of the determinant term */ - /* needed for exact continuation of the run, since evamax and eva use - random numbers */ - if(startoption == 2 && g_proc_id == 0 - && reproduce_randomnumber_flag == 1){ - rlxd_reset(rlxd_state); - } /* set ddummy to zero */ for(ix = 0; ix < VOLUME+RAND; ix++){ diff --git a/invert.c b/invert.c index c4fc1d114..b3ace5fb5 100644 --- a/invert.c +++ b/invert.c @@ -86,6 +86,14 @@ int main(int argc,char *argv[]) { #pragma pomp inst init #pragma pomp inst begin(main) #endif + + DUM_DERI = 6; + /* DUM_DERI + 2 is enough (not 7) */ + DUM_SOLVER = DUM_DERI+2; + DUM_MATRIX = DUM_SOLVER+6; + /* DUM_MATRIX + 2 is enough (not 6) */ + NO_OF_SPINORFIELDS = DUM_MATRIX+2; + verbose = 0; g_use_clover_flag = 0; g_nr_of_psf = 1; diff --git a/phmc_tm.c b/phmc_tm.c index 56d784461..b24f648a4 100644 --- a/phmc_tm.c +++ b/phmc_tm.c @@ -130,6 +130,16 @@ int main(int argc,char *argv[]) { char *filename_infos = "EVS.data"; /* END PHMC ... to be used almost at the end of the file */ + DUM_DERI = 6; + DUM_SOLVER = DUM_DERI+7; + DUM_MATRIX = DUM_SOLVER+6; + NO_OF_SPINORFIELDS = DUM_MATRIX+8; + + DUM_BI_DERI = 6; + DUM_BI_SOLVER = DUM_BI_DERI+7; + DUM_BI_MATRIX = DUM_BI_SOLVER+6; + NO_OF_BISPINORFIELDS = DUM_BI_MATRIX+6; + verbose = 0; g_use_clover_flag = 0; g_nr_of_psf = 1; @@ -615,12 +625,6 @@ int main(int argc,char *argv[]) { fclose(parameterfile); } - /* compute the energy of the determinant term */ - /* needed for exact continuation of the run, since evamax and eva use - random numbers */ - if(startoption == 2 && g_proc_id == 0){ - rlxd_reset(rlxd_state); - } /* set ddummy to zero */ for(ix = 0; ix < VOLUME+RAND; ix++){