Intel® oneAPI HPC Toolkit
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
1920 Discussions

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

jayphallam
Beginner
250 Views

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.

0 Kudos
3 Replies
TimP
Black Belt
250 Views


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.

Chris_Schanzle
Beginner
250 Views

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!

srimks
New Contributor II
250 Views
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

Reply