O'Reilly logo

UPC: DISTRIBUTED SHARED MEMORY PROGRAMMING by Katherine Yelick, Thomas Sterling, William Carlson, Tarek El-Ghazawi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 1

Introductory Tutorial

The objective of this chapter is to give programmers a general understanding of UPC and to enable them to write and run simple UPC programs quickly. The chapter is therefore a working overview of UPC. Subsequent chapters are devoted to gaining more proficiency with UPC and resolving the more subtle semantic issues that arise in the programming of parallel computing systems using UPC. In this chapter we introduce the basic execution model in UPC, followed by some of the key UPC features, including:

  • Threads
  • Shared and private data
  • Pointers
  • Distribution of work across threads
  • Synchronization of activities between threads

More in-depth treatment of these subjects is provided in the respective book chapters. In addition, in subsequent chapters we address advanced features and usage that may be needed for writing more complex programs. Nonetheless, this introduction provides a valuable starting point for first-time parallel programmers and a good overview for more experienced programmers of parallel machines. However, advanced UPC programmers may wish to skip this chapter and proceed to the following chapters, as all material in this introduction is included and elaborated upon in the remainder of the book. It should be noted that UPC is an extension of ISO C [ISO99], and familiarity with C is assumed.

1.1 GETTING STARTED

UPC, or Unified Parallel C [CAR99, ELG01, ELG03] is an explicit parallel language that provides the facilities for direct user specification ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required