Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / hydro / arc / macros.mpp.ifort.luna
blob39ac0d636294ec985490baff538de67d64739d0d
1 ## If you have multiple mpi biulds on a single machine
2 ## this example may be relevant to you. 
3 ## Ex: The hydro-c1 machine has mpi and netcdf built against portland 
4 ##     fortran in the PATH. However mpi and netcd built against intel 
5 ##     fortran is also available. Here's how I build WRF HYDRO against 
6 ##     intel
7 ##     Below, in this file, I make the changes:
8 ##       COMPILER90 = $(ifortCompiler90)
9 ##       LDFLAGS    = $(ifortLdFlags)
10 ##       NETCDFINC  = $(ifortNetcdfInc)
11 ##       NETCDFLIB  = -L$(ifortNetcdfLib) -lnetcdff -lnetcdf
12 ##     In my ~/.bashrc I have
13 ##       ## WRF HYDRO
14 ##       export NETCDF=/opt/netcdf
15 ##       export WRF_HYDRO=1
16 ##       export HYDRO_D=1
17 ##       ### manage ifort on hydro
18 ##       export ifortNetcdfLib="/opt/netcdf-4.3.0+ifort-12.1/lib/"
19 ##       export ifortNetcdfInc="/opt/netcdf-4.3.0+ifort-12.1/include/"
20 ##       # RPATH for ifort (pgi is already default so no need)
21 ##       ifortMpiLib="/opt/openmpi-1.10.0-intel/lib/"
22 ##       export ifortLdFlags="-Wl,-rpath,${ifortNetcdfLib}:${ifortMpiLib} -L${ifortNetcdfLib} -L${ifortMpiLib}"
23 ##       export ifortCompiler90='/opt/openmpi-1.10.0-intel/bin/mpif90'
24 ##       # Aliases for invoking ifort
25 ##       alias impirun='/opt/openmpi-1.10.0-intel/bin/mpirun'
26 ##       alias iman='man -M/opt/openmpi+intel/man'
27 ##       # Bonus: Check your wrf hydro environment - up you to maintain to your needs.
28 ##       alias henv='printenv | egrep -i "(HYDRO|NUDG|PRECIP|CHAN_CONN|^NETCDF|^LDFLAGS|^ifort)" | egrep -v PWD'
30 .IGNORE:
32 ifeq ($(SPATIAL_SOIL),1)
33 SPATIAL_SOIL = -DSPATIAL_SOIL
34 else
35 SPATIAL_SOIL = 
36 endif
38 ifeq ($(HYDRO_REALTIME),1)
39 HYDRO_REALTIME = -DHYDRO_REALTIME
40 else
41 HYDRO_REALTIME =
42 endif
44 ifeq ($(WRF_HYDRO),1)
45 WRF_HYDRO = -DWRF_HYDRO $(HYDRO_REALTIME)
46 else
47 WRF_HYDRO =
48 endif
50 ifeq ($(WRF_HYDRO_RAPID),1)
51 WRF_HYDRO = -DWRF_HYDRO -DWRF_HYDRO_RAPID $(HYDRO_REALTIME)
52 endif
54 ifeq ($(HYDRO_D),1)
55 HYDRO_D = -DHYDRO_D $(WRF_HYDRO)
56 else
57 HYDRO_D =  $(WRF_HYDRO)
58 endif
61 ifeq ($(WRF_HYDRO_NUDGING),1)
62 WRF_HYDRO_NUDGING = -DWRF_HYDRO_NUDGING
63 else
64 WRF_HYDRO_NUDGING = 
65 endif
67 ifeq ($(OUTPUT_CHAN_CONN),1)
68 OUTPUT_CHAN_CONN = -DOUTPUT_CHAN_CONN
69 else
70 OUTPUT_CHAN_CONN = 
71 endif
73 ifeq ($(PRECIP_DOUBLE),1)
74 PRECIP_DOUBLE = -DPRECIP_DOUBLE
75 else
76 PRECIP_DOUBLE = 
77 endif
79 ifeq ($(NCEP_WCOSS),1)
80 NCEP_WCOSS = -DNCEP_WCOSS
81 else
82 NCEP_WCOSS =
83 endif
85 ifeq ($(NWM_META),1)
86 NWM_META = -DNWM_META
87 else
88 NWM_META =
89 endif
91 RMD         = rm -f
92 COMPILER90  = ftn
93 FORMAT_FREE = -FR
94 BYTESWAPIO  = -convert big_endian
95 F90FLAGS    = -w -c -ftz -align all -fno-alias -fp-model precise $(FORMAT_FREE) $(BYTESWAPIO)
96 DEBUGFLAGS = -DHYDRO_D -g -traceback -debug all -check all
97 MODFLAG     = -I./ -I ../../MPP -I ../MPP -I ../mod
99 # Used for DMAPP 
100 # module load dmapp/7.0.1-1.0502.11080.8.76.ari
101 #LDFLAGS            = $(HDF5_LDFLAGS) -Wl,--whole-archive,-ldmapp,--no-whole-archive
102 LDFLAGS     = $(HDF5_LDFLAGS)
103 CPPINVOKE       = -fpp
104 CPPFLAGS    = -DMPP_LAND -I ../Data_Rec $(HYDRO_D) $(SPATIAL_SOIL) $(NWM_META) $(WRF_HYDRO_NUDGING) $(OUTPUT_CHAN_CONN) $(PRECIP_DOUBLE) $(NCEP_WCOSS)
105 LIBS        =$(Z_LIB)   
106 NETCDFINC   = $(NETCDF_INC)
107 NETCDFLIB   = -L$(NETCDF_LIB) -lnetcdff -lnetcdf