shpcc94 (Раздаточные материалы)

PDF-файл shpcc94 (Раздаточные материалы) Модели параллельных вычислений и DVM технология разработки параллельных программ (53474): Другое - 7 семестрshpcc94 (Раздаточные материалы) - PDF (53474) - СтудИзба2019-09-18СтудИзба

Описание файла

Файл "shpcc94" внутри архива находится в следующих папках: Раздаточные материалы, SAGE. PDF-файл из архива "Раздаточные материалы", который расположен в категории "". Всё это находится в предмете "модели параллельных вычислений и dvm технология разработки параллельных программ" из 7 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Просмотр PDF-файла онлайн

Текст из PDF

High Performance Fortran Interface to the Parallel C++ Shelby X. Yang, Dennis Gannon, Suresh Srinivas, Francois Bodin, and Paul BodeDepartment of Computer Science, Indiana UniversityBloomington, IN 47405fyang,gannon,ssriniva,fbodin,bodeg@rainier.cica.indiana.eduAbstractThis paper describes the design of a Fortran interface to the parallel C++ (pC++) programming language. The pC++ Fortran interface provides a mechanism for users to link pC++ programs with Fortransubroutines so that they can take advantage of both thefast computing speed of Fortran and the object-orientedprogramming paradigm of C++. We will discuss thedesign of the Fortran interface and illustrate it witha galactic dynamics application.

Our interface implementation is ecient. The galactic dynamics application can achieve a 14.4 Gops sustained speed on a512-node CM-5 massively parallel supercomputer.1 IntroductionOne of the principal roles played by C++ in programming massively parallel computers is in the design of distributed data structures that are either toocomplex or simply inconvenient to program in Fortran. However, the mainstay of scientic and engineering programming is Fortran. The reasons for thisare more than cultural. The restrictions in the Fortran type-system prohibit the use of pointers beyondthe simple alias mechanisms allowed by Fortran90.Consequently, Fortran compilers can perform aggressive data-dependence-based optimizations which arenot possible in C++. In addition, code generationtechnology and optimized intrinsic library functionspresent in Fortran are much better than their C++counterparts.

With the present generation of Fortran90 compilers, vector and array operations will beeasy to compile into ecient code. We believe thatit is essential to support a portable programming en This research issupported in part by ARPA under contractAF 30602-92-C-0135, the National Science Foundation Oce ofAdvanced Scientic Computing under grant ASC-9111616, andthe National Science Foundation and ARPA Grand ChallengeAward, \The Formation of Galaxies and Large-scale Structure."vironment that mixes Fortran with C++ across theentire range of supercomputing platforms. 1There is no fundamental problem in linking Fortranto C++ programs.

C++ has a standard facility forrepresenting interfaces to other languages. However,with the founding of the High Performance FortranForum and the publication of the High PerformanceFortran (HPF) [1] extensions to Fortran90, we have anew problem. In this paper, we explore and propose amechanism for linking HPF programs to parallel C++programs.The paper is organized as follows. In section 2, wegive a brief introduction to pC++.

In section 3, 4, and5, we discuss the design of the Fortran interface. Insection 6, we discribe our experiments with a galacticdynamics application on the Thinking Machines CM5 and the Intel Paragon. And nally in section 7, wedraw our conclusions.2 A brief introduction to pC++pC++ [2] is an extension of C++ designed to allow programmers to compose \concurrent aggregate"classes which can be aligned and distributed over thememory of a parallel machine in a manner similar tothe HPF compiler directives.

pC++ allows users towrite portable and ecient codes which can be run ona wide range of parallel computer systems. The rstversion of the compiler is a preprocessor which generates Single Program Multiple Data (SPMD) C++code. Currently, it runs on the Thinking MachinesCM-5, the Intel Paragon, the BBN TC2000, theKendall Square Research KSR-1, the IBM SP-1, Parallel Virtual Machine (PVM) for workstation clusters,and the Sequent Symmetry. The basic concept behind1 This point of view is also supported in the researchcommunity. The soon to be published conclusions of the1993 NSF/ARPA/DOE Grand Challenge Meeting include several strong recommendations for more investigation of mixingobject-oriented style with the more traditional programmingstyles.pC++ is the notion of a distributed data structure,called Collection, and parallel operations associatedwith it. A collection is a structured set of objects distributed across the processing elements of a computer.In a manner designed to be consistent with HPF, distribution of the objects in a collection over the processors is dened by programmers.

