Skip to content
Snippets Groups Projects
Makefile.inc.p690 3.45 KiB
Newer Older
  • Learn to ignore specific revisions
  • Douglas Guptill's avatar
    Douglas Guptill committed
    # Define our compilers.................................
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    F90    = mpxlf90_r
    F77    = mpxlf_r
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    CC     = mpcc_r
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    # Libraries................
    #
    # libs removed on p690...
    # -lacml
    # -L/usr/lpp/X11 -lX11 \
    # PGPLOT = /home/beaumnt1/software/pgplot-5.2.2-q64
    # -L$(PGPLOT) -lpgplot \
    
    LIBS = \
     -LOCTREE -lOctree$(BITS) \
     -LNN -lnn_f$(BITS) \
     -LNN -lnn_c$(BITS) \
     -LCASCADE -lcascade$(BITS) \
     -LRESAMPLE -lresample$(BITS) \
    
     -L/home/beaumnt1/software/wsmp/lib/Power4 -lpwsmp64 \
    
     -lpthread -lhm -lhu -lm_r 
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # The Makefiles look at compile output with this
    PAGER=more
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # for 64 bit compile..................................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    AR =ar -X 64
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    BITS=-q64
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    OPTIONS = -b64 -bmaxdata:0x80000000 -bhalt:0 -bnoquiet
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    FLG64=-b64
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # Define FORTRAN compiler flags.......................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # On one p690 run, we have these two results: 
    #           Temperature calculations    4243.5252    426.0988      0.0117
    #           Temperature calculations     336.4992     32.3458      0.0077
    # The difference being 
    #  1. number of processors: 4 and 16
    #  2. the compile flags: debug and speed
    # Also, the first run quit sooner; i.e. at a different place
    # The first run stopped on a floating point overflow
    # The second run stopped on a seg fault.
    #
    
    # -qsave is the default for Fortran77, -qnosave for Fortran90
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # take -qextchk out for the final compile
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # Need -qhalt=s, else the compiler stops on the multiple errors from MPI calls.
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    FFLAGS  = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
    -qmaxmem=-1 \
    -qcheck -qwarn64  \
    -qfloat=nomaf:nofold:norsqrt:strictnmaf \
    -qflttrap=overflow:underflow:zerodivide:invalid:NANQ:enable \
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    -qsigtrap -qnosave -qhalt=s -qextchk
    
    # For speed................
    # FFLAGS  = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
    # -qmaxmem=-1 \
    # -qfloat=nomaf:nofold:norsqrt:strictnmaf \
    # -qhalt=s
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # Define C compiler flags.............................
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # take -qextchk out for the final compile
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    CFLAGS  = -g -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
    -qcheck -qwarn64 \
    -qfloat=nomaf:nofold:norsqrt \
    -qflttrap=overflow:underflow:zerodivide:invalid:enable \
    -qhalt=e -qextchk
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # CFLAGS  = -O2 -qstrict -Q $(BITS) $(FLG64) -qarch=auto -qtune=auto \
    # -qfloat=nomaf:nofold:norsqrt \
    # -qhalt=e
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    # compile rules.......................................
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    #
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    COMPILE_OUT=$(NAME)$(BITS).compile
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    .SUFFIXES:
    .SUFFIXES: .o .c .f .f90
    .f90.o:
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "--"                                          >>$(COMPILE_OUT) 2>&1
    	@echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
    	@echo "xlf is `which xlf`"                          >>$(COMPILE_OUT) 2>&1
    	@echo "$(F90) -qsuffix=f=f90 $(FFLAGS) -c $<"       >>$(COMPILE_OUT) 2>&1
    	$(F90) -qsuffix=f=f90 $(FFLAGS) -c $<               >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    .f.o:
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "--"                                          >>$(COMPILE_OUT) 2>&1
    	@echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
    	@echo "xlf is `which xlf`"                          >>$(COMPILE_OUT) 2>&1
    	@echo "$(F77) -qsuffix=f=f $(FFLAGS) -c $<"         >>$(COMPILE_OUT) 2>&1
    	$(F77) -qsuffix=f=f $(FFLAGS) -c $<                 >>$(COMPILE_OUT) 2>&1
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    
    .c.o:
    
    Douglas Guptill's avatar
    Douglas Guptill committed
    	@echo "--"                                          >>$(COMPILE_OUT) 2>&1
    	@echo "OBJECT_MODE should be 64, is ${OBJECT_MODE}" >>$(COMPILE_OUT) 2>&1
    	@echo "$(CC) $(CFLAGS) -c $<"                       >>$(COMPILE_OUT) 2>&1
    	$(CC) $(CFLAGS) -c $<                               >>$(COMPILE_OUT) 2>&1