source: branches/iLoveclim/SOURCES/Fichiers-parametres/Makefile.tof-asterix-sequential.inc @ 359

Last change on this file since 359 was 359, checked in by aquiquet, 2 years ago

Trunk merged to branch at revision 357

File size: 3.0 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# debug Segmentation Faults SIGSEGV : https://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors
16
17# le directory dans lequel sont les compilateurs et MKL
18# DIRLOCAL=/usr/local variable d'environnement a definir dans .bash_profile
19
20
21# lit le nom du fichier param pour lancer sur r2d2 par une commande :   echo jobparam | LBQ....
22JOB = 'job'
23
24# mettre debug à 1 pour compiler avec options strictes
25debug ?= 0
26
27# compilation avec ifort :
28ifeq ($(ifort),1)
29
30# librairies
31        NCDF_INC  = -I$(NETCDFHOME)/include
32        NCDF_LIB  = -L$(NETCDFHOME)/lib -lnetcdf -lnetcdff
33
34# utilisation de MKL :
35        ifeq ($(mkl_c), 1)
36#               MKL_LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm  # MKL parallele
37                MKL_LIB =  -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm           # MKL sequentiel
38                MKL_INC = -I$(MKLROOT)/include
39        endif
40
41        IFORT= ifort
42
43        ARITHMi = -O2 -fp-model precise -mcmodel=medium -shared-intel #-qopenmp #-traceback
44                                                                      # (normalement reproductible)
45    ifeq ($(debug), 1)
46                ARITHM    = $(ARITHMi) -g -p -traceback -CB -warn all
47        else
48                ARITHM    = $(ARITHMi) -diag-disable warn
49        endif
50               
51#ARITHM    =  -fp-model precise -warn all -CU -CA # options pour une meilleure arithmetique (normalement reproductible)
52# ARITHM = -03                    # trop brutal ne pas utiliser
53
54        FT        = $(IFORT) $(ARITHM) $(MKL_INC) #-traceback   -CB  #-g #-pg  # -g # -pg -ipo !aurel : j'ai enleve -CB
55        LK        = $(IFORT) $(ARITHM) # -traceback   -CB # -g  #-pg   #-g #  -pg
56        F_NETCDF  = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback  -CB   #-g #-pg -ipo # -g
57        #FT        = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback  -CB  #-g #-pg -ipo # -g
58       
59# compilation avec gfortran et librairie BLAS
60else
61
62# librairies
63        LIBSYS = /usr/lib
64#       INCSYS = /usr/include  # Ubuntu
65        INCSYS = /usr/lib64/gfortran/modules  # Fedora
66        NCDF_INC  = $(INCSYS)
67        NCDF_LIB  = -L$(LIBSYS) -lnetcdff -lnetcdf
68
69        IFORT= gfortran
70
71        ARITHMi    = -O2 -ffree-line-length-none -mtune=native -mfpmath=sse
72
73        ifeq ($(debug), 1)
74                ARITHM  = $(ARITHMi) -g -pg -Wall -fno-align-commons -p -ggdb -ffpe-trap=invalid,zero,overflow,underflow -fbacktrace -fcheck=all
75        else
76                ARITHM = $(ARITHMi)
77        endif
78
79# debug : -g -CB -fp-stack-check -check all
80        FT        = $(IFORT) $(ARITHM) -c
81        LK        = $(IFORT) $(ARITHM)
82        F_NETCDF  = $(IFORT) $(ARITHM) -c -I$(NCDF_INC)
83endif
84
85
86
Note: See TracBrowser for help on using the repository browser.