The implementation method and device of the calculating task of CFX
Technical field
The present invention relates to scientific algorithm field, and especially, it is related to the implementation method and dress of a kind of calculating task of CFX
Put.
Background technology
CFX is first, the whole world in complex geometry, grid, solves and obtain great in these three CFD tradition bottle diameter problems
The commercial CFD software of breakthrough, by means of its unique technical characterstic, leads high-performance CFD business software of new generation
Overall development trend, 2003, CFX was added in the extended family of the CAE simulation softwares ANSYS of global maximum.
In traditional HPCC environment, user will run the calculation procedure based on CFX softwares generally two
The mode of kind:One is, in the use environment of job scheduling, to need one is performed under command line environment using remote character terminal and be
Row operation, typically has following flow process:
The executable file of CFX calculation procedures, input file, data file etc. are got out, these files generally need to put
Put in the globally shared storage of cluster, user generally uses the instruments such as FTP, SFTP and uploads these files to cluster, most
In the case of number, user also needs to carry out edit-modify to input file etc. with the text edit tool.
It is determined that running the number of passes that enters of CFX calculation procedures needs, and run on which node, these information are passed through
The mode of command line parameter passes to the process initiation device of CFX, and by the process initiation device startup optimization of CFX, the CFX calculates journey
Sequence.
After the completion of program operation, result of calculation is checked, or destination file is downloaded to user's sheet using instruments such as FTP, SFTP
Ground terminal.
It is more than the main flow for directly running CFX calculation procedures, under practical situation, user is on HPCC
Submit parallel computation task to, the interface for needing unification to provide using job scheduling software, user generally also need to write one again
Job scheduling script, applies for computing resource in script, submits parallel computation task to by this script, by job scheduling software
Come process task queuing, Resources allocation, initiate concurrent program.
Another way is the graphical operation interface using CFX calculation procedures, typically has following flow process:
User generally uses the data file that the instruments such as FTP, SFTP upload CFX calculation procedures to cluster.
Start the graphical operation interface of CFX calculation procedures, the data file required for selecting to calculate is arranged and calculates data
Calculating parameter and needs needed for file enters number of passes, nodes etc., and click computing button starts computing.
After the completion of program operation, result of calculation is checked, or destination file is downloaded to user's sheet using instruments such as FTP, SFTP
Ground terminal.
It is more than to start the main flow that graphical operation interface runs CFX calculation procedures, job scheduling software cannot be right
Which carries out calculating task and processes the operation such as queuing, Resources allocation.
It is described above in traditional HPCC environment, user runs two kinds based on CFX calculation procedures
Basic operation procedure, the first flow process are generally needed under remote character terminal, are realized, for non-by way of order line
For the vast domestic consumer of bone ash level, operation difficulty is big, and execution efficiency is low, and error probability is big;Although second flow process is in behaviour
Make to decrease in difficulty, in man-machine interaction, experience preferable, but cannot be using at HPCC job scheduling software
Reason task queue, Resources allocation, initiation concurrent program, are that whole high-performance calculation resource in order, efficiently and reasonably cannot make
With, or even cause the waste of computing resource uneven with distribution.
The drawbacks of both the above executive mode, is mainly manifested in:
It is very big using difficulty.Want smoothly to submit a CFX parallel computation task to, user generally require it is very familiar very
More unrelated with its specialty background many knowledge and instrument, such as (SuSE) Linux OS basic operation, Shell scripts, often
Text editing and character handling implement, the calling of MPI environment, job scheduling software are used etc., these knowledge or work
The learning curve of tool is very steep, skilled to grasp the time for usually needing to take years, and such utilization cost is to vast common
It is very huge for user.
Execution efficiency is low.Want smoothly to submit a CFX parallel computation task to, need to perform multiple flow processs, need to use
Some professional tools, need to perform complicated loaded down with trivial details operation in command line environment, so as to cause the submission expense of parallel computation task
When it is laborious, execution efficiency is low.
Error probability is big.For most of domestic consumer, complicated loaded down with trivial details operation is performed in command line environment, occurred
The probability of human operational error is very big.It is especially for the unfamiliar user of operating process, easy in the links for performing
Encounter problems.
For the manager of HPCC, to domestic consumer's open command row terminal, safety is there is also
Risk, the maloperation of user may affect the stable operation of system, hacker to be also possible to avail oneself of the opportunity to get in.
Using the method for the graphical operation interface of CFX calculation procedures, it is impossible to make application program with job scheduling organically
Combine so that job scheduling software cannot come process task queuing, Resources allocation, initiate CFX concurrent programs, using figure
During shape operation interface, fixed calculate node in HPCC can only be provided the user by hand and complete to calculate, i.e., without
Size dynamic regulation computing resource of the method according to amount of calculation, also simultaneously cause calculate node it is idle again when cannot reuse
Computing resource waste.
In the prior art, although there are some business software for calculation and provide the parallel computation task of oneself by graphical
Submit to interface to carry out instruction submission, but be both for individual software, no universality, and it is further desired that special client is soft
Part cooperation is completed, and the combination of job scheduling software cannot be realized or be there is a problem of different degrees of.
For needing under remote character terminal by the side of order line during user's operation CFX calculation procedures in correlation technique
Realizing, operation difficulty is big, and execution efficiency is low, the big problem of error probability, not yet proposes effective solution at present for formula.
The content of the invention
For needing under remote character terminal by the side of order line during user's operation CFX calculation procedures in correlation technique
Realizing, operation difficulty is big, and execution efficiency is low, the big problem of error probability for formula, and the present invention proposes a kind of calculating task of CFX
Implementation method and device, can make user without the need for, by way of order line, being only input into computations by shirtsleeve operation, just
Whole calculating process can be realized.
The technical scheme is that what is be achieved in that:
According to an aspect of the invention, there is provided a kind of implementation method of the calculating task of CFX, the implementation method bag
Include:
Obtain the computations of user input;
Computations is parsed, it is determined that the type for calculating and the calculating parameter included in computations;
Calculating parameter is updated in the calculation command sentence corresponding with type is calculated being pre-configured with, and performs the calculating
Command statement.
Additionally, before the sentence for substituting into calculating parameter is performed, the implementation method is further included:
Judge whether the computations of user input is legal, and in the result for judging in the case of no, to forbid performing meter
Calculate command statement and pointed out;
Wherein, whether legal condition includes at least one of to judge the computations of user input:
The scope of calculating parameter in the form of computations, computations.
Additionally, before the sentence for substituting into calculating parameter is performed, the implementation method is further included:
The resource request instruction of user input is obtained, resource request instruction is parsed, resource parameters are obtained, wherein,
Resource parameters are used to represent user's requested resource amount;
Resource parameters are updated to the computing resource scheduling sentence being pre-configured with, and perform the computing resource and dispatch sentence.
Additionally, before computing resource scheduling sentence is performed, the implementation method is further included:
Judge whether the resource request instruction of user input is legal, and in the case where judged result is no, forbid performing
Computing resource is dispatched sentence and is pointed out;
Wherein, judge the resource request of user input instructs whether legal condition includes at least one of:
The form of computing resource request instruction, user's requested resource amount.
Wherein, computing resource includes at least one of:
Calculate node, CPU core number, calculating duration, the store path of result of calculation.
Additionally, the computations for obtaining user input includes:
By being provided previously by graphical interfaces, the calculating ginseng of parameter input inframe input of the user in graphical interfaces is obtained
The store path of number, and/or the path input inframe input according to user in graphical interfaces obtains the text comprising calculating parameter
Part the |input paramete in determining this document.
Wherein, graphical interfaces includes web interface.
According to a further aspect in the invention, there is provided a kind of calculating task of CFX realizes device, and this realizes device bag
Include:
First acquisition module, for obtaining the computations of user input;
Parsing module, for parsing to computations, it is determined that the type for calculating and the meter included in computations
Calculate parameter;
First performing module, for calculating parameter to be updated to the calculation command language corresponding with type is calculated being pre-configured with
In sentence, and perform the calculation command sentence.
Additionally, this realizes that device is further included:
Judge module, for, before the sentence for substituting into calculating parameter is performed, whether judging the computations of user input
It is legal, and in the result for judging in the case of no, to forbid performing calculation command sentence and being pointed out;
Wherein, whether legal condition includes at least one of to judge the computations of user input:
The scope of calculating parameter in the form of computations, computations.
Additionally, this realizes that device is further included:
Second acquisition module, for, before the sentence for substituting into calculating parameter is performed, obtaining the resource request of user input
Instruction, parses to resource request instruction, obtains resource parameters, wherein, resource parameters are used to represent the money asked by user
Measure in source;
Second performing module, for resource parameters to be updated to the computing resource being pre-configured with scheduling sentence, and execution should
Computing resource dispatches sentence.
The present invention is by parsing the calculating parameter for obtaining and calculating type from the computations of user input, and will calculate
Parameter is updated to the pre-configured calculation command sentence corresponding with the calculating type, and performs the calculation command sentence,
User can be made only to be input into simple computations, the order line operation of complexity need not be carried out, can just be completed to calculate, be reduced
User is improve execution efficiency, is reduced error probability using the difficulty of CFX calculation procedures.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment
The accompanying drawing that needs are used is briefly described, it should be apparent that, drawings in the following description are only some enforcements of the present invention
Example, for those of ordinary skill in the art, on the premise of not paying creative work, can be being obtained according to these accompanying drawings
Obtain other accompanying drawings.
Fig. 1 is the implementation method flow chart of the calculating task of CFX according to embodiments of the present invention;
Fig. 2 is that the calculating task of CFX according to embodiments of the present invention realizes device block diagram.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, the every other embodiment obtained by those of ordinary skill in the art belong to present invention protection
Scope.
A kind of embodiments in accordance with the present invention, there is provided implementation method of the calculating task of CFX.
As shown in figure 1, the implementation method includes:
Step S101, obtains the computations of user input;
Step S103, parses to computations, it is determined that the type for calculating and the calculating ginseng included in computations
Number;
Step S105, calculating parameter is updated in the calculation command sentence corresponding with type is calculated being pre-configured with, and
Perform the calculation command sentence.
Additionally, before the sentence for substituting into calculating parameter is performed, the implementation method is further included:
Judge whether the computations of user input is legal, and in the result for judging in the case of no, to forbid performing meter
Calculate command statement and pointed out;
Wherein, whether legal condition includes at least one of to judge the computations of user input:
The scope of calculating parameter in the form of computations, computations.
Additionally, before the sentence for substituting into calculating parameter is performed, the implementation method is further included:
The resource request instruction of user input is obtained, resource request instruction is parsed, resource parameters are obtained, wherein,
Resource parameters are used to represent user's requested resource amount;
Resource parameters are updated to the computing resource scheduling sentence being pre-configured with, and perform the computing resource and dispatch sentence.
Additionally, before computing resource scheduling sentence is performed, the implementation method is further included:
Judge whether the resource request instruction of user input is legal, and in the case where judged result is no, forbid performing
Computing resource is dispatched sentence and is pointed out;
Wherein, judge the resource request of user input instructs whether legal condition includes at least one of:
The form of computing resource request instruction, user's requested resource amount.
Wherein, computing resource includes at least one of:
Calculate node, CPU core number, calculating duration, the store path of result of calculation.
Additionally, the computations for obtaining user input includes:
By being provided previously by graphical interfaces, the calculating ginseng of parameter input inframe input of the user in graphical interfaces is obtained
The store path of number, and/or the path input inframe input according to user in graphical interfaces obtains the text comprising calculating parameter
Part the |input paramete in determining this document.
Wherein, graphical interfaces includes web interface.
Embodiments in accordance with the present invention, additionally provide a kind of calculating task of CFX realize device.
As shown in Fig. 2 this realizes that device includes:
First acquisition module 21, for obtaining the computations of user input;
Parsing module 22, for parsing to computations, it is determined that include in the type and computations of calculating
Calculating parameter;
First performing module 23, for calculating parameter to be updated to the calculation command corresponding with type is calculated being pre-configured with
In sentence, and perform the calculation command sentence.
Additionally, this realizes that device is further included:
Judge module(It is not shown), for, before the sentence for substituting into calculating parameter is performed, judging the calculating of user input
Whether instruction is legal, and in the result for judging in the case of no, to forbid execution calculation command sentence and pointed out;
Wherein, whether legal condition includes at least one of to judge the computations of user input:
The scope of calculating parameter in the form of computations, computations.
Additionally, this realizes that device is further included:
Second acquisition module(It is not shown), for, before the sentence for substituting into calculating parameter is performed, obtaining user input
Resource request is instructed, and resource request instruction is parsed, resource parameters are obtained, wherein, resource parameters are used to represent user institute
The stock number of request;
Second performing module(It is not shown), for resource parameters to be updated to the computing resource being pre-configured with scheduling sentence,
And perform computing resource scheduling sentence.
For example, in one embodiment, technology according to the present invention scheme, has carried out web envelopes for CFX calculation procedures
Fill, and write corresponding software interface and realize concrete function.
By encapsulation, flow process is submitted to be hidden in bottom the task of CFX calculation procedures, there is provided to give user one simple, intuitive
Web interface, user only needs to shirtsleeve operation is performed in web interface, for example:Input calculates desired parameters, selects to calculate class
Type, input calculate required resource, select store path of result of calculation, etc., the CFX provided by embodiments of the invention
The implementation method and device of calculating task, can obtain the calculating parameter of above-mentioned user input and calculate type, and will obtain
To calculating parameter be updated to the calculation command sentence corresponding with the calculating type that be pre-configured with, perform the calculation command language
Sentence simultaneously returns result of calculation, and, user can check result of calculation according to the store path of the result of calculation of oneself application.
Also, the implementation method and device of the CFX calculating tasks provided by embodiments in accordance with the present invention, can also to
The computations of family input carries out validity judgement, if the meter that the computations form of user input can not be preconfigured
Command statement identification is calculated, then refusal performs the sentence, and sends prompting message, operated or to soft so as to avoid user error
The malicious attack of part.
Additionally, user application computing resource during, it is only necessary to be intended to apply computing resource quantity, and/or
Resource type is input in corresponding text box, or is selected in corresponding drop-down menu, is carried in the embodiment of the present invention
For the implementation method of CFX calculating tasks can obtain the resource request content of user input, the resource in server is carried out
Scheduling, there is provided to user, for example, by remote control software VNC (Virtual Network Computing) management function,
Can realize in job scheduling system that graphic interaction is operated, remotely beat in operating system automatically the head calculate node of distribution
The graphical interfaces of the softwares such as CAE is opened, after graphical interfaces sets up calculating exercise question, computed push-buttom is clicked on and directly operation can be delivered
In the calculate node distributed to job scheduling.Meanwhile, if the apllied computing resource quantity of user is beyond server mesh
Before the total resources that can provide, then refuse the application of user, and send prompting message.
The web method for packing provided by above-described embodiment, user only need to just perform shirtsleeve operation in web interface
Data file preparation, computing resource application can be realized, calculating task is submitted to, result of calculation such as checks at the entire work flow, need not be passed through
The mode of order line, substantially reduces the use threshold of user, improves service efficiency, reduces error probability.
In the present embodiment, web encapsulation is carried out for CFX calculation procedures, be that user brings brand-new occupation mode, effect
It is mainly reflected in:
Substantially reduce and use difficulty.User no longer needs skillfully to grasp (SuSE) Linux OS basic operation, Shell scripts
Language, conventional text editing and character handling implement, the calling of MPI environment, job scheduling software etc. and its specialty background without
The knowledge and instrument of pass, can just be easily accomplished the work such as preparation, the execution of CFX parallel computation tasks, greatly reduce and use door
Sill.
Greatly improve service efficiency.The order line of very complicated operates Hide All in bottom, holds in bottom automatic batch
OK, the substantial amounts of manual operation time can be saved, service efficiency is improved.
The success rate that raising task is submitted to.According to the web method for packing provided by embodiment, can be to user in web interface
The parameter and data of submission carry out the validity checking of different latitude, such as, check whether the computing resource of user's application exceedes
Whether its authority, the parameter of user input are legal, and whether the input file form of user is correct etc., if it is determined that make mistake, meeting
Corresponding prompting is given in web interface, the success rate of parallel task submission can be greatly improved by these validity checkings.
Sophisticated functions is realized easily.Some complicated or Premium Features when CFX concurrent programs run, such as calculating network
Select, start cpu process binding etc., it is if needing to specify complicated parameter by command line mode, cumbersome, using difficulty
Larger, after web encapsulation, user only needs to can be achieved with these functions by some Option Boxs on interface.
Improve the safety in utilization of HPCC.Operation is submitted to be encapsulated in web interface the task of domestic consumer
Afterwards, what user performed is all enclosed operation, and largely avoiding affects the user of system stability or safety illegally to grasp
Make.
Software Graphics interface and job scheduling seamless combination.Realize and graphic interaction is realized in job scheduling system
Operation, in operating system automatically the head calculate node of distribution, the graphical interfaces of the software such as Remote Open CAE, sets in graphical interfaces
After having put calculating exercise question, clicking on computed push-buttom directly can be delivered to operation in the calculate node distributed by job scheduling.
In sum, it is by means of the above-mentioned technical proposal of the present invention, defeated by obtaining parameter of the user in graphical interfaces
Enter computations, and/or the resource bid instruction of inframe input, and the parameter information that obtains will be parsed from instruction and be updated to phase
The command statement answered, and perform the command statement, can make the calculating task of CFX realize that process need not be by order line, greatly
It is big to reduce operation difficulty, execution efficiency is improved, error probability is reduced, also, by the resource request instruction to user input
The execution of sentence is dispatched in parsing with computing resource, reasonable distribution and can be utilized computing resource, be improve computing resource utilization rate,
Additionally, by the validity judgement to user input information, the safe and stable operation of CFX calculation procedures can be ensured well.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Within god and principle, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.