140 likes | 298 Views
XLF 9.1. Ian J. Bush Computational Science and Engineering Department CCLRC Daresbury Laboratory Warrington WA4 4AD I.J.Bush@dl.ac.uk. XLF 9.1. Currently available as a non-default install (NDI) See the HPCx mailing on 15 th July for how to use it
E N D
XLF 9.1 Ian J. Bush Computational Science and Engineering Department CCLRC Daresbury Laboratory Warrington WA4 4AD I.J.Bush@dl.ac.uk
XLF 9.1 • Currently available as a non-default install (NDI) • See the HPCx mailing on 15th July for how to use it • The intention is to make it the default on 28th of September • If no major problems are reported • It’s up to YOU to test it on your code ! ScicomP-11
Why XLF 9.1 • Extra compiler facilities • Extra language facilities • Partial support for Fortran 2003 • Performance ScicomP-11
New Compiler Facilities • -qflttrap=nanq • Detect all NaN values • Help debugging • -qsaveopt • Saves the compiler options in the object file • Now quite what did this get compiled with… • -qversion • At long last !!! • More directives to help optimisation • MASS now supported (by the compiler group) • Power5 ( and cell ) support ScicomP-11
Language Facilities • Full OpenMP 2.0 support • Partial support for Fortran 2003 • C Interoperability • Mixed Public and Private entities in a derived type • Access to command line and environment • Information about the implementation • Flush statement • IOMSG= specifier in I/O statements • Various others: ASSOCIATE, IMPORT, PROCEDURE, NEW_LINE • Full support in xlf 11 (xlf 10 next year) ScicomP-11
C Interoperability • Provides a portable way of mixing Fortran and C in the same code • Uses Fortran kinds to map between C data types and Fortran • Mapping comes from an intrinsic module • Facilities to convert between Fortran and C pointers ScicomP-11
C Interoperability • Fortran Side Interface Subroutine hostname( host, length, error ) Bind( c ) Use, Intrinsic :: iso_c_binding Character( Kind = c_char ), Dimension( * ) :: host Integer( c_int ), Value :: length Integer( c_int ) :: error End Subroutine hostname End Interface .. Call hostname( host, length, error ) • C Side void hostname( char *host, int length, int *error ){ *error = gethostname( host, length ); } ScicomP-11
Access to the Command Line • command_argument_count() • Intrinsic function that returns the number of arguments to the command • Call get_command_argument( ... ) • Access to each of the command arguments • Call get_command( ... ) • Access the complete command line • Methods for error checking provided – e.g. did you provide a big enough buffer ? ScicomP-11
Information About the Implementation All Fortran implementations have certain aspects that are specific to the environment. The intrinsic module iso_fortran_env contains values to help programs avoid depending on specific values. E.g. • input_unit, output_unit, error_unit • Which units are preconnected to stdin, stdout, stderr • numeric_storage_size, character_storage_size • The size, in bits, of storage units • iostat_end, iostat_eor • The values returned by IOSTAT= for EOF and EOR ScicomP-11
Other Facilities • There is now a FLUSH statement. • Similar syntax to close, rewind etc. • When an I/O error occurs by use of the IOMSG= specifier you can get an error message from the implementation describing what has occurred ScicomP-11
Performance - SpecFP ScicomP-11
Performance – Apps on HPCx • PCHAN • DNS CFD code • on average 1.44 times faster under xlf9.1 • Centori • Tokamak simulation code • 1.22 times faster under xlf9.1 • CASTEP • Ab initio electronic structure code • 1.06 times faster under xlf9.1 • No app found to be slower under xlf9.1 ScicomP-11
PCHAN – Compiler Comparison ScicomP-11
Summary And Further Info • xlf9.1 • Improved flags and directives • MASS now supported • Partial F2003 support • Improved performance • xlf10 out next year • Full information on IBM Fortran compilers at http://publib.boulder.ibm.com/infocenter/comphelp/index.jsp ScicomP-11