Changeset 77778f8 in flexpart.git for src/makefile
- Timestamp:
- Jun 13, 2018, 1:43:58 PM (6 years ago)
- Branches:
- univie
- Children:
- 1a8fbee
- Parents:
- 505a96e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/makefile
ra9cf4b1 r77778f8 1 1 SHELL = /bin/bash 2 2 ################################################################################ 3 # 4 # LICENSE 5 # Valid-License-Identifier: GPL-3.0-or-later 6 # License text: https://spdx.org/licenses/GPL-3.0-or-later.html#licenseText 7 # 3 8 # DESCRIPTION 4 9 # Makefile for FLEXPART. Standard (serial) and parallel (MPI) version … … 7 12 # possible ("make -j") 8 13 # 9 # At NILU we have installed gcc-4.9.1 and libraries under user /homevip/flexpart 10 # ("ROOT_DIR") 11 # To use gfortran version 4.9, add "gcc=4.9" to the make command, e.g. 14 # 15 # The makefile is prepared for the environment at NILU. 16 # There, gcc-4.9.1 and libraries are installed under user /homevip/flexpart 17 # NILU users can compile with gfortran version 4.9 by addin "gcc=4.9" to the make command, e.g. 12 18 # 'make -j ecmwf gcc=4.9', 13 # also set environment variable LD_LIBRARY_PATH to point to compiler libraries 19 # You also set environment variable LD_LIBRARY_PATH to point to compiler libraries 20 # 21 # Other users will have to edit the 14 22 # 15 23 # Makefile was modified to produce unified executable for both ECMWF and GFS meteo data formats … … 23 31 # USAGE 24 32 # Compile serial FLEXPART 25 # make [-j] serial33 # make [-j] [serial] [ncf=yes} 26 34 # 27 35 # Compile parallel FLEXPART 28 # make [-j] mpi 36 # make [-j] mpi [ncf=yes} 29 37 # 30 38 # Compile for debugging parallel FLEXPART 31 # make [-j] mpi-dbg 32 # 33 # NETCDF OUTPUT 34 # To add support for output in netCDF format, append `ncf=yes` to the 35 # `make` command 39 # make [-j] mpi-dbg [ncf=yes} 40 # 41 # ncf=yes adds support for output in netCDF format. Requires netCDF libs to be installed. 42 # 43 # AUTHORS 44 # NILU people, Petra Seibert (PS), 2018 45 # 46 # VERSION and CHANGES 47 # v1.0 as found in git branch dev on flexpart.eu, 2018-06-08 48 # v1.1 PS, make the file more useful for non-NILU users 36 49 # 37 50 ################################################################################ … … 50 63 FLEXPART-SERIAL = FLEXPART 51 64 52 53 ifeq ($(gcc), 4.9) 54 # Compiled libraries under user ~flexpart, gfortran v4.9 65 ifneq ($(gcc), 4.9) 66 # make sure that all paths correspond to your system 67 F90 = gfortran 68 MPIF90 = mpifort 69 70 INCPATH1 = /usr/include 71 INCPATH2 = /usr/include 72 LIBPATH1 = /usr/lib 73 else 74 # NILU: Compiled libraries under user ~flexpart, gfortran v4.9 75 ROOT_DIR = /homevip/flexpart/ 55 76 ROOT_DIR = /homevip/flexpart/ 56 77 … … 61 82 INCPATH2 = ${ROOT_DIR}/include 62 83 LIBPATH1 = ${ROOT_DIR}/lib 63 else64 # Compiled libraries under user ~flexpart, gfortran v5.465 ROOT_DIR = /homevip/flexpart/66 67 F90 = /usr/bin/gfortran68 MPIF90 = /usr/bin/mpifort69 70 INCPATH1 = ${ROOT_DIR}/gcc-5.4.0/include71 INCPATH2 = /usr/include72 LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib73 84 endif 74 85 … … 83 94 84 95 85 # path to gributils used to detect meteodata format96 #add path to gributils to default searchpath of make 86 97 VPATH = gributils/ 87 98 … … 92 103 93 104 ## LIBRARIES 94 #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff95 105 LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT) 96 106 97 FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native 98 99 DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV_DBG) $(NCOPT) -fbacktrace -Wall -fdump-core $(FUSER) # -ffpe-trap=invalid,overflow,denormal,underflow,zero -Warray-bounds -fcheck=all 107 #FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native 108 FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) # -fcheck=all -fbacktrace -march=native 109 110 # Explanation of unusual gfortran options 111 # -fmessage-length=0: do not wrap around compiler messages at col 72 112 # -flto=jobserver: use GNU make's job server mode to determine the number of parallel jobs. This is useful when the Makefile calling GCC is already executing in parallel. (+ in front of $(FC) further down also needed for parallel compiling). 113 114 DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV_DBG) $(NCOPT) -fbacktrace -Wall -fdump-core $(FUSER) # -ffpe-trap=invalid,overflow,denormal,underflow,zero -fcheck=all 100 115 101 116 LDFLAGS = $(FFLAGS) -L$(LIBPATH1) -Wl,-rpath,$(LIBPATH1) $(LIBS) #-L$(LIBPATH2)
Note: See TracChangeset
for help on using the changeset viewer.