Luận án tiến sĩ: Tự động sinh mã chương trình cho tính toán khoa học - Zhe Fu

Luận án tiến sĩ về sinh tự động chương trình cho tính toán khoa học. Phát triển phương pháp tái sử dụng mã trong Fortran thông qua lập trình chung.

Trường ĐH

Oregon State University

Chuyên ngành

Computer Science

Tác giả

Luan An

Thể loại

Luận án

Năm xuất bản

Số trang

162

Thời gian đọc

25 phút

Lượt xem

0

Lượt tải

0

Phí lưu trữ

50 Point

Tóm tắt nội dung

I. Tự Động Sinh Mã Cho Tính Toán Khoa Học

Tự động sinh mã chương trình (automatic program generation) giải quyết vấn đề tái sử dụng code trong tính toán khoa học (scientific computing). Fortran là ngôn ngữ phổ biến trong nhiều lĩnh vực khoa học. Tuy nhiên, Fortran thiếu hỗ trợ lập trình generic (generic programming). Vấn đề này tạo ra thách thức lớn cho việc phát triển phần mềm toán học (mathematical software). Giải pháp nằm ở kỹ thuật sinh mã tự động. Hai phương pháp chính được phát triển. Phương pháp đầu tiên tạo trình sinh mã cho đặc tả dựa trên phương trình. Phương pháp thứ hai mở rộng Fortran với khả năng lập trình generic. Cả hai đều nhắm đến hiệu suất cao (high-performance computing). Ứng dụng thực tế bao gồm mô hình hóa đại dương nghịch đảo. Hệ thống này chuyển đổi đặc tả generic thành mã Fortran hiệu quả. Một hệ thống kiểu (type system) phát hiện lỗi ngay trong đặc tả. Parametric Fortran cho phép tham số hóa các cấu trúc Fortran tùy ý. Công nghệ này hỗ trợ định nghĩa hàm generic và loại bỏ code trùng lặp.

1.1. Vấn Đề Tái Sử Dụng Code

Vấn đề tái sử dụng code là thách thức phổ biến trong kỹ thuật phần mềm khoa học. Fortran không cung cấp cơ chế generic programming hiệu quả. Các nhà khoa học thường viết lại code tương tự nhiều lần. Điều này gây lãng phí thời gian và tăng nguy cơ lỗi. Computational science đòi hỏi độ chính xác cao. Mỗi phiên bản code cần bảo trì riêng. Thiếu tính generic làm giảm năng suất phát triển. Numerical methods phức tạp khó tái sử dụng.

1.2. Giải Pháp Sinh Mã Tự Động

Program synthesis cung cấp giải pháp cho vấn đề tái sử dụng. Kỹ thuật này tự động tạo code từ đặc tả cấp cao. Domain-specific languages (DSL) đơn giản hóa việc mô tả thuật toán. Trình biên dịch chuyển đổi DSL thành Fortran tối ưu. Symbolic computation hỗ trợ xử lý biểu thức toán học. Automatic programming giảm công việc thủ công. Code generation đảm bảo tính nhất quán.

1.3. Lợi Ích Của Phương Pháp

Sinh mã tự động tăng năng suất đáng kể. Các nhà khoa học tập trung vào logic thuật toán thay vì chi tiết cài đặt. Hệ thống kiểu phát hiện lỗi sớm trong quá trình phát triển. Code được sinh ra có hiệu suất cao tương đương code viết tay. Khả năng bảo trì được cải thiện nhờ đặc tả rõ ràng. Mathematical software trở nên linh hoạt và mở rộng dễ dàng.

II. Forge Ngôn Ngữ Chuyên Biệt Cho Mô Hình Hóa

