# # Makefile for 2+1 transverse lattice program # # This is a modification of the 3+1 version (August 2000) # # this is to be run with the command gmake on # gsm and at argonne # # urand has been removed from the laso program. # it had been causing lots of trouble. # # The case 2+1 is forced by the compiler directive -DHINDEX=1 # # # bvds.geneva.edu mpich configure command: # configure --disable-short-longs # make >& make.log # added man pages to /etc/man.config # # MPI command line: # (the following should work with mpich, # but stdin etc. do not seem to get redirected.) # mpirun -np 13 -stdin junk.in -stdout junk.tmp -stderr junk.err junk # # However, the following does work: # testmpi: joel test.in mpirun -np 6 -v joel &test.tmp # #--------------------------------------------------------------------------- # # Search path to find files # VPATH=../davecode # # checkergcc is version of gcc with extensive memory checking. # -pg is for profiler gprof # -g is gdb debugger DEBUG= CC=gcc FC=g77 # # directory with standard source files (dnlaso.f, etc.) # that are not in LAPACK or BLAS. # LIBDIRS=-L../lib/ # # In principal /usr/lib/gcc-lib/i486-linux/egcs-2.90.29 # should be the directory for libf2c.a, however the # "seconds()" subroutine seems to have a problem with # corrupting memory. # # The seconds() routine is unsed a lot by ARPACK. # Since the LAPACK seconds() routine corrupts memory, # as a makeshift fix, I included a dummy version of seconds() in ARPACK. # The ARPACK library must come before the LAPACK library # for this fix to work. -f2c -lm # LIBS=-llong -larpack_LINUX -llapack -lblas # # both -ansi & -pendantic needed to force ANSI c # -O2 is optimization CFLAGS=$(DEBUG) -O3 -Wall -DHINDEX=1 FFLAGS=$(DEBUG) -DHINDEX=1 # -W other possible bad things... # # generate a version of code using MPI # %.mpi.o: %.c mpicc -c $(CFLAGS) -DUSE_MPI=1 -DONE_PROCESSOR_SPECTRUM=1 -o $@ $< %.c.o: %.c checkergcc -c $(CFLAGS) -o $@ $< mpiobjects = usempi.mpi.o improved.mpi.o \ interaction1.o interaction2.o interaction3.o hamilton.mpi.o\ group.o basis.o weights.o spectrum.mpi.o extrapolate.o objects = interaction1.o interaction2.o interaction3.o \ hamilton.o group.o basis.o weights.o improved.o spectrum.o \ extrapolate.o cobjects = interaction1.c.o interaction2.c.o \ interaction3.c.o hamilton.c.o group.c.o \ basis.c.o weights.o improved.c.o extrapolate.c.o spectrum.c.o tb: testbasis.o basis.o group.o $(CC) $(CFLAGS) -o tb testbasis.o basis.o group.o -lm ctb: testbasis.c.o basis.c.o group.c.o checkergcc -v $(CFLAGS) -o tb testbasis.c.o basis.c.o group.c.o -lm ti: testinteraction.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o ti testinteraction.o $(objects) $(LIBS) laso: runlaso.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o laso runlaso.o $(objects)\ $(LIBS) #This was an unsuccessful attempt to get checkergcc to work #There was trouble getting all of the libraries correct claso: runlaso.c.o $(cobjects) checkergcc -v $(CFLAGS) -o claso $(LIBDIRS) -L/usr/lib \ runlaso.c.o $(cobjects) $(LIBS) structure: structure.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o structure structure.o $(objects)\ $(LIBS) # test case using old version of hamiltonian routine laso2: hamilton.old.o runlaso.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o laso2 runlaso.o interaction1.o \ interaction2.o interaction3.o \ hamilton.old.o group.o basis.o weights.o improved.o spectrum.o\ $(LIBS) monster: monster.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o monster monster.o $(objects) $(LIBS) wind: wind.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o wind wind.o $(objects) $(LIBS) mpiwind: wind.mpi.o $(mpiobjects) mpif77 $(CFLAGS) $(LIBDIRS) -o mpiwind wind.mpi.o\ $(mpiobjects) $(LIBS) jessica: jessica.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o jessica jessica.o $(objects) $(LIBS) joel: jessica.mpi.o $(mpiobjects) mpif77 $(CFLAGS) $(LIBDIRS) -o joel jessica.mpi.o \ $(mpiobjects) $(LIBS) disperse: disperse.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o disperse disperse.o $(objects) $(LIBS) baba: baba.o $(objects) $(FC) $(CFLAGS) $(LIBDIRS) -o baba baba.o $(objects) $(LIBS) # The following files are dependant on the file include.h $(objects) testbasis.o testinteraction.o runlaso.o monster.o\ wind.o jessica3.o *.mpi.o: include.h # The following files are dependant on the file run.h testinteraction.o spectrum.o extrapolate.o runlaso.o monster.o wind.o\ improved.o jessica3.o interaction3.o *.mpi.o: run.h # the following are dependant on usempi.h *.mpi.o: usempi.h # There seems to be some trouble with DNLASO with memory # alignment. I still haven't tracked down the cause. # # dnlaso is written in FORTRAN IV =? FORTRAN 66 # -Wall is all warnings # -k is keep C files around -C check array subscripts # f2c and fort77 don't have FORTRAN 66 option -ff66. # sometimes the code works better when compiled under FORTRAN 77. # -O -k clean: rm -f core *~ *.o *.log *.dvi *.aux