#-------------------------------------------------------------------------- # This makefile is used to compile the simple PVM sample on the SP2. # It can also be used as a template makefile for C or Fortran programs. #-------------------------------------------------------------------------- # # FC and CC specify the compilers to be used for Fortran and C. # FFLAGS or CFLAGS can be set to -g if debugging is desired; the # current -O setting allows compiler optimization. ARCH = RS6K PVM_ROOT = /usr/local/apps/pvm3 PVMLIB = $(PVM_ROOT)/lib/$(ARCH)/libgpvm3.a $(PVM_ROOT)/lib/$(ARCH)/libpvm3.a PVMFLIB = $(PVM_ROOT)/lib/$(ARCH)/libfpvm3.a FC = f77 FFLAGS= -g CC = cc CFLAGS= -g # EXEDIR sets the directory where executables are put. # Typically, executables are kept in the PVM default binary directory # $(HOME)/pvm3/bin/RS6K, or in current working directory. # If you choose not to move executables to the default location, # you must let PVM know where the executable reside through the 'ep=' # extension in the hostfile. # See example and PVM documentation for details. EXEDIR=$(HOME)/pvm3/bin/RS6K EXEDIR=. # LFLAGS gives paths to include for proper linking: # FLIBS and CLIBS may give particular libraries required. # (in this case, the pvm3 library and the Fortran pvm3 library) FLIBS=$(PVMFLIB) $(PVMLIB) CLIBS=$(PVMLIB) # INCL gives required include paths. INCL=-I$(PVM_ROOT)/include #-------------------------------------------------------------------------- # This part is typically user-defined, giving the program names, etc. #-------------------------------------------------------------------------- all: include manager worker # # Special consideration is given for the fact that xlf compiles do not # search the include path for include files. So, the proper include file # is linked into the source directory. The fortran files are also touched # to guarantee they are compiled with the proper header. # include: touch *.f ln -s -f $(PVM_ROOT)/include/fpvm3.h . manager: manager.o $(FC) $(LFLAGS) $(FFLAGS) -o $(EXEDIR)/manager manager.o $(FLIBS) worker: worker.o $(FC) $(LFLAGS) $(FFLAGS) -o $(EXEDIR)/worker worker.o $(FLIBS) hostlist: hostfile cp hostfile $(EXEDIR) .f.o: $(FC) -c $(FFLAGS) $(INCL) $*.f .c.o: $(CC) -c $(CFLAGS) $(INCL) $*.c clean : rm -f core $(EXEDIR)/manager.results $(EXEDIR)/manager*.*.out \ $(EXEDIR)/manager*.*.err $(EXEDIR)/hostfile new : rm -f core *.o $(EXEDIR)/manager $(EXEDIR)/worker *.results *.*.out \ *.*.err $(EXEDIR)/hostfile *.cmd.tmp fpvm3.h