Forge là domain-specific language được thiết kế cho mô hình hóa đại dương nghịch đảo (inverse ocean modeling). Ngôn ngữ này cho phép đặc tả generic trong nhiều khía cạnh. Các chiều của mảng (array dimensions) có thể tham số hóa. Danh sách tham số linh hoạt theo ngữ cảnh. Các subroutine được gọi có thể thay đổi. Forge cung cấp cú pháp dựa trên phương trình toán học. Đặc tả gần với ký hiệu toán học truyền thống. Trình biên dịch Forge chuyển đổi đặc tả thành mã Fortran. Quá trình này hoàn toàn tự động. Code được sinh ra tối ưu cho hiệu suất. Hệ thống kiểu của Forge phát hiện lỗi trong đặc tả. Kiểm tra kiểu diễn ra trước khi sinh mã. Điều này đảm bảo tính đúng đắn của chương trình. Forge đã được áp dụng thành công trong các công cụ IOM thực tế. Markovian time convolution là ví dụ điển hình. Bell-shaped space convolution cũng được biểu diễn hiệu quả.

2.1. Kiến Trúc Forge

Forge bao gồm ba thành phần chính: ngôn ngữ đặc tả, trình biên dịch và hệ thống kiểu. Ngôn ngữ đặc tả sử dụng ký hiệu toán học tự nhiên. Symbolic computation xử lý các biểu thức phức tạp. Trình biên dịch thực hiện nhiều giai đoạn tối ưu hóa. Code generation tạo ra Fortran code hiệu quả. Hệ thống kiểu đảm bảo an toàn về kiểu dữ liệu.

2.2. Đặc Tả Công Cụ IOM

Markovian time convolution được biểu diễn ngắn gọn trong Forge. Đặc tả bao gồm interfaces và dependent indices. Interfaces định nghĩa giao diện với model. Dependent indices xử lý quan hệ phụ thuộc giữa các chiều. Bell-shaped space convolution yêu cầu xử lý không gian phức tạp. Forge hỗ trợ đầy đủ các phép toán cần thiết. Numerical methods được mã hóa một cách trực quan.

2.3. Hệ Thống Kiểu Forge

Hệ thống kiểu kiểm tra tính nhất quán của đặc tả. Typing rules đảm bảo các phép toán hợp lệ. Kiểm tra chiều mảng ngăn chặn lỗi runtime. Type system phát hiện lỗi trước khi biên dịch. Điều này tiết kiệm thời gian debug đáng kể. Program synthesis an toàn hơn nhờ kiểm tra kiểu nghiêm ngặt.

III. Parametric Fortran Mở Rộng Lập Trình Generic

Parametric Fortran mở rộng Fortran với khả năng lập trình generic đầy đủ. Ngôn ngữ này cho phép tham số hóa các cấu trúc Fortran tùy ý. Template chương trình được định nghĩa với tham số linh hoạt. Các tham số có thể là giá trị, kiểu dữ liệu hoặc code. Quá trình translation chuyển template thành chương trình Fortran cụ thể. Giá trị tham số hướng dẫn quá trình sinh mã. Parametric Fortran đặc biệt hữu ích trong scientific computing. Ứng dụng bao gồm định nghĩa hàm generic cho mảng đa chiều. Array addition hoạt động với số chiều tùy ý. Generic array slicing linh hoạt với các pattern khác nhau. Loại bỏ code trùng lặp giảm kích thước chương trình. Automatic differentiation được thực hiện hiệu quả. Hệ thống IOM generic được cài đặt thành công bằng Parametric Fortran. High-performance computing được duy trì nhờ tối ưu hóa thông minh. Code được sinh ra có chất lượng tương đương code viết tay.

3.1. Cơ Chế Tham Số Hóa

Parametric Fortran cho phép tham số hóa nhiều cấp độ. Số chiều mảng có thể là tham số. Kích thước cụ thể của mảng cũng tham số hóa được. Thậm chí cấu trúc control flow có thể tham số. Generic programming trở nên tự nhiên trong Fortran. Program templates tái sử dụng cho nhiều trường hợp. Domain-specific languages dễ xây dựng trên nền tảng này.

3.2. Ứng Dụng Thực Tế

Array addition generic hoạt động với 1D, 2D, 3D và nhiều chiều hơn. Một định nghĩa duy nhất phục vụ tất cả trường hợp. Array slicing hỗ trợ các pattern phức tạp. Code trùng lặp được loại bỏ tự động. Automatic differentiation sinh ra đạo hàm chính xác. Mathematical software trở nên ngắn gọn và dễ bảo trì.

3.3. Hiệu Suất Và Tối Ưu

