Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
46 Views

Install Issues on a MAC

I am trying to instal the fortran compiler on a mac (yosemite) but I'm having issues with authorizing. I have no idea what administrator or root access even means, but I have tried both using my admin password on my mac; however, I always get an "authorization failure" message. I've seen a few posts on this but I have not been able to follow them. PLEASE, someone help! 

0 Kudos
2 Replies
Highlighted
Beginner
46 Views

I was able to install by opening through terminal; however, I now have a new problem when compiling. I'm trying to compile a very simple code called TEST.f95 to test the compiler and I get the following error:

 

Joshs-MacBook-Pro:TEST Josh$ ifort TEST.f95 

ld: warning: ignoring file TEST.f95, file was built for unsupported file format ( 0x70 0x72 0x6F 0x67 0x72 0x61 0x6D 0x20 0x68 0x65 0x6C 0x6C 0x6F 0x0A 0x20 0x20 ) which is not the architecture being linked (x86_64): TEST.f95

Undefined symbols for architecture x86_64:

  "_MAIN__", referenced from:

      _main in for_main.o

ld: symbol(s) not found for architecture x86_64

 

Can someone please help me figure this out?

 

0 Kudos
Highlighted
Employee
46 Views

That is caused by your .f95 extension. The compiler is ignoring the file and passing it to the linker because .f95 is not a recognized Fortran source file extension. If you insist on using that you must use the -Tf option and if your source code is free form, then you also need to use -free option. My test case below uses free-form source format. 

You could avoid this also by simply renaming the file with a .f90 extension.

$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.2.146 Build 20160204
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

$ ifort test.f95
ld: warning: ignoring file test.f95, file was built for unsupported file format ( 0x70 0x72 0x6F 0x67 0x72 0x61 0x6D 0x20 0x74 0x65 0x73 0x74 0x0A 0x70 0x72 0x69 ) which is not the architecture being linked (x86_64): test.f95
Undefined symbols for architecture x86_64:
  "_MAIN__", referenced from:
      _main in for_main.o
ld: symbol(s) not found for architecture x86_64

$ ifort -free -Tf test.f95
$

 

0 Kudos