KR101068669B1 - Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon - Google Patents

Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon Download PDF

Info

Publication number
KR101068669B1
KR101068669B1 KR1020090101541A KR20090101541A KR101068669B1 KR 101068669 B1 KR101068669 B1 KR 101068669B1 KR 1020090101541 A KR1020090101541 A KR 1020090101541A KR 20090101541 A KR20090101541 A KR 20090101541A KR 101068669 B1 KR101068669 B1 KR 101068669B1
Authority
KR
South Korea
Prior art keywords
threads
thread
cone
program
visualization
Prior art date
Application number
KR1020090101541A
Other languages
Korean (ko)
Other versions
KR20110045129A (en
Inventor
김영주
전용기
Original Assignee
한국과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국과학기술원 filed Critical 한국과학기술원
Priority to KR1020090101541A priority Critical patent/KR101068669B1/en
Publication of KR20110045129A publication Critical patent/KR20110045129A/en
Application granted granted Critical
Publication of KR101068669B1 publication Critical patent/KR101068669B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1858Parallel file systems, i.e. file systems supporting multiple processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
    • G06F9/3893Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled in tandem, e.g. multiplier-accumulator
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
    • G06F9/3893Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled in tandem, e.g. multiplier-accumulator
    • G06F9/3895Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled in tandem, e.g. multiplier-accumulator for complex operations, e.g. multidimensional or interleaved address generators, macros
    • G06F9/3897Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled in tandem, e.g. multiplier-accumulator for complex operations, e.g. multidimensional or interleaved address generators, macros with adaptable data path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4494Execution paradigms, e.g. implementations of programming paradigms data driven

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Geometry (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Debugging And Monitoring (AREA)

Abstract

병렬 프로그램에서의 공유 변수에 대한 접근을 3차원 원추 상에 시각화하기 위한 방법, 장치, 및 저장 매체가 개시된다. 시각화 방법은 프로그램에 대한 경합 탐지 결과를 수신하는 단계, 경합 탐지 결과를 분석하여 프로그램의 내포 깊이를 획득하고, 3차원 원추를 시각화한 뒤 내포 깊이에 상응하도록 3차원 원추의 높이를 등분하는 원추 시각화 단계, 프로그램의 실행 중 생성되는 복수 개의 병행 스레드 중 동일한 내포 수준의 스레드를 원추의 동일한 높이에 위치한 원주 상에 시각화하는 스레드 시각화 단계 및 경합 탐지 결과를 분석하여 스레드들 중 공유 변수에 대한 접근 사건들이 발생한 스레드들을 읽기 및 쓰기 접근 사건의 발생 유무 및 발생 선후에 따라 분류하고, 분류된 스레드들을 서로 구별되도록 시각화하는 접근 사건 시각화 단계를 포함한다. A method, apparatus, and storage medium for visualizing access to shared variables in a parallel program on a three-dimensional cone are disclosed. The visualization method includes the steps of receiving a contention detection result for the program, analyzing the contention detection results to obtain the nesting depth of the program, visualizing the three-dimensional cone, and then coniculating the height of the three-dimensional cone to equal the nesting depth. Step, a thread visualization step of visualizing a thread of the same nesting level among a plurality of parallel threads generated during execution of the program on a circumference located at the same height of the cone, and analyzing the contention detection result to analyze the access events of the shared variables among the threads. And classifying the generated threads according to whether or not the read and write access events are generated and their probabilities, and visualizing the classified threads to distinguish them from each other.

OpenMP 병렬 프로그램, 경합 검증, 3차원 확장적 시각화, 병행성 관계 OpenMP parallel program, contention validation, 3D scalable visualization, parallelism

Description

OpenMP프로그램의 접근을 확장형 3차원 원추 상에 시각화하기 위한 방법, 장치, 및 방법을 저장하는 저장 매체{Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon} Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon}

본 발명은 내포 병렬성을 가지는 병렬 프로그램의 디버깅 기법에 관한 것으로서, 특히, 병렬 프로그램에서의 공유 변수에 대한 접근을 3차원 원추 상에 시각화함으로써, 디버깅을 용이하게 하고 프로그램 개발을 효율적으로 수행할 수 있도록 하기 위한 방법, 장치, 및 저장 매체에 관한 것이다. The present invention relates to a debugging technique of a parallel program having nested parallelism. In particular, by visualizing the access to a shared variable in a parallel program on a three-dimensional cone, to facilitate debugging and to efficiently perform program development. A method, apparatus, and storage medium for doing so.

공유 메모리 병렬 프로그램이 수행되는 동안, 하나 이상의 병행 스레드들은 동일한 공유 변수를 이용한다. 따라서, 여러 개의 병행 스레드가 동시에 하나의 공유 변수에 접근하는 경우 적절한 동기화가 수행되지 않으면 자료 경합(data race)이라는 접근 오류가 발생한다. 병렬 프로그램에서 경합이 발생하면 프로그래머가 설계한 것과 다른 실행 결과가 발생될 수 있으며, 이러한 결과는 비결정적 결과(nondeterministic output)이라고 한다. While a shared memory parallel program is running, one or more parallel threads use the same shared variable. Therefore, if multiple concurrent threads access a shared variable at the same time, an access error called data race will occur if proper synchronization is not performed. Conflicts in parallel programs can produce results that differ from those designed by the programmer. These results are called nondeterministic output.

병렬 프로그램 수행시의 스레드들 간의 병행성 관계는 POEG(Partial Order Execution Graph)를 이용하여 나타낼 수 있다. POEG에서 정점(vertex)은 병렬 스레드의 생성/합류 명령 및 임의의 공유 변수에 대한 접근 사건을 나타내고, 간선(arc)은 스레드를 나타낸다. r과 w는 각각 해당 스레드에서의 읽기 및 쓰기 사건을 나타낸다. 임의의 두 사건 ei 및 ej 사이에 경로가 없으면 ei 및 ej는 병행(concurrent)하다고 한다. 동일한 공유 변수에 대한 두 사건들 중에서 하나가 쓰기 사건이면 두 사건은 대립하는 사건이라고 한다. ei 및 ej 가 대립 사건이고 병행한 경우 두 사건이 경합한다고 한다. The parallelism between threads when executing a parallel program can be represented by using a Partial Order Execution Graph (POEG). Vertices in POEG represent the creation / join instructions of parallel threads and access events to any shared variables, and arcs represent threads. r and w represent the read and write events on that thread, respectively. If there is no path between any two events e i and e j then e i and e j are said to be concurrent. If one of the two events for the same shared variable is a write event, the two events are said to be in conflict. If e i and e j are conflicting cases and parallel, the two events are said to be in conflict.

그런데, 산업 표준화를 위한 병렬 프로그램 모델인 OpenMP(Open Multi-Processing)는 공유 메모리를 사용하고 표준 C/C++와 Fortran 77/90을 확장하는 디렉티브와 라이브러리들의 집합이다. OpenMP는 디렉티브를 이용하여 순차적 프로그램을 쉽게 병렬화 할 수 있고, coarse-grain parallelism을 구현할 수 있는 orphan 디렉티브 개념을 제공하여 병렬 프로그램의 확장성을 높여준다. OpenMP에서 제공하는 디렉티브는 병렬화 디렉티브와 동기화 디렉티브가 있다. 병렬화 디렉티브는 새로운 스레드의 생성과 합류를 하는 "#pragma omp parallel for"와 "#pragma omp parallel sections" 등이 있고, 동기화 디렉티브는 스레드간의 수행 순서를 제어하는 "#pragma omp atomic", "#pragma omp barrier", "#pragma omp critical" 등이 있다. 또한 OpenMP는 런타임 수행환경을 제어할 수 있는 라이브러리와 환경 변수들을 제공한다.By the way, OpenMP (Open Multi-Processing), a parallel program model for industrial standardization, is a set of directives and libraries that use shared memory and extend standard C / C ++ and Fortran 77/90. OpenMP makes it easy to parallelize sequential programs using directives and provides the concept of orphan directives to implement coarse-grain parallelism, which increases the scalability of parallel programs. The directives provided by OpenMP include parallelization directives and synchronization directives. Parallelization directives include "#pragma omp parallel for" and "#pragma omp parallel sections" that create and join new threads. Synchronization directives control "#pragma omp atomic" and "#pragma", which control the execution order between threads. omp barrier "and" #pragma omp critical ". OpenMP also provides libraries and environment variables that control the runtime execution environment.

도 1a는 병렬 프로그램의 스레드의 경합을 설명하기 위한 소스 코드이다. 도 1a의 11번 줄에서 "#pragma omp parallel" 디렉티브에 의해서 스레드가 생성된다. 여기서는 2개의 스레드가 생성된다고 가정한다. 생성된 스레드들은 12번 줄의 "#pragma omp for private(i,y,z)" 디렉티브에 의해서 13번 줄의 for 문장부터 19번 줄의 "}" 까지의 반복문 몸체에서 명시된 작업을 할당받는다. 반복문 내에서 첨자 변수인 i, y, z 는 각 스레드에서 사용하는 private 변수이고, 정수형 변수인 x는 두 스레드에서 공유하는 공유 변수이다. x, y, 그리고 z 변수의 초기값은 0으로 한다. 1A is source code for explaining contention of threads in a parallel program. In line 11 of FIG. 1A, a thread is created by the "#pragma omp parallel" directive. This assumes that two threads are created. The created threads are assigned the work specified in the loop body from the for statement on line 13 to the "}" on line 19 by the "#pragma omp for private (i, y, z)" directive on line 12. In the loop, the subscript variables i, y, and z are private variables used by each thread, and the integer variable x is a shared variable shared by both threads. The initial values of the x, y, and z variables are 0.

생성된 두 개의 스레드 중에서 첫 번째 스레드가 수행하는 15번 문장과 두 번째 스레드가 수행하는 18번 문장은 스레드가 병행성 관계에 있지만 "#pragrma omp critical(L1)" 디렉티브로 임계구역이 설정되므로 x에 대한 경합이 존재하지 않아야 한다. 그렇지만 도 1b에서 보는 것처럼 첫 번째 스레드가 수행하는 14번 문장에서 공유 변수 x에 대해 읽기 사건을 수행하고, 두 번째 스레드는 18번 문장에서 공유 변수 x에 대해 쓰기 접근 사건을 수행하면 두 접근 사건간에 경합이 발생한다. 왜냐하면, 14번 문장에 있는 공유 변수 x에 대해서 임계구역으로 보호되지 않았기 때문이다. 두 스레드는 병행적 수행으로 인해 접근 사건들의 수행순서가 변경될 수 있다. 따라서 20번 문장에서 x의 변수 값은 100, 104, 그리고 204 중에서 임의의 값 하나가 출력된다. 이들 값 중에서 104의 값은 공유 변수 x가 임계구역으로 보호되지 않았기 때문에 발생하는 것이다. 따라서 프로그래머가 의도하지 않은 값 일 수 있다. 왜냐하면 두 스레드 사이에 적절한 동기화 없이 병렬 스레드들이 적어도 하나의 쓰기 접근 사건들로 공유 변수인 x에 접근하기 때문이다. 그러므로, 공유 변수 x에 발생한 경합으로 인해서 비결정적 수행결과(nondeterministic output)를 초래할 수 있다. 비결정적 수행결과가 발생한다는 것은 프로그램이 안정적으로 동작하지 않는다는 것을 나타내는 것으로서 반드시 해결하여야 한다. Of the two threads created, sentence 15 executed by the first thread and sentence 18 performed by the second thread have x because the threads are in concurrency, but the critical section is set by the "#pragrma omp critical (L1)" directive. There should be no contention for. However, as shown in FIG. 1B, when the first thread executes a read event on the shared variable x in sentence 14 and the second thread performs a write access event on the shared variable x in sentence 18, Contention occurs. This is because the critical variable for the shared variable x in sentence 14 is not protected. The parallel execution of the two threads may change the order in which access events occur. Therefore, in the 20th sentence, a random value of x is output from 100, 104, and 204. Of these values, a value of 104 occurs because the shared variable x is not protected by the critical zone. Therefore, the value may not be intended by the programmer. This is because parallel threads access the shared variable x with at least one write access event without proper synchronization between the two threads. Therefore, contention on shared variable x may result in nondeterministic output. The occurrence of nondeterministic results indicates that the program does not run reliably and must be resolved.

도 1b는 도 1a에 도시된 의사 코드가 실행될 때의 POEG를 예시하는 도면이다. 여기서 POEG (Partial Order Execution Graph)는 병렬 프로그램의 논리적 순서관계를 그래프로 나타낸 것이다. 도 1b에서

Figure 112009065242574-pat00001
기호와
Figure 112009065242574-pat00002
기호로 지정된 영역은 록 변수인 L1의 임계구역을 의미한다. 도 1b에서 T1 스레드에 r1과 T2 스레드에 w4는 병행관계에 있고 r1이 임계구역으로 보호되어 있지 않기 때문에 w4와 경합이라는 것을 알 수 있다. 그런데, 병렬 프로그램이 복잡해질수록 동시에 수행되는 스레드의 개수도 증가하고, 모든 접근 사건들의 경합을 일목요연하게 판단하기 곤란하다. FIG. 1B is a diagram illustrating a POEG when the pseudo code shown in FIG. 1A is executed. Here, the Partial Order Execution Graph (POEG) is a graph showing the logical ordering relationship of parallel programs. In FIG. 1B
Figure 112009065242574-pat00001
Symbols and
Figure 112009065242574-pat00002
The area designated by the symbol means the critical area of the lock variable L1. It can be seen from FIG. 1B that w1 is in parallel with the thread T1 and w4 in the thread T2, and because w1 is not protected by the critical section, it is contended with w4. However, as the parallel program becomes more complex, the number of threads executed simultaneously increases, and it is difficult to judge the contention of all access events at a glance.

그러므로, 병렬 프로그램의 접근을 일목요연하게 도시함으로써 사용자로 하여금 병렬 프로그램을 손쉽게 디버깅함으로써 프로그램 개발 시간을 줄임은 물론 프로그램의 동작 안정성을 향상시키기 위한 기술이 절실히 요구된다.Therefore, by showing the parallel program approach at a glance, there is an urgent need for a user to easily debug the parallel program, thereby reducing the program development time and improving the operational stability of the program.

본 발명의 목적은 병렬 프로그램의 경합 탐지 결과를 일목요연하게 도시할 수 있는 방법을 제공하는 것이다. SUMMARY OF THE INVENTION An object of the present invention is to provide a method capable of showing the contention detection results of a parallel program at a glance.

본 발명의 다른 목적은 병렬 프로그램의 수행 구조를 논리적으로 이해할 수 있도록 함으로써 탐지된 경합들에 대한 원인을 쉽게 규명할 뿐만 아니라, 디버깅을 위해 직관적인 정보를 제공할 수 있는 시각화 장치를 제공하는 것이다. Another object of the present invention is to provide a visualization apparatus capable of logically understanding the execution structure of a parallel program so that not only the cause of detected contentions can be easily identified, but also intuitive information can be provided for debugging.

상기와 같은 목적들을 달성하기 위한 본 발명의 일면은, OpenMP 프로그램의 접근을 확장형 3차원 원추 상에 시각화하기 위한 방법에 관한 것으로서, 프로그램에 대한 경합 탐지 결과를 수신하는 단계, 경합 탐지 결과를 분석하여 프로그램의 내포 깊이를 획득하고, 3차원 원추를 시각화한 뒤 내포 깊이에 상응하도록 3차원 원추의 높이를 등분하는 원추 시각화 단계, 프로그램의 실행 중 생성되는 복수 개의 병행 스레드 중 동일한 내포 수준의 스레드를 원추의 동일한 높이에 위치한 원주 상에 시각화하는 스레드 시각화 단계 및 경합 탐지 결과를 분석하여 스레드들 중 공유 변수에 대한 접근 사건들이 발생한 스레드들을 읽기 및 쓰기 접근 사건의 발생 유무 및 발생 선후에 따라 분류하고, 분류된 스레드들을 서로 구별되도록 시각화하는 접근 사건 시각화 단계를 포함한다. 특히, 원추 시각화 단계는, 각 내포 수준 내에 다중 루프(multi-way loop)가 존재하는지 판단하는 단계 및 다중 루프가 존재하는지 여부를 해당 내포 수준에 표시하는 단계를 포함한다. 또한, 스레드 시 각화 단계는 스레드들 중 임계 구역(critical section)을 포함하는 스레드를 결정하고, 임계 구역을 포함하는 스레드를 록 변수에 따라 상이한 색깔로 구별되도록 표시하는 단계를 포함한다. 더 나아가, 스레드 시각화 단계는 병행 스레드들 간의 병행성에 기반하여 스레드들 간의 거리를 결정하고, 원추 상에 스레드들을 결정된 거리만큼 이격되게 각각 표시하며, 스레드들 중 자식 스레드를 포함하는 부모 스레드를 자식 스레드와 구별되도록 표시하는 수직적 추상화 단계를 더 포함한다. 또한, 스레드 시각화 단계는 원추 상의 동일한 원추 상에 위치된 스레드들 중 소정 개수의 스레드들을 하나의 스레드로 표시하는 수평적 추상화 단계를 더 포함한다. 바람직하게는, 접근 사건 시각화 단계는 스레드들을 접근 사건이 발생되지 않은 스레드, 읽기 접근 사건이 쓰기 접근 사건보다 먼저 발생한 스레드, 쓰기 접근 사건이 읽기 접근 사건보다 먼저 발생한 스레드로 각각 분류하는 단계 및 분류된 스레드들을 서로 구별되도록 표시하는 단계를 포함한다. 더 나아가, 접근 사건 시각화 단계는, 스레드들을 접근 사건이 발생되지 않은 스레드, 읽기 접근 사건이 쓰기 접근 사건보다 먼저 발생한 스레드, 쓰기 접근 사건이 읽기 접근 사건보다 먼저 발생한 스레드로 각각 분류하는 단계 및 분류된 스레드들을 서로 구별되도록 표시하는 단계를 포함한다. One aspect of the present invention for achieving the above object, relates to a method for visualizing the access of an OpenMP program on an extended three-dimensional cone, receiving a contention detection result for the program, by analyzing the contention detection results A cone visualization step of acquiring the nesting depth of the program, visualizing the three-dimensional cones, and then dividing the height of the three-dimensional cones to correspond to the nesting depths. Analyze the thread visualization step and contention detection result to visualize on the circumference located at the same height of, and classify the threads where the access event to the shared variable among the threads occur according to whether or not the read and write access event occurs and after Event visualization to visualize partitioned threads from one another Steps. In particular, the cone visualization step includes determining whether a multi-way loop exists within each nesting level and indicating whether there is a multi-loop present at the nesting level. In addition, the thread visualization step includes determining a thread including a critical section of the threads, and marking the thread including the critical section to be distinguished in different colors according to the lock variable. Further, the thread visualization step determines the distance between the threads based on the concurrency between the parallel threads, marks each of the threads on the cone spaced apart by the determined distance, and displays the parent thread including the child thread among the threads. It further includes a vertical abstraction step to distinguish it from. In addition, the thread visualization step further includes a horizontal abstraction step of representing a predetermined number of threads as one thread among the threads located on the same cone on the cone. Preferably, the access event visualization step is to classify the threads into a thread that does not have an access event, a thread in which a read access event occurs before a write access event, and a thread in which a write access event occurs before a read access event, respectively. Marking the threads to be distinct from one another. Furthermore, the access event visualization step is to classify the threads into a thread that does not have an access event, a thread in which a read access event occurs before a write access event, and a thread in which a write access event occurs before a read access event, respectively. Marking the threads to be distinct from one another.

상기와 같은 목적들을 달성하기 위한 본 발명의 다른 면은, 본 발명의 일면에 따른 방법을 구현하기 위한 명령어들을 포함하는 컴퓨터 프로그램을 기록하는 기록 매체에 관한 것이다. Another aspect of the present invention for achieving the above objects relates to a recording medium for recording a computer program comprising instructions for implementing the method according to one aspect of the present invention.

상기와 같은 목적들을 달성하기 위한 본 발명의 또다른 면은, OpenMP 프로그 램의 접근을 확장형 3차원 원추 상에 시각화하기 위한 장치로서, 프로그램에 대한 경합 탐지 결과를 수신하는 사용자 인터페이스, 경합 탐지 결과를 분석하여 프로그램의 내포 깊이를 획득하고, 3차원 원추를 시각화한 뒤 내포 깊이에 상응하도록 3차원 원추의 높이를 등분하는 원추 시각화 모듈, 프로그램의 실행 중 생성되는 복수 개의 병행 스레드 중 동일한 내포 수준의 스레드를 원추의 동일한 높이에 위치한 원주 상에 시각화하는 스레드 시각화 모듈, 및 경합 탐지 결과를 분석하여 스레드들 중 공유 변수에 대한 접근 사건들이 발생한 스레드들을 읽기 및 쓰기 접근 사건의 발생 유무 및 발생 선후에 따라 분류하고, 분류된 스레드들을 서로 구별되도록 시각화하는 접근 사건 시각화 모듈을 포함하는 장치에 관한 것이다. 원추 시각화 모듈은, 각 내포 수준 내에 다중 루프(multi-way loop)가 존재하는지 판단하고, 다중 루프가 존재하는지 여부를 해당 내포 수준에 더욱 표시하는 것을 특징으로 한다. 또한, 스레드 시각화 모듈은, 스레드들 중 임계 구역(critical section)을 포함하는 스레드를 결정하고, 임계 구역을 포함하는 스레드를 록 변수에 따라 상이한 색깔로 구별되도록 더욱 표시한다. 더 나아가, 스레드 시각화 모듈은, 병행 스레드들 간의 병행성에 기반하여 스레드들 간의 거리를 결정하고, 원추 상에 스레드들을 결정된 거리만큼 이격되게 각각 표시하며, 스레드들 중 자식 스레드를 포함하는 부모 스레드를 자식 스레드와 구별되도록 표시하는 수직적 추상화 모듈을 더 포함한다. 또는, 스레드 시각화 모듈은 원추 상의 동일한 원추 상에 위치된 스레드들 중 소정 개수의 스레드들을 하나의 스레드로 표시하는 수평적 추상화 모듈을 더 포함한다. 또한, 접근 사건 시각화 모듈은, 스레드들을 접근 사건이 발생되지 않은 스 레드, 읽기 접근 사건이 쓰기 접근 사건보다 먼저 발생한 스레드, 쓰기 접근 사건이 읽기 접근 사건보다 먼저 발생한 스레드로 각각 분류하고, 분류된 스레드들을 서로 구별되도록 더욱 표시하는 것을 특징으로 한다. Another aspect of the present invention for achieving the above object is an apparatus for visualizing the access of the OpenMP program on an extended three-dimensional cone, a user interface for receiving a contention detection result for the program, contention detection results A cone visualization module that analyzes to obtain the nesting depth of the program, visualizes the three-dimensional cones, and then divides the height of the three-dimensional cones to correspond to the nesting depths. Is a thread visualization module for visualizing the circumference on the same circumference of the cone, and analyzes the contention detection result to classify the occurrences of read and write access events and whether or not they occur after the occurrence of access events to shared variables among the threads. And visualize classified threads to distinguish them from each other An apparatus comprising a visualization module is provided. The cone visualization module may determine whether a multi-way loop exists within each nesting level, and further indicate whether the multi-loop exists. In addition, the thread visualization module determines which thread includes a critical section of the threads and further displays the thread comprising the critical section to be distinguished in different colors according to the lock variable. Further, the thread visualization module determines the distance between the threads based on the concurrency between the parallel threads, marks each of the threads on the cone apart by the determined distance, and displays the parent thread including the child thread among the threads. It further includes a vertical abstraction module that marks the thread as distinct. Alternatively, the thread visualization module further includes a horizontal abstraction module that indicates, as one thread, a predetermined number of threads located on the same cone on the cone. In addition, the access event visualization module classifies the threads into threads that do not have an access event, threads where a read access event occurs before a write access event, and threads where a write access event occurs before a read access event. It is characterized in that further display to distinguish them from each other.

본 발명에 의하여, 병렬 프로그램의 경합 탐지 결과를 일목요연하게 도시할 수 있으므로, 프로그램의 개발 시간을 단축할 수 있다. According to the present invention, since the contention detection result of the parallel program can be illustrated at a glance, the development time of the program can be shortened.

또한, 본 발명에 의하여, 병렬 프로그램의 수행 구조를 프로그래머가 직관적이고 논리적으로 이해할 수 있기 때문에, 탐지된 경합의 원인을 쉽게 규명할 수 있으므로 프로그램의 수행 결과의 안정성을 확보할 수 있다. In addition, according to the present invention, since the programmer can intuitively and logically understand the execution structure of the parallel program, it is possible to easily identify the cause of the detected contention, thereby ensuring the stability of the result of the program execution.

본 발명과 본 발명의 동작상의 이점 및 본 발명의 실시에 의하여 달성되는 목적을 충분히 이해하기 위해서는 본 발명의 바람직한 실시예를 예시하는 첨부 도면 및 첨부 도면에 기재된 내용을 참조하여야만 한다. In order to fully understand the present invention, the operational advantages of the present invention, and the objects achieved by the practice of the present invention, reference should be made to the accompanying drawings which illustrate preferred embodiments of the present invention and the contents described in the accompanying drawings.

이하, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예를 설명함으로서, 본 발명을 상세히 설명한다. 그러나, 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며, 설명하는 실시예에 한정되는 것이 아니다. 그리고, 본 발명을 명확하게 설명하기 위하여 설명과 관계없는 부분은 생략되며, 도면의 동일한 참조부호는 동일한 부재임을 나타낸다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. In addition, in order to clearly describe the present invention, parts irrelevant to the description are omitted, and the same reference numerals in the drawings indicate the same members.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 “포함”한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라, 다른 구 성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 “...부”, “...기”, “모듈”, “블록” 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. Throughout the specification, when a part is said to "include" a certain component, this means that it may further include other components, without excluding other components unless otherwise stated. The terms "part", "unit", "module", "block", and the like described in the specification mean units for processing at least one function or operation, And a combination of software.

도 2는 본 발명의 일면에 의한 OpenMP 프로그램의 접근을 확장형 3차원 원추 상에 시각화하기 위한 방법을 개념적으로 나타내는 흐름도이다. 2 is a flowchart conceptually illustrating a method for visualizing an approach of an OpenMP program on an extended three-dimensional cone according to one aspect of the present invention.

도 2를 참조하면, 우선 본 발명에 의한 시각화 방법은 OpenMP 프로그램의 접근에 대한 분석 결과인 경합 탐지 결과를 수신한다(S210). 경합 탐지 결과는 OpenMP 프로그램의 수행중 경합 탐지 동작을 수행한 결과를 나타낸다. 즉, 경합 탐지 결과는, 복수 개의 병행 스레드에 대한 접근 사건들을 동기화 명령어 포함 여부를 기준으로 분류하고, 공유 변수에 대한 각 접근 사건들 중 접근 역사에 저장된 이전의 접근 사건과 병행성 관계에 있는 접근 사건을 경합으로 탐지함으로써 작성될 수 있다. Referring to FIG. 2, first, the visualization method according to the present invention receives a contention detection result that is an analysis result of an approach of an OpenMP program (S210). The contention detection result shows the result of the contention detection operation during the execution of the OpenMP program. That is, the contention detection result classifies access events for a plurality of parallel threads based on whether a synchronization instruction is included and accesses that are in parallel with previous access events stored in the access history among each access event for shared variables. Can be written by detecting an event as contention.

경합 탐지 결과는 내포 수준에 대한 정보, 스레드에 대한 정보, 및 접근 사건에 대한 정보를 포함할 수 있다. 특히, 내포 수준에 대한 정보는 합류 심벌(Join symbol) 및 내포 깊이(Nesting depth)를 포함할 수 있으며, 스레드 정보 및 접근 사건 정보는 소스 코드 라인 번호(Source code line no), 사건 타입(Event type), English-Hebrew 레이블(EH-Label), 루프 인덱스(Loop index), 내포 수준(Nesting level), 및 록 변수(Lock variables)들을 포함할 수 있다. The contention detection result may include information about nesting levels, information about threads, and information about access events. In particular, the information on the nesting level may include a join symbol and nesting depth, and the thread information and the access event information may include a source code line number and an event type. ), An English-Hebrew label (EH-Label), a loop index, a nesting level, and lock variables.