Code generation trong Parametric Fortran được tối ưu hóa cao. Compiler thực hiện inline expansion khi cần thiết. Loop unrolling áp dụng cho các trường hợp cụ thể. High-performance computing không bị ảnh hưởng. Numerical methods duy trì độ chính xác. Computational science hưởng lợi từ cả tính generic và hiệu suất.

IV. Hệ Thống Mô Hình Hóa Đại Dương Nghịch Đảo

Hệ thống Inverse Ocean Modeling (IOM) áp dụng kỹ thuật sinh mã tự động. Mục tiêu là tạo công cụ generic cho mô hình hóa đại dương. Markovian time convolution xử lý phụ thuộc thời gian. Phương pháp này mô hình hóa quá trình ngẫu nhiên Markov. Bell-shaped space convolution xử lý phân bố không gian. Hàm bell-shaped mô tả sự lan truyền trong không gian. Cả hai phương pháp đều được biểu diễn trong Forge. Đặc tả ngắn gọn nhưng đầy đủ chức năng. Trình biên dịch sinh mã Fortran tối ưu cho từng model cụ thể. Giao diện đồ họa (GUI) đơn giản hóa việc sử dụng hệ thống. Người dùng không cần hiểu chi tiết cài đặt. Các nhà khoa học tập trung vào vấn đề khoa học. IOM system đã được triển khai thành công trong nghiên cứu thực tế. Scientific computing hưởng lợi từ tính linh hoạt. Numerical methods phức tạp trở nên dễ tiếp cận. Mathematical software chất lượng cao được tạo ra nhanh chóng.

4.1. Markovian Time Convolution

Markovian time convolution mô hình hóa phụ thuộc thời gian trong đại dương. Quá trình Markov giả định trạng thái tương lai chỉ phụ thuộc trạng thái hiện tại. Convolution tích hợp ảnh hưởng qua thời gian. Numerical methods tính toán tích phân này hiệu quả. Forge biểu diễn phương pháp bằng đặc tả toán học. Code generation tạo implementation tối ưu.

4.2. Bell Shaped Space Convolution

Bell-shaped space convolution xử lý phân bố không gian. Hàm bell-shaped (hình chuông) mô tả sự lan truyền. Convolution không gian tính toán ảnh hưởng từ các vị trí lân cận. Computational science yêu cầu độ chính xác cao trong tính toán này. Symbolic computation xử lý biểu thức phức tạp. High-performance computing đảm bảo tốc độ tính toán.

4.3. Giao Diện Người Dùng

GUI của IOM system đơn giản hóa quy trình làm việc. Người dùng chọn model và công cụ qua giao diện trực quan. Tham số được nhập dễ dàng qua form. Hệ thống tự động sinh mã và biên dịch. Program synthesis diễn ra trong nền. Kết quả trả về sẵn sàng sử dụng. Domain-specific languages ẩn sau giao diện thân thiện.

V. Kỹ Thuật Program Synthesis Cho Khoa Học

Program synthesis tự động tạo chương trình từ đặc tả cấp cao. Kỹ thuật này đặc biệt phù hợp với scientific computing. Numerical methods phức tạp được mô tả bằng ký hiệu toán học. Symbolic computation chuyển đổi ký hiệu thành code thực thi. Automatic programming giảm thiểu lỗi con người. Code generation đảm bảo tính nhất quán giữa đặc tả và cài đặt. Domain-specific languages cung cấp abstraction phù hợp. Mathematical software được phát triển nhanh hơn. High-performance computing vẫn được duy trì nhờ tối ưu hóa compiler. Generic programming cho phép tái sử dụng code tối đa. Template được instantiate với tham số cụ thể. Computational science hưởng lợi từ cả năng suất và chất lượng. Type system phát hiện lỗi sớm trong quá trình phát triển. Điều này quan trọng với phần mềm khoa học yêu cầu độ tin cậy cao. Program generation techniques tiếp tục phát triển. Tương lai hứa hẹn nhiều ứng dụng mới trong khoa học.

5.1. Symbolic Computation

