Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Co-Arrays and Multi-Cores Robert W. Numrich Minnesota Supercomputing Institute Minneapolis, MN USA [email protected]

16 November 2009

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Fortran is a modern language

I

Fortran 2003 I I I I

I

Object-oriented Portable C interface Parametrized derived types Strong typing through interfaces

Fortran 2008 I I

Co-arrays First parallel addition to the language

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Fortran 2003

I

Object-oriented I

Objects I I I I

I I I I I

User-defined derived types define classes Type-bound procedures Type constructors Type finalization

Abstract types Inheritance Deferred procedure bindings Overloaded generic procedures Polymorphism

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

The co-array model

I

SPMD with a fixed number of virtual images I I I I I

I

A single program is replicated a fixed number of times. num images() returns the number of images at run-time this image() returns the local image index An image corresponds to a logical partition of global memory The physical memory for each image is assigned to some local memory by the run-time system.

Physical processors are assigned to work on a set of images whose memory is local to the processor.

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

The co-array model

I

Images are dereferenced by multi-rank co-dimensions. I I I

All variables are local to an image. Only variables declared with co-dimensions are visible across images. Co-indices are dereferenced relative to all the images.

I

allocate and deallocate of co-arrays are collective across all images.

I

sync all is collective across all images.

I

Extra memory buffers to support send/recv are not required.

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Using Co-arrays

real

:: x(n)[p,*]

real

:: y(n)

y(:)

= x(:)

y(:)

= x(:)[r,s] ! remote load

! local load

x(:)[r,s]

= y(:)

! remote store

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Multi-core hierarchies

real,allocatable :: a[:,:,:] p = coresPerChip() q = chipsPerNode() r = nodesPerSystem() allocate(a[p,q,*])

I

x=a

local reference

x = a[:,q,r]

on-chip reference

x = a[p,:,r]

on-node reference

x = a[p,q,:]

off-node reference

This requires interaction with run-time system to partition memory correctly.

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Assigning images to cores

One-to-one I

one core to one image

Many-to-one I

many cores to one image (OpenMP)

One-to-many I

one core to many images (virtual processors)

Many-to-many I

many cores to many images (virtual processors with OpenMP)

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Limitations beyond control of the language

I

Shared caches with unknown design on different chips.

I

Cache coherency protocols

I

Memory partitioning algorithms useed by the run-time system

I

Overheads for spawning threads

I

Bandwidth to local memory

I

Cache contention, thrashing

I

Memory bus contention

I

Memory bank contention

I

TLB reach

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

A little history

I

Multi-core, shared-memory systems are not new. I I

I

They all had memory hierarchies. I I I I

I

A,S and B,T and V registers Multiple memory banks Local memory CRAY-2 MSPs and SSPs on CRAY-X1

We never really figured out how to use them well. I I I I I

I

Cray: XMP, YMP, CRAY-2, CRAY-3, C90, T90, X1 They were just bigger.

There was a mish-mash of programming models mostly long forgotten. Controlling memory hierarchies was difficult. Memory consistency was a nightmare. None of them had enough memory bandwidth. Typically good scaling was 2.5 out of 4 or 4 out of 8 or 7 out of 16.

Most of the techniques we used have been lost.

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Co-arrays and GPUs

I

A GPU is an accelerator associated with an image.

I

Compilers should be able to generate code for GPUs.

I

The higher the peak the more unbalanced the machine.

I

GPUs look a lot like long-vector machines such as Cyber 205, CM5, MASPAR etc.

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Compilers that support co-arrays

I

Cray has supported co-arrays for over ten years

I

g95 has a preliminary portable implementation

I

IBM under development

I

Rice University project

I

University of Houston project

I

gfortan in discussion phase

I

Ask Intel for a multi-core implementation

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

Summary

I

The co-array model needs little if any change for multi-core.

I

The issues are mainly with the run-time system.

I

Co-arrays work best on hardware with a true global address space. By the way, could we stop making up new terms for a CPU?

I

I

CPU, processor, core, thread, process, task, rank, image, locale, domain, region ...

Robert W. Numrich

Co-Arrays and Multi-Cores

Modern Fortran The co-array model The co-array model for multi-cores History GPUs Summary

References

I

J. Reid, Coarrays in the next Fortran Standard, ISO/IEC JTC1/SC22/WG5 N1787, 2009.

I

J. Reid and R.W. Numrich, Co-arrays in the next Fortran Standard, Scientific Programming, 15(1), pp. 9-26, 2007.

I

R.W. Numrich, A Parallel Numerical Library for Co-Array Fortran, Proceedings PPAM05, pp. 960-969, 2005.

I

R.W. Numrich, Parallel numerical algorithms based on tensor notation and Co-Array Fortran syntax, Parallel Computing, 31, pp. 588-607, 2005.