경합 탐지 결과가 수신되면 이를 분석하여(S220) 분석된 내포 깊이에 따라 3 차원 원추의 높이를 등분한다(S230). 즉, 3차원 원추를 도시한 후, nesting depth 정보를 독출하여 이에 따라서 3차원 원추의 높이를 등분한다. When the contention detection result is received (S220), the height of the 3D cone is equally divided according to the analyzed nesting depth (S230). That is, after the three-dimensional cone is shown, the nesting depth information is read out and the height of the three-dimensional cone is equally divided accordingly.

도 3은 도 2에 도시된 방법에 포함되는 원추 시각화 단계가 수행된 결과를 예시하는 도면이다. 도 3에는 내포 수준이 3인 병렬 프로그램을 도시한다. 내포 수준이 3이기 때문에 도시된 원추의 높이는 3등분된다. 이 때, 각 내포 수준 내에 다중 루프(multi-way loop)가 존재할 경우, 다중 루프가 존재함을 콤보 박스로 표시한다. 범례에 설명된 바와 같이, 다중 루프인 경우 아랫방향 화살표로 표시하고, 원웨이 루프일 경우에는 굵은 점으로 표시한다. 이와 같이 다중 루프와 원웨이 루프를 상이한 심벌을 이용하여 도시함으로써, 사용자가 직관적으로 다중 루프의 존재 여부를 파악할 수 있다. FIG. 3 is a diagram illustrating a result of performing a cone visualization step included in the method illustrated in FIG. 2. 3 shows a parallel program with a nesting level of three. Since the nesting level is 3, the height of the cone shown is divided into three. At this time, if there are multi-way loops within each nesting level, a combo box indicates that multiple loops exist. As explained in the legend, in the case of multiple loops it is indicated by the down arrow, in the case of one-way loops it is indicated by bold dots. As such, the multiple loop and the one-way loop are illustrated using different symbols, so that the user can intuitively determine the existence of the multiple loop.