Symbolic computation xử lý biểu thức toán học ở dạng ký hiệu. Khác với numerical methods, symbolic computation bảo toàn cấu trúc toán học. Điều này cho phép tối ưu hóa đại số trước khi sinh mã. Mathematical software hưởng lợi từ độ chính xác cao. Automatic differentiation là ứng dụng điển hình. Đạo hàm được tính toán chính xác bằng symbolic manipulation.

5.2. Domain Specific Languages

Domain-specific languages (DSL) được thiết kế cho lĩnh vực cụ thể. Forge là DSL cho inverse ocean modeling. Parametric Fortran là DSL cho generic programming trong Fortran. DSL cung cấp abstraction phù hợp với domain. Code generation từ DSL tạo ra implementation hiệu quả. Scientific computing hưởng lợi từ sự kết hợp giữa expressiveness và performance.

5.3. Tương Lai Của Automatic Programming

Automatic programming tiếp tục phát triển với AI và machine learning. Program synthesis có thể học từ ví dụ. Generic programming trở nên phổ biến hơn trong scientific computing. High-performance computing kết hợp với abstraction cao. Computational science sẽ tiếp cận dễ dàng hơn. Mathematical software chất lượng cao sẽ được tạo ra nhanh hơn.

VI. Ứng Dụng Code Generation Trong Khoa Học

Code generation có nhiều ứng dụng quan trọng trong scientific computing. Định nghĩa hàm generic cho mảng đa chiều là ứng dụng phổ biến. Array operations hoạt động với số chiều tùy ý. Loại bỏ code trùng lặp giảm kích thước và độ phức tạp. Automatic differentiation sinh đạo hàm tự động cho optimization. Numerical methods phức tạp được sinh ra từ đặc tả toán học. Mathematical software trở nên dễ bảo trì và mở rộng. High-performance computing được đảm bảo qua compiler optimization. Generic programming cho phép viết code một lần, sử dụng nhiều lần. Domain-specific languages đơn giản hóa biểu diễn thuật toán. Symbolic computation xử lý biểu thức phức tạp chính xác. Computational science hưởng lợi từ năng suất cao và ít lỗi. Program synthesis tự động hóa các tác vụ lặp đi lặp lại. Type system đảm bảo tính đúng đắn của chương trình. Các ứng dụng thực tế đã chứng minh hiệu quả của phương pháp. Inverse ocean modeling là ví dụ thành công điển hình.

6.1. Generic Array Operations

Generic array operations hoạt động với mảng đa chiều tùy ý. Array addition, multiplication và các phép toán khác được định nghĩa một lần. Template được instantiate cho 1D, 2D, 3D arrays và nhiều chiều hơn. Numerical methods dựa trên mảng trở nên linh hoạt. Code generation tạo ra implementation tối ưu cho từng trường hợp. High-performance computing được duy trì.

6.2. Automatic Differentiation

Automatic differentiation sinh đạo hàm tự động từ hàm gốc. Symbolic computation đảm bảo độ chính xác tuyệt đối. Không có sai số làm tròn như numerical differentiation. Mathematical software cho optimization hưởng lợi lớn. Gradient và Jacobian được tính toán hiệu quả. Computational science sử dụng rộng rãi trong machine learning và optimization.

6.3. Code Reuse Và Bảo Trì

Code generation cải thiện đáng kể khả năng tái sử dụng. Generic programming cho phép viết code trừu tượng. Program synthesis tạo ra implementation cụ thể khi cần. Bảo trì dễ dàng hơn vì chỉ cần sửa đặc tả. Scientific computing hưởng lợi từ codebase nhỏ gọn hơn. Domain-specific languages làm code dễ đọc và hiểu hơn.

Xem trước tài liệu
Tải đầy đủ để xem toàn bộ nội dung
Luận án tiến sĩ: Automatic program generation for scientific computing

Tải xuống file đầy đủ để xem toàn bộ nội dung

Tải đầy đủ (162 trang)

Trích đoạn nội dung luận án

Tải xuống để đọc toàn bộ

