The history of the Fortran language can be traced straight to IBM. Fortran was originally proposed by John Backus in 1953, and the initial Fortran compiler, for IBM mainframe computers, was delivered in 1957. Fast-forward to today, and Fortran is widely used on the field of High-Performance Computing. It has become an ANSI standard, and has been implemented on all major platforms on this space. What makes Fortran successful on this space is its ability to provide developers with very good performance for numerical computation withour requiring... [More]
If you don't already have access to the IBM XL Fortran compiler, you'll no doubt
want to try it out. You can either download a free trial version (for AIX
or for Linux )
and use it for sixty (60) days, or you can try it in our sandbox .
The sandbox allows you to access an AIX or Linux system through a
Citrix client (for those unfamiliar with it, it's a simulation of a
Windows environment accessible over the web - I know it sounds slow, but
believe me when I say you won't really notice any performance
degradation). You won't... [More]
Time really flies! About six years ago, the Fortran 2003 standard (commonly abbreviated as F03) was officially published in an attempt to modernize the language. Over the past few years, we've seen a steady increase of interest in adoption of F03 features in the field, particularly the object-oriented programming (OOP) and C interoperability features. F03's C interoperability features struck a chord in the scientific computation community as mixed language applications are becoming the mainstream. In addition, more and more scientific and... [More]
Input / Output (I/O) performance can be a significant factor in overall program performance. The way you write I/O statements can make a big difference. Consider the following example:
subroutine sub(x, n) real x(n) do i = 1, n, 2 write (unit=11) x(i) enddo end subroutine
The I/O in sub might not be as fast as you'd like. This is due to the accumulation of the overhead for each write statement. The write statement above has to do some preparation work before it can actually write anything. It also has to do some... [More]
Are you concerned about program security? The XL Fortran v13.1 and XL C/C++ v11.1 compilers have a stack protection feature. It is not an active system that protects or denies write access to the stack. Instead, it is a defensive mechanism that can detect a corrupted or overwritten stack and take the appropriate action. Regardless of how the corruption occurred, either due to programming error or an attack on your system, stack protection always terminates the executing program.
The compilers have two new command line options dealing... [More]
When the compiler knows that an array occupies a contiguous block of memory, it can perform optimizations based on memory layout. Explicit shape arrays, assumed-size arrays and allocatable arrays occupy contiguous blocks of memory. For array pointers and assumed shape arrays, the compiler cannot determine at compile time if it is the case.
In the latest AIX XL Fortran compiler, -qassert=contiguous was introduced to allow the programmer to indicate to the compiler that: * all array pointers are pointer associated with contiguous... [More]
Our colleague Jim Xia recently coauthored a new book: Scientific Software Design: The Object-Oriented Way (ISBN: 978-0521888134). The book is a great example of how to use the object-oriented features of Fortran 2003 in scientific design patterns. BTW, the examples in the book compile with XL Fortran.
The Back Cover: This book concerns software design. Although many current discussions of scientific programming focus on scalable performance, this book focuses on scalable design. The authors analyze how the structure of a package... [More]
IBM marks its centennial today. As part of our 100 days of celebration, IBM highlighted 100 of its best achievements in the Icons of Progress site. FORTRAN is featured as the March 3rd icon.
Since its release in 1957, the Fortran language has continued to evolve, with the latest versions adding object-orientation, parameterized derived types, and distributed programming. No one knows what innovations the next 100 years will bring, but who knows, Fortran's innovation, longevity, and high performance might be highlighted in the next... [More]
If you are using the Parallel Environment's (PE) mpi module with an older version of the XL Fortran compiler , you might hit this error message:
1514-220 (S) Module symbol file for module mpi is in a format not recognized by this compiler. Please compile the module with this
The mpi module was generated using XL Fortran 12.1, so it's incompatible with earlier versions of XL Fortran. We recently published a technote about this. Consider upgrading to take advantage of the extra type-checking offered by this module.
XL Fortran 13.1 provides a new utilization tracking and reporting feature to help you understand the compiler utilization within your organization. You use this feature to help determine whether your organization’s use of the compiler matches your compiler license entitlements. When enabled, each invocation of the compiler is recorded in a compiler utilization file. The utilization reporting tool can then be used to generate a report of the overall usage of the compiler within your organization. In particular, the report indicates whether the... [More]
The latest release of XL Fortran introduces new data types and intrinsic functions for the Vector Scalar eXtension (VSX) instruction set tuned for the POWER7 processor. With the VSX instruction set and the original Vector Multimedia eXtension (VMX) intrinsic functions; you can efficiently manipulate vector operations in your application. The Mathematical Acceleration Subsystem (MASS) libraries contain an accelerated set of frequently used mathematical intrinsic functions that provide improved performance over the corresponding standard system... [More]
OpenMP 3.1 has been released! Here is the announcement on it and the new specification in pdf online. Our friends in the C/C++ cafe have provided some interesting details on the new specification. More information can be found in their blog posting here .
One of the main features of Fortran 2003 is object-orientation (OO). Derived types can now have specific and generic type-bound procedures, type-bound defined operators, type-bound defined assignment, type-bound finalizers (destructors), and type-bound user-defined derived type IO routines. For example, type base below has specific type-bound procedures find, assign, add and writef, defined operator +, type bound assignment, and a user-defined derived type IO formatted write routine:
integer, allocatable ::... [More]
With multicore and manycore machines becoming popular nowadays, more and more applications are using multi-threading to take advantage of the hardware capabilities and get better performance. Fortran applications are no exception. This blog provides tips on creating thread-safe Fortran applications with XL Fortran.
Like other languages, protect global and heap variables that may be accessed directly or indirectly by multiple threads. In Fortran, global variables are common blocks and module variables. Heap variables are ALLOCATABLE... [More]
Last week, I wrote about user-defined constructors in Fortran 2003. This week, I'd like to discuss user-defined assignment bindings and their role as "copy constructors" for allocatable components.
Like Fortran 90's user-defined assignment interface blocks, Fortran 2003's user-defined assignment bindings define a set of subroutines the compiler must call to perform assignment between objects of two types. User-defined assignment bindings are treated differently from interface blocks when you have intrinsic assignment between types... [More]
C interoperability is one of the most popular features of Fortran 2003. Recently, I was part of a discussion about why XL Fortran flags the following as invalid:
logical(8), target :: logicalarray(20)
p = c_loc(logicalarray) ! XLF will flag an error here
According to Fortran 2003 (and Fortran 2008), the argument to the C_LOC function must either be of an interoperable type or must be a nonpolymorphic scalar. The standard tries to be interoprable with the _Bool type in C, which is of size 1. So... [More]
Subscribe to the IBM Software Newsletter - or update your
subscription Interested in software for IBM Power Systems? Now you can receive
Power-related software news and features in every issue of the IBM Software
Newsletter, PLUS special Power Systems Editions of the newsletter twice per
year! Subscribe to receive the Power Systems Edition
In the Fortran language, the kind type parameter of an intrinsic type is specified between parenthesis following the intrinsic type keyword. For example if you declare a variable of type REAL(8), the variable will have a kind type parameter equal to 8 and it will occupy 8-bytes in memory. A variable of type COMPLEX consists of a real and an imaginary part. Both the real and the imaginary parts are of type REAL. By specifying the kind type parameter in a COMPLEX type declaration, you specify the kind type parameter of each part of the complex... [More]
Last week, an XLF user asked a question in the comp.lang.fortran newsgroup about how to get make to compile some Fortran files with fixed form and others with free form. There are several ways of doing this in XLF:
If you use the ".f" file extension only for FORTRAN 77 files, you can use the generic "xlf" command to compile. The "xlf" command checks the file extension of the source file, and chooses default options, including source form, that are appropriate for that extension. For example, if you compile... [More]
FREE newsletter - get IBM Software news, special #PowerSystems features - subscribe: http://bit.ly/rs1rZn #POWER7 We just published a special Power Systems Edition of the newsletter, which you can see here - http://www-148.ibm.com/tela/webmail/NlDynamicPage/9540/32113/cosmetic?web_page_id=546427&pre=0 - and we're also including Power Systems-related content in each monthly issue.
Check-out this tutorial to learn how to use the interoperability features of the IBM XL Fortran and the IBM XL C/C++ compiler to integrate Fortran, C and Java source code into an application. The demonstration shows how to call Java source routines from Fortran and vice versa. Interoperability is useful for integrating parts written in different languages into an application. This enables developers to take advantage of language best situated for the job or easily integrate legacy assets into a new application. Interoperability of IBM XL... [More]
If you've tried calling system functions from a Fortran program, you might have run into difficulties because these functions don't have a Fortran interface. For example, the following code will fail execution:
p = malloc(40)
if (p == 0) then
! malloc error. Print errno
print *, "malloc failed. errno=", errno()
x = [10.0, 5.0, 4.0, 7.0, 2.0, 1.0, 3.0, 6.0, 9.0, 8.0]
print *, x
The reason is that malloc , errno , exit , and free do not have an... [More]
Just a quick note to let you know that these Fortran PTFs are available! October 2011 Update for XL Fortran for Linux, V13.1 Compiler: http://www-01.ibm.com/support/docview.wss?uid=swg24031171 October 2011 Update for XL Fortran for Linux V13.1 Runtime: http://www-01.ibm.com/support/docview.wss?uid=swg24031172 Can't find the updates for your compilers? Check out our Fortran compilers latest updates page: http://www-01.ibm.com/support/docview.wss?rs=43&uid=swg21156900
The November 2011 PTF for XL Fortran for AIX, V13.1 is now available at the following links and on Fix Central . November 2011 PTF for XL Fortran for AIX, V13.1 November 2011 PTF for XL Fortran Runtime for AIX, V13.1 Can't find the updates for your compilers? Check out our C/C++ compilers latest updates page here .
The short answer is no. However, Fortran has its own mechanisms for providing additional flexibility in procedure references. For instance you can declare a dummy argument as "optional" by giving it the OPTIONAL attribute. This allows you to skip the actual argument that would normally get associated with that dummy argument in a call. For instance, in the following program:
call sub(10, 20)
call sub(10, 20, 30)
The December 2011 Compiler and RTE PTFs for XL Fortran Enterprise Edition for AIX, V11.1 are now available at the following links and on Fix Central : December 2011 PTF for XL Fortran Enterprise Edition for AIX, V11.1 December 2011 PTF for XL Fortran Enterprise Edition for AIX, V11.1 RTE Can't find the updates for your compiler? Check out our Fortran compiler latest update page here .
To declare a thread specific common block, XL Fortran provides two parallelization directives, THREADPRIVATE and THREADLOCAL. One may be puzzled as to what is the difference between them and which one of them is better. THREADLOCAL is not defined in the OpenMP standard. It is a directive that XL Fortran supported before the OpenMP standard was published. The reason that XL Fortran is still supporting it is for applications that have dependency on it. On the other hand, THREADPRIVATE is part of the OpenMP standard. It can better interact... [More]
The January 2012 Compiler and RTE PTFs for XL Fortran for Linux, V12.1 are now available at the following links and on Fix Central : January 2012 Update for XL Fortran for Linux, V12.1 January 2012 Runtime for XL Fortran for Linux, V12.1 Can't find the updates for your compiler? Check out our Fortran compiler latest update page here.
The January 2012 PTF for XL Fortran for AIX, V13.1 is now available at the following links and on Fix Central . January 2012 PTF for XL Fortran for AIX, V13.1 January 2012 PTF for XL Fortran Runtime for AIX, V13.1 Can't find the updates for your compilers? Check out our C/C++ compilers latest updates page here .
you know that the compiler you use can impact whether or not you
achieve optimal performance from all parts of your systems.
Organizations often overlook the importance of compilers, often running
new high-powered servers with outdated compilers that limit the servers’
potential. Or failing to update compilers that can improve the
efficiency of existing hardware investments as more advanced versions
are released. In practical terms,this translates into greater power
consumption, slower response times,numerous administrative... [More]