원추 추상화 단계가 수행되면, 동일한 내포 수준에 속하는 스레드를 동일한 높이에 위치한 원주 상에 시각화한다(S240). When the cone abstraction step is performed, the threads belonging to the same nesting level are visualized on the circumference located at the same height (S240).

도 4는 도 2에 도시된 방법에 포함되는 스레드 시각화 단계가 수행된 결과를 예시하는 도면이다. 이 때, 스레드는 범례에 나타난 바와 같이 확장가능한 스레드(scalable thread)인지 여부, 비-접근 스레드인지, 및 임계 구역을 포함하는지 여부에 따라 각각 상이한 심벌을 이용하여 도시된다. 따라서, 사용자는 도시된 스레드의 심벌만 보고서 용이하게 각 심벌의 속성을 파악할 수 있다. 4 is a diagram illustrating a result of performing a thread visualization step included in the method illustrated in FIG. 2. At this time, the threads are shown using different symbols, respectively, depending on whether they are scalable threads, non-access threads, and critical sections as shown in the legend. Therefore, the user can easily grasp the attributes of each symbol by easily reporting only the symbol of the thread shown.

그런데, 동일한 내포 수준에 포함되는 스레드의 개수는 매우 많을 수 있으며, 이 경우 한정된 원주 상에 모든 스레드를 도시하는 것이 불가능할 수 있다. 또는, 모든 스레드를 한정된 원주 상에 도시하는 것이 가능하더라도, 이 경우 각 스 레드의 속성을 파악하기에 너무 복잡할 수 있다. 그러므로, 본 발명에 따른 시각화 방법은 도시된 POEG의 시각적/공간적 복잡도를 줄이기 위해서 수직적/수평적 추상화가 필요한지 판단한다(S250). 판단 결과 추상화가 필요하다면, 하나 이상의 스레드를 각각 수직 및 수평 방향으로 접고 펼칠 수 있는 수직 및 수평 추상화 단계(S260)가 수행된다. However, the number of threads included in the same nesting level may be very large, in which case it may be impossible to show all the threads on a limited circumference. Alternatively, although it is possible to show all threads on a finite circumference, in this case it may be too complicated to grasp the attributes of each thread. Therefore, the visualization method according to the present invention determines whether vertical / horizontal abstraction is necessary to reduce the visual / spatial complexity of the illustrated POEG (S250). As a result of the determination, if the abstraction is necessary, vertical and horizontal abstraction steps S260 may be performed to fold and unfold one or more threads in the vertical and horizontal directions, respectively.