pC++ provides amechanism for building a \collection of objects" froma base element class. Member functions of this elementclass can be applied to the entire collection (or a subset) in parallel. This type of parallelism is similar todata-parallelism, though we call it object-parallelism.In addition, there is a mechanism for encapsulating theSPMD style in a thread based computing paradigm.A base element class is a normal C++ class. Forexample, a class that represents a segment of a list ofparticles in an N-body simulation can be declared asclass Segment {public:double x[seg_nbodies],y[seg_nbodies],z[seg_nbodies],mass[seg_nbodies];Segment();void AccelerateParticles();}where x, y, and z represent the position of a particle in the x, y, and z dimesions, and mass presentsthe mass of the particle.

The member functionAccelerateParticles accelerates the the particlesaccording to the forces exerted on them.A pC++ collection has the following component:Collection NameOfCollection:ParentCollection{private:<private data fields and functions>protected:<protected data fields and functions>public:<public data fields and functions>MethodOfElement:<data fields and functionsadded to each element>};The key points to note are: A collection declaration begins with the keywordCollection which is followed by the name of thecollection and the name of the base collection thecurrent collection inherits.

A collection has private, protected, public dataelds and member functions exactly as a normalC++ class. However, when a collection object isallocated, one copy of the collection structure isallocated in the memory of each processor. Themember functions in a collection are invoked inthe SPMD mode. A collection also has a set of data elds andmember functions that will be copied into eachbase element class as public elds. These are labeled as MethodOfElement elds.

The purposeof MethodOfElement elds is to allow each element to access or act on other elements in thecollection. They are invoked in the object-parallelmode like other member functions in the base element class.To construct a collection object one needs to create aprocessor object, a distribution object and an alignment object analogous to HPF. pC++ uses a speciallibrary class called Processors for the processor object. In the current implementation, it represents theset of all processors available to the program at runtime.

To build a distribution of some size, say 64, onecan writeProcessors P;Distribution D(64,&P,CYCLIC);where the ith distribution grid is mapped to processori%P, because a cyclic distribution is used. To createan alignment object that denes the mapping of thecollection elements to the distribution one writesAlign A(32,"[ALIGN(T[i],D[i])]");where it is assumed that there are 32 elements in thecollection. The collection constructor uses the alignment object to dene the size and dimension of thecollection. The mapping is described by a text stringcorresponding to the HPF alignment directive.

It denes a mapping from a domain structure to a distribution structure using dummy index variables.The intent of this two stage mapping, as it was originally conceived for HPF, is to allow the distributioncoordinates to be a frame of reference so that dierentarrays could be aligned with each other in a mannerthat promotes memory locality.With the distribution and alignment objects dened, a collection of Segment class can be constructed:NameOFCollection<Segment> C(&D,&A);and member function AccelerateParticles can beinvoked in the object-parallel modeC.AccelerateParticles();3 Interfacing HPF and pC++Let us consider the ways in which this interfacemight operate: HPF calling C++/pC++:a. A direct call to a C++ function from the mainthread of a Fortran program.

This presentsno real problems that did not exist before,unless an HPF distributed array is passed asan argument.b. A C++ function is called as an HPF extrinsicfunction in a parallelized loop. Again this isonly interesting if an HPF distributed arrayis passed as an argument.The HPF extrinsic procedure interface which allows calls to non-HPF subprograms as extrinsicprocedures may well suce for the above two situations provided the C++ subprogram is designedto be executed on a single processor. In bothcases we assume that the C++ function will notattempt to return a value of any type other thana base type like int or double.

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5259
Авторов
на СтудИзбе
421
Средний доход
с одного платного файла
Обучение Подробнее