Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 Discussions

Cannot compile!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

herger
Beginner
1,882 Views
Hi all.
I have a new laptop with intel core 2 duo and fedora 10 64 bit.
I installed the C++ and Fortran Compilers.
I CANNOT COMPILE from shell.
I did the following, always trying if the problem was solved after any receipt:

1) copied ifortvars.sh and .csh and iccvars.sh and csh to /etc/profile.d/ and gave 777 permisisions;
2) source /opt/.../ifortvars.sh intel64 (and the same for iccvars.sh with append intel64)
3) repeated the same with append ia32
4) added the following lines to the .bash_profle file:
PATH=$PATH:/opt/intel/Compiler/11.1/056/bin
export PATH

WHAT ELSE CAN I DO?????? It's incredible, in all the internet I didn't find any solution.....

When I try to compile, it appears always
ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64

bash: ifort: command not found

or

bash: icc: command not found

Thanks in advance and the best regards

Herger


0 Kudos
1 Solution
Steven_L_Intel1
Employee
1,882 Views

Can you show us the actual log of the shell session with the actual commands you type and the actual output?

Are the "unknown switch" errors coming from the source command or the ifort command? My guess is "source".

It should be as simple as:

source /opt/intel/Compiler/11.1/056/bin/ifortvars.sh intel64
ifort myprog.f90

You will not want to try to use "ia32" as a target unless you have installed additional 32-bit components as specified in the release notes.

View solution in original post

0 Kudos
6 Replies
Steven_L_Intel1
Employee
1,883 Views

Can you show us the actual log of the shell session with the actual commands you type and the actual output?

Are the "unknown switch" errors coming from the source command or the ifort command? My guess is "source".

It should be as simple as:

source /opt/intel/Compiler/11.1/056/bin/ifortvars.sh intel64
ifort myprog.f90

You will not want to try to use "ia32" as a target unless you have installed additional 32-bit components as specified in the release notes.
0 Kudos
herger
Beginner
1,882 Views

Can you show us the actual log of the shell session with the actual commands you type and the actual output?

Are the "unknown switch" errors coming from the source command or the ifort command? My guess is "source".

It should be as simple as:

source /opt/intel/Compiler/11.1/056/bin/ifortvars.sh intel64
ifort myprog.f90

You will not want to try to use "ia32" as a target unless you have installed additional 32-bit components as specified in the release notes.

Hi. Thanks for Your kind and quick reply.
When I open a shell there is written

ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
[falcucci@Gundam ~]$

IERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
[falcucci@Gundam ~]$

It appeared when I copied the files .sh and .csh to /etc/profile.d.......

If I try to do as You said... it works! Also for icc.
Do I have to do source /opt/intel/Compiler/11.1/056/bin/ifortvars.sh intel64
any time I have to compile something or at any startup?

Is there any need to do the same with ifortvars_intel64.sh?

Thanks and the best regards

H






0 Kudos
Steven_L_Intel1
Employee
1,882 Views

I'm not very familiar with Linux, but I assume that copying the script to the /etc/profile.d folder causes it to be invoked automatically, without arguments. ifortvars.sh (and iccvars.sh) requires the argument. Perhaps you can add an invocation of "source" in your .login or whatever? You need this only once per session if you are going to compile something.

Do not touch ifortvars_intel64.sh. Use only ifortvars.sh

Please read the product documentation - it explains all of this.
0 Kudos
Hubert_H_Intel
Employee
1,882 Views
Quoting - herger

Hi. Thanks for Your kind and quick reply.
When I open a shell there is written

ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
[falcucci@Gundam ~]$

IERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64
[falcucci@Gundam ~]$

It appeared when I copied the files .sh and .csh to /etc/profile.d.......

If I try to do as You said... it works! Also for icc.
Do I have to do source /opt/intel/Compiler/11.1/056/bin/ifortvars.sh intel64
any time I have to compile something or at any startup?

Is there any need to do the same with ifortvars_intel64.sh?

Thanks and the best regards

H







Automatic execution of scriptsor commands is usually done with the .bashrc file where you can enter anything thatshall beexecuted whenever your open a new shell. However, your system may not have a .bashrc in your home direcotroy or you may not use a bash shell so please read proper help about shell script execution.
For bash, your .bashrc could include the source script(s)to setupthe whole compiler environment automatically, for example:
$ cat ~/.bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions

source /opt/intel/Compiler/11.1/046/bin/iccvars.sh ia32


$


That's all for setting up the compiler environment; nothing else required!
Regards,
Hubert.
0 Kudos
Steven_L_Intel1
Employee
1,882 Views
Thanks for the assistance, Hubert. Just a note that in this case, he wants "intel64" and not "ia32".
0 Kudos
herger
Beginner
1,882 Views
Hi.
Thanks for all.
Both of You have been incredibly kind.

Everthing works greatly.
Thanks again

Herger
0 Kudos
Reply