Changeset 77778f8 in flexpart.git for src/makefile


Ignore:
Timestamp:
Jun 13, 2018, 1:43:58 PM (6 years ago)
Author:
pesei <petra seibert at univie ac at>
Branches:
univie
Children:
1a8fbee
Parents:
505a96e
Message:

Introduce changelog.txt, update version string, make makefile more useful for use outside NILU, improve error msg in readcomma$

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/makefile

    ra9cf4b1 r77778f8  
    11SHELL = /bin/bash
    22################################################################################
     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#
    38#  DESCRIPTION
    49#    Makefile for FLEXPART. Standard (serial) and parallel (MPI) version
     
    712#    possible ("make -j")
    813#
    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.
    1218#       '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
    1422#
    1523#    Makefile was modified to produce unified executable for both ECMWF and GFS meteo data formats
     
    2331#  USAGE
    2432#    Compile serial FLEXPART
    25 #      make [-j] serial
     33#      make [-j] [serial] [ncf=yes}
    2634#
    2735#    Compile parallel FLEXPART
    28 #      make [-j] mpi
     36#      make [-j] mpi [ncf=yes}
    2937#     
    3038#    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
    3649#
    3750################################################################################
     
    5063FLEXPART-SERIAL = FLEXPART
    5164
    52 
    53 ifeq ($(gcc), 4.9)
    54 # Compiled libraries under user ~flexpart, gfortran v4.9
     65ifneq ($(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
     73else
     74# NILU: Compiled libraries under user ~flexpart, gfortran v4.9
     75        ROOT_DIR = /homevip/flexpart/
    5576        ROOT_DIR = /homevip/flexpart/
    5677
     
    6182        INCPATH2  = ${ROOT_DIR}/include
    6283        LIBPATH1 = ${ROOT_DIR}/lib
    63 else
    64 # Compiled libraries under user ~flexpart, gfortran v5.4
    65         ROOT_DIR = /homevip/flexpart/
    66 
    67         F90       = /usr/bin/gfortran
    68         MPIF90    = /usr/bin/mpifort
    69 
    70         INCPATH1  = ${ROOT_DIR}/gcc-5.4.0/include       
    71         INCPATH2  = /usr/include
    72         LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib
    7384endif
    7485
     
    8394
    8495
    85 # path to gributils used to detect meteodata format
     96#add path to gributils to default searchpath of make
    8697VPATH = gributils/
    8798
     
    92103
    93104## LIBRARIES
    94 #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff
    95105LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT)
    96106
    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
     108FFLAGS   = -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
     114DBGFLAGS = -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
    100115
    101116LDFLAGS  = $(FFLAGS) -L$(LIBPATH1) -Wl,-rpath,$(LIBPATH1) $(LIBS) #-L$(LIBPATH2)
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG