Get Started with the Intel® Fortran Compiler 19.1 for
Before You Begin
- Determine your installation directory,<install_dir>:
- If your compiler was installed in the default location by a root user or sudo user, the compiler will be installed under/opt/intel/. In this case,<install_dir>is/opt/intel/.
- For non-root users, your home directory underintel/is used. In this case,<install_dir>will be$HOME/intel/.
- For cluster or enterprise users, your admin team may have installed the compilers on a shared network file system. Check with your local admin staff for the location of installation (<install_dir>).
- Source the environment-setting script for your shell:
- bash:source <install_dir>/bin/compilervars.sh intel64
- csh/tcsh:source <install_dir>/bin/compilervars.csh intel64
- If you want to use the 32bit ia32 compiler instead of the default 64bit compiler, replaceintel64in the source command above withia32. For example:
- bash:source <install_dir>/bin/compilervars.sh ia32
- csh/tcsh:source <install_dir>/bin/compilervars.csh ia32
Use the Command Line
- ifort helloworld.f90
Build a Program
- Use a text editor to create a file called "hello.f90" with the following contents:print *, “hello!” end
- From a command window, issue the following command to define the compiler using the C-SHELL./usrs/users/me$ source /opt/intel/parallel_studio_xe_2018/bin/psxevars.csh intel64Or issue the following command using a BASH-style shell:/usrs/users/me$ . /opt/intel/parallel_studio_xe_2018/bin/psxevars.sh intel64This command adds the compiler directors to PATH and updates LD_LIBRARY_PATH to make it easier to run a Fortran program. This particular configuration defaults the compiler to generating 64-bit objects. That can be overridden using command line options.The command to invoke the setup script must be done in any command window where you want to use the Intel® Fortran Compiler. Alternatively, the command can be added to a .cshrc, .bashrc, or other shell startup file.
- From the command window, issue the following command:/usrs/users/me$ ifort –o hello hello.f90
- Now you have an executable called "hello", which can be run and will give immediate feedback.
/usrs/users/me$ hello hello!
/usrs/users/me$ ifort –o hello–coarray -coarray-num-images=4 hello.f90 /usrs/users/me$ hello hello! hello! hello! hello!
- Explore the Intel® Fortran Compiler 19.1 Developer Guide and Reference on the Intel® Developer Zone.
Find More: Intel® Fortran Compiler
The Developer Guide and Reference contains information on:
Information on product installation, new and changed features, and issues that are not described in the product documentation.
This link takes you an archive of Intel® Fortran Compiler release notes on the Intel® Developer Zone.
Software product documentation on the Intel® Developer Zone.
You can access general help for compiler options after setting up the environment by entering
at the command line.
Find More: Intel® Parallel Studio
The online training site is an excellent resource for training on using the compiler in conjunction with your product suite.
Information on the product installation, new and changed features, and issues that are not described in the product documentation.
This link takes you to the Intel® Developer Zone.
Code samples and corresponding tutorials. Learn specific compiler optimizations, features, tools, and programming concepts.