Tech Articles

Compiler intialization on Linux


Tech Articles ID    KB8024477
Status:    Published
Published date:    06/12/2020
Updated:    06/15/2020
Reported In:   Easy5 - EASY5
Created with Version:   EASY5 (2020)
 

Abstract (Question)

How do you initialize the compilers on Linux?

Description (Answer)

For INTEL FORTRAN:

The user needs to set the environment variable WSLIBDIR to  lib_lx64_ifort

Linux users must run ifortvars.bat or iccvars.bat before starting Easy5. This is usually done in the shell initialization file. 

 

If you are running C-shell then the initialization file is named .cshrc and the line to add is

     source /opt/intel/compilers_and_libraries_2019.4.243/linux/bin/iccvars.csh -arch intel64

 or if you are using Bash then the initialization file is named .bash_profile

     source /opt/intel/compilers_and_libraries_2019.4.243/linux/bin/iccvars.sh -arch intel64

 

The above examples are for users that have both Intel Fortran and Intel C installed.  If only Intel Fortran is installed then for C-shell

     source /opt/intel/compilers_and_libraries_2019.4.243/linux/bin/ifortvars.csh -arch intel64

 or for Bash

     source /opt/intel/compilers_and_libraries_2019.4.243/linux/bin/ifortvars.sh -arch intel64

 

Of course, you may have to adjust if the Intel compilers are installed in a different place on your installation.

 

For GNU FORTRAN:

The user needs to set the environment variable WSLIBDIR to lib_lx64_gfort

 

For GNU there is no initialization file comparable to iccvars.csh or iccvars.sh

The user just needs to have the directory containing gcc, g++ and gfortran in PATH.  On the MSC Linux computers that directory is /usr/bin

To determine where that path is, type

which gfortran

in a Linux shell.  If it returns

gfortran : Command not found

then the user needs to figure out where gfortran is installed and add it to PATH, or gfortran may need to be missing and need to be installed.  If so then make sure that it is the same version as called out in the Linux Install Notes. 


Rate this Page
Rate the quality of this article from 5 (high) to 1 (low):
1
2
3
4
5
 
How can we improve this?