# # ------ MAKEFILE FILE FOR IBM Blue Gene Linux SPIDER WITH MPI ----------- # ArDean Leith Sept. 2007 # # Notes: # The commands for ELEMENTS may be necessary # To create executable: make -f Makefile_linux_fftw_bg ../bin/spider_linux_fftw_bg # May be necessary to remove all: *.F before starting compilation # # O2 : optimization level # qstrict : follow program semantics when optimizing # qipa : inter procedural analysis # qfixed=72 : fixed line length # qarch=440 : target machine # qtune=440 : target machine # # Note: To have text of FORTRAN error messages displayed, specify # -env "NLSPATH=$NLSPATH" on your mpirun command line. FFLAGS = -O2 -qstrict -qarch=440d -qstrict -qipa -qtune=440 -qfixed=72 -qnosave -c LFLAGS = -O2 -qarch=440d -qnosave CPPFLAGS = -DSP_IBMSP3 -DUSE_MPI -DMPI_DEBUG -DSP_LIBFFTW # F90 compiler location: /opt/ibmcmp/xlf/bg/10.1/bin/blrts_xlf COMP = mpixlf90 CPP = /opt/ibmcmp/xlf/bg/10.1/exe/cpp PGM = spider_linux_fftw_bg LIB = $(PGM).a SRC = spider # FFTW library location FFTWLIBDIR = ../fftw/fftw-bg/lib LINKLIBS = -L $(FFTWLIBDIR) -lsrfftw -lsfftw .PRECIOUS : $(LIB) ../bin/$(PGM) include Makefile.inc ../bin/$(PGM) : $(PGM).o $(LIB) @echo linking ../bin/$(PGM) $(COMP) $(LFLAGS) $(PGM).o $(LIB) $(LINKLIBS) -lc -o ../bin/$(PGM) $(PGM).o : $(SRC).f $(CPP) $(CPPFLAGS) $(SRC).f $(SRC).F $(COMP) $(FFLAGS) -o $(PGM).o $(SRC).F @\rm $(SRC).F $(LIB) : $(ELEMENTS) @echo all object files placed in library $(ELEMENTS) : $(CPP) $(CPPFLAGS) $*.f $*.F $(COMP) $(FFLAGS) $*.F $(AR) r $(LIB) $*.o @\rm $*.o $*.F