Download PathScale ENZO User Guide

Transcript
Table of Contents
1 Introduction............................................................................................................................................................4
1.1 PathScale ENZO™ Overview .......................................................................................................................4
1.2 ENZO™ Runtime Overview ..........................................................................................................................4
1.3 PathScale ENZO™ Code Generation............................................................................................................5
1.4 Scope of this Document.................................................................................................................................5
2 HMPP Concept......................................................................................................................................................5
2.1 The HMPP Codelet Concept ........................................................................................................................5
2.2 HMPP Codelet Remote Procedure Call and Groups of codelets ..................................................................7
2.2.1 Execution Error with Asynchronous or Synchronous Codelet RPCs....................................................8
2.3 ENZO™ Runtime API Library Routines ........................................................................................................8
2.4 ENZO™ Memory Model ...............................................................................................................................8
3 HMPP Directives ...................................................................................................................................................8
3.1 Introduction ...................................................................................................................................................8
3.2 Concept of set of directives ........................................................................................................................10
3.3 Syntax of the HMPP directives ...................................................................................................................10
3.4 Directives for Implementing the Remote Procedure Call on an HWA .........................................................15
3.4.1 codelet Directive .................................................................................................................................15
3.4.2 group directive ....................................................................................................................................20
3.4.3 The callsite Directive ...........................................................................................................................21
3.4.4 The synchronize Directive ..................................................................................................................23
3.4.5 The allocate Directive .........................................................................................................................23
3.4.6 The release Directive ..........................................................................................................................25
3.5 Controlling Data Transfers...........................................................................................................................26
3.5.1 advancedload Directive ......................................................................................................................26
3.5.2 delegatedstore Directive .....................................................................................................................29
3.5.3 Array Sections in HMPP .....................................................................................................................31
3.5.3.1 Case of not normalized arrays ....................................................................................................32
3.5.3.2 Use of array sections in HMPP, examples...................................................................................33
3.6 HMPP data declaration ...............................................................................................................................35
3.6.1 map directive ......................................................................................................................................35
3.6.2 The mapbyname Directive...................................................................................................................37
3.6.3 The resident directive .........................................................................................................................38
3.7 Regions in HMPP........................................................................................................................................40
4 Supported Languages ........................................................................................................................................43
4.1 Input C and C++ Code.................................................................................................................................43
4.1.1 Supported C Language Constructs .....................................................................................................44
4.1.2 Parameter Passing Convention for C Codelets ..................................................................................45
4.1.3 Inlined functions ..................................................................................................................................45
4.2 Input Fortran Code ......................................................................................................................................45
4.2.1 Supported Fortran Language Constructs ............................................................................................45
4.2.1.1 Explicit declaration in codelet......................................................................................................46
4.2.1.2 Supported Data Types ................................................................................................................46
4.2.1.3 Declarations ................................................................................................................................47
4.2.1.4 Parameters .................................................................................................................................47
4.2.1.5 Inlined functions ..........................................................................................................................47
4.2.1.6 Intrinsic functions ........................................................................................................................47
4.2.1.7 Other Type Attributes and Declarations ......................................................................................47
4.2.1.8 Arrays .........................................................................................................................................47
4.2.1.9 IF statements ..............................................................................................................................48
NVIDIA ® is a registered trademark of the NVIDIA Corporation
This information is the property of PathScale Inc. and cannot be used, reproduced or transmitted without authorization.
Page 2
Copyright © 2010 PathScale Inc. - DOC-ENZO08022010