Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.88 KB

login-env-compilers.rst

File metadata and controls

54 lines (41 loc) · 1.88 KB

Set environment variables for compilers

The sample GNU <env-files-gnu10> and Intel <env-files-intel19> environment files set the environment variables listed below in order to select the desired C, C++, and Fortran compilers:

Environment variables that specify compilers
Variable Specifies the: GNU name Intel name
CC C compiler gcc icx
CXX C++ compiler g++ icx
FC Fortran compiler gfortran ifort

Note

GEOS-Chem Classic only requires the Fortran compiler. But you will also need the C and C++ compilers if you plan to build other software packages (such as KPP <kppguide>) or install libraries manually <spackguide>.

Also, older Intel compiler versions used icc as the name for the C compiler and icpc as the name of the C++ compiler. These names have been deprecated in Intel 2023 and will be removed from future Intel compiler releases.

The commands used to define CC, CXX, and FC are:

# for GNU
export CC=gcc
export CXX=g++
export FC=gfortran

or

# for Intel
export CC=icx
export CXX=icx
export FC=ifort