source: trunk/SOURCES/Fichiers-parametres/Makefile.tof-lsce3130.inc @ 76

Last change on this file since 76 was 76, checked in by dumas, 8 years ago

OpenMP parallelization in conserv-mass-adv-diff_sept2009_mod.f90, diffusiv-polyn-0.6.f90, dragging_neff_slope_mod.f90, eaubasale-0.5_mod.f90 and relaxation_water_diffusion.f90

File size: 2.8 KB
Line 
1# Makefile de GRISLI - compilo et options pour Cat (pc-226)
2# FT options de compilation
3# LK options de link
4
5# Rappel de quelques options interessantes
6#-------------------------------------------
7# faire imperativement attention a l'arithmetique
8# -fpe0 s'arrete sur les floating point exception (sauf underflow)
9# -CB  Performs run-time checking on array subscript and character substring expressions
10# -g pour debug
11# -pg pour le profiling
12# -traceback permet de connaitre la ligne qui plante
13
14# faire man ifort pour plus d'infos
15
16# le directory dans lequel sont les compilateurs et MKL
17# DIRLOCAL=/usr/local variable d'environnement a definir dans .bash_profile
18
19
20# lit le nom du fichier param pour lancer sur r2d2 par une commande :   echo jobparam | LBQ....
21JOB = 'job'
22
23# mettre debug à 1 pour compiler avec options strictes
24debug ?= 0
25
26# compilation avec ifort :
27ifeq ($(ifort),1)
28
29# librairies
30        NCDF_INC  = -I$(NETCDFHOME)/include
31        NCDF_LIB  = -L$(NETCDFHOME)/lib -lnetcdf -lnetcdff
32
33# utilisation de MKL :
34        ifeq ($(mkl_c), 1)
35                MKL_LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm  # MKL parallele
36#               MKL_LIB =  -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm           # MKL sequentiel
37                MKL_INC = -I$(MKLROOT)/include
38        endif
39
40        IFORT= ifort
41
42        ARITHMi = -O2 -fp-model precise  #-openmp
43                                                                      # (normalement reproductible)
44    ifeq ($(debug), 1)
45                ARITHM    = $(ARITHMi) -CB -g -p -traceback -warn all  #-openmp
46        else
47                ARITHM    = $(ARITHMi) -diag-disable warn
48        endif
49               
50#ARITHM    =  -fp-model precise -warn all -CU -CA # options pour une meilleure arithmetique (normalement reproductible)
51# ARITHM = -03                    # trop brutal ne pas utiliser
52
53        FT        = $(IFORT) $(ARITHM) $(MKL_INC) #-traceback   -CB  #-g #-pg  # -g # -pg -ipo !aurel : j'ai enleve -CB
54        LK        = $(IFORT) $(ARITHM) -i_dynamic # -traceback   -CB # -g  #-pg   #-g #  -pg
55        F_NETCDF  = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback  -CB   #-g #-pg -ipo # -g
56        #FT        = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback  -CB  #-g #-pg -ipo # -g
57       
58# compilation avec gfortran et librairie BLAS
59else
60
61# librairies
62        LIBSYS = /usr/lib
63#       INCSYS = /usr/include  # Ubuntu
64        INCSYS = /usr/lib64/gfortran/modules  # Fedora
65        NCDF_INC  = $(INCSYS)
66        NCDF_LIB  = -L$(LIBSYS) -lnetcdff -lnetcdf
67
68        IFORT= gfortran
69
70        ARITHMi    = -O2 -ffree-line-length-none -mtune=native -mfpmath=sse
71
72        ifeq ($(debug), 1)
73                ARITHM  = $(ARITHMi) -g -pg -Wall -fno-align-commons -p -ggdb -ffpe-trap=invalid,zero,overflow,underflow -fbacktrace -fcheck=all
74        else
75                ARITHM = $(ARITHMi)
76        endif
77
78# debug : -g -CB -fp-stack-check -check all
79        FT        = $(IFORT) $(ARITHM) -c
80        LK        = $(IFORT) $(ARITHM)
81        F_NETCDF  = $(IFORT) $(ARITHM) -c -I$(NCDF_INC)
82endif
83
84
85
Note: See TracBrowser for help on using the repository browser.