AN ABSTRACT OF THE DISSERATION OF Zhe Fu for the degree of Doctor of Philosophy in Computer Science presented on July 6, 2006. Title: Automatic Program Generation for Scientic Computing Abstract approved: Martin Erwig The code reuse problem is a common software engineering problem in scientic computing. As a prevailing programming language in many scientic elds, For- tran does not provide support to address this problem. One particular reason is that Fortran lacks the support for generic programming.

By applying program- generation techniques, we developed two approaches to address the code reuse problem. The rst approach is to design a program generator for the equation- based specication of subroutines that can be generic in the dimensions of arrays, parameter lists, and called subroutines. We apply that approach to a real-world problem in scientic computing, which requires the generic description of inverse ocean modeling tools. In addition to a compiler that can transform generic spec- ications into ecient Fortran code for models, we have also developed a type system that can identify possible errors already in the specications.

The second approach is to extend Fortran with the support for generic programming. The result is the language Parametric Fortran, which supports dening Fortran pro- gram templates by allowing the parameterization of arbitrary Fortran constructs. A Fortran program template can be translated into a regular Fortran program guided by values for the parameters. Parametric Fortran is particularly useful in scientic computing.

The applications include dening generic functions, re- moving duplicated code, and automatic dierentiation. The described Fortran extension has also been successfully employed implementing the generic inverse ocean modeling system. c Copyright By Zhe Fu July 6, 2006 All Rights Reserved Automatic Program Generation for Scientic Computing by Zhe Fu A DISSERTATION submitted to Oregon State University in partial fulllment of the requirements for the degree of Doctor of Philosophy Presented on July 6, 2006 Commencement June 2007 UMI Number: 3236879 UMI Microform 3236879 Copyright 2006 by ProQuest Information and Learning Company. All rights reserved.

This microform edition is protected against unauthorized copying under Title 17, United States Code. ProQuest Information and Learning Company 300 North Zeeb Road P. Box 1346 Ann Arbor, MI 48106-1346 Doctor of Philosophy dissertation of Zhe Fu presented on July 6, 2006. APPROVED: Major Professor, representing Computer Science Director of the School of Electrical Eengineering and Computer Science Dean of the Graduate School I understand that my dissertation will become part of the permanent collection of Oregon State University libraries.

My signature below authorizes release of my disseratation to any reader upon request. Zhe Fu, Author ACKNOWLEDGEMENTS Foremost I especially thank my advisor Martin Erwig for suggesting the won- derful thesis topic. His wide knowledge and logical way of thinking have been of great value for me. His understanding, encouraging and personal guidance have provided a good basis for the present thesis.

I also thank professor An- drew Bennett. His summer school in 2002 helped me to understand the area of inverse ocean modeling, which is the major application of the approaches pre- sented in this thesis. My thanks also go to Boon Chua and Ben Paum, who helped me with the implementation of the IOM system and Parametric Fortran. I am really grateful to my family, especially to my parents for their continuous support and encouragement.

At last, I want to express my special thanks to my wife, Yuanyuan Wang. I would not have been able to completed my Ph.D thesis without her support. TABLE OF CONTENTS Page 1 Introduction 1 1.1 The Code Reuse Problem in Scientic Computing .2 Solving the Code Reuse Problem by Automatic Program Generation 8 1.2 Generic Programming in Haskell .3 Array Programming Languages .2 Metaprogramming Tools for Fortran. 30 3 The Inverse Ocean Modeling System 32 3.1 Markovian Time Convolution .2 Bell-Shaped Space Convolution .3 A Graphical User Interface for the IOM.

