Developer(s) | Intel |
---|---|
Stable release | |
Operating system | Linux, Windows, OS X |
Type | Compiler |
License | Proprietary, Freeware[2] |
Website | software.intel.com/en-us/intel-compilers |
Intel Fortran Compiler, also known as IFORT, is a group of Fortrancompilers from Intel for Windows, OS X, and Linux.
Overview[edit]
The compilers generate code for IA-32 and Intel 64 processors and certain non-Intel but compatible processors, such as certain AMD processors. A specific release of the compiler (11.1) remains available for development of Linux-based applications for IA-64 (Itanium 2) processors. On Windows, it is known as Intel Visual Fortran.[3] On OS X and Linux, it is known as Intel Fortran.
The latest release of the compiler continues to support the Intel Xeon Phi coprocessor and Intel Architecture instruction-set capabilities by means of automatic vectorization, which can enable applications to use SSE, SSE2, SSE3, SSSE3, SSE4 and AVXSIMD instructions. Use of such instructions through the compiler can lead to improved application performance in some applications as run on IA-32 and Intel 64 architectures, compared to applications built with compilers that do not support these instructions.
It looks like your MPI installation is configured to use ifort instead of gfortran, you should either change that or switch on the appropriate flags for the ifort compiler (beware though, -ffast-math turns off checks that can lead to unreliable results. Jun 17, 2017 This post shows how to add an entry to the Mac OS X PATH variable - (1) for the current terminal session only, (2) permanently for the current user only and (3) permanently for all users on a Mac OS X system. Here, the Tomcat startup.sh executable is used as an example. Could anybody tell me how I can use quadruple precision in fortran90/95 code? Is there also any special treatment such as 1.0D0 for double precision? Also, if there are any special ways to compile the file, please let me know that too. Please assume I am a very beginner of fortran90/95. For this reason, I have been aiming at trying a non-commercial distribution of the well-known Intel Fortran compiler, iFort. Unfortunately, Intel does not provide such distribution for the Mac OS X systems, but only for Linux. That is why I’m trying the non commercial distribution of the iFort compiler for Linux. Explore the world of Mac. Check out MacBook Pro, iMac Pro, MacBook Air, iMac, and more. Visit the Apple site to learn, buy, and get support.
Intel Fortran also continues support for OpenMP 4.0,[4]automatic parallelization for symmetric multiprocessing, almost all of the Fortran 2003 standard and much of the Fortran 2008 standard[5] including Coarray Fortran, user-defined I/O, BLOCK and submodules. For more information on Fortran standards, a number or resources are available, such as the Wikipedia Fortran entry or the Fortran wiki page. When used with Intel cluster tools (see the 'Description of Packaging' below) the compiler can also automatically generate Message Passing Interface calls for distributed memory multiprocessing from OpenMP directives.
Optimizations[edit]
Intel compilers are optimized[6] to computer systems using processors that support Intel architectures. They are designed to minimize stalls and to produce code that executes in the fewest possible number of cycles. Intel Fortran Compilers support three separate high-level techniques for optimizing the compiled program: interprocedural optimization (IPO), profile-guided optimization (PGO), and other high-level optimizations (HLO). They also support a directives-based approach to application offloading to Intel coprocessors, such as the Intel Xeon Phi coprocessor.
Interprocedural optimization applies typical compiler optimizations (such as constant propagation) but uses a broader scope that may include multiple procedures, multiple files, or the entire program.[7]
Regarding profile-guided optimization, the compiler generates a dataset of performance-related information from using the application with representative workloads, which it then analyzes to find which parts of the application are executed more and less frequently. The compiler uses these data to organize application execution to optimize performance based on how the application is actually used. This is in contrast to IPO which optimizes applications according to the logical flow of the application independent of workloads. The two can be combined to provide workload-based optimizations within which the logical-flow is optimized. Thus, all optimizations can benefit from profile-guided feedback because they are less reliant on heuristics when making compilation decisions.
High-level optimizations are optimizations performed on a version of the program that more closely represents the source code. This includes loop interchange, loop fusion, loop unrolling, loop distribution, data prefetch, and more.[8]
Standards support[edit]
The Intel Fortran compiler supports all of the features of the Fortran 90, Fortran 95, Fortran 2003 standards and most of Fortran 2008. It also supports some draft Fortran 2018 features. Additionally, it supports various extensions found in VAX Fortran and Compaq Visual Fortran.
A partial list of items from the Fortran 2003 standard supported by Intel Fortran:
- Parameterized derived tpes
- User-defined derived type I/O
- Enumerators
- Type extension and type-bound procedures
- FINAL routines and GENERIC, OPERATOR, and ASSIGNMENT overloading in type-bound procedures
- Polymorphic data and the CLASS declaration
- Allocatable scalar variables (not deferred-length character)
- SOURCE= keyword for ALLOCATE
- Intrinsic modules IEEE_EXCEPTIONS, IEEE_ARITHMETIC and IEEE_FEATURES
- ASSOCIATE construct
- DO CONCURRENT construct
- PROCEDURE declaration and procedure pointers
- CONTIGUOUS attribute
- Structure constructors with component names and default initialization
- Array constructors with type and character length specifications
- I/O keywords BLANK, DECIMAL, DELIM, ENCODING, IOMSG, PAD, ROUND, SIGN, and SIZE
- PUBLIC types with PRIVATE components and PRIVATE types with PUBLIC components
- A file can be opened for stream access (ACCESS='STREAM')
- BIND attribute and ISO_C_BINDING intrinsic module
- ASYNCHRONOUS attribute
- VALUE attribute
- FLUSH statement
- WAIT statement
- IMPORT statement
- Allocatable components of derived types, allocatable dummy arguments, and allocatable function results
- VOLATILE attribute[9]
- Names of length up to 63 characters
- Statements up to 256 lines
A partial list of items from the Fortran 2008 standard supported by Intel Fortran:
- Coarrays
- Submodules
- The BLOCK construct to allow dynamic scoping
- CRITICAL construct
- The Fortran 2008 standard specifies a maximum rank of 15; the maximum array rank has been raised to 31 dimensions in Intel Fortran
- A generic interface may have the same name as a derived type
- Bounds specification and bounds remapping list on a pointer assignment
- NEWUNIT= specifier in OPEN
- A CONTAINS section can be empty
- Coarrays can be specified in ALLOCATABLE, ALLOCATE, and TARGET statements
- MOLD keyword in ALLOCATE
- DO CONCURRENT statement
- ERROR STOP statement
Fortran 2018, currently a draft version, includes further interoperability between Fortran and C. Intel Fortran supports draft Fortran 2018 as of version 16.0.
Architectures[edit]
- x86-64 (Intel 64 and AMD64)
- IA-64 (Itanium 2)
Description of packaging[edit]
The Intel Fortran compiler is available as part of the Intel Parallel Studio XE 2016 suite, which focuses on development of parallelism models in application software. It also includes Intel C++, Intel Math Kernel Library, Intel Integrated Performance Primitives, Intel Data Analytics Acceleration Library and performance analysis tools such as Intel VTune Amplifier and Intel Inspector. There are three forms of Parallel Studio XE: Composer, Professional, and Cluster. The Composer Edition includes the C++ and/or Fortran compilers, the performance libraries, and parallel models support. The Professional Edition adds the analysis tools that assist in debugging and tuning parallel applications. The Cluster Edition adds support for development of software for computer clusters. It includes all of the above plus a standards-based MPI Library, MPI communications profiling and analysis tool, MPI error checking and tuning tools, and cluster checker.
History since 2003[edit]
Compiler version | Release date | Major new features |
---|---|---|
Intel Fortran Compiler 8.0 | December 15, 2003 | Precompiled headers, code-coverage tools. |
Intel Fortran Compiler 8.1 | September, 2004 | AMD64 architecture (for Linux). |
Intel Fortran Compiler 9.0 | June 14, 2005 | AMD64 architecture (for Windows), software-based speculative pre-computation (SSP) optimization, improved loop optimization reports. |
Intel Fortran Compiler 10.0 | June 5, 2007 | Improved parallelizer and vectorizer, Streaming SIMD Extensions 4 (SSE4), new and enhanced optimization reports for advanced loop transformations, new optimized exception handling implementation. |
Intel Fortran Compiler 10.1 | November 7, 2007 | New OpenMP* compatibility runtime library. To use the new libraries, you need to use the new option '-Qopenmp /Qopenmp-lib:compat' on Windows, and '-openmp -openmp-lib:compat' on Linux. This version of the Intel compiler supports more intrinsics from Microsoft Visual Studio 2005. VS2008 support - command line only in this release. |
Intel Fortran Compiler 11.0 | November 2008 | More Fortran 2003 support. Support for OpenMP 3.0. Source Checker for static memory/parallel diagnostics. Commercial licenses for Windows version include Microsoft Visual Studio 2005 Premier Partner Edition. |
Intel Fortran Compiler 11.1 | June 23, 2009 | Support for latest Intel SSE, AVX and AES instructions. More Fortran 2003 support. Support for latest Intel MKL release (included in compiler products). Commercial licenses for Windows version include Microsoft Visual Studio 2008 Shell and libraries. |
Intel Fortran Composer XE 2011 up to Update 5 (compiler 12.0) | November 7, 2010 | Coarray Fortran, additional 2003 (FINAL subroutines, GENERIC keyword,) and 2008 (Coarrays, CODIMENSION, SYNC ALL, SYNC IMAGES, SYNC MEMORY, CRITICAL, LOCK, ERROR STOP, ALLOCATE/DEALLOCATE) |
Intel Fortran Composer XE 2011 Update 6 and above (compiler 12.1) | September 8, 2011 | OpenMP 3.1, additional 2003 (ALLOCATE with SOURCE=, polymorphic source) and 2008 standards support, Windows version ships with Visual Studio 2010 Shell. |
Intel Fortran Composer XE 2013 (compiler 13.0) | September 5, 2012 | Linux-based support for Intel Xeon Phi coprocessors, support for Microsoft Visual Studio 12 (Desktop), support for gcc 4.7, support for Intel AVX 2 instructions, updates to existing functionality focused on delivering improved application performance. Continued availability of the Visual Studio 2010 Shell for Windows versions. |
Intel Fortran Composer XE 2013 SP1 (compiler 14.0) | July 31, 2013 | User-Defined Derived Type I/O; OpenMP directives, clauses and procedures; coarrays ; Microsoft Visual Studio parallel build support |
Intel Fortran Composer XE 2013 SP1 Update 1 (compiler 14.0.1) | October 18, 2013 | Japanese localization of 14.0; Windows 8.1 and Xcode 5.0 support |
Intel Fortran Composer XE 2015 (compiler 15.0) | August 5, 2014 | Full support for Fortran 2003; BLOCK from Fortran 2008; EXECUTE_COMMAND_LINE from Fortran 2008; New optimization report annotates the source from within Visual Studio[10] |
Intel Fortran Composer XE 2015 Update 1 (compiler 15.0.1) | October 30, 2014 | AVX-512 support; Japanese localization; MIN/MAX Reductions in SIMD Loop Directive |
Intel Fortran Compiler 16.0, part of Intel Parallel Studio XE 2016 | August 25, 2015 | Submodules from Fortran 2008, enhanced interoperability of Fortran with C from draft Fortran 2018, OpenMP 4.1 extensions |
Intel Fortran Compiler 17.0 | March 4, 2016 | OpenMP 4.5 extensions |
Intel Fortran Compiler 18.0 | January 17, 2017 | Full Fortran 2008 support |
Intel Fortran Compiler 19.0 | September 12, 2018 | Some Fortran 2018 features |
Debugging[edit]
The Intel compiler provides debugging information that is standard for the common debuggers (DWARF 2 on Linux, similar to gdb, and COFF for Windows). The flags to compile with debugging information are /Zi on Windows and -g on Linux. Debugging is done on Windows using the Visual Studio debugger, and on Linux using gdb.
While the Intel compiler can generate a gprof-compatible profiling output, Intel also provides a kernel-level, system-wide statistical profiler as a separate product called VTune. VTune features an easy-to-use GUI (integrated into Visual Studio for Windows, Eclipse for Linux) as well as a command-line interface. In addition to the VTune profiler, there is Intel Advisor that specializes in vectorization optimization and tools for threading design and prototyping.
Intel also offers a tool for memory and threading error detection called Intel Inspector XE. Regarding memory errors, it helps detect memory leaks, memory corruption, allocation/de-allocation of API mismatches and inconsistent memory API usage. Regarding threading errors, it helps detect data races (both heap and stack), deadlocks and thread and synch API errors.
See also[edit]
- Intel Integrated Performance Primitives (IPP)
- Intel Data Analytics Acceleration Library (DAAL)
- Intel Math Kernel Library (MKL)
- Intel Threading Building Blocks (TBB)
- VTune Amplifier
- Intel Developer Zone (Intel DZ; support and discussion)
References[edit]
- ^'Intel Fortran Compiler 19.0 Release Notes'. 20 March 2020.
- ^'No Cost Options for Intel Parallel Studio XE, Support yourself, Royalty-Free'. 19 March 2020.
- ^'Intel Visual Fortran Compiler Professional Edition for Windows'. cnet.com.
- ^P. Muruganandam (2017). 'OpenMP GNU and Intel Fortran'. Comput. Phys. Commun. 220: 503. arXiv:1709.04423. doi:10.1016/j.cpc.2017.07.013.
- ^'Intel Fortran'. 2016.
... ... significant Fortran 2008 feature support, including ...
- ^'Intel (Fortran, C, and C++)'. NERSC.gov.
- ^Intel compiler documentation. Select the Fortran compiler of choice and search for Profile-Guided Optimization. http://software.intel.com/en-us/intel-software-technical-documentation
- ^The Software Optimization Cookbook, High-Performance Recipes for IA-32 Platforms, Richard Gerber, Aart J.C. Bik, Kevin B. Smith, and Xinmin Tian, Intel Press, 2006
- ^'VOLATILE'. Oracle.com.
- ^'Intel Visual Fortran 15 now available'.
External links[edit]
- Official website
Ifort Mac And Cheese
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Intel_Fortran_Compiler&oldid=954402383'
gfortran for Mac
DISCLAIMER: I provide this information here to aid my memory and in thehope that others will find it a useful resource based on my experiences of installing a gfortran compiler on Macs. I am not a computer scientist orFortran guru and, as such, am unlikely to be able to help you with Fortran code,compilation or runtime problems.
There are several options available for installing gfortran for Mac OS X,other than installing from source code.
GCC Wiki
I currently choose to use the relevant gfortran installer (.dmg) packagesprovided through the GCC Wiki (opens in new window). Note that the files areinstalled in /usr/local system directories which require the administratorpassword.
HPC
There are also various tar-files of gfortran distributions provided at the High PerformanceComputing web page. There are up-to-date distributions for some systems(only Mac OS X 10.7 (Lion), 10.8 (Mountain Lion), 10.9 (Mavericks) and 10.10(Yosemite) as of the last update of this page).
I recommend not to choose a package containing a version that is not a stable version accordingto the main GCC web site. Furthermore, for simplicity, I would recommendonly to install the relevant 'gfortran only' distributions.
The files are gzip'd tar-files which should be unpacked, for instance byusing the Terminal application, as follows:
sudo tar xvfz[tar-file] -C /
Note that the files are installed in /usr/local system directories whichrequire the administrator password.
The R Project
Previously, I had preferred to use the gfortran packages distributed inassociation with the R Project. These can be found in the 'Apple Xcode gcc-42add-ons' section of their Tools web page (opens in new window) or via the direct linksbelow. These gfortran packages and updates are specifically built to matchApple's own gcc builds. This does mean that the version is back at GCC 4.2,which is undoubtedly where it will stay since GCC changed their licensing andApple has stopped updating their GCC distribution with Xcode. Nonetheless, myexperience shows that this distribution is one that always works.
There are several packages relevant to particular Mac OS X and Xcodeinstallations. Run gcc-v to find out which Apple gcc build is currently installed as part of theXcode tools.
- Mac OS X 10.7 (Lion) and 10.8 (Mountain Lion): One may need to apply a link after installing one of these packages so 'gfortran' may be used as a command, e.g.sudo ln -s /usr/bin/gfortran-4.2 /usr/bin/gfortranOtherwise, simply use the explicit command 'gfortran-4.2'.
- Mac OS X 10.6 (Snow Leopard):
- Mac OS X 10.5 (Leopard):
The files for builds 5564 and 5566 are gzip'd tar-files which should beunpacked, for instance by using the Terminal application, as follows:
sudo tar xvfz[tar-file] -C /
Note that the files are installed in /usr system directories which requirethe administrator password.
Packages for older OS X and Xcode versions are also available on the pagelinked to above.
Compatibility and uninstalling
Note that each of these distributions has different associated libraries andother installed files which may conflict with or be wholly or partiallyoverwritten by one another. It is therefore advisable to ensure that you haveonly one distribution installed at any one time.
It is straightforward to uninstall the GCC Wiki distribution and instructionsare provided on the detailed instructions web page. Simply run the command:
sudo rm -r/usr/local/gfortran /usr/local/bin/gfortran
It is slightly more difficult to uninstall the R Project or HPC distribution. HPC distributes gfortran as a tar-file. Therefore each file contained in thetar-file should be removed. The easiest way to do this is probably to run thecommand:
For sh/bash:
for file in $(tar tfz[tar-file]); do sudo rm -f /$file; done
for file in $(tar tfz[tar-file]); do sudo rm -f /$file; done
For csh/tcsh:
foreach file ( `tar tfz[tar-file]` )
sudo rm -f /$file
end
foreach file ( `tar tfz[tar-file]` )
sudo rm -f /$file
end
Fort Machine
where [tar-file] is the package, for example gfortran-4.7-bin.tar.gz,gfortran-lion.tar.gz, gfortran-snwleo-intel-bin.tar.gz, etc. This will removeall files but not directories, which may contain other files that are not to be removed. To remove empty directories only, then run the command:
For sh/bash:
for file in $(tar tfz[tar-file]); do sudo rmdir -p /$file; done
for file in $(tar tfz[tar-file]); do sudo rmdir -p /$file; done
For csh/tcsh:
foreach file ( `tar tfz[tar-file]` )
sudo rmdir -p /$file
end
foreach file ( `tar tfz[tar-file]` )
sudo rmdir -p /$file
end
The R Project distribution is a .pkg file and this adds another level ofcomplication. To list the files that were installed from this package, oneneeds to locate the 'receipt', which is a .bom file. On my system (Mac OS X10.8, Mountain Lion) the file is located at/private/var/db/receipts/org.r-project.gcc-42.darwin11.pkg.bom (was/private/var/db/receipts/org.r-project.gnuFortran42.lion.usr.pkg.bom for Mac OSX 10.7, Lion; or /private/var/db/receipts/org.r-project.mac.tools.gfortran.bom for Mac OS X 10.6, Snow Leopard). To find the file, run a command such as:
Fort Macon State Park
sudo find / -iname'*fortran*.bom'
Once the appropriate file has been located, a list of files that have beeninstalled can be found by running the command:
lsbom -pF [bom-file]
Therefore, similarly to removing the HPC distribution, the files can beremoved by running commands such as:
For sh/bash:
for file in $(lsbom -pF[bom-file]); do sudo rm -f $file; done
for file in $(lsbom -pF[bom-file]); do sudo rmdir -p $file; done
for file in $(lsbom -pF[bom-file]); do sudo rm -f $file; done
for file in $(lsbom -pF[bom-file]); do sudo rmdir -p $file; done
For csh/tcsh:
foreach file ( `lsbom-pF [bom-file]` )
sudo rm -f $file
end
foreach file ( `lsbom-pF [bom-file]` )
sudo rmdir -p $file
end
foreach file ( `lsbom-pF [bom-file]` )
sudo rm -f $file
end
foreach file ( `lsbom-pF [bom-file]` )
sudo rmdir -p $file
end
Note that these commands should be run from the root directory (cd / first).
Last updated: 2020-09-02, M.Floyd (MIT)
Accessibility
Accessibility