CN1932766A - Semi-automatic parallel method of large serial program code quantity-oriented field - Google Patents
Semi-automatic parallel method of large serial program code quantity-oriented field Download PDFInfo
- Publication number
- CN1932766A CN1932766A CN 200610117051 CN200610117051A CN1932766A CN 1932766 A CN1932766 A CN 1932766A CN 200610117051 CN200610117051 CN 200610117051 CN 200610117051 A CN200610117051 A CN 200610117051A CN 1932766 A CN1932766 A CN 1932766A
- Authority
- CN
- China
- Prior art keywords
- parallel
- serial
- program
- serial program
- masterplate
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
A half-self-motion parallel method for field with a lot of serial procedure codes relates to (1) set up standard CFD serial procedure; (2) analyze parallel; (3) set up Meta account task; (4) introduce serial procedure; (5) introduce parallel stencil-plate; (6) mutually instruct parallel. It aims at the parallel stencil-plate of CFD field and overcasts the parallel procedures corresponding to the all serial procedures of this field and is suit for innovatory personnel of serial procedures; then, user don't need to know too much about the parallel knowledge. It has better effect and higher efficiency than mass self-motion means for dealing with the CFD field. Meanwhile, the open stencil-plate can overcome the disadvantage to mass display parallel without too much professional parallel knowledge or writing complicated parallel code.
Description
Technical field
What the present invention relates to is a kind of method of field of computer technology, particularly, is a kind of semi-automatic parallel method towards the big field of serial program code quantity.
Background technology
Clustering has appearred in the fast development of the computer technology and the communication technology, and cluster is to pass through the interconnected calculating node of express network by one group, and these calculate node collaborative works so that the computational resource of single system mapping to be provided.Develop rapidly with hardware technology and to compare, the development of multiple programming technology but comes to a halt.At first, multiple programming is than serial programming complexity height; Secondly, multiple programming compares to the support of serial programming shortage software; At last, the development time of multiple programming is short, does not also have enough technological accumulation at present.However, the multiple programming technology also has many development, wherein progressively forms two research directions in multiple programming model field: automatic program parallelization model, the explicit parallelization model of program.Automatic parallelization method promptly is that sequential programme is carried out automatically parallelizing, by compiler the source code of sequential programme is carried out correlation analysis, uses the batch processing converter technique to convert serial code to parallel codes then.One of key of parallelization serial code is a correlation analysis, and is relevant relevant with control by the data in its cognizance code.Automatic parallelization method does not reach general and degree efficiently at present as yet, makes the concurrent program efficient that obtains in this way lower usually, and has the program of significant proportion still can't carry out parallelization to handle.No matter theoretical research shows at compile duration or at run duration, there is not the automatic technology that to develop all potential concurrencys in the serial program.Explicit parallel method be by the programmer use specific language construction, compiler directive or built-in function in program to concurrency explicit declaration in addition.Wherein main explicit multiple programming model has data parallel, message transmission and shared variable etc.The shortcoming of explicit parallel method is the exploitation of explicit concurrent program, requires the user must grasp a large amount of parallel algorithm examples, parallel programming language etc.Lack unified DLL (dynamic link library), make that concurrent program is difficult to transplant between different platform.
Find through literature search prior art, " ParAgent:Adomain-specific semi-automatic parallelization tool " (ParAgent: a kind of semi-automatic parallel instrument of specific area) that S.Mitra etc. deliver on " Proceedings of the 7thInternational Conference on High Performance Computing " (the 7th international high-performance calculation conference meeting collection) (volume was 141 pages to 148 pages in 2000 the 1970th), propose in this article at method of finite difference, the method of semi-automatic parallel is carried out in the application in field such as finite element method and boundary element method, concrete grammar is: the Fortran-77 source code of serial is converted to the concurrent program that embedding has communication pool primitive, improving its concurrency at cycling) its deficiency is: the program structure of this method is relatively poor, the artificial participation too much, the automatically parallelizing rate is lower, and only at this older program language of Fortran-77.
Also find Chinese patent title: " user guided program semi-automatic parallelizing method ", the patent No.: 200510026587.4 in the retrieval.Though this method can be suitable for more simple field, will convert concurrent program to based on object-oriented serial Java code, yet, (serial program code quantity is bigger in these fields for the field of more complicated under the actual conditions, code is in the great majority with processor-oriented C/Fortran code simultaneously, such as CFD, Fluid Mechanics Computation just), it is powerless that the method seems.
Summary of the invention
The objective of the invention is at the deficiencies in the prior art, a kind of semi-automatic parallel method towards the big field of serial program code quantity is provided.The present invention combines the advantage of automatic parallelization method and explicit parallel method, has avoided their defective, by the user interactions guide parallelization, makes the concurrent program efficient that produces can obtain necessary assurance.The present invention is according to the feature of CFD field parallel computation program, extract corresponding five types concurrent program template, in template, adopt the characteristic of tag sign concurrent program,, realize the source-to-source conversion of serial program to concurrent program by User Interface.
The present invention is achieved by the following technical solutions, and concrete steps of the present invention are as follows:
1. creating a standard CFD serial program
So-called standard is meant that the user must write serial program in strict accordance with five kinds of pairing serial program frameworks of parallel masterplate on the serial program flow process.
2. analysis parallelization
Not being all serial programs can parallelization.But in the serial program of parallelization also not being all calculating sections can parallelization.So, at first to analyze serial program, with and each calculation task of being comprised, summarize the serial program flow process, and the principal character of each calculation task.The normal process of serial program be by this program at the decision of the field of problem.Secondly, at each calculation task, take out the calculating framework.At last, the user selects the pairing framework of calculation task the most consuming time, sees which kind of parallel example this framework is suitable for, and this serial program is mapped to the pairing masterplate of this parallel example is got on by user guided.So-called parallel example is abstract to the parallel algorithm of classics, can contain the parallel application of high-performance computing sector.Classical parallel algorithm example comprise the stage walk abreast, divide and rule, streamline, main-slave structure, work pool formula etc.So-called masterplate is that the concurrent program to the CFD field summarizes out the concurrent program framework of corresponding five kinds of examples.
3. create first calculation task
Unit's calculation task is called for short first task, is meant with parallel communications irrelevant, and himself inside can not executed in parallel calculation task, be the fundamental element that constitutes concurrent program, the data dependence between first task is data input and output etc., and a plurality of first task of no correlativity can executed in parallel.Unit's task can be debugged separately and test.
4. importing serial program
Specifying needs parallel serial engineering project.
5. import parallel masterplate
The masterplate of specifying serial program to answer surely.
6. instruct parallelization alternately
Finish by the interactive wizard process, interactive wizard is an interactive graphics (IG) interface, finishes relevant parallelization work by this interface guiding user.Specifically also comprise the steps:
(1) creates the conversion engineering.This project will comprise serial program, the concurrent program that will generate, and the target executable program of concurrent program, and the masterplate code etc.
(2) select parallel example.According to analyzing the problem framework that takes out in the step 2, determine suitable parallel example and parallel masterplate.
(3) generation of parallel codes.According to the serial program flow process, the code of corresponding function is inserted into the pairing label tag of masterplate place.
(4) editor's parallel codes.Can finally generate fashionable concurrent program code obtaining continuing directly modification on the parallel codes after the conversion.
(5) generation can be carried out concurrent program.If said process is no problem, can finally generates and to carry out concurrent program.
The present invention is by above step, can create one with the stage walk abreast, divide and rule, the parallel codes of five kinds of examples such as streamline, main-slave structure, work pool, shield the complicacy of bottom multiple programming simultaneously.Compared with prior art, major advantage is: at the parallel masterplate in CFD field, cover the pairing concurrent program of all serial programs of this field substantially, be convenient to the serial program developer and directly use; Next, but adopt first task that the computing module of reality parallel computation is encapsulated; Then, do not need the user that parallel knowledge is had too many understanding.
The present invention is more effective than the final concurrent program of most of full-automatic method gained, the efficient height.Simultaneously, because open stencil-plate, overcome the parallel shortcoming of most of demonstrations again, do not needed the too many specialty of the user knowledge that walks abreast, perhaps write a large amount of headachy parallel codes.In addition, masterplate of the present invention is open, and the user can increase label according to the demand of oneself, changes the position of label, reduces label, changes tag name, thereby uses the own customized masterplate that meets application-specific.Compared with prior art, the invention solves the problem of the serial program parallelization in CFD field.Simultaneously, aspect masterplate, the present invention makes the user more freely to change masterplate according to application scenarios owing to adopted open principle, and this point also is not available in the prior art.
Description of drawings
Fig. 1 is a principle of the invention framework synoptic diagram
Fig. 2 is a relevant serial code synoptic diagram among the embodiment
Fig. 3 is that relevant parallel codes generates synoptic diagram among the embodiment
Fig. 4 is a respective labels synoptic diagram among the embodiment
Embodiment
Below in conjunction with accompanying drawing the embodiment of the invention is made description:
As shown in Figure 1, principle of the invention framework synoptic diagram.
The realization of 1 serial unit task
Serial unit task logically is only relevant with service logic, and first task can only be generated by the user, and does not relate to parallel semantic.First task after the expansion can relate to parallel semantic.May have a plurality of first tasks in the serial program or expand first task, the present invention requires the user that first task of calculated amount maximum is carried out parallelization.And the degree of expansion of first task has determined the granularity of parallelization.Unit's task is selected in serial program by the user, is inserted in the masterplate<metatask〉...</metatask〉locate.Each first task code of calculating node is identical, only input and output difference.
2 example frameworks are realized
2.1 the example framework is realized by template code
Application code meets certain structure, rule in writing the code process, and abstract come out a kind ofly can cover the program code framework that the user uses to form with these rules, claims that this program code framework is a template code.
And at concurrent program the abstract masterplate that comes out be exactly so-called parallel masterplate.
The principal feature of template code has: 1) abstract framework, it is the framework that is used for describing a program, himself will meet certain predefine standard.2) can not compiling property, it be can not direct compilation, operation on actual machine program code, must be through just becoming the specific code that can compile, move after the conversion.3) the wide property contained, promptly it is to have certain representativeness, can contain certain class and specifically use, and uses framework is provided for solving this class.
Parallel masterplate has additional characteristic, i.e. communication semanteme.Though it does not embody any service logic, different parallel masterplates embodies different parallel semantemes, communication semanteme in other words.
2.2 template code realizes
At first must write template code, then these template code be joined in the system, as Fig. 1.Like this, these templates just can be utilized.
Realize a complete and good and satisfactory template code, need the application demand of going to obtain as much as possible, analyze the realization of these demands, program can be decomposed into: service logic is relevant, service logic is irrelevant.Service logic is irrelevant to be meant that in certain class application program group, these programs have same program structure or code, and promptly these parts are identical in different application programs.For strengthening the versatility of template, need take out these general constant parts as much as possible.Service logic is relevant to be meant that in certain class application program group, program has different program structures and code as the case may be, according to the part of particular case needs change.The code that service logic is irrelevant can directly provide in masterplate, has so just saved a large amount of duplications of labour of concurrent program exploitation, can allow the programmer focus on the service logic of problem.And the relevant code of service logic must cooperate user's guidance, conversion guide, and the label in the masterplate is finished parallelization work jointly.
2.3 label is realized
So-called label marks the position exactly in advance in masterplate, the user is inserted into a kind of means of this position to pairing function code by tag name, as among Fig. 4<tag name and</tag name.The name of label has embodied the function of respective code.The determining positions of label the framework of program, comprise semantemes such as beginning, work, end.The versatility of the number decision masterplate of label.Number of tags is many more, and the masterplate versatility is poor more.So we will reduce the number of label under the correctness that guarantees masterplate as far as possible.
The number of label, the position, the change of title is accompanied by the appearance of new masterplate.So the present invention is the masterplate opening.Promptly under certain standard, masterplate can be changed voluntarily according to user's demand, and additions and deletions are new to occur, and meet the masterplate of particular user requirements.
The generation of 3 parallel codes
According to user's guidance, change guide, the code of the corresponding function of serial program is inserted into the corresponding mark of parallel masterplate.And, following several means are arranged at the operation of masterplate.
1) insert fresh code, promptly insert new code in some position of template code, common insertion comprises calling and function that other need increase first task code.
2) revise code, can existing masterplate code be changed at user's request.
3) delete code, unnecessary code in the deletion template code, because template is a general framework code, some function is unnecessary for specific application, therefore needs deletion.
Can see that from the serial code of Fig. 2 the calculating of " call METAEVALUATE (AEROPA, X) " part is appointed as atomic task by the user, its code just is copied to respectively from node.Detailed process is, the serial code of " METAEVALUATE (AEROPA, X) " realize being inserted into the masterplate file<METATASK</METATASK between.And the major node task of former serial program becomes concurrent program shown in Figure 3.As can be seen, except a series of MPI_SEND () and the current primitive of MPI_RECV (), the calculation task of the middle major node of Fig. 2 is consistent with the major node calculation task among Fig. 3.And the current primitive among Fig. 3 is to be provided by masterplate, has portrayed hypotactic current semanteme, also just because of the characteristics of this part have been desalinated the concern of user to the current details of concurrent program, thereby helps the user to be absorbed in logic business itself.
By these three kinds of operations, template code is converted into the parallel codes that can compile, move, as Fig. 2 and Fig. 3.
Claims (9)
1, a kind of semi-automatic parallel method towards the big field of serial program code quantity is characterized in that concrete steps are as follows:
(1) creating a standard CFD serial program;
(2) analyze parallelization;
(3) create first calculation task;
(4) import serial program;
(5) import parallel masterplate;
(6) instruct parallelization alternately.
2, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 1, it is characterized in that, creating a standard CFD serial program in the described step (1) is meant: be meant that the user must write serial program in strict accordance with five kinds of pairing serial program frameworks of parallel masterplate on the serial program flow process.
3, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 2, it is characterized in that, masterplate in the described step (1) is meant: the concurrent program in CFD field is summarized out the concurrent program framework of corresponding five kinds of examples.
4, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 3, it is characterized in that, example in the described step (1), be meant: abstract to the parallel algorithm of classics, can contain the parallel application of high-performance computing sector, classical parallel algorithm example comprise the stage walk abreast, divide and rule, streamline, main-slave structure, work pool formula.
5, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 1, it is characterized in that, analysis parallelization in the described step (2), be meant: at first will analyze serial program, with and each calculation task of being comprised, summarize the serial program flow process, and the principal character of each calculation task, the normal process of serial program be by this program at the field decision of problem; Secondly, at each calculation task, take out the calculating framework; At last, the user selects the pairing framework of calculation task the most consuming time, sees which kind of parallel example this framework is suitable for, and this serial program is mapped to the pairing masterplate of this parallel example is got on by user guided.
6, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 1, it is characterized in that, first calculation task in the described step (3), be called for short first task, be meant: irrelevant with parallel communications, and the calculation task that himself inside can not executed in parallel, it is the fundamental element that constitutes concurrent program, data dependence between unit's task is data input and output etc., but a plurality of first task executed in parallel of no correlativity, and first task can be debugged separately and test.
7, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 1 is characterized in that, the importing serial program in the described step (4), and specifying needs parallel serial engineering project.
8, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 1 is characterized in that, the masterplate that walks abreast of the importing in the described step (5) is meant: the masterplate of specifying serial program to answer surely.
9, the semi-automatic parallel method towards the big field of serial program code quantity according to claim 1, it is characterized in that, interactive wizard in the described step (6), it is an interactive graphics (IG) interface, finish relevant parallelization work by this interface guiding user, by the interactive wizard process, specifically also comprise the steps:
1. create the conversion engineering: this project will comprise serial program, the concurrent program that will generate, the target executable program of concurrent program, and masterplate code;
2. select parallel example:, determine parallel example and parallel masterplate according to analyzing the problem framework that takes out in the step (2);
3. the generation of parallel codes:, the code of corresponding function is inserted into the pairing label tag of masterplate place according to the serial program flow process;
4. edit parallel codes:, finally generate fashionable concurrent program code obtaining continuing directly modification on the parallel codes after the conversion;
5. generate and can carry out concurrent program: if said process is no problem, final generation can be carried out concurrent program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200610117051 CN1932766A (en) | 2006-10-12 | 2006-10-12 | Semi-automatic parallel method of large serial program code quantity-oriented field |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200610117051 CN1932766A (en) | 2006-10-12 | 2006-10-12 | Semi-automatic parallel method of large serial program code quantity-oriented field |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1932766A true CN1932766A (en) | 2007-03-21 |
Family
ID=37878612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200610117051 Pending CN1932766A (en) | 2006-10-12 | 2006-10-12 | Semi-automatic parallel method of large serial program code quantity-oriented field |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1932766A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101989192A (en) * | 2010-11-04 | 2011-03-23 | 浙江大学 | Method for automatically parallelizing program |
CN102368216A (en) * | 2011-10-20 | 2012-03-07 | 北京金和软件股份有限公司 | Process implementation method based on automatic project building |
CN102707952A (en) * | 2012-05-16 | 2012-10-03 | 上海大学 | User description based programming design method on embedded heterogeneous multi-core processor |
CN103902362A (en) * | 2014-04-29 | 2014-07-02 | 浪潮电子信息产业股份有限公司 | Method for parallelizing SHIFT module serial codes in GTC software |
CN106469114A (en) * | 2015-08-18 | 2017-03-01 | 上海无线通信研究中心 | A kind of Parallel Computing Performance detecting system towards communication test and its method |
CN111857732A (en) * | 2020-07-31 | 2020-10-30 | 中国科学技术大学 | Serial program parallelization method based on marks |
-
2006
- 2006-10-12 CN CN 200610117051 patent/CN1932766A/en active Pending
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101989192A (en) * | 2010-11-04 | 2011-03-23 | 浙江大学 | Method for automatically parallelizing program |
CN102368216A (en) * | 2011-10-20 | 2012-03-07 | 北京金和软件股份有限公司 | Process implementation method based on automatic project building |
CN102368216B (en) * | 2011-10-20 | 2013-11-27 | 北京金和软件股份有限公司 | Process implementation method based on automatic project building |
CN102707952A (en) * | 2012-05-16 | 2012-10-03 | 上海大学 | User description based programming design method on embedded heterogeneous multi-core processor |
CN103902362A (en) * | 2014-04-29 | 2014-07-02 | 浪潮电子信息产业股份有限公司 | Method for parallelizing SHIFT module serial codes in GTC software |
CN103902362B (en) * | 2014-04-29 | 2018-05-18 | 浪潮电子信息产业股份有限公司 | A kind of method to GTC software SHIFT module serial code parallelizations |
CN106469114A (en) * | 2015-08-18 | 2017-03-01 | 上海无线通信研究中心 | A kind of Parallel Computing Performance detecting system towards communication test and its method |
CN106469114B (en) * | 2015-08-18 | 2019-06-04 | 上海无线通信研究中心 | A kind of Parallel Computing Performance detection system and its method towards communication test |
CN111857732A (en) * | 2020-07-31 | 2020-10-30 | 中国科学技术大学 | Serial program parallelization method based on marks |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Isard et al. | Distributed data-parallel computing using a high-level programming language | |
Lee et al. | Dataflow architectures and multithreading | |
Ceng et al. | MAPS: an integrated framework for MPSoC application parallelization | |
Prakash et al. | MPI-SIM: using parallel simulation to evaluate MPI programs | |
Kennedy et al. | Automatic data layout for distributed-memory machines | |
CN1577265A (en) | Description language for an extensible compiler and tools infrastructure | |
CN1661559A (en) | Area based memory management for object-oriented program | |
US20090328016A1 (en) | Generalized expression trees | |
CN1932766A (en) | Semi-automatic parallel method of large serial program code quantity-oriented field | |
Hamou-Lhadj et al. | A metamodel for the compact but lossless exchange of execution traces | |
Liu et al. | Panacea: Towards holistic optimization of MapReduce applications | |
Wang et al. | A framework for distributed data-parallel execution in the Kepler scientific workflow system | |
Ciccozzi et al. | A comprehensive exploration of languages for parallel computing | |
Bonfietti et al. | Maximum-throughput mapping of SDFGs on multi-core SoC platforms | |
CN1316359C (en) | User guided program semi-automatic parallelizing method | |
CN107203406B (en) | Processing method for distributed storage structure | |
CN115904328A (en) | LLVM intermediate language-based parallel computing framework conversion method for cross-GPU architecture | |
Dooley et al. | Detecting and using critical paths at runtime in message driven parallel programs | |
Urfianto et al. | Decomposition of task-level concurrency on C programs applied to the design of multiprocessor SoC | |
Heid et al. | μStreams: a tool for automated streaming pipeline generation on soft-core processors | |
CN100562008C (en) | Message handling system and processing method thereof | |
Jing et al. | An Automatic Task Partition Method for Multi-core System | |
Cheung | Rethinking the application-database interface | |
Spear et al. | Making performance analysis and tuning part of the software development cycle | |
Kasyanov et al. | Support tools for functional programming distance learning and teaching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |