Simple HelloWorld with Intel 11 (Fortran and C/C++)

Simple HelloWorld with Intel 11 (Fortran and C/C++)

I am trying to create a simple helloworld.for and helloworld.cc to prove my Intel 11 compiiler is correctly installed on my RedHat linux box but get the following errors:

icc helloworld.cc
ld: cannot find -limf

ifort helloworld.for
ld: /opt/intel/Compiler/11.0/074/bin/lib/for_main.o: No such file: No such file or directory

Any idea what is going on? I can get these working finr with the old version 10 compiler.

Thanks.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

My guess would be that you didn't source an 11.0ifortvars or iccvars script to set up your environment variables. In 11.0, either will take care of both icc and ifort.

The above suggestion didn't help in my case. I do a custom install to /var/tmp/intel, then package it up into my own RPM binary for local installations. Part of this packaging involves fixing paths and - for optimization (which worked in V10.0) - moves aside the ifort shell script (I set vars via /etc/profile.d/, LD_LIBRARY_PATH done in /etc/ld.so.conf.d/) and just symlinking ifort -> ifortbin. This breaks in V11.0; ifortbin apparently now cares about arg0. Note the last few lines of the original ifort shell script - "exec -a" is used. The most elegant fix is to rename ifortbin to ifort.

Hope that helps someone!

Quoting - jayphallam

I am trying to create a simple helloworld.for and helloworld.cc to prove my Intel 11 compiiler is correctly installed on my RedHat linux box but get the following errors:

icc helloworld.cc
ld: cannot find -limf

ifort helloworld.for
ld: /opt/intel/Compiler/11.0/074/bin/lib/for_main.o: No such file: No such file or directory

Any idea what is going on? I can get these working finr with the old version 10 compiler.

Thanks.

Hi.

Could you refer the similar queryhttp://software.intel.com/en-us/forums/showthread.php?t=62599

and http://software.intel.com/en-us/forums/showthread.php?t=62689

Please understand it, and execute for yourself, it 'll work.

If still having problem either on implementation or understanding, do let me know.

~BR

Login to leave a comment.