jmerkow
jmerkow

Reputation: 1860

installing ifort and icc simultaneously

I am trying to install and use both the fortran and c++ compilers from intel on my ubuntu machine. The problem I am having is that when I update the symbolic links for one I lose the ability to use the other. The compilevars.sh script add necessary paths for each compiler.

I was thinking I could copy the files for both compilers into a new directory and then update the compilevars.sh to point to the new directories. Im not sure that this is the best method to do this. It seems like a common problem, but I can't find anything on google or here that addresses it.

I am using the compilers from this website http://software.intel.com/en-us/non-commercial-software-development

here is the contents of my /opt/intel/

drwxr-xr-x  2 root root  4096 Oct 27 11:02 bin
lrwxrwxrwx  1 root root    20 Oct 27 11:02 composerxe -> composer_xe_2013_sp1
drwxr-xr-x  3 root root  4096 Oct 27 11:02 composer_xe_2013_sp1
drwxr-xr-x 14 root root  4096 Oct 23 15:28 composer_xe_2013_sp1.0.080
drwxr-xr-x 13 root root  4096 Oct 27 11:02 composer_xe_2013_sp1.1.106
lrwxrwxrwx  1 root root    18 Oct 27 11:02 include -> composerxe/include
-rw-r--r--  1 root root 16113 Oct 27 11:02 intel_sdp_products.db
lrwxrwxrwx  1 root root    14 Oct 27 11:02 ipp -> composerxe/ipp
drwxr-xr-x  6 root root  4096 Oct 23 15:28 ism
lrwxrwxrwx  1 root root    14 Oct 27 11:02 lib -> composerxe/lib
drwxr-xr-x  2 root root  4096 Oct 27 10:59 licenses
lrwxrwxrwx  1 root root    14 Oct 27 11:02 man -> composerxe/man
lrwxrwxrwx  1 root root    14 Oct 27 11:02 mkl -> composerxe/mkl
lrwxrwxrwx  1 root root    16 Oct 27 11:02 mpirt -> composerxe/mpirt
lrwxrwxrwx  1 root root    14 Oct 27 11:02 tbb -> composerxe/tbb

Upvotes: 1

Views: 1580

Answers (2)

milancurcic
milancurcic

Reputation: 6241

Adding this line to .bashrc (or similar for other shells) does it for me:

export PATH=/opt/intel/bin:$PATH

Upvotes: 2

Igor Popov
Igor Popov

Reputation: 2620

We solve this problem efficiently at my workgroup using the Environment Modules. When I need to use icc, all environment variables are setup by module load icc, whereas when I need ifort I execute module load ifort. This is a very convenient system. You can even have multiple versions of the same software installed (e.g. icc 13 and 14) and switch between them with a single command. You can find the software at http://modules.sourceforge.net/ It needs a little bit time to learn how to setup but it can be done relatively fast. It is possible that your linux distro has the software in its repository, so the installing procedure can be further simplified.

Upvotes: 2

Related Questions