pcxx_ug (Раздаточные материалы)
Описание файла
Файл "pcxx_ug" внутри архива находится в следующих папках: Раздаточные материалы, SAGE. PDF-файл из архива "Раздаточные материалы", который расположен в категории "". Всё это находится в предмете "модели параллельных вычислений и dvm технология разработки параллельных программ" из 7 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .
Просмотр PDF-файла онлайн
Текст из PDF
User Guide for a Portable Parallel C++Programming System, pC++ Dennis Gannon, Shelby X. Yang, Peter BeckmanDepartment of Computer Science & CICAIndiana University, Bloomington, Indiana, U.S.A.September 9, 1994AbstractThis document describes version 1.0 of the pC++ system for building portableparallel programs. It is intended for users that are already C++ programmers andwould like to use data parallel style operations in C++ using arrays of objects in whichobject member functions can be applied in parallel. To accomplish this, pC++ providesa very simple mechanism to build \collections of objects" from some base element class.Member functions from this element class can be applied to the entire collection (ora subset) in parallel.
In addition there is a mechanism for encapsulating SPMD stylecomputation in a thread based computing model that is both ecient and completelyportable.This research is supported by DARPA under contract AF 30602-92-C-0135 from Rome Labs, NationalScience Foundation Oce of Advanced Scientic Computing under grant ASC-9111616ipC++ User GuideContents1 Introduction2 Installing the System. Ver. 1.02.1 Installation13: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :3 The pC++ Programming Language.3.1 Threads, Processors and Runtime Models Ver. 1.0+.3.2 Thread Environment Classes. Ver.
2.0 : : : : : : : :3.2.1 Thread Reduction Functions. Ver. 2.0 : : : :3.2.2 Communication Between Threads. Ver. 2.0 :3.2.3 Constructors for TEClass Objects. Ver. 2.0 :3.2.4 Encapsulating SPMD Libraries. Ver. 2.0 : : :5: : : : : : : : : : :: : : : : : : : : : :: : : : : : : : : : :: : : : : : : : : : :: : : : : : : : : : :: : : : : : : : : : :4 Collections. Ver 1.0+4.14.24.34.44.54.6Distributions, Alignments, and Processors Ver 1.0+ : : :Collection as a Template TEClass. Ver 2.0 : : : : : : : :Element Types. Ver 1.0+ : : : : : : : : : : : : : : : : :The Structure of a Collection.
Ver 1.0+ : : : : : : : : :Collection Constructors. Ver 1.0+ : : : : : : : : : : : :Communication between Collection Elements. Ver 1.0+4.6.1 Vector Subsets of a Collection. Ver. 1.0+ : : : :4.6.2 More on ThisCollection. Ver. 2.0 : : : : : : : : :4.6.3 Working with the Local Collection. Ver. 1.0+ : :4.7 Accessing a Remote Collection Element. Ver 1.0+ : : :4.8 Parallelism with Collection: Summary. Ver 1.0+ : : : :4.8.1 Method of Element Parallelism : : : : : : : : : :4.8.2 Thread Parallelism : : : : : : : : : : : : : : : : :4.9 The Organization of a pC++ Program. Ver 1.0+ : : : :4.9.1 I/O in pC++ programs.
ver 1.0 : : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :: : : : : : : : :Example: Matrix-Matrix Multiply. Ver 1.0+ : : : : : : : : : : :Example: Batcher's Bitonic Merge Sort.
Ver 1.0+ : : : : : : :C++ and HPF Style Fortran. Ver 2.0 : : : : : : : : : : : : : :Interfacing HPF and pC++ : : : : : : : : : : : : : : : : : : : :Working with Connection Machines node Fortran on the CM-5Working with Intel node Fortran on the Paragon : : : : : : : :ii561112131418: : : : : : : : :5 Programming with Collections. Ver 1.0+5.15.25.35.45.55.6318212223262729303133353537373839: : : : :: : : : :: : : : :: : : : :: : : : :: : : : :3941444547516 The Demo Examples. Ver 1.0+6.16.26.36.4BM-1: Block Grid CG : : : : : : : : : : : : : : : : :BM-2: A Fast Poisson Solver : : : : : : : : : : : : :BM-3: The NAS Embarrassingly Parallel BechmarkBM-4: the NAS Sparse CG Benchmark : : : : : : :52: : : : : : : : : : :: : : : : : : : : : :: : : : : : : : : : :: : : : : : : : : : :7 Known Bugs in Version 1.08 The pC++ Kernel Class8.1 The pC++ SuperKernel collection9 The DistributedArray Collectioniii525355565860: : : : : : : : : : : : : : : : : : : : :61631 IntroductionIn its current form pC++ is a very simple preprocessor that generates C++ code from thepC++ extensions to C++.
Just as the original AT&T C++ system used a preprocessorcalled Cfront to translate C++ to C, pC++ can be considered a C++front, i.e. a translatorfrom an extension of C++ down to C++. Consequently, to run pC++ programs you needa current implementation of C++ (AT&T version 3.0 or better, or g++ version 2.4.5 orbetter) running on, or cross compiling for, your target machine.pC++ currently runs in uniprocessor mode on workstations from Sun, SGI, HP, NeXT,DEC and IBM.
This allows one to partially debug parallel programs as uniprocessor tasks.Unfortunately, you get no special performance win from running parallel programs on thesemachines and there are parallel program bugs that may not be discovered during serialexecution. On the other hand, if you have a Thinking Machines CM-5, Intel Paragon, SequentSymmetry, BBN TC2000, or KSR-1, you can run pC++ programs that exploit parallelism.(The IBM SP1 port is nearly completed, and Cray T3D will be the next target.) Moreimportant, a pC++ program, if it has been designed with care, will run on all these machineswithout changing a line of code.
In addition to sequential execution on workstations, thereare two parallel simulators that pC++ programs will run on. These simulators allow one toemulate true parallel execution on a sequential machine. However, our experience indicatesthat once a program works with the sequential pC++ system on a workstation, it is an easyjob to port it to the parallel platforms. And once it is running on one parallel machine, itsimply requires recompilation to run on any of the other parallel platforms.This brief document will outline some of the main points of the language and how to useit. We will also try to outline some of the problems you will encounter.
This is an \alpha"version of free software and there are bound to be many many bugs. Version 1.0 will befollowed very quickly by Version 2.0 which will have many more features. However, thereare certain things to know in advance about the limitations of pC++. These include pC++ DOES NOT provide a way to get parallelism out of a network of workstations.However we are currently working on a PVM port, and should have a prototype runningbefore the end of 1993.
This is an exciting area and others are working on it. Checkout CC++ from Caltech. pC++ DOES NOT do large grain data ow. Look at Mentat from the University ofVirginia. pC++ IS NOT a good foundation for implementing a concurrent operating system.In the future we hope to be able to mix modules of pC++ with code designed for theseother systems, but that will not work right now.In addition to the limitations to pC++ as a programming language and model, there arelimitations of Version 1.0 that WILL BE FIXED in Version 2.0. These limitations are listedbelow.
Version 1.0 of pC++ does not yet have a HPF or node level Fortran interface. (to bexed in version 2.0)1 Version 1.0 of pC++ does not support some of the standard C++ functionality. In-cluded in this are things like the overloaded comma operator. More important, supportfor C++ templates is weak. A more complete list of known preprocessor bugs is includedin the appendix. Version 1.0 of pC++ does not support separate compilation when pC++ extensionsare spread across multiple les. The rules for separate compilation will be describedlater. Version 1.0 of pC++ does not support the CM-5 vector units directly, but you can linkCMF node Fortran subroutines into pC++ class functions.
This is described later inthis document, Version 1.0 of pC++ has none of the good optimizations that you might expect. Versions 2.0 and 3.0 will focus on these optimizations. Version 1.0 of pC++ has very limited I/O. In particular, the C++ stream library isnot integrated because it will need a rewrite for the parallel environment. I/O issuesare considered in detail in a later section.In the following section we cover both the current alpha release, pC++ version 1.0 andthe next release, pC++ version 2.0. We have included both in this document so users ofversion 1.0 can know what direction pC++ is going. We have indicated with each sectionheader which version number that is required. The symbol Ver. 1.0+ means that thisapplied to the current version as well as future versions.
The symbol Ver. 2.0 means thatthis is not implemented in version 1.0.22 Installing the System. Ver. 1.0The following comes from the le INSTALL in the standard software distribution. It is bestto read that le instead of this section to make sure you have the most recent information.In order to save disk space, we have created three dierent pC++/Sage++ distributions.You may select the distribution that best ts your planned use. All distributions are Unix\tar"ed and GNU gzipped. sage++-*.tar.gz The Sage++ compiler tools and the c, c++, and fortran parsers.The pC++ run-time system and code generator are not included. pc++-*.tar.gz Just enough of Sage++ to compile pC++.
Includes run-time systemsfor several parallel machines. pc++sage++-*.tar.gz Everything! The Sage++ tools and the pC++ run-time system..The tools required to make pC++ are: An ANSI C compiler (The compiler MUST be ANSI compatible) A C++ compiler (either g++ AT&T's C++, DEC's cxx, or IBM's xlC) About 25-80 Meg of disk space for compilation.A word about compilers.
Unfortunately, the vision of portable Unix programs has yet tobe fullled. Since every vendor's C compiler and header les vary slightly, pC++/Sage++uses gcc/g++ by default. This choice was also inuenced by companies like SGI, SUN, andHP \unbundling" their ANSI C compilers, and hoping people pay extra for their compilers.However, relying on gcc/g++ is a problem for parallel machines that use use customCPUs for which gcc is not dened, such as the KSR1. Therefore we also support AT&T'sC++ compiler, which can be ported to almost any machine with a good C compiler.2.1 InstallationGet the most up-to-date version from the FTP archive. Use \nger sage@cica.indiana.edu"to learn about the current version and where to nd it.1. Move the archive to the directory where tar will create the distribution directory.