wiki:Documentation/UserGuide/flags

Version 2 (modified by ajornet, 5 years ago) (diff)

--

Compilation flags

Compilation flags let users change compiler's behaviour. For example, It can give you more information about an exception or it can apply more or less optimizations to the code. Be aware that each compiler has its own flags.

Intel

Inside ../../util/AA_make.gdef you can modifify orchidee default flags. This lines belong to obelix HPC. Located at LSCE. They are ready for intel fortran compiler.

###-Q- lxiv8    F_O = -DCPP_PARA -O3 $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR) -fp-model precise
#-Q- lxiv8    F_O = -DCPP_PARA -p -g -traceback -fp-stack-check -ftrapuv -check bounds $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)
  • First line is for production mode. In this case It is commented.
  • Second line belongs to debug mode.

In case you find non desired Nan in the code it is recommended to compile orchidee using the flag below. It triggers an exception instead of using Nan values.

  • -fpe0: floating point error related with divided by zero. More info
#-Q- lxiv8    F_O = -DCPP_PARA -p -g -fpe0 -traceback -fp-stack-check -ftrapuv -check bounds $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)

Note: if you modify this file you have to apply ins_make again. This way it spreads the changes to all Orchidee's folders. Then recompile from zero.