도 5는 도 2에 도시된 스레드 시각화 단계에 포함되는 수직적 추상화 단계를 수행한 결과를 예시하는 도면이며, 도 6은 수평적 추상화 단계를 수행한 결과를 예시하는 도면이다. FIG. 5 is a diagram illustrating a result of performing a vertical abstraction step included in the thread visualization step illustrated in FIG. 2, and FIG. 6 is a diagram illustrating a result of performing a horizontal abstraction step.

수직적 추상화 기법은 스레드간의 각도를 이용하여 3차원 원뿔 상에 하나의 스레드는 하나의 원형 심벌로 추상화하는 기법이다. 이 경우, 추상화된 스레드인지 여부를 포함하기 위하여 자식 스레드의 포함여부에 따라서 부모 스레드가 자식 스레드를 포함하고 있지만 부모 스레드가 표시하지 않았다면 추상화된 부모 스레드의 원형 심벌 내에 +를 추가하여

Figure 112009065242574-pat00003
모양으로 하고 부모 스레드가 단말 스레드이거나 부모 스레드가 포함하고 있는 자식 스레드들을 표현하고 있다면 추상화 된 부모 스레드의 원형 심벌 내에 -를 추가하여
Figure 112009065242574-pat00004
모양으로 추상화한다. 전술된 바와 같이 원형 심벌의 둘레가 굵은 선이며 색이 입혀진 심벌은 추상화 된 스레드 내에 임계구역(critical section)을 포함하고 있다는 의미한다. In the vertical abstraction technique, a thread abstracts a thread into a circular symbol on a three-dimensional cone using an angle between threads. In this case, if the parent thread contains a child thread but does not indicate that the child thread is included to include whether it is an abstracted thread, add a + in the circle symbol of the abstracted parent thread.
Figure 112009065242574-pat00003
If the parent thread is a terminal thread or represents a child thread that the parent thread contains, add a-to the circle symbol of the abstracted parent thread.
Figure 112009065242574-pat00004
Abstract into shapes. As described above, the circular symbol is surrounded by a thick line and the colored symbol means that it includes a critical section in the abstracted thread.

