#include #include #include #include #include #include "spectrum.h" #include "improved.h" /* needed for global_kt */ #ifdef USE_MPI #include "usempi.h" #endif #define MOM 1 /* Flag for nonzero P_1 or L */ #define VECTORS 0 /* Flag for finding/printing eigenvectors */ /* This file runs the lanczos algorithm for finding the lowest Eigenvalues of the Hamiltonian. */ #ifdef __uxp__ /* Fujitsu vpp */ extern int fcn(integer *m, integer *npar, doublereal *xp, doublereal *fvecc, integer *iflag){ return 0; } #endif int MAIN(int argc, char **argv){ int i; enum state_type type=TYPE_SOURCE; specify_calculation x; eigensystem eigen=INITIAL_EIGENSYSTEM; full_basis basis={0}; clock_t t1; time_t t2,tf; element angle[HINDEX+2]; #if HINDEX==2 #if MOM /* Profile examples from the end of 1998 use o=-1,multi=9,multi2=8 */ /* 6 20 1 15 */ int ht[HINDEX]={1,0},np=3,kt=8,charge=0,o=0,multi=15; element kmax=3.5,ll=1.265; #else /* 1 24 6 8 1 8 */ int ht[HINDEX]={2,0},np=5,kt=4,charge=0,o=0,multi=0; #endif #if 0 /* meson test case, gauge only */ element couplings[NPARAMS]={0.03250809*0, 1.0, 0, 0, 0, 0, 0, 0, 0, 0, -0.323*0, 0, 0.362*0, 0}; #elif 0 /* meson test case, all couplings */ element couplings[NPARAMS]={0.03250809, 1.0, 0.688, -0.038, -0.09, 374.0, 0.158, 143.0, 999, 999, -0.323, 0.162, 0.362, 0}; #elif 0 /* glueball test couplings */ element couplings[NPARAMS]={0.03, 1.0, 0.7,0.03,-0.005, 3.0,0.13,1.0, -2.0,1.0,1,1,1,0}; #elif 1 /* May 2002, junk.in */ element couplings[NPARAMS]={0.001967542671,1,0.3909839522,-0.01250282378, -0.06421231123,353.2492529,0.07049127522, 160.6273835,-0.7123520719,-0.6519355869, 0,0,0,0}; /* In older results, lambda_5 is scaled differently, use 0.25 or 1.0 */ #elif 0 /* older test couplings */ element couplings[NPARAMS]={0.1, 1.0, 0.2,0.1,0.15,0.0,0.15,0.0,0.0,0.0}; #elif 0 /* couplings used in first 3+1 paper */ element couplings[NPARAMS]={0.051777,1.0,0.759751,-0.075265,-0.139860, 8.559161,0.157577,1.847000,-3.702121}; #endif #elif HINDEX==1 #if MOM int ht[HINDEX]={0},np=8,kt=28,charge=1,o=0,multi=1; element kmax=3.0,ll=3.0; #else /* 1 0 24 8 1 8 */ int ht[HINDEX]={0},kt=28,np=8,charge=0,o=1,multi=1; #endif #if 1 element couplings[NPARAMS]={0.1,2.0,-0.2,-0.23,20.0,0.0}; #else element couplings[NPARAMS]={0.0324919696232906307,1.0,0.0,0.0,0.0,-2.0}; #endif #endif size_t j; integer nval=5; #if MOM int ipt[HINDEX]; #if 0 element transmom[HINDEX]; #endif #endif #ifdef USE_MPI int myrank; MPI_Init(&argc, &argv); /* initialize MPI */ mpi_group=MPI_COMM_WORLD; /* communicator used by spectrum(...) */ init_mpi_types(); MPI_Comm_rank(MPI_COMM_WORLD,&myrank); #else int myrank=0; /* dummy variable for the non-parallel case */ #endif #ifdef BABBAGE /* Routine to initialize Fortran on Babbage */ if(hf_fint((char*)NULL)) exit(1); #endif #if MOM for(i=0;i1.0e-8)printf(", %i: %g",i,np[i]); printf("\n"); } #endif if(myrank==0){ printf("continue? (0=no)"); fflush(stdout); scanf("%i",&i); } #ifdef USE_MPI MPI_Bcast(&i,1,MPI_INT,0,MPI_COMM_WORLD); #endif }while(i); /* print out memory usage (before freeing memory) */ if(myrank==0) print_memory_usage(stdout,&basis); /* Free up memory used. This is mainly for debugging */ free_eigensystem(&eigen); free_spectrum(); free_basis(&basis); #ifdef USE_MPI /* MasterShutDown();*/ MPI_Finalize(); /* cleanup MPI */ #endif return 0; }