Skip to content

Commit

Permalink
some defines are variables now
Browse files Browse the repository at this point in the history
  • Loading branch information
urbach committed Feb 1, 2007
1 parent fc61f79 commit 579215e
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion README.bgl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
as options to mpirun.
17 changes: 16 additions & 1 deletion benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
27 changes: 7 additions & 20 deletions global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
16 changes: 7 additions & 9 deletions hmc_tm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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++){
Expand Down
8 changes: 8 additions & 0 deletions invert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 10 additions & 6 deletions phmc_tm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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++){
Expand Down

0 comments on commit 579215e

Please sign in to comment.