make.tre 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #Compiler Options -- serial hands-off version
  2. #LD = xlf90_r -qspillsize=2152
  3. #CF90 = xlf90_r -qsuffix=f=f90 -qspillsize=2152 -qfree=f90
  4. #CF77 = xlf90_r -qfixed -qspillsize=2152
  5. #
  6. #Compiler -- F90
  7. #CF90 = /usr/bin/xlf95_r
  8. CF90 = mpxlf95_r
  9. #Compiler -- F77
  10. CF77 = /usr/bin/xlf90_r
  11. CP77 = $(CF90)
  12. #Linker
  13. #LD = /usr/bin/xlf95_r
  14. LD = mpxlf95_r
  15. #Paralellization opts
  16. #PARO =
  17. PARO = -qsmp=omp
  18. #Size defaults
  19. SIZEO = -b64 -q64 -qrealsize=8
  20. #Arch opts
  21. ARCHO= -qarch=auto -qtune=auto -qcache=auto
  22. #Optimalization opts
  23. OPTO= -O3 -qstrict
  24. OPTO= -O2 -qstrict
  25. #Inlining opts
  26. #INLO= -Q -qipa
  27. INLO=
  28. # Diverse options
  29. DIVO= -qmaxmem=-1 -qnosave -I/usr/local/NetCDF/include
  30. # Flags for debugging -- slow, gives location of SIGTRAP
  31. # -g -- turns on debugging ...
  32. # -qfloat -- options for floating point operations
  33. # -qflttrap -- Floating point operation traps
  34. # -qextchk -- Checks if subroutine args are consistent + common block checks
  35. # -C -- Checks array bounds
  36. # qinitauto=FF initializes all vars to NaN -- So that uninitialized vars can be detected
  37. #
  38. #DEBUG_FLAGS = -C -qflttrap=underflow:overflow:zerodivide:invalid:enable \
  39. # -qextchk -qinitauto=FF -qfloat=nofold:nohssngl:nans -g
  40. # version without qfloat shoul allow for stmt_func
  41. # without qextchk which allows for inconsistent interfaces
  42. # qextchk notes the different declarations of a in analysis(A,...)
  43. #DEBUG_FLAGS = -C -qflttrap=overflow:zerodivide:invalid:enable -qinitauto=FF -g -qfullpath \
  44. # -qinitauto=FF
  45. #DEBUG_FLAGS = -qflttrap=underflow:overflow:zerodivide:invalid:enable -qfullpath
  46. DEBUG_FLAGS = -pg
  47. F77FLG = -qextname -qfixed
  48. F90FLG = -qextname -qsuffix=f=f90 -qfree=f90
  49. FFLAGS = $(SIZEO) $(OPTO) $(ARCHO) $(PARO) $(INLO) $(DIVO) $(DEBUG_FLAGS)
  50. LINKFLAGS = $(SIZEO) $(OPTO) $(PARO) $(INLO) $(DIVO) $(DEBUG_FLAGS) -bloadmap:load.out -brename:.dgesvd_,.dgesvd
  51. CPPARCH = -DPWR4 -DAIX
  52. CPPFLAGS = -P $(CPPARCH)
  53. #LIBS = -lessl /home/parallab/nersc/knutali/lib/liblapack64.a
  54. LIBS = -lessl -lmass -L /usr/local/lib/ -llapack -L /usr/local/NetCDF/lib/ -lnetcdf
  55. #LIBS = -lessl -L /usr/local/lib/ -llapack -L /usr/local/NetCDF/lib/ -lnetcdf
  56. CPP = /usr/lib/cpp
  57. all: $(TARGET)
  58. $(TARGET): $(INC2) $(OMOD) $(OBJECTS) $(OMP_EXCEPTION_OBJ77) $(OMP_EXCEPTION_OBJ90)
  59. cd ./TMP ; $(LD) $(LINKFLAGS) -o ../$(TARGET) $(OMOD) $(OBJECTS) $(LIBS) -brename:.dgesvd_,.dgesvd
  60. #################################################################################
  61. OBJECTS1 = p_test.o mod_states.o mod_dimensions.o m_testref.o
  62. $(TARGET1): $(OBJECTS1) $(OMOD)
  63. cd ./TMP ; $(LD) $(LINKFLAGS) -o ../$(TARGET1) $(OBJECTS1)
  64. #################################################################################
  65. OBJECTS2 = mod_raw_io.o m_parse_blkdat.o p_EnKF_postprocess.o
  66. $(TARGET2): $(OBJECTS2)
  67. cd ./TMP ; $(LD) $(LINKFLAGS) -o ../$(TARGET2) $(OBJECTS2)
  68. #################################################################################
  69. clean:
  70. cd ./TMP ; rm *.f *.o *.f90 *.h *.mod
  71. new: source depend
  72. source:
  73. ./mksource.sh > source.files
  74. depend:
  75. ./mkdepend.pl | sort -u > depends.file
  76. include depends.file