Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

compiling c++ program with intel compiler icpc in linux

Tags:

linux

icc

I have installed intel compiler Intel® Parallel Studio XE 2015 and I have written simple hello world program at desktop.

then I can't figure how can I run this cpp file.

I have tried as

icpc helloworld.cpp

but it says command not found.

like image 262
Malacu Avatar asked Apr 29 '26 16:04

Malacu


1 Answers

You need to have icpc in your PATH. If you do know where Intel compiler is installed then append the PATH env variable. If you don't, search for icpc binary.

~> find / -name icpc
/opt/intel/composer_xe_2013_sp1.0.040/bin/intel64/icpc

Once you've found it, a convenient way of changing your environment is to source a script which comes with the compiler.

~> source /opt/intel/composer_xe_2013_sp1.0.040/bin/compilervars.sh intel64
~> which icpc
/opt/intel/composer_xe_2013_sp1.0.040/bin/intel64/icpc

This adding-to-path procedure is explained on Intel website here.

like image 53
ink Avatar answered May 01 '26 13:05

ink