수평적 추상화 기법은 동일한 원뿔 상에 표현되는 스레드들의 시각적 공간 복잡도를 줄이기 위한 것이다. 원뿔 상에 스레드가 수직적으로 추상화되었다 하더라도 여전히 시각적 공간복잡도가 크기 때문에 수평적 추상화 기법을 이용하여 여 러 개의 스레드를 하나의 스레드로 표현함으로써 스레드 복잡성을 줄이는 것도 가능하다. 즉 복잡성의 비율 조절을 통해 전체 스레드가 아닌 수평적으로 추상화된 스레드가 원뿔 상에 표시된다. 도 5를 참조하면, 내포수준 2에서는 4:1 비율로 추상화 된 것이고 내포수준 3에서는 2:1로 추상화 된 것이다.The horizontal abstraction technique is intended to reduce the visual spatial complexity of threads represented on the same cone. Even though the threads are abstracted vertically on the cone, it is still possible to reduce the complexity of the thread by using a horizontal abstraction technique to represent multiple threads as a single thread because of the large visual space complexity. In other words, by adjusting the ratio of complexity, horizontally abstracted threads are displayed on the cone, not the entire thread. Referring to FIG. 5, the nesting level 2 is abstracted at 4: 1 ratio and the nesting level 3 is abstracted at 2: 1.

도 5 및 도 6으로부터 알 수 있는 바와 같이, 본 발명은 OpenMP 프로그램의 수행구조를 3차원 원추 상에 확장적으로 시각화하여 직관적으로 경합을 탐지할 수 있는 환경을 제공한다. 3차원 추상상의 시각화는 시각화의 한계를 위해서 스레드간의 병행성 관계를 효과적으로 표현할 수 있는 POEG(Partial Order Execution Graph)의 개념을 이용한다. 그리고 확장적 시각화는 시각적 복잡성을 줄이기 위해서 추상화 기법을 이용한다. 이 기법은 복잡성의 원인이 되는 스레드, 접근사건, 동기화 등에 대해서 상징적인 의미를 부여한 심벌로 대체함으로써 시각적 복잡성을 해결한다. As can be seen from Figures 5 and 6, the present invention provides an environment that can intuitively detect contention by extensively visualizing the execution structure of the OpenMP program on a three-dimensional cone. The visualization of three-dimensional abstraction uses the concept of Partial Order Execution Graph (POEG) that can effectively express the parallelism between threads for the limitation of visualization. Extensive visualization uses abstraction techniques to reduce visual complexity. This technique solves visual complexity by replacing symbols with symbolic meanings for threads, access events, and synchronization that cause complexity.

스레드가 시각화되면, 각 스레드들 중 공유 변수에 대한 접근 사건들이 발생한 스레드들을 읽기 및 쓰기 접근 사건의 발생 유무 및 발생 선후에 따라 분류한다. 그리고, 분류된 스레드에 따라 상이한 심벌을 이용하여 각 스레드를 차등적으로 시각화하는 접근 사건 시각화 단계가 수행된다(S270). When a thread is visualized, the threads in which access events for shared variables among the threads are generated are classified according to whether or not read and write access events occur and after the occurrence. Then, an access event visualization step of differentially visualizing each thread using different symbols according to the classified threads is performed (S270).

도 7은 도 2에 도시된 방법에 포함되는 접근 사건 시각화 단계가 수행된 결과를 예시하는 도면이다. FIG. 7 is a diagram illustrating a result of performing an approach event visualization step included in the method illustrated in FIG. 2.

접근 사건 시각화 과정은 스레드 시각화 과정과 유사하지만 시각화하는 대상이 공유 변수에 대한 접근사건들이라는 점이 다르다. 접근 사건의 종류는 읽기와 쓰기 접근사건이 발생되지 않은 스레드 심벌인 non-access thread, 읽기 접근사건이 먼저 발생한 스레드 심벌인 read-first thread, 그리고 쓰기 접근사건이 먼저 발생한 스레드 심벌인 write-first thread 등이 있다. 접근 사건 시각화 기법에도 스레드 시각화 과정에서와 동일하게 수직적 추상화 기법과 수평적 추상화 기법이 적용될 수 있다. 수직적 추상화 기법은 스레드 추상화에서 제공하는 기능과 동일하게 +와 -를 심벌을 이용한다. The access event visualization process is similar to the thread visualization process, except that the objects to be visualized are access events for shared variables. The types of access events are: non-access thread, which is a thread symbol where no read or write access occurred, read-first thread, which is the thread symbol in which a read access occurred first, and write-first thread, which is the thread symbol in which a write access occurred first. Etc. In the approach event visualization technique, the vertical abstraction technique and the horizontal abstraction technique may be applied in the same manner as in the thread visualization process. The vertical abstraction technique uses the + and-symbols as well as the functionality provided by thread abstraction.

접근 사건 추상화 기법에서 이용되는 심벌들은 도 8에 예시된다. The symbols used in the access event abstraction technique are illustrated in FIG. 8.

도 8에 예시된 심벌을 참조하여 도 7을 설명하면, 도 7의 내포수준 1에서 오른쪽에 있는

Figure 112009065242574-pat00005
심벌은 스레드에 공유변수에 대한 접근사건이 발생하지 않은 스레드이며 자식 스레드들을 포함하고 있다. 내포수준 2에서 앞쪽에 있는
Figure 112009065242574-pat00006
심벌은 스레드에서 공유변수에 대해서 쓰기접근사건이 먼저 발생한 것이고 둘레가 굵은 선이고 색이 입혀져 있기 때문에 임계구역 내에 추상화 된 쓰기 접근사건임을 알 수 있다. 그리고 색은 록 변수마다 다르다. 그리고 수평적 추상화 기법은 Thread 추상화에서 지원하는 수평적 추상화 기법과 동작원리는 동일하다. Referring to FIG. 7 with reference to the symbols illustrated in FIG. 8, the right-hand side at nesting level 1 of FIG. 7 is described.
Figure 112009065242574-pat00005
A symbol is a thread that has never had access to a shared variable and contains child threads. Forward at nesting level 2
Figure 112009065242574-pat00006
The symbol is a write access event that occurs first on the shared variable in the thread and is an abstract write access event within the critical area because of the thick line and the colored line. And the color is different for each lock variable. And the horizontal abstraction technique is the same as the horizontal abstraction technique supported by Thread abstraction.

도 9는 본 발명의 다른 면에 의한 3D 시각화 장치를 개념적으로 나타내는 블록도이다. 9 is a block diagram conceptually illustrating a 3D visualization apparatus according to another aspect of the present invention.

