Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
Panel
borderColorwhite
bgColorwhite
titleBGColorwhite
borderStyledotted
titleIf using 'configure' command
Code Block
titlegcc/gfortran compilers
export CC=gcc
export FC=gfortran
export CCFLAGS="-g -O2"
export FCFLAGS="-g -O2"
Code Block
titleIntel compiler:
export CC=icc
export FC=ifort
export CFLAGS="-g -O1 -fp-model precise"
export FCFLAGS="-g -O1 -fp-model precise"
Note

We currently recommend not using a higher optimization level than -O1 with the Intel compiler. Failures have been seen with grib_api and the Intel compiler when compiled with -O2.

 

 

Column
Panel
borderColorwhite
bgColorwhite
titleBGColorwhite
borderStyledotted
titleIf using 'cmake' command
Code Block
titlegcc/gfortran compilers
export CC=gcc
Code Block
languagebash
titleCray compiler (cce)
export CC=cc
export FC=ftn
export CFLAGSgfortran
cmake .... -DCMAKE_C_FLAGS="-O1g -G2O2" -hflexDCMAKE_Fortran_mpFLAGS=conservative -hadd_paren"-g -hfp1"
export FCFLAGS="-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1"O2"
Code Blockcode
titleIBM Intel compiler:
export CC=xlc_ricc
export FC=xlf90_r
export CFLAGSifort
cmake ... -DCMAKE_C_FLAGS="-g -O2O1 -fp-qstrict -qarch=auto -qtune=auto"
export FCFLAGSmodel precise" -DCMAKE_Fortran_FLAGS="-g -O2O1 -qstrict -qarch=auto -qtune=autofp-model precise"

For the IBM xlc compiler we recommend disabling the creation of 'shared libraries' which is known to cause problems with some versions of grib_api.

In this example, note the use of the '_r' form of the IBM compiler to ensure grib_api is compiled 'thread-safe'.
Note

We currently recommend not using a higher optimization level than -O1 with the Intel compiler. Failures have been seen with grib_api and the Intel compiler when compiled with -O2.

Section
Column
Panel
borderColorwhite
bgColorwhite
titleBGColorwhite
borderStyledotted
titleIf using 'cmakeconfigure' command
Code Block
languagebash
titlegcc/gfortran compilersCray compiler (cce)
export CC=gcccc
export FC=gfortran
cmake .... -DCMAKE_C_FLAGS="-g -O2" -DCMAKE_Fortran_FLAGS="-g -O2ftn
export CFLAGS="-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1"
export FCFLAGS="-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1"
Code Block
titleIntel IBM compiler:
export CC=iccxlc_r
export FC=ifortxlf90_r
cmake ... -DCMAKE_C_FLAGSexport CFLAGS="-g -O1O2 -fp-model precise" -DCMAKE_Fortran_FLAGSqstrict -qarch=auto -qtune=auto"
export FCFLAGS="-g -O1O2 -fp-model preciseqstrict -qarch=auto -qtune=auto"

 

 

code
Column
language
Panel
borderColorwhite
bgColorwhite
titleBGColorwhite
borderStyledotted
titleIf using 'cmake' command
Code Block
languagebash
titlebashtitleCray compiler (cce)
export CC=cc
export FC=ftn
cmake ... -DCMAKE_C_FLAGS="-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1" -DCMAKE_Fortran_FLAGS="-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1"
Code Block
titleIBM compiler:
export CC=xlc_r
export FC=xlf90_r
cmake ... -DCMAKE_C_FLAGS="-g -O2 -qstrict -qarch=auto -qtune=auto" -DCMAKE_Fortran_FLAGS="-g -O2 -qstrict -qarch=auto -qtune=auto"
Note

For the IBM xlc compiler we recommend disabling the creation of 'shared libraries' which is known to cause problems with some versions of grib_api.

In this example, note the use of the '_r' form of the IBM compiler to ensure grib_api is compiled 'thread-safe'.

Compiling, checks and installing

...