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

Symbolic Link to ifort

Vishnu
Novice
2,443 Views

Hi!

I am attempting to use the Intel compiler on Ubuntu 14.04, using Geany as my editor. The following question is related to an earlier forum topic linked here. It talks about Geany not being able to use ifort. Even if the 'source-ing' command has been added to .bashrc, this problem persists. A solution given on an Ubuntu forum was to make a symbolic link to the 'ifort' file.

My question is, what file do I use to make this symbolic link? I can see lots of possiblilities:

/opt/intel/parallel_studio_xe_2016.1.056/compilers_and_libraries_2016/linux/bin/intel64/ifort

or

/opt/intel/compilers_and_libraries_2016.1.150/linux/bin/intel64/ifort

or

/opt/intel/compilers_and_libraries/linux/bin/intel64/ifort

I'm confused.

0 Kudos
1 Solution
mecej4
Honored Contributor III
2,444 Views

Vishnu wrote:

I think the fact that the symbolic link to 'ifort' does not happen automatically is something that is important to newbies like me. 

If that is a symbolic link that you created yourself, you may have exchanged one problem for a flock of other problems. "ifort" is just the compiler driver, not the compiler proper, and it will work only in the correct environment (paths to a.out-s and shared libraries, and environmental variables used by the compiler tools). When you use a user-created symbolic link from the likes of Eclipse, you will attempt to run "ifort" without the necessary environment, and it will fail.

For the same kind of reasons, the installer does not (and should not) spill symbolic links arbitrarily just because some package that may be installed in the future may be able to use it.

View solution in original post

0 Kudos
7 Replies
mecej4
Honored Contributor III
2,444 Views

Those "lots of possibilities" that you mention may all be linked copies of just one executable. You can run each of them to find out their versions, or you can do a long listing (ls -l) of those files/links.

We (i.e., other users of the Intel compilers) can help you with a basic command-line setup of IFort in this forum. Getting help for integrating and configuring it with the likes of Eclipse, Geany, etc., is something for which you may need to go elsewhere, unless it so happens that a forum member has used the same third party software with IFort. Generally, you have to do whatever the tool/IDE/editor needs in order for it to be able to spawn a correctly configured shell, run the compilation, and capture the output from the compilation.

0 Kudos
Vishnu
Novice
2,444 Views

mecej4 wrote:

Those "lots of possibilities" that you mention may all be linked copies of just one executable. You can run each of them to find out their versions, or you can do a long listing (ls -l) of those files/links.

I ran 'ifort -V' on all of them and they all give the same version. So then when I looked a little more closely, all of them were just shortcuts to one single executable: /opt/intel/parallel_studio_xe_2016.1.056/compilers_and_libraries_2016/linux/bin/intel64/ifort . Thanks!

mecej4 wrote:

We can help you with a basic command-line setup of IFort in this forum. Getting help for integrating and configuring it with the likes of Eclipse, Geany, etc., is something for which you may need to go elsewhere. Generally, you have to do whatever the tool/IDE/editor needs in order for it to be able to spawn a correctly configured shell, run the compilation, and capture the output from the compilation.

I am sorry, but I assumed that I could discuss any kind of problem I was having with setting up the compiler suite to work the way I would like it to; and I think the fact that the symbolic link to 'ifort' does not happen automatically is something that is important to newbies like me. It is just that I am used to forums of open-source projects where it is okay to discuss everything related to the functioning of the software, starting from little bugs to user-end experience.

0 Kudos
mecej4
Honored Contributor III
2,445 Views

Vishnu wrote:

I think the fact that the symbolic link to 'ifort' does not happen automatically is something that is important to newbies like me. 

If that is a symbolic link that you created yourself, you may have exchanged one problem for a flock of other problems. "ifort" is just the compiler driver, not the compiler proper, and it will work only in the correct environment (paths to a.out-s and shared libraries, and environmental variables used by the compiler tools). When you use a user-created symbolic link from the likes of Eclipse, you will attempt to run "ifort" without the necessary environment, and it will fail.

For the same kind of reasons, the installer does not (and should not) spill symbolic links arbitrarily just because some package that may be installed in the future may be able to use it.

0 Kudos
TimP
Honored Contributor III
2,444 Views

Among the reasons for not automatically creating a symlink to ifort for all users or all shell sessions is that it could greatly complicate installations where more than one Fortran compiler (or more than one version of ifort) is in use.
 

0 Kudos
Vishnu
Novice
2,444 Views

Oh! okay, thanks! I didn't know that. Now then I'm back to square one. So if every terminal has that right environment (on account of the compiler variables setting file being added to my .bashrc), why would my editor not be able to execute an 'ifort' command? (I guess I now understand what mecej4 said about me having to go elsewhere to figure this out -- but you guys can help me if you have any hunches about what the problem may be)

0 Kudos
Steven_L_Intel1
Employee
2,443 Views

The problem is simple - the environment in which you are invoking ifort hasn't been set up properly. You can certainly ask about that here. What we can't help with is details using a third-party editor.  Maybe if you did the "source" command and then ran the editor from that same command window, it would work.

0 Kudos
Vishnu
Novice
2,443 Views

The problem is solved if I open Geany from the terminal. It now works even after I've removed the symbolic link.

Thanks a lot guys!

0 Kudos
Reply