도 9에 도시된 바와 같이, 본 발명에 의한 3D 시각화 장치(900)는 원추 시각화 모듈(910), 스레드 시각화 모듈(920), 및 접근 사건 시각화 모듈(930)을 포함한다. As shown in FIG. 9, the 3D visualization apparatus 900 according to the present invention includes a cone visualization module 910, a thread visualization module 920, and an approach event visualization module 930.

원추 시각화 모듈(910)은 경합 탐지 결과를 분석하여 얻은 내포 깊 이(nesting depth) 값에 따라 (1/ nesting depth * each level number)의 비율로 3차원 원추를 도시한다. 원추 시각화 모듈(910)에서 수행하는 동작의 의사 코드는 다음과 같다. Cone visualization module 910 shows a three-dimensional cone in the ratio of (1 / nesting depth * each level number) according to the nesting depth value obtained by analyzing the contention detection results. The pseudo code of the operation performed in the cone visualization module 910 is as follows.

for(a=0;a<levelstore;a++){ // each level numberfor (a = 0; a <levelstore; a ++) {// each level number

::

glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient); // 광원 함수glLightModelfv (GL_LIGHT_MODEL_AMBIENT, ambient); // light source function

glRotatef(90.0, 1.0, 0.0, 0.0); // 위치 함수glRotatef (90.0, 1.0, 0.0, 0.0); // position function

gluCylinder(PencilObj, 0.0, 1.0-(1.0/levelstore*a), 1.0-1.0/levelstore*a,20, 2);gluCylinder (Pencil Obj, 0.0, 1.0- (1.0 / levelstore * a), 1.0-1.0 / levelstore * a, 20, 2);

// 원뿔그리기 - 지름 0, 반지름/높이 1.0-(1.0/levelstore*a), 옆면 20각// draw cone-diameter 0, radius / height 1.0- (1.0 / levelstore * a), side 20 angle

}}

※ nesting depth = levelstore, each level number = a※ nesting depth = levelstore, each level number = a

원추가 도시되면, 스레드 시각화 모듈(920)은 프로그램의 실행 중 생성되는 복수 개의 병행 스레드 중 동일한 내포 수준의 스레드를 원추의 동일한 높이에 위치한 원주 상에 시각화한다. 여기서, 높이는 high[level] = (1.0 / levelmax) * (each level number) * (main cone high)을 이용하여 계산되고, 각도는 degree[level] = (360 / (each level thread total number) )을 이용하여 계산될 수 있다. 그러면, 도시되는 각 심벌의 위치 좌표는 X: high[level] * cos(degree[level] * thread number), Y: high[level] * sin(degree[level] * thread number), 및 Z: high[level]로 계산될 수 있다. When the cone is shown, the thread visualization module 920 visualizes threads of the same nesting level among the plurality of parallel threads created during execution of the program on the circumference located at the same height of the cone. Here, the height is calculated using high [level] = (1.0 / levelmax) * (each level number) * (main cone high), and the angle is degree [level] = (360 / (each level thread total number)) Can be calculated using. Then, the position coordinate of each symbol shown is X: high [level] * cos (degree [level] * thread number), Y: high [level] * sin (degree [level] * thread number), and Z: high can be calculated as [level].

스레드 시각화 모듈(920)에서 수행되는 동작의 의사 코드는 다음과 같다. The pseudo code of the operation performed in the thread visualization module 920 is as follows.