38 4 Forge: A Domain-Specic Language for Dening Inverse Ocean Modeling Tools 42 4.1 Overview of Forge .1 Using Forge to Generate IOM Tools .2 The Forge Compiler .2 Generating Fortran from Tool Descriptions .1 Expressing Markovian Time Convolution in Forge .2 Interfaces and Dependent Indices .3 Summary: The Complete Tool Specication for the Marko- vian Convolution .4 Expressing the Bell-Shaped Space Convolution in Forge .5 Model Specications .3 The Forge Type System. 60 TABLE OF CONTENTS (Continued) Page 4.1 The Typing Rules of Forge. 74 5 Parametric Fortran: An Extension of Fortran for Generic Pro- gramming 77 5.1 Overview of Parametric Fortran .1 Array Addition for Arbitrary Dimensions .2 Realization of the Program Generation .3 Generic Array Slicing .4 Removing Duplicated Code .2 Implementing the IOM System in Parametric Fortran .1 Expressing Markovian Time Convolution in Parametric For- tran .2 Implementing the Bell-Shaped Space Convolution in Para- metric Fortran .3 Benets of Using Parametric Fortran in the IOM .3 Application of Parametric Fortran to Automatic Dierentiation .1 Implementing Automatic Dierentiation in Parametric For- tran .2 An Example: The Inviscid Burger's Model .3 Dierentiating the Inviscid Burger's Model Using Paramet- ric Fortran .4 Implementation of the Parametric Fortran Compiler .1 Representing Fortran Syntax in Haskell .2 A Type Class for Program Generation .3 Dening Parameter Types as Instances of Param .5 Implementation of Accessors .6 Implementation of List Parameters. 123 6 Conclusion and Future Work 128 TABLE OF CONTENTS (Continued) Page Bibliography 132 Appendices 138 Appendix A: The Syntax of Forge.

138 Appendix B: The Fortran Code of Markovian Time Convolution Gener- ated by Forge for PEZ. 140 Appendix C: The Haskell Implementation of the Parameter Type Diff. 141 Appendix D: The Installation of Parametric Fortran. 147 LIST OF FIGURES Figure Page 1.1 The Fortran code for the 2D simple convolution in time.2 The Fortran code for the 3D simple convolution in time.1 Summation of array elements.2 Using timeConv on 3-D arrays.3 The Fortran statement generated by CTADEL.4 The FORESYS Graphical User Interface .1 The discrete equations of Markovian time convolution.2 The Fortran program of Markovian Time Convolution.3 Graphical User Interface.2 Using model parameters in tools and library function calls .3 Fortran translation of discrete equations.4 The Forge specication for Markovian time convolution.5 The specication for the bell-shaped convolution in space.6 Rules for environment judgments.8 Typing rules for expressions.9 Partial order on types.10 Type rules for Forge statements.1 Array addition for 2D arrays.2 Parametric Fortran syntax tree .3 Syntax tree of {dim: c = a + b}.

84 LIST OF FIGURES (Continued) Figure Page 5.4 Transformation of nodes .5 Syntax tree of generated for loop .6 Parametric Fortran Template of an Array Slicing Subroutine .7 Removing Duplicated Code with Parametric Fortran .8 The Parametric Fortran Template for the Markovian Time Con- volution .9 The Parametric Fortran Template for the Bell-Shaped Space Con- volution .10 The Fortran Program for the Bell-Shaped Space Convolution .11 The Chain Rule for Computing the Tangent Linear Model .12 The Parametric Fortran Template for the Inviscid Burger's Model 107 5.13 The adjoint program for the inviscid Burger's model. 109 LIST OF TABLES Table Page 5.2 Code savings achieved by Parametric Fortran. 99 LIST OF APPENDIX FIGURES Figure Page 1 Syntax of specications. 138 2 Syntax of interfaces.

139 3 Syntax of dependent-index declarations. 139 5 Syntax of parameter denitions. 139 Chapter 1  Introduction Code reuse refers to the technique that allows a partial or complete computer program written at one time to be used in another program written at a later time. The goal of code reuse is to save time and energy of programmers by re- ducing redundant work.

Code reuse is critical especially in those areas in which the involved software fragments are large and thus costly to reproduce. A very common example of code reuse is using software libraries. Common operations, such as accessing data in a specic format, processing data in a specic way (sorting, searching, etc), or I/O operations, are needed by many dierent appli- cations. Developers of new programs can use the code in the software library to accomplish these tasks, instead of actually writing new code directly to perform the operations.

Using libraries is a very eective form of code reuse. However, the use of libraries is often limited by the fact that library functions work only on specic data structures. The most direct way to achieve code reuse is copying some or all of the code from an existing program into a new one. This approach is not preferable because code from the original program usually needs to be modied before being used in the new program, for example, variable names may need to be changed.