I

R.W. Numrich, CafLib User Manual: Release 1.2, technical report.

Robert W. Numrich

Co-Arrays and Multi-Cores

Co-Arrays and Multi-Cores

Nov 16, 2009 - A single program is replicated a fixed number of times. ▷ num images() returns the number of images at run-time. ▷ this image() returns the ...

89KB Sizes 1 Downloads 196 Views

Recommend Documents

Gas and electric residential and
Feb 8, 2016 - Gas and electric residential and business rebate programs continue in ... in the energy needs of our customers, and Vectren is committed to.

Gas and electric residential and
Feb 8, 2016 - Vectren's energy efficiency programs achieve record energy ... Gas and electric residential and business rebate programs continue in 2016.

pdf-1267\historic-homes-and-institutions-and-genealogical-and ...
... the apps below to open or edit this item. pdf-1267\historic-homes-and-institutions-and-genealogi ... ty-massachusetts-with-a-history-of-worcester-socie.pdf.

Performance of Amplify-and-Forward and Decode-and ...
Current broadband wireless networks are characterized by large cell ... Partnership Project (3GPP) to fulfill 4G requirements specified by the International ... enhancements in radio link technology will not solve the basic problem related to ...

!051018 - Planning and Service Coordination and Finance and ...
Donald Morandini, Chair; Freman Hendrix; Robert Luce; Chuck Moss; Alma Smith ... and Fina ... et Joint Committee Meeting Packet - May 10, 2018.pdf !051018 ...

Epilogue War and its Consequences and Hamilton and Jefferson ...
Epilogue War and its Consequences and Hamilton and Jefferson Chart.pdf. Epilogue War and its Consequences and Hamilton and Jefferson Chart.pdf. Open.Missing:

pdf-1316\crickets-and-bullfrogs-and-whispers-and ...
... apps below to open or edit this item. pdf-1316\crickets-and-bullfrogs-and-whispers-and-thun ... pictures-by-harry-and-hopkins-lee-bennett-ed-behn.pdf.

ATM and CAVs-Operational and User Information Challenges and ...
ATM and CAVs-Operational and User Information Challenges and Opportunities.pdf. ATM and CAVs-Operational and User Information Challenges and ...

Mission and Vision Statements and goals English and Spanish.pdf ...
KEMENTERIAN PELAJARAN MALAYSIA. PENTAKSIRAN DIAGNOSTIK AKADEMIK SBP 2012. PERCUBAAN PENILAIAN MENENGAH RENDAH. SCIENCE.

Judiciary and micro and small enterprises: Impact and ...
that will make possible a good economic performance. Several .... During the past decade, municipal and rural savings and loans were .... The 25 - 45 year-old age bracket stands out, as it accounts for over 40% of the micro and small ... Gradually, t

Enhance Security and Usability Security and Usability Security and ...
Even though graphical passwords are difficult to guess and break, if someone direct observe during the password enter sessions, he/she probably figure out the password by guessing it randomly. Nevertheless, the issue of how to design the authenticati

Microformats and Microdata and SEO - GitHub
Microformats and Microdata and SEO. Making the Web a ... This document was written in Markdown then saved into a PDF using Marked. You can download ...

Organizational Report and Election Campaign Contributions and ...
Organizational Report and Election Campaign Contributions and Expenditures Manual .pdf. Organizational Report and Election Campaign Contributions and ...

Neuroscience and education - myths and messages.pdf ...
Page 1 of 8. Imagine having a brain that is only 10%. active, that shrinks when you drink less. than 6 to 8 glasses of water a day and that. increases its interhemispheric connectivity. when you rub two invisible buttons on your. chest. For neuroscie

IMPORT BANS, AND TESTING AND CERTIFICATION REQUIREMENT
Aug 21, 2015 - Press release by MIFAFF, dated 9 May 2012, "Temporary ban on import of panther puffer from Miyagi-ken"; n. Press release by MIFAFF, dated ...

Edukasyong Pantahanan at Pangkabuhayan and Technology and ...
SPACE FOR ROUGH WORK. Whoops! There was a problem loading this page. Retrying... Edukasyong Pantahanan at Pangkabuhayan and Techno ... Livelihood Education Grades 4-6 December 2013.pdf. Edukasyong Pantahanan at Pangkabuhayan and Techno ... Livelihood

Candidate Information Yorkshire and Humber Nursing and ...
While research is now core business for the NHS, there has been limited involvement of .... and Humber Nursing and Academic post master Internship 2016.pdf.

China and New Zealand Agreements and ... - beehive.govt.nz
Arrangement on Mutual Recognition of Academic Qualifications in Higher Education between. The Government of New Zealand and The Government of the ...