if(lev[1][0] != 0) { if (lev [1] [0]! = 0) {

degree[1] = (3.141592) / 180 * (360/lev[1][0]); // 각도 (Level 1)degree [1] = (3.141592) / 180 * (360 / lev [1] [0]); // angle (Level 1)

high[1] = (1.0 / levelstore); // 높이 (Level 1)high [1] = (1.0 / levelstore); // height (Level 1)

::

glBegin(GL_LINES); // 스레드 그림 시작glBegin (GL_LINES); // start thread figure

glVertex3f(0,0,0); // 스레드 시작점glVertex3f (0,0,0); // thread entry point

glVertex3f(high[1]*cos(degree[1]*b)+0.01,high[1]*sin(degree[1]*b)+0.01,high[1]-0.01);glVertex3f (high [1] * cos (degree [1] * b) +0.01, high [1] * sin (degree [1] * b) +0.01, high [1] -0.01);

glEnd(); // 스레드 끝점 및 그림 마침glEnd (); // finish the thread endpoint and figure

::

glutSolidSphere(0.043,20,20); // Non-Access 심벌인 원구 표현glutSolidSphere (0.043,20,20); // representation of sphere as non-access symbol

스레드가 시각화되면, 접근 사건 시각화 모듈(930)이 각 스레드를 분류하고 차등적으로 도시한다. 여기서, 도시되는 심벌의 위치 좌표는 스레드 시각화 모듈(920)에서 연산한 값과 동일하지만, 접근 사건 시각화 모듈(930)은 도시된 스레드를 read-first, write-first 심벌 등으로 구분하여 다시 도시한다. Once the threads are visualized, the access event visualization module 930 classifies and differentially shows each thread. Here, the position coordinates of the symbol shown are the same as the value calculated by the thread visualization module 920, but the access event visualization module 930 divides the illustrated thread into read-first, write-first symbols, and the like. .

접근 사건 시각화 모듈(930)에서 수행되는 동작을 나타내는 의사 코드는 다음과 같다. Pseudo code representing an action performed in the access event visualization module 930 is as follows.

if(lev[1][0] != 0) { if (lev [1] [0]! = 0) {

degree[1] = (3.141592) / 180 * (360/lev[1][0]); // 각도 (Level 1)degree [1] = (3.141592) / 180 * (360 / lev [1] [0]); // angle (Level 1)

high[1] = (1.0 / levelstore); } // 높이 (Level 1)high [1] = (1.0 / levelstore); } // height (Level 1)

::

glBegin(GL_LINES); // 스레드 그림 시작glBegin (GL_LINES); // start thread figure

glVertex3f(0,0,0); // 스레드 시작점glVertex3f (0,0,0); // thread entry point

glVertex3f(high[1]*cos(degree[1]*b)+0.01,high[1]*sin(degree[1]*b)+0.01,high[1]-0.01);glVertex3f (high [1] * cos (degree [1] * b) +0.01, high [1] * sin (degree [1] * b) +0.01, high [1] -0.01);

glEnd(); // 스레드 끝점 및 그림 마침glEnd (); // finish the thread endpoint and figure

::

redraw( ); // Non-Access 대신 Read-first, Write-first 심벌 표현redraw (); // Read-first, Write-first symbol instead of Non-Access

이상 설명한 바와 같이, 본 발명은 OpenMP 프로그램에서 발생하는 자료 경합을 최적의 기능과 성능으로 3차원으로 확장적 시각화를 할 수 있는 도구이다. As described above, the present invention is a tool that can visualize data contention generated in an OpenMP program in three dimensions with optimal function and performance.

본 발명에 의하여, 추상적 개념을 이용한 확장적 시각화 도구를 이용하여 병렬 프로그램의 수행구조를 논리적으로 이해할 수 있다. 또한, 그리고 최근의 CPU의 발전 동향을 살펴보면, 싱글 코어를 가진 펜티엄 4에서 듀얼 코어를 가진 펜티엄 D로 발전하고 있는 추세이다. 이것은 앞으로 병렬 컴퓨팅이 절실히 요구된다는 의미로 해석할 수 있을 것이다. 이러한 병렬 컴퓨팅에서 발생하는 오류들은 순차 프로그램에서 발생하는 오류보다 탐지하기가 어렵고, 오류가 탐지되더라도 디버깅이 쉽지 않을 것이다. 따라서 병렬 프로그램에서 발생한 오류들을 탐지하고 디버깅하기 위해 많은 시간과 노력이 필요하게 될 것이다. 이러한 점에서, 본 연구에서 제안하는 도구는 이러한 도구의 개발 분야에서 영향이 클 것이다. 먼저, 도구의 이론적인 부분은 병렬 컴퓨팅 환경에서의 성능을 향상시키거나 시각적 결과를 요하는 분야에서 사용될 수 있다. 그리고 기술적인 부분은 표준화되어 있는 OpenMP 프로그램을 위한 디버깅 도구의 산업 표준화를 적극적으로 지원할 수 있다.According to the present invention, it is possible to logically understand the execution structure of a parallel program by using an extended visualization tool using an abstract concept. Also, if you look at the recent development of the CPU, the trend is moving from Pentium 4 with single core to Pentium D with dual core. This could be interpreted to mean that parallel computing is desperately needed. Errors occurring in such parallel computing are harder to detect than errors occurring in sequential programs, and even when errors are detected, debugging will be difficult. This will require a lot of time and effort to detect and debug errors that occur in parallel programs. In this regard, the tools proposed in this study will have a significant impact in the development of these tools. First, the theoretical part of the tool can be used in fields that improve performance in a parallel computing environment or require visual results. And the technical part can actively support industry standardization of debugging tools for standardized OpenMP programs.

본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. Although the present invention has been described with reference to the embodiments shown in the drawings, this is merely exemplary, and it will be understood by those skilled in the art that various modifications and equivalent other embodiments are possible.

따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 등록청구범위의 기술적 사상에 의해 정해져야 할 것이다. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.

본 발명은 병렬 프로그램의 디버깅 분야에 적용될 수 있다. The present invention can be applied to the field of debugging of parallel programs.

도 1a는 병렬 프로그램의 스레드의 경합을 설명하기 위한 의사 코드이다. 1A is pseudo code for explaining contention of threads in a parallel program.

도 1b는 도 1a에 도시된 의사 코드가 실행될 때의 POEG를 예시하는 도면이다. FIG. 1B is a diagram illustrating a POEG when the pseudo code shown in FIG. 1A is executed.

도 2는 본 발명의 일면에 의한 OpenMP 프로그램의 접근을 확장형 3차원 원추 상에 시각화하기 위한 방법을 개념적으로 나타내는 흐름도이다. 2 is a flowchart conceptually illustrating a method for visualizing an approach of an OpenMP program on an extended three-dimensional cone according to one aspect of the present invention.

도 3은 도 2에 도시된 방법에 포함되는 원추 시각화 단계가 수행된 결과를 예시하는 도면이다. FIG. 3 is a diagram illustrating a result of performing a cone visualization step included in the method illustrated in FIG. 2.

도 4는 도 2에 도시된 방법에 포함되는 스레드 시각화 단계가 수행된 결과를 예시하는 도면이다. 4 is a diagram illustrating a result of performing a thread visualization step included in the method illustrated in FIG. 2.

도 5는 도 2에 도시된 스레드 시각화 단계에 포함되는 수직적 추상화 단계를 수행한 결과를 예시하는 도면이다. FIG. 5 is a diagram illustrating a result of performing a vertical abstraction step included in the thread visualization step illustrated in FIG. 2.

도 6은 도 2에 도시된 스레드 시각화 단계에 포함되는 수평적 추상화 단계를 수행한 결과를 예시하는 도면이다. FIG. 6 is a diagram illustrating a result of performing a horizontal abstraction step included in the thread visualization step shown in FIG. 2.

도 7은 도 2에 도시된 방법에 포함되는 접근 사건 시각화 단계가 수행된 결과를 예시하는 도면이다. FIG. 7 is a diagram illustrating a result of performing an approach event visualization step included in the method illustrated in FIG. 2.

도 8은 접근 사건 추상화 기법에서 이용되는 심벌들을 예시하는 도면이다. 8 is a diagram illustrating symbols used in an access event abstraction technique.

도 9는 본 발명의 다른 면에 의한 3D 시각화 장치를 개념적으로 나타내는 블록도이다. 9 is a block diagram conceptually illustrating a 3D visualization apparatus according to another aspect of the present invention.

Claims (14)

OpenMP 프로그램의 접근을 확장형 3차원 원추 상에 시각화하기 위한 방법에 있어서, In a method for visualizing an OpenMP program's approach on an extended three-dimensional cone, 상기 프로그램에 대한 경합 탐지 결과를 수신하는 단계; Receiving a contention detection result for the program; 상기 경합 탐지 결과를 분석하여 상기 프로그램의 내포 깊이를 획득하고, 3차원 원추를 시각화한 뒤 상기 내포 깊이에 상응하도록 상기 3차원 원추의 높이를 등분하는 원추 시각화 단계; A cone visualization step of analyzing the contention detection result to obtain a nesting depth of the program, visualizing a three-dimensional cone, and then dividing the height of the three-dimensional cone to correspond to the nesting depth; 상기 프로그램의 실행 중 생성되는 복수 개의 병행 스레드 중 동일한 내포 수준의 스레드를 상기 원추의 동일한 높이에 위치한 원주 상에 시각화하는 스레드 시각화 단계; 및 A thread visualization step of visualizing a thread of the same nesting level among a plurality of parallel threads generated during execution of the program on a circumference located at the same height of the cone; And 상기 경합 탐지 결과를 분석하여 상기 스레드들 중 공유 변수에 대한 접근 사건들이 발생한 스레드들을 읽기 및 쓰기 접근 사건의 발생 유무 및 발생 선후에 따라 분류하고, 분류된 스레드들을 서로 구별되도록 시각화하는 접근 사건 시각화 단계를 포함하는 것을 특징으로 하는 방법. Analyzing the contention detection result, classifying the occurrence of access events to the shared variable among the threads according to whether or not the read and write access event occurs and the occurrence of the occurrence, and visualize the classified threads to distinguish from each other Method comprising a. 제1항에 있어서, 상기 원추 시각화 단계는, The method of claim 1, wherein the cone visualization step, 각 내포 수준 내에 다중 루프(multi-way loop)가 존재하는지 판단하는 단계; 및 Determining whether a multi-way loop exists within each nesting level; And 상기 다중 루프가 존재하는지 여부를 해당 내포 수준에 표시하는 단계를 포 함하는 것을 특징으로 하는 방법. And indicating at the nesting level whether the multiple loops are present. 제1항에 있어서, 상기 스레드 시각화 단계는, The method of claim 1, wherein the thread visualization step, 상기 스레드들 중 임계 구역(critical section)을 포함하는 스레드를 결정하고, 임계 구역을 포함하는 스레드를 록 변수에 따라 상이한 색깔로 구별되도록 표시하는 단계를 포함하는 것을 특징으로 하는 방법. Determining a thread comprising a critical section of the threads, and marking the thread including the critical section to be distinguished in different colors according to a lock variable. 제3항에 있어서, 상기 스레드 시각화 단계는, The method of claim 3, wherein the thread visualization step, 병행 스레드들 간의 병행성에 기반하여 상기 스레드들 간의 거리를 결정하고, 상기 원추 상에 상기 스레드들을 결정된 거리만큼 이격되게 각각 표시하며, 상기 스레드들 중 자식 스레드를 포함하는 부모 스레드를 자식 스레드와 구별되도록 표시하는 수직적 추상화 단계를 더 포함하는 것을 특징으로 하는 방법. Determine the distance between the threads based on the concurrency between the parallel threads, respectively mark the threads spaced apart by the determined distance on the cone, and distinguish a parent thread, including a child thread, of the threads from a child thread. And further comprising a vertical abstraction step of displaying. 제3항에 있어서, 상기 스레드 시각화 단계는, The method of claim 3, wherein the thread visualization step, 상기 원추 상의 동일한 원추 상에 위치된 스레드들 중 소정 개수의 스레드들을 하나의 스레드로 표시하는 수평적 추상화 단계를 더 포함하는 것을 특징으로 하는 방법. And a horizontal abstraction step of representing a predetermined number of threads of the threads located on the same cone on the cone as one thread. 제1항에 있어서, 상기 접근 사건 시각화 단계는, The method of claim 1, wherein the approach event visualization step, 상기 스레드들을 접근 사건이 발생되지 않은 스레드, 읽기 접근 사건이 쓰기 접근 사건보다 먼저 발생한 스레드, 쓰기 접근 사건이 읽기 접근 사건보다 먼저 발생한 스레드로 각각 분류하는 단계; 및 Classifying the threads into threads for which no access event has occurred, threads for which a read access event occurs before a write access event, and threads for which a write access event occurs before a read access event, respectively; And 분류된 상기 스레드들을 서로 구별되도록 표시하는 단계를 포함하는 것을 특징으로 하는 방법. Displaying the sorted threads so as to be distinguished from each other. 제1항에 있어서, 상기 접근 사건 시각화 단계는, The method of claim 1, wherein the approach event visualization step, 상기 스레드들을 접근 사건이 발생되지 않은 스레드, 읽기 접근 사건이 쓰기 접근 사건보다 먼저 발생한 스레드, 쓰기 접근 사건이 읽기 접근 사건보다 먼저 발생한 스레드로 각각 분류하는 단계; 및 Classifying the threads into threads for which no access event has occurred, threads for which a read access event occurs before a write access event, and threads for which a write access event occurs before a read access event, respectively; And 분류된 상기 스레드들을 서로 구별되도록 표시하는 단계를 포함하는 것을 특징으로 하는 방법. Displaying the sorted threads so as to be distinguished from each other. 제1항 내지 제7항 중 어느 한 항에 따른 방법을 구현하기 위한 명령어들을 포함하는 컴퓨터 프로그램을 기록하는 기록 매체. A recording medium for recording a computer program comprising instructions for implementing the method according to any one of claims 1 to 7. OpenMP 프로그램의 접근을 확장형 3차원 원추 상에 시각화하기 위한 장치에 있어서, Apparatus for visualizing an approach of an OpenMP program on an extended three-dimensional cone, 상기 프로그램에 대한 경합 탐지 결과를 수신하는 사용자 인터페이스;A user interface for receiving a contention detection result for the program; 상기 경합 탐지 결과를 분석하여 상기 프로그램의 내포 깊이를 획득하고, 3차원 원추를 시각화한 뒤 상기 내포 깊이에 상응하도록 상기 3차원 원추의 높이를 등분하는 원추 시각화 모듈; A cone visualization module for analyzing the contention detection result to obtain a nesting depth of the program, visualizing a three-dimensional cone, and then dividing the height of the three-dimensional cone to correspond to the nesting depth; 상기 프로그램의 실행 중 생성되는 복수 개의 병행 스레드 중 동일한 내포 수준의 스레드를 상기 원추의 동일한 높이에 위치한 원주 상에 시각화하는 스레드 시각화 모듈; 및 A thread visualization module for visualizing a thread of the same nesting level among a plurality of parallel threads generated during execution of the program on a circumference located at the same height of the cone; And 상기 경합 탐지 결과를 분석하여 상기 스레드들 중 공유 변수에 대한 접근 사건들이 발생한 스레드들을 읽기 및 쓰기 접근 사건의 발생 유무 및 발생 선후에 따라 분류하고, 분류된 스레드들을 서로 구별되도록 시각화하는 접근 사건 시각화 모듈을 포함하는 것을 특징으로 하는 장치. Access event visualization module that analyzes the contention detection result and classifies threads in which access events to a shared variable among the threads occur according to whether or not read and write access events occur, and visualizes the classified threads to be distinguished from each other. Apparatus comprising a. 제9항에 있어서, 상기 원추 시각화 모듈은, The method of claim 9, wherein the cone visualization module, 각 내포 수준 내에 다중 루프(multi-way loop)가 존재하는지 판단하고, 상기 다중 루프가 존재하는지 여부를 해당 내포 수준에 표시하는 것을 특징으로 하는 장치. And determining whether a multi-way loop exists within each nesting level, and indicating whether the multi-loop exists. 제9항에 있어서, 상기 스레드 시각화 모듈은, The method of claim 9, wherein the thread visualization module, 상기 스레드들 중 임계 구역(critical section)을 포함하는 스레드를 결정하고, 임계 구역을 포함하는 스레드를 록 변수에 따라 상이한 색깔로 구별되도록 더욱 표시하는 것을 특징으로 하는 장치. Determine a thread comprising a critical section of the threads, and further display the thread including the critical section to be distinguished in different colors according to a lock variable. 제11항에 있어서, 상기 스레드 시각화 모듈은, The method of claim 11, wherein the thread visualization module, 병행 스레드들 간의 병행성에 기반하여 상기 스레드들 간의 거리를 결정하고, 상기 원추 상에 상기 스레드들을 결정된 거리만큼 이격되게 각각 표시하며, 상기 스레드들 중 자식 스레드를 포함하는 부모 스레드를 자식 스레드와 구별되도록 표시하는 수직적 추상화 모듈을 더 포함하는 것을 특징으로 하는 장치. Determine the distance between the threads based on the concurrency between the parallel threads, respectively mark the threads spaced apart by the determined distance on the cone, and distinguish a parent thread, including a child thread, of the threads from a child thread. And a vertical abstraction module for displaying. 제11항에 있어서, 상기 스레드 시각화 모듈은, The method of claim 11, wherein the thread visualization module, 상기 원추 상의 동일한 원추 상에 위치된 스레드들 중 소정 개수의 스레드들을 하나의 스레드로 표시하는 수평적 추상화 모듈을 더 포함하는 것을 특징으로 하는 장치. And a horizontal abstraction module for displaying a predetermined number of threads of the threads located on the same cone on the cone as one thread. 제9항에 있어서, 상기 접근 사건 시각화 모듈은, The method of claim 9, wherein the approach event visualization module, 상기 스레드들을 접근 사건이 발생되지 않은 스레드, 읽기 접근 사건이 쓰기 접근 사건보다 먼저 발생한 스레드, 쓰기 접근 사건이 읽기 접근 사건보다 먼저 발생한 스레드로 각각 분류하고, 분류된 상기 스레드들을 서로 구별되도록 더욱 표시하는 것을 특징으로 하는 장치. The threads are classified into a thread in which an access event does not occur, a thread in which a read access event occurs before a write access event, and a thread in which a write access event occurs before a read access event, respectively, and further display the classified threads to be distinguished from each other. Device characterized in that.
KR1020090101541A 2009-10-26 2009-10-26 Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon KR101068669B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090101541A KR101068669B1 (en) 2009-10-26 2009-10-26 Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090101541A KR101068669B1 (en) 2009-10-26 2009-10-26 Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon

Publications (2)

Publication Number Publication Date
KR20110045129A KR20110045129A (en) 2011-05-04
KR101068669B1 true KR101068669B1 (en) 2011-09-28

Family

ID=44240228

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090101541A KR101068669B1 (en) 2009-10-26 2009-10-26 Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon

Country Status (1)

Country Link
KR (1) KR101068669B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030261A (en) 2001-07-16 2003-01-31 Sharp Corp Higher order synthesis method, thread generated by using the higher order synthesis method and method for generating circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030261A (en) 2001-07-16 2003-01-31 Sharp Corp Higher order synthesis method, thread generated by using the higher order synthesis method and method for generating circuit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"OpenMP 프로그램의 디버깅을 위한 효과적 경합 시각화" ,김금희, 김영주, 전용기, 한국정보과학회 2004년도 가을 학술발표논문집 제31권 제2호(Ⅰ) pp. 13~15, 2004.10

Also Published As

Publication number Publication date
KR20110045129A (en) 2011-05-04

Similar Documents

Publication Publication Date Title
Burckhardt et al. Effective program verification for relaxed memory models
US9411559B2 (en) Resolution of textual code in a graphical hierarchical model of a technical computing environment
US20170109933A1 (en) Visualizing the structure and execution of a program
US7844953B2 (en) Program, apparatus and method for verifying program
US8302078B2 (en) Lazy evaluation of geometric definitions of objects within procedural programming environments
JP2017004281A (en) Compile program and compile method
Sung et al. Modular verification of interrupt-driven software
Schlich et al. Reduction of interrupt handler executions for model checking embedded software
CN103778062B (en) Multiple interrupt routine data access conflict detection method based on abstract interpretation
US20030079206A1 (en) Debugger capable of providing warnings for unreachable breakpoints
KR101108431B1 (en) System and method of detecting data races in OpenMP program, and recording medium storing the method thereon
US8798971B2 (en) System and method for using a truth table graphical function in a statechart
KR101068669B1 (en) Method and apparatus of visualizing accesses in OpenMP program on scalable 3D cone, and recording medium storing the method thereon
Bauch et al. LTL model checking of LLVM bitcode with symbolic data
JP2011170697A (en) Software structure analyzing device
Yu et al. Loop parallelization using the 3D iteration space visualizer
Novais et al. On the use of software visualization to analyze software evolution: An interactive differential approach
US20140019946A1 (en) Layered decomposition for scalable static data race detection of concurrent programs
Malburg et al. Tuning dynamic data flow analysis to support design understanding
Liew et al. Provable GPU data-races in static race detection
CN115033472B (en) Interrupt driver model detection method based on thread cyclic scheduling serialization
Jannesari et al. Detecting correlation violations and data races by inferring non-deterministic reads
CN114153750B (en) Code checking method and device, code compiling method and electronic equipment
Lipman STEP File Analyzer User S Guide (version 3)
Cavarra Data flow analysis and testing of abstract state machines

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20140827

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee