Setup of Intel's Fortran compiler on Linux

This short step-by-step tutorial should help you setup Code::Blocks IDE for use Intel's Fortran compiler on Linux. The Intel's Fortran version 2017 is used here. The setup process can be a bit different for other versions.

  1. To start Code::Blocks, open a terminal in the folder with Code::Blocks. According to the Intel’s documentation, the environment variables should be set using provided script file “compilervars.sh”:

    /images/mag_1.4rc1_2.png

  1. Start Code::Blocks:

    /images/mag_1.4rc1_3.png

  1. Setup Intel’s Fortran compiler “ifort”:

    /images/mag_1.4rc1_4.png

  1. Setup Intel’s provided customized GDB debugger:

    /images/mag_1.4rc1_5.png

  1. If you want to debug your code, compile your project with “ifort” compiler with option “-debug full”. Before the start of debugging make sure that the active debugger is GDB or “Target’s default” if you set correct debugger for “ifort” compiler:

    /images/mag_1.4rc1_6.png

  1. When you start your debug session, check that correct debugger is used:

    /images/mag_1.4rc1_7.png

  1. You can omit Step 1 by including “source /opt/intel/bin/compilervars.sh intel64” line directly into “codeblocks_run.sh” file:

    /images/mag_1.4rc1_8.png