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

switching between versions

princess_sophie
Beginner
993 Views
Hi, I wnt to know if in a Mac OS I should switch betwwen two versions of Fortran compiler. In a Linux machine we use the instruction "module switch version1 version2" but neither module nor switch are valid commands on the Mac.
Thanks!
0 Kudos
6 Replies
Kevin_D_Intel
Employee
993 Views

I was unable to find modules (http://modules.sourceforge.net/) for Mac OS so I'm afraid you must resort to using the source command with the appropriate ifortvars.sh/ifortvars.csh for the specific ifort compiler release you want to use from the versions you have installed unless someone else has a link to a version or perhaps an alternative.
0 Kudos
princess_sophie
Beginner
993 Views

I was unable to find modules (http://modules.sourceforge.net/) for Mac OS so I'm afraid you must resort to using the source command with the appropriate ifortvars.sh/ifortvars.csh for the specific ifort compiler release you want to use from the versions you have installed unless someone else has a link to a version or perhaps an alternative.
Thanx Kevin. but I do not understand what to do. Shuld I use more commands when compliling my program?
I am a new user and I can acces the Mac by remote conexion.
0 Kudos
Kevin_D_Intel
Employee
993 Views

There are not extra commands, just a different command than module. Instead of using module you must use the source command to setup your shell environment accordingly to use the compiler.

So, after logging into your Mac, execute the appropriate source command to setup your environment so you can use the compiler. You can use the source command again to change the environment setup to use a different compiler version if you have multiple ifort versions installed.

The best advice I can offer is to obtain the Getting Started guide (here) and follow the steps in Section 3, Starting the Compiler from the command line.

You will need to know the installation path of your ifort compiler to use the source command.
0 Kudos
princess_sophie
Beginner
993 Views
Oooops, I was totally missunderstood the word "source", so now that I know that it refers to a command I will read about it in the documentation you had provided.
Thank you A LOT Kevin
:)
0 Kudos
Olivier_C_
New Contributor I
993 Views
Quoting - princess_sophie
Oooops, I was totally missunderstood the word "source", so now that I know that it refers to a command I will read about it in the documentation you had provided.
Thank you A LOT Kevin
:)
Dear princess Sophie,
Maybe you are new to Unix systems, so
- either your shell is csh and you will type at command prompt before compiling and executing your code:
source /opt/intel/Compiler/11.0/069/bin/intel64/ifortvars_intel64.csh
- or if your shell is bash (which is more likely) you will type at the prompt:
. /opt/intel/Compiler/11.0/069/bin/intel64/ifortvars_intel64.sh
In the example, I have release 11.0.069 and an x86_64 processor (you probably do as well with a Core 2 Duo).
Sincerely,
Olivier.

0 Kudos
TimP
Honored Contributor III
993 Views
- either your shell is csh and you will type at command prompt before compiling and executing your code:
source /opt/intel/Compiler/11.0/069/bin/intel64/ifortvars_intel64.csh
- or if your shell is bash (which is more likely) you will type at the prompt:
. /opt/intel/Compiler/11.0/069/bin/intel64/ifortvars_intel64.sh

bash accepts the abbreviation "." as a synonym for "source". It might even be verbalized as "source" with either spelling. and it's easy to make mistakes (such as omitting the space after ".") when attempting to communicate by short-hand. If you put it in a basic sh script, you must spell it out.
0 Kudos
Reply