Logo image
Translating HPF for Execution on DSM
Thesis

Translating HPF for Execution on DSM

Wen-Kuo Lin
Masters, 國立清華大學, 資訊工程學系
1994

Abstract

分散共享式記憶體系統 高效能福傳語言 資料預先載入策略 HPF DSM High Performance Fortran Distributed Shared-Memory Data Preloading
一般說來,平行電腦可分為兩大類:一種是所謂的共享式記憶體系統 (shared-memory systems),另一種是所謂的分散式記憶體系統( distributed-memory systems)。在共享式記憶體的環境下,寫程式比較 容易,就跟一般寫循序程式 (sequential program) 一樣。但由於每一個 處理器所看到的記憶體是同一個,因此,在這種環境之下,共享記憶體就 成了整個系統的瓶頸。對後者而言,雖然它沒有前者的缺點,但程式設計 者必須改變原有寫程式的方式,即改採用訊息流通 (message passing)的 方式。這種寫程式的方式比較複雜、除錯上更是困難。因此,就產生了分 散共享式記憶體系統 (distributed shared-memory systems)。它是這 兩類平行電的折衷。在結構上,是採用分散式的架構,而寫程式的方法, 則與共享式記憶系統相同。通常,分散共享式記憶體系統的效能和它的實 現方式有很大的關係。論文中,我們要探討的是實現在程式庫這一層的分 散共享式記憶體系統的兩個問題:第一、寫程式不具透通性 (non- transparent)。第二、溝通負荷(comm- unication overhead)過大。在這 篇論文中我實現一個轉譯器,目的是將高效能福傳(High Performance Fortran)程式轉換成可在分散共享記憶系統下順利執行。其基本觀念是去 辨認一個共享物件 (shared object) 是在等號的右邊還是左邊?然後再 將這個共享物件代換成分散共享式記憶體系統的讀或寫的函式庫呼叫。不 過,這種方式有一個重大的考驗,那就是效能的問題。因此,為了改善效 能的問能,我們對這個轉譯器加入一個最佳化的策咯。這個策咯我們稱之 為資料預先載入 (data preloading)。在方法上,是根據高效能福傳的指 示器(directives)所提供的訊息,將迴圈中可能會用到的共享物件,預先 放入緩衝記憶體中。這樣做的目的是要降低向分散共享式記憶體系統發出 存取要求的次數,即減少處理器與處理器之間的溝通次數。因此,若能有 效地降低,則必能改善這個轉譯器的輸出程式的效能。從實驗的結果中, 我們可以觀察到,因溝通所花的代價,對效能而言,具有決定性的因素。 因此,利用增加記憶體的方式,可降低溝通的次數。我們可以由實驗的結 果而得到驗証。 Parallel computers are usually classified into two categories: distributed-memory systems and shared- memory systems. Programs are easier to write in the shared-memory model, but the shared memory also becomes a bottleneck of the system. On the other hand, nodes in distributed-memory systems are coupled loosely. However, it is difficult and often tedious to write programs using message passing style. Distributed shared memory (DSM) systems are a compromise between distributed-memory systems and shared-memory systems. DSM systems provide the shared memory interfaces on top of network clusters. Unfortunately, the software and communication overheads are usually very high on such systems. In general the performance of DSMs will be affected greatly by its implementation. In this thesis, we will address two issues in DSMs implemented at the library/user layer: (1) porting sequential programs to such an environment, which is not trivial because accessing to the DSM is non- transparent; (2) large communication overhead in such systems. We implemented a translator to translate a sequential program written in HPF to a parallel program suitable for DSMs. The basic idea is to identify references to shared objects and transform them into calls to the DSM. We improve the performance of the code generated by our translator using the data preloading technique . The main idea is to gather all shared objects (according to the HPF distribution primitives) into local buffers before a loop is executed. Thus, the inter- processor communications are reduced because the number of requests to DSM is decreased. From the experimental results we can observe that the communication cost dominates the overall performance. Therefore, in such environments we can trade memory space for reduced communications. We will also examine the effects of data preloading optimization on the generated code.

Metrics

1 Record Views

Details

Logo image