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

Linking f95 to ifort instead of Gfortran

Tarandeep_K_
Beginner
4,605 Views

I have Ubuntu 14.04 and have installed intel fortran compiler. I am trying to compile a code through makefile that uses ifort.  However, I get these errors while compiling 

-------------------------------------------

f95: error: precise: No such file or directory
f95: error: unrecognized command line option ‘-h’
f95: error: unrecognized command line option ‘-fp-model’
f95: error: unrecognized command line option ‘-ip’

 

-----------------------------------------------

I posted this query to another online forum that pointed out that I should check if the "f95" is still

linked to gfortran and it indeed is linked to the default gfortran compiler. 

I found that out by typing "ls -la /etc/alternatives/f95" resulting in the following: 

-------------------------------------------------------

lrwxrwxrwx 2 root root 17 Feb 27  2015 /etc/alternatives/f95 -> /usr/bin/gfortran

-------------------------------------------------------

My understanding is that the I would need the "f95" get linked to my intel fortran compiler. But I don't know the right way to do it and avoid getting the compilation errors.

Thank you for your time.

 
0 Kudos
6 Replies
Kevin_D_Intel
Employee
4,605 Views

You do not need to alter the system to use ifort. This can be controlled within the Makefile. Can you post your Makefile so we can see it and know better how to advise you?

0 Kudos
Tarandeep_K_
Beginner
4,605 Views

Thanks, I have uploaded the makefile. The extension has been changed to upload it. 

0 Kudos
Tarandeep_K_
Beginner
4,605 Views

Please ignore my previous question as I seem to have gone past this issue. Thanks for your help. 

0 Kudos
Kevin_D_Intel
Employee
4,605 Views

That's actually an include file that would be used by a Makefile and its configured properly to use ifort.

Are you certain the actual Makefile you used references this include file by its name, Linux-ifort.mk ?

0 Kudos
Tarandeep_K_
Beginner
4,605 Views

Hi Kevin,

Sorry for the confusion on my part. That is actually an include file used by a makefile. I have moved beyond this issue. I had to remove a mpi option for the code to detect ifort compiler which helped me.

0 Kudos
Kevin_D_Intel
Employee
4,605 Views

Ok, sorry, I had not seen your post before posting. Glad it was resolved.

0 Kudos
Reply