0% found this document useful (0 votes)
321 views

Intel Fortran User Guide

The document provides instructions for using the Intel Fortran compiler in Microsoft Windows. It describes downloading and installing Microsoft Visual Studio, Intel Fortran compiler, and an editor like Emacs. It then explains how to edit a Fortran program in the editor, compile it using Intel Fortran in the Visual Studio environment, and execute the program.

Uploaded by

VuToanThang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
321 views

Intel Fortran User Guide

The document provides instructions for using the Intel Fortran compiler in Microsoft Windows. It describes downloading and installing Microsoft Visual Studio, Intel Fortran compiler, and an editor like Emacs. It then explains how to edit a Fortran program in the editor, compile it using Intel Fortran in the Visual Studio environment, and execute the program.

Uploaded by

VuToanThang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Using Intel Fortran compiler in Microsoft Windows

 Download and install Microsoft Visual Studio first.

 Download and install Intel Fortran compiler.

 Download and install Emacs editor.

 Edit a Fortran program and execute.


 Download and install Microsoft Visual Studio
• Intel Fortran runs under Microsoft Visual Studio.
• So, you will need to download and install Microsoft Visual Studio first.
• The community version is free.

1. Download the installer from


https://www.visualstudio.com/zh-tw/products/visual-studio-community-vs.aspx
 Download and install Microsoft Visual Studio
• Intel Fortran runs under Microsoft Visual Studio.
• So, you will need to download and install Microsoft Visual Studio first.
• The community version is free.

1. Download the installer from


https://www.visualstudio.com/zh-tw/products/visual-studio-community-vs.aspx
2. Execute the installer to install (with necessary components only)
(Note: the installer is less than 0.2 MB, but the installation requires 4GB disk space)

Only these components


are necessary
 Download and install Intel Fortran
1. Register to download student version of Intel Fortran compiler student version (free)
https://software.intel.com/en-us/qualify-for-free-software/student

Click the link and follow the


registration procedure

Your NTU email


2. Install Intel Fortran compiler (student version)

• After registering, you will receive an • Confirm extracting the installation files
email containing product serial number
and download link.

• Ignore this pre-requisite issue

(require 2.86GB disk space)


2. Install Intel Fortran compiler (student version)
• After registering, you will receive an email
• Confirm extracting the installation files
containing product serial number and download
link.

• Ignore this pre-requisite issue

• Download and save the installation package


(require 3.31GB disk space)

• Enter the serial number in the registration email from Intel

• Choose Yes or No
• Enter the serial number in the registration email from Intel

• Choose Yes or No
• Customize the installation to save disk space • Right click to remove unnecessary components

(red cross)

• Choose both of them • Make sure Visual Studio is integrated properly


• Customize the installation to save disk space • Make sure Visual Studio is integrated properly

• Choose both IA-32 and Intel 64 • Be patient, installation takes a while

(red cross)

• Right click to remove unnecessary components


(complete installation requires 14 GB)
3. Modify start location of the command line environment after installation
(for example, start at your desktop)

"C:\Users\your_ID\Desktop\"
 Download and install editor (Choose one of the following editors)
GNU Emacs Notepad++
http://www.gnu.org/software/emacs/emacs.html https://notepad-plus-plus.org/

1. Download and unpack Emacs under c:


http://homepage.ntu.edu.tw/~wttsai/fortran/emacs-24.2.zip
2. Customize font and background
c:\emacs-24.2\bin\runemacs.exe

• Setting font size:


Option > Set Default Font (Consolas is recommended) > Save Options
• Setting dark background:
Options > Customize Emacs > Custom Themes (deeper-blue is recommended) > Save Theme Settings
3. Associate Fortran source codes (*.f90) with Emacs
• Create a text file (right click and 新增 > 文字文件) with filename extension f90 (e.g., test.f90)
• Right click the file to 開啟檔案 > 瀏覽 > c:\emacs-24.2\bin\runemacs.exe
• Double click the f90 file and set to dismiss the startup screen

(1) cross it
(2) click it
 Edit a Fortran program and execute.

1. Edit a new Fortran program


• Create an text file (e.g., homework\test1.f90 in Desktop)
• Edit it with Emacs (remember to save the file after editing)

2. Compile the Fortran program


• Use "Intel 64 Visual Studio 2015 environment" to
start a command prompt window

• Change to the source code directory (e.g., cd Homework)


• Execute the compiling command: (e.g., ifort test1.f90)
3. Execute the program

Executable program

Fortran source code


Emacs backup file*

Object file*
*can be deleted without consequence

You might also like