# Makefile de GRISLI avec gfortran # FT options de compilation # LK options de link # Rappel de quelques options interessantes #------------------------------------------- # faire imperativement attention a l'arithmetique # -fbacktrace # Specify that, when a runtime error is encountered or a deadly # signal is emitted (segmentation fault, illegal instruction, bus # error or floating-point exception), the Fortran runtime library # should output a backtrace of the error. This option only has # influence for compilation of the Fortran main program. # -fbounds-check # Enable generation of run-time checks for array subscripts and # against the declared minimum and maximum values. It also checks # array indices for assumed and deferred shape arrays against the # actual allocated bounds and ensures that all string lengths are # equal for character array constructors without an explicit typespec. # # -fcheck=bounds idem mais plus de possibilites dans le check # Some checks require that -fbounds-check is set for the compilation # of the main program. # -ffree-line-length-n # Set column after which characters are ignored in typical free-form # lines in the source file. The default value is 132. n may be none, # meaning that the entire line is meaningful. -ffree-line-length-0 # means the same thing as -ffree-line-length-none. # -ffpe-trap=zero,overflow,underflow # tells Fortran to trap the listed floating point errors (fpe). Having # zero on the list means that if you divide by zero the code will die # rather than setting the result to +INFINITY and # continuing. Similarly, if overflow is on the list it will halt if # you try to store a number larger than can be stored for the type of # real number you are using because the exponent is too large. # le directory dans lequel sont les compilateurs et MKL # DIRLOCAL=/usr/local variable d'environnement a definir dans .bash_profile # la version d'Aurelien, mais il faut changer le netcdf #DIRLOCAL=/site #NETCDFHOME=/site/netcdf #HDF5_HOME=/site/hdf5 # librairies NCDF_INC = /usr/include NCDF_LIB = -L/usr/lib -lnetcdff -lnetcdf # -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 MKL_LIB = -L/usr/local/lib -llapack -lblas # Misha export $MKL_LIB, $NCDF_INC, $NCDF_LIB ARITHM = -O3 -mtune=core2 -mfpmath=sse -ffpe-trap=zero,overflow # -fbacktrace -fcheck=bound IFORT = gfortran #echo '-I$(NCDF_INC)' #echo $(NCDF_LIB) FT = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) $(NCDF_LIB) $(MKL_LIB) LK = $(IFORT) $(ARITHM) -I$(NCDF_INC) $(NCDF_LIB) $(MKL_LIB) F_NETCDF = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) $(NCDF_LIB) $(MKL_LIB) Micha= -lsz -lm -lz # options Micha # -lsz pourrait etre (szlib) un outil de compression hdf5 mais n'est pas installe (non libre) # -lz pourrait etre (zlib) un outi de compression netcdf et est installe # -lm ??? # les otions -m sont celles de gcc, voir aussi # http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options