Such modications can easily introduce errors in the new program. Code reuse is highly desirable in scientic computing. However, as a widely 2 used programming language in scientic computing, Fortran still lacks the sup- port to achieve code reuse. This thesis makes contributions to the Fortran code reuse problem in scientic computing by applying program generation techniques.

In this introduction we rst give a description of the code reuse problem in scientic computing. We also describe the program-generation approach to addressing this problem and then outline the rest of the thesis.1 The Code Reuse Problem in Scientic Computing In the area of scientic computing, the inability to properly reuse software has a particularly severe impact on the eective use of computers to support the scientic activities. Although there has been considerable work in scientic com- puting on eciency issues, such as compilation and paralellization, the software engineering problems caused by large legacy software systems have been largely ignored so far. Fortran is still the prevailing programming language in many areas of science.

For example, ocean scientists have implemented ocean models in Fortran to sim- ulate and predict the state of oceans, such as the Regional Ocean Model System (ROMS) [32] and the Advanced Circulation (ADCIRC) model [2]. Major reasons for using Fortran are the existence of ecient Fortran compilers for supercom- puters that are needed to run large-scale simulations and the reliance on legacy software packages that are required for particular subsystems. At the same time, the reliance on Fortran causes severe software engineering problems, in particular, 3 the inability to reuse software. Although many projects incorporate previously written Fortran code, a closer look reveals that this reuse is coupled with high costs for adapting old Fortran programs.

Moreover, the code reuse is performed in an ad hoc way that makes future reuse even more dicult. Scientists often write data assimilation programs in Fortran to analyze sci- entic models with real observation data. Two examples are the Inverse Ocean Modeling (IOM) system [4, 17] and the Weather Research and Forecasting (WRF) model [20]. The algorithm of a particular data assimilation program is the same for all the scientic models it analyzes.

However, in dierent scientic models, the representation of data may be dierent. For example, in the ROMS [32] and the ADCIRC model [2], data are stored in 4-dimensional arrays that contain 3 space dimensions and the time dimension. In the 2D Shallow Water model [27], data are represented as 3 dimensional which is 2-dimensional space plus the time dimension. Furthermore, even though the number of dimensions of the arrays storing the data is the same in the ROMS model and the ADCIRC model, the time dimension in these two models is located in dierent dimensions of the ar- rays.

In the ROMS model, the time dimension is the rst dimension of the arrays, whereas in the ADCIRC model, the time dimension is at the last dimension. Since these data assimilation programs need to work for dierent scientic models, they have to be implemented in the way that can work with all the dif- ferent data representations in the scientic models. For example, convolution tools that compute the average of weighted values are commonly used in data assimilation programs.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ

Từ khóa và chủ đề nghiên cứu


Câu hỏi thường gặp

Luận án "Tự động sinh mã chương trình cho tính toán khoa học" nghiên cứu về vấn đề gì?

Luận án tiến sĩ về sinh tự động chương trình cho tính toán khoa học. Phát triển phương pháp tái sử dụng mã trong Fortran thông qua lập trình chung.

Luận án "Tự động sinh mã chương trình cho tính toán khoa học" được bảo vệ tại trường nào?

Luận án này được bảo vệ tại Oregon State University. Năm bảo vệ: 2006.

Luận án "Tự động sinh mã chương trình cho tính toán khoa học" thuộc chuyên ngành gì?

Luận án "Tự động sinh mã chương trình cho tính toán khoa học" thuộc chuyên ngành Computer Science. Danh mục: Khoa Học Máy Tính.

Luận án "Tự động sinh mã chương trình cho tính toán khoa học" có bao nhiêu trang?

Luận án "Tự động sinh mã chương trình cho tính toán khoa học" có 162 trang. Bạn có thể xem trước một phần tài liệu ngay trên trang web trước khi tải về.

Cách tải luận án "Tự động sinh mã chương trình cho tính toán khoa học" về máy như thế nào?

Để tải luận án về máy, bạn nhấn nút "Tải xuống ngay" trên trang này, sau đó hoàn tất thanh toán phí lưu trữ. File sẽ được tải xuống ngay sau khi thanh toán thành công. Hỗ trợ qua Zalo: 0559 297 239.

Luận án liên quan

Chia sẻ tài liệu: Facebook Twitter