Cray C and C- Reference Manual
Total Page:16
File Type:pdf, Size:1020Kb
R Cray C and C++ Reference Manual S–2179–83 © 1996-2000, 2002-2014 Cray Inc. All Rights Reserved. This document or parts thereof may not be reproduced in any form unless permitted by contract or by written permission of Cray Inc. U.S. GOVERNMENT RESTRICTED RIGHTS NOTICE The Computer Software is delivered as "Commercial Computer Software" as defined in DFARS 48 CFR 252.227-7014. All Computer Software and Computer Software Documentation acquired by or for the U.S. Government is provided with Restricted Rights. Use, duplication or disclosure by the U.S. Government is subject to the restrictions described in FAR 48 CFR 52.227-14 or DFARS 48 CFR 252.227-7014, as applicable. Technical Data acquired by or for the U.S. Government, if any, is provided with Limited Rights. Use, duplication or disclosure by the U.S. Government is subject to the restrictions described in FAR 48 CFR 52.227-14 or DFARS 48 CFR 252.227-7013, as applicable. The following are trademarks of Cray Inc. and are registered in the United States and other countries: Cray and design, Sonexion, Urika, and YarcData. The following are trademarks of Cray Inc.: ACE, Apprentice2, Chapel, Cluster Connect, CrayDoc, CrayPat, CrayPort, ECOPhlex, LibSci, NodeKARE, Threadstorm. The following system family marks, and associated model number marks, are trademarks of Cray Inc.: CS, CX, XC, XE, XK, XMT, and XT. The registered trademark Linux is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a worldwide basis. Other trademarks used in this document are the property of their respective owners. Intel, Aries and Gemini are trademarks of Intel Corporation in the United States and/or other countries. CUDA, Kepler, OpenACC and NVIDIA are trademarks of NVIDIA Corporation. Google is a trademark of Google. ISO is a trademark of International Organization for Standardization (Organisation Internationale de Normalisation). OpenMP is a trademark of OpenMP architecture Review Board. O2 is a trademark of Silicon Graphics, Inc. Opteron is a trademark of Advanced Micro Devices, Inc. PGI is a trademark of The Portland Group Compiler Technology, STMicroelectronics, Inc. Platform is a trademark of Platform Computing Corporation. TotalView is a trademark of Rogue Wave Software, Inc. UNIX, the “X device,” X Window System, and X/Open are trademarks of The Open Group. Portions of this document were copied by permission of OpenMP Architecture Review Board from OpenMP C and C++ Application Program Interface, Version 2.0, March 2002, Copyright © 1997-2002, OpenMP Architecture Review Board. RECORD OF REVISION S–2179–83 Published June 2014 Supports the Cray C and C++ compilers running on Cray XE, Cray XK, and XC30 compute nodes. S–2179–82 Published September 2013 Supports the Cray C and C++ compilers running on Cray XE, Cray XK, and XC30 compute nodes. S–2179–81 Published September 2012 Supports the Cray C and C++ compilers running on Cray XE and Cray XK compute nodes. S–2179–80 Published December 2011 Supports the Cray C and C++ compilers running on Cray XE and Cray XK compute nodes. S–2179–74 Published June 2011 Supports the Cray C and C++ compilers running on Cray XT and Cray XE compute nodes. S–2179–73 Published December 2010 Supports the Cray C and C++ compilers running on Cray XT and Cray XE compute nodes. 7.2 Published February 2010 Supports the Cray C and C++ compilers running on Cray XT compute nodes. 7.1 Published June 2009 Supports the Cray C and C++ compilers running on Cray XT compute nodes. 7.0 Published December 2008 Supports the Cray C and (Deferred implementation) C++ compilers running on Cray XT compute nodes. 6.0 Published September 2007 Supports the Cray C and Cray C++ 6.0 release running on Cray X1 series and Cray X2 systems. 5.6 Published March 2007 Supports Cray C++ 5.6 and Cray C 8.6 releases running on Cray X1 series systems. 5.5 Published December 2005 Supports Cray C++ 5.5 and Cray C 8.5 releases running on UNICOS/mp 3.0 or later operating systems. 5.4 Published March 2005 Supports Cray C++ 5.4 and Cray C 8.4 releases running on UNICOS/mp 3.0 or later operating systems. 5.3 Published November 2004 Supports Cray C++ 5.3 and Cray C 8.3 releases running on UNICOS/mp 2.5 or later operating systems. 5.2 Published April 2004 Supports Cray C++ 5.2 and Cray C 8.2 releases running on UNICOS/mp 2.3 or later operating systems. 5.1 Published October 2003 Supports Cray C++ 5.1 and Cray C 8.1 releases running on UNICOS/mp 2.2 or later operating systems. 5.0 Published June 2003 Supports Cray C++ 5.0 and Cray C 8.0 releases running on UNICOS/mp 2.1 or later operating systems. 4.3 Published March 31, 2003 Draft version to support Cray C 7.3 and Cray C++ 4.3 releases running on UNICOS/mp operating systems. 4.2 Published December 20, 2002 Draft version to support Cray C 7.2 and Cray C++ 4.2 releases running on UNICOS/mp operating systems. 4.1 Published August 20, 2002 Draft version to support Cray C 7.1 and Cray C++ 4.1 releases running on UNICOS/mp operating systems. 3.6 Published June 2002 This para supports the Cray Standard C 6.6 and Cray Standard C++ 3.6 releases running on UNICOS and UNICOS/mk operating systems. 3.4 Published October 2000 This para supports the Cray C 6.4 and Cray C++ 3.4 releases running on UNICOS and UNICOS/mk operating systems. This para supports a new inlining level, inline4. 3.4 Published August 2000 This para supports the Cray C 6.4 and Cray C++ 3.4 releases running on UNICOS and UNICOS/mk operating systems. It includes updates to para 3.3. 3.3 Published July 1999 This para supports the C and C++ compilers contained in the Cray C++ Programming Environment release 3.3, which is supported on the Cray SV1, Cray C90, Cray J90, and Cray T90 systems running UNICOS 10.0.0.5 and later, and Cray T3E systems running UNICOS/mk 2.0.4 and later. On all supported Cray systems, the C++ compiler is Cray C++ 3.3 and the C compiler is Cray C 6.3. 3.2 Published January 1999 This para supports the C and C++ compilers contained in the Cray C++ Programming Environment release 3.2, which is supported on all systems except the Cray T3D system. On all supported Cray systems, the C++ compiler is Cray C++ 3.2 and the C compiler is Cray C 6.2. 3.1 Published August 1998 This para supports the C and C++ compilers contained in the Cray C++ Programming Environment release 3.1, which is supported on all systems except the Cray T3D system. On all supported Cray systems, the C++ compiler is Cray C++ 3.1 and the C compiler is Cray C 6.1. 3.0.2 Published March 1998 This para supports the C and C++ compilers contained in the Cray C++ Programming Environment release 3.0.2, which is supported on all systems except the Cray T3D system. On all supported Cray systems, the C++ compiler is Cray C++ 3.0.2 and the C compiler is Cray C 6.0.2. 3.0 Published May 1997 This rewrite supports the C and C++ compilers contained in the Cray C++ Programming Environment release 3.0, which is supported on all systems except the Cray T3D system. On all supported Cray systems, the C++ compiler is Cray C++ 3.0 and the C compiler is Cray C 6.0. 2.0 Published January 1996 Original Printing. This manual supports the C and C++ compilers contained in the Cray C++ Programming Environment release 2.0. On all Cray systems, the C++ compiler is Cray C++ 2.0. On Cray systems with IEEE floating-point hardware, the C compiler is Cray Standard C 5.0. On Cray systems without IEEE floating-point hardware, the C compiler is Cray Standard C 4.0. Changes to this Document Cray C and C++ Reference Manual S–2179–83 S–2179–83 Added information: • -h develop selects compiler optimization levels to balance compile time against application execution time. Use this option during application development, when quick turnaround is desired. It minimizes compile time at the cost of execution time performance. See -h develop on page 53. • -h flex_mp=strict provides a level repeatability of between the conservative and intolerant levels. See -h flex_mp=level on page 37. • -h concurrent is equivalent to adding a CONCURRENT directive (pragma) before every loop in the file, including loops created from array syntax. See -h concurrent on page 45 and concurrent Directive on page 85. • The -Wx,arg option can be used to pass command line arguments to the PTX assembler for OpenACC applications. See -W phase,"opt ..." on page 57. • The -Wc,arg option can be used to pass command line arguments to the CUDA linker for OpenACC applications. See -W phase,"opt ..." on page 57. • The new cray_upc_sheap_info() call provides symmetric heap usage information to UPC applications. See the cray_upc_sheap_info(3c) manpage. • The new cray_upc_shared_cast() call creates a pointer-to-shared from a pointer-to-local, providing the inverse functionality to upc_cast. See the cray_upc_shared_cast(3c) man page. • See new CRAY_OMP_CHECK_AFFINITY Environment Variable on page 106. • Added descriptions for __sync_val_compare_and_swap, and __sync_lock_test_and_set. See Local Atomic Memory Operations on page 217.