The implementation method of the calculating task of ANSYS and device
Technical field
The present invention relates to scientific algorithm field, and especially, relate to the calculating task of a kind of ANSYS
Implementation method and device.
Background technology
ANSYS software is to melt structure, fluid, electric field, magnetic field, Analysis of The Acoustic Fields in the large-scale general of one
Finite element analysis software, software analysis computing module includes that structural analysis (can carry out linear analysis, non-linear
Analyze and nonlinearity analysis), hydrodynamic analysis, electromagnetic field analysis, Analysis of The Acoustic Fields, piezoelectricity divides
Analysis and the coupling analysis of multiple physical field, this software provides the cell type of more than 100 kinds, is used for simulating
Various structure and materials in engineering, additionally, also allow for user according to oneself need software is expanded,
Including User defined element attribute, self-defined material constitutive (this structure of structure, heat this structure, this structure of fluid),
User Defined flow field boundary condition, User Defined structural break criterion and crack propagation law etc..
In traditional HPCC environment, user to run calculating journey based on ANSYS software
Sequence generally has two ways: one is in the use environment of job scheduling, needs to use remote character terminal to exist
Perform sequence of operations under command line environment, typically have a following flow process:
Get out the executable file of ANSYS calculation procedure, input file, data file etc., these literary compositions
Part typically requires in the globally shared storage being placed on cluster, and user generally uses the instruments such as FTP, SFTP
Uploading these files to cluster, in most of the cases, user also needs to the text edit tool input literary composition
Parts etc. carry out edit-modify.
Determine and run the process number that this ANSYS calculation procedure needs, and run on which node, will
These information pass to the process initiation device of ANSYS by the way of command line parameter, pass through ANSYS
This ANSYS calculation procedure of process initiation device startup optimization.
After program has been run, check result of calculation, or use the instruments such as FTP, SFTP to download result literary composition
Part is to user local terminal.
Being above directly running the main flow of ANSYS calculation procedure, under practical situation, user is in high property
Parallel computation task can be submitted on computing cluster, need the unified interface using job scheduling software to provide, use
Family generally also needs to write a job scheduling script again, and in script, application calculates resource, by this foot
This submission parallel computation task, is processed task queue, Resources allocation, initiation by job scheduling software parallel
Program.
Another way is the graphical operation interface using ANSYS calculation procedure, typically has following
Flow process:
User generally uses the instruments such as FTP, SFTP and uploads the data literary composition of ANSYS calculation procedure to cluster
Part.
Start the graphical operation interface of ANSYS calculation procedure, select the data file required for calculating,
Arranging and calculate the calculating parameter needed for data file and the process number of needs, nodes etc., click is transported
Calculate button and start computing.
After program has been run, check result of calculation, or use the instruments such as FTP, SFTP to download result literary composition
Part is to user local terminal.
It is above starting graphical operation interface and runs the main flow of ANSYS calculation procedure, job scheduling
Software cannot carry out calculating task to it and process the operations such as queuing, Resources allocation.
Being described above in traditional HPCC environment, user runs and calculates based on ANSYS
Two kinds of basic operation procedures of program, the first flow process typically requires under remote character terminal, by order
The mode of row realizes, and for the vast domestic consumer of non-bone ash level, operation easier is big, execution efficiency
Low, error probability is big;Although the second flow process decreases in operation easier, man-machine interaction is experienced relatively
Good, but HPCC job scheduling software processes task queue, Resources allocation cannot be used, send out
Play concurrent program, be that whole high-performance calculation resource cannot in order, efficiently and reasonably use even cause
Calculate waste and the distribution inequality of resource.
The drawback of both the above executive mode is mainly manifested in:
Use difficulty the biggest.Wanting to submit an ANSYS parallel computation task smoothly to, user often needs
Want the very familiar a lot of knowledge the most unrelated with its specialty background and instrument, such as (SuSE) Linux OS base
This operation, Shell script, conventional text editing and character handling implement, the calling of MPI environment,
Use of job scheduling software etc., the learning curve of these knowledge or instrument is very steep, and skilled grasp is usually
Needing the time taken years, such utilization cost is the hugest for vast domestic consumer.
Execution efficiency is low.Want to submit an ANSYS parallel computation task smoothly to, need to perform multiple stream
Journey, needs to use some professional tools, needs to perform complicated loaded down with trivial details operation in command line environment, thus leads
The submission causing parallel computation task is wasted time and energy, and execution efficiency is low.
Error probability is big.For major part domestic consumer, perform complicated loaded down with trivial details behaviour in command line environment
Make, occur that the probability of human operational error is very big, especially for the unfamiliar user of operating process, holding
The links of row is all likely to encounter problem.
For the manager of HPCC, to domestic consumer's open command row terminal, there is also
The risk of safety, the maloperation of user may affect the stable operation of system, and hacker is also possible to take advantage of void
And enter.
The method using the graphical operation interface of ANSYS calculation procedure, it is impossible to make application program and operation
Scheduling organically combines so that job scheduling software cannot process task queue, Resources allocation, send out
Play ANSYS concurrent program, when using graphical operation interface, high-performance can only be provided the user by hand
Calculating node fixing in computing cluster completes to calculate, i.e. cannot be according to the dynamic regulating calculation of the size of amount of calculation
Resource, causes the computing resource waste that cannot reuse when calculating the node free time more simultaneously.
In the prior art, although there is some business software for calculation provides the parallel computation task of oneself to pass through
Graphical submission interface carries out instruction and submits to, but is both for individual software, does not has universality, and, also
Needing special client software to coordinate, the combination from job scheduling software cannot realize or exist different
The problem of degree.
Need when running ANSYS calculation procedure for user in correlation technique to pass through under remote character terminal
The mode of order line realizes, and operation easier is big, and execution efficiency is low, the problem that error probability is big, the most still
Effective solution is not proposed.
Summary of the invention
Need when running ANSYS calculation procedure for user in correlation technique to pass through under remote character terminal
The mode of order line realizes, and operation easier is big, and execution efficiency is low, the problem that error probability is big, the present invention
Implementation method and the device of the calculating task of a kind of ANSYS are proposed, it is possible to make user without passing through order line
Mode, only input computations by shirtsleeve operation, can be achieved with whole calculating process.
The technical scheme is that and be achieved in that:
According to an aspect of the invention, it is provided the implementation method of the calculating task of a kind of ANSYS, should
Implementation method includes:
Obtain the computations of user's input;
Computations is resolved, determines the calculating parameter comprised in the type of calculating and computations;
To calculate in the calculation command statement corresponding with calculating type that parameter is updated to be pre-configured with, and perform
This calculation command statement.
Additionally, before performing the statement of substitution calculating parameter, this implementation method farther includes:
Judge that the computations that user inputs is the most legal, and in the case of the result judged is no, forbid
Perform calculation command statement and point out;
Wherein, it is judged that the most legal condition of computations of user's input includes at least one of:
The form of computations, computations calculate the scope of parameter.
Additionally, before performing the statement of substitution calculating parameter, this implementation method farther includes:
Obtain the resource request instruction of user's input, resource request instruction resolved, obtains resource parameters,
Wherein, resource parameters is used for representing user's requested resource amount;
Resource parameters is updated to the calculating scheduling of resource statement being pre-configured with, and performs this calculating scheduling of resource
Statement.
Additionally, before performing to calculate scheduling of resource statement, this implementation method farther includes:
Judge that the resource request instruction that user inputs is the most legal, and in the case of judged result is no, prohibit
Only perform calculate scheduling of resource statement and point out;
Wherein, it is judged that the resource request of user's input instructs the most legal condition and includes at least one of:
Calculate the form of resource request instruction, user's requested resource amount.
Wherein, calculate resource and include at least one of:
Calculate node, CPU core number, calculate duration, the store path of result of calculation.
Additionally, the computations obtaining user's input includes:
By being provided previously by graphical interfaces, the meter inputted in obtaining user's parameter input frame in graphical interfaces
Calculate parameter and/or obtain bag according to the store path of input in user's path input frame in graphical interfaces
Containing calculating the file of parameter and determining the input parameter in this document.
Wherein, graphical interfaces includes web interface.
According to a further aspect in the invention, it is provided that the calculating task of a kind of ANSYS realize device, should
Realize device to include:
First acquisition module, for obtaining the computations of user's input;
Parsing module, for resolving computations, determines in the type of calculating and computations and wraps
The calculating parameter contained;
First performs module, for calculating the calculating corresponding with calculating type that parameter is updated to be pre-configured with
In command statement, and perform this calculation command statement.
Farther include additionally, this realizes device:
Judge module, for before performing the statement of substitution calculating parameter, it is judged that the calculating of user's input refers to
It is the most legal to make, and in the case of the result judged is no, forbids performing calculation command statement and carrying
Show;
Wherein, it is judged that the most legal condition of computations of user's input includes at least one of:
The form of computations, computations calculate the scope of parameter.
Farther include additionally, this realizes device:
Second acquisition module, for, before performing the statement of substitution calculating parameter, obtaining the money of user's input
Source request instruction, resolves resource request instruction, obtains resource parameters, and wherein, resource parameters is used for
Represent user's requested resource amount;
Second performs module, for resource parameters being updated to the calculating scheduling of resource statement being pre-configured with, and
Perform this calculating scheduling of resource statement.
The present invention passes through resolve the calculating parameter obtained from the computations of user's input and calculate type, and
It is updated to the pre-configured calculation command statement corresponding with this calculating type by calculating parameter, and performs
This calculation command statement, it is possible to make user only need to input simple computations, it is not necessary to carry out the order of complexity
Row operation, just can complete to calculate, reduce user and use the difficulty of ANSYS calculation procedure, improve and hold
Line efficiency, reduces error probability.
Accompanying drawing explanation
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 enforcement
In example, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only
Some embodiments of the present invention, for those of ordinary skill in the art, are not paying creative work
Under premise, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the implementation method flow chart of the calculating task of ANSYS according to embodiments of the present invention;
Fig. 2 be the calculating task of ANSYS according to embodiments of the present invention realize device block diagram.
Detailed description of the invention
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 clearly
Chu, be fully described by, it is clear that described embodiment be only a part of embodiment of the present invention rather than
Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art obtained all its
His embodiment, broadly falls into the scope of protection of the invention.
According to embodiments of the invention, it is provided that the implementation method of the calculating task of a kind of ANSYS.
As it is shown in figure 1, this implementation method includes:
Step S101, obtains the computations of user's input;
Step S103, resolves computations, determines in the type of calculating and computations and comprises
Calculating parameter;
Step S105, will calculate the calculation command language corresponding with calculating type that parameter is updated to be pre-configured with
In Ju, and perform this calculation command statement.
Additionally, before performing the statement of substitution calculating parameter, this implementation method farther includes:
Judge that the computations that user inputs is the most legal, and in the case of the result judged is no, forbid
Perform calculation command statement and point out;
Wherein, it is judged that the most legal condition of computations of user's input includes at least one of:
The form of computations, computations calculate the scope of parameter.
Additionally, before performing the statement of substitution calculating parameter, this implementation method farther includes:
Obtain the resource request instruction of user's input, resource request instruction resolved, obtains resource parameters,
Wherein, resource parameters is used for representing user's requested resource amount;
Resource parameters is updated to the calculating scheduling of resource statement being pre-configured with, and performs this calculating scheduling of resource
Statement.
Additionally, before performing to calculate scheduling of resource statement, this implementation method farther includes:
Judge that the resource request instruction that user inputs is the most legal, and in the case of judged result is no, prohibit
Only perform calculate scheduling of resource statement and point out;
Wherein, it is judged that the resource request of user's input instructs the most legal condition and includes at least one of:
Calculate the form of resource request instruction, user's requested resource amount.
Wherein, calculate resource and include at least one of:
Calculate node, CPU core number, calculate duration, the store path of result of calculation.
Additionally, the computations obtaining user's input includes:
By being provided previously by graphical interfaces, the meter inputted in obtaining user's parameter input frame in graphical interfaces
Calculate parameter and/or obtain bag according to the store path of input in user's path input frame in graphical interfaces
Containing calculating the file of parameter and determining the input parameter in this document.
Wherein, graphical interfaces includes web interface.
According to embodiments of the invention, additionally provide a kind of ANSYS calculating task realize device.
Include as in figure 2 it is shown, this realizes device:
First acquisition module 21, for obtaining the computations of user's input;
Parsing module 22, for resolving computations, determines type and the computations of calculating
In the calculating parameter that comprises;
First performs module 23, corresponding with calculating type for be updated to be pre-configured with by calculating parameter
In calculation command statement, and perform this calculation command statement.
Farther include additionally, this realizes device:
Judge module (not shown), for before performing the statement of substitution calculating parameter, it is judged that user is defeated
The computations entered is the most legal, and in the case of the result judged is no, forbids performing calculation command language
Sentence is also pointed out;
Wherein, it is judged that the most legal condition of computations of user's input includes at least one of:
The form of computations, computations calculate the scope of parameter.
Farther include additionally, this realizes device:
Second acquisition module (not shown), for, before performing the statement of substitution calculating parameter, obtaining and use
The resource request instruction of family input, resolves resource request instruction, obtains resource parameters, wherein, and money
Source dates is used for representing user's requested resource amount;
Second performs module (not shown), adjusts for the calculating resource being updated to resource parameters be pre-configured with
Degree statement, and perform this calculating scheduling of resource statement.
Such as, in one embodiment, according to technical scheme, for ANSYS calculation procedure
Carry out web encapsulation, and write corresponding software interface and realize concrete function.
By encapsulation, flow process is submitted to be hidden in bottom the task of ANSYS calculation procedure, it is provided that to user
The web interface of one simple, intuitive, user has only in web interface perform shirtsleeve operation, such as:
Input calculates desired parameters, selects to calculate type, inputs the resource required for calculating, selects result of calculation
Store path, etc., the ANSYS that embodiments of the invention are provided calculates implementation method and the dress of task
Put, the calculating parameter of above-mentioned user input can be obtained and calculate type, and the calculating parameter that will acquire
It is updated to the calculation command statement corresponding with this calculating type being pre-configured with, performs this calculation command statement
And return result of calculation, and, user can check meter according to the store path of the result of calculation of oneself application
Calculate result.
Further, the ANSYS provided according to embodiments of the invention calculates implementation method and the device of task,
The computations of user's input can also be carried out validity judgement, if the computations form of user's input
The calculation command statement identification that can not be preconfigured, then refusal performs this statement, and sends prompting message,
Thus avoid user error operation or the malicious attack to software.
Additionally, apply for calculating during resource user, it is only necessary to be intended to the calculating resource of application quantity,
And/or resource type inputs in corresponding text box, or select in corresponding drop-down menu,
The ANSYS provided in the embodiment of the present invention calculates the implementation method of task can obtain the resource that user inputs
Request content, is scheduling the resource in server, it is provided that to user, such as, soft by remotely controlling
Part VNC (Virtual Network Computing) manages function, it is possible to realize figure in job scheduling system
Shape interactive operation, the head automatically distributed in operating system calculates the softwares such as Remote Open CAE on node
Graphical interfaces, after graphical interfaces sets up calculating exercise question, clicking on computed push-buttom can directly be delivered to operation
On the calculating node that job scheduling is distributed.Meanwhile, if user's apllied calculating resource quantity beyond
The total resources that server can provide at present, then refuse the application of user, and send prompting message.
The web method for packing provided by above-described embodiment, user has only to perform letter in web interface
Single operation can be achieved with data file preparation, calculating resource bid, calculating task is submitted to, result of calculation is looked into
The entire work flow such as see, it is not necessary to by the way of order line, be substantially reduced the use threshold of user, improve and use
Efficiency, reduces error probability.
In the present embodiment, carry out web encapsulation for ANSYS calculation procedure, bring for user brand-new
Occupation mode, effect is mainly reflected in:
It is substantially reduced use difficulty.User be no longer necessary to skillfully to grasp (SuSE) Linux OS basic operation,
Shell script, conventional text editing and character handling implement, the calling of MPI environment, operation are adjusted
The knowledge unrelated with its specialty background and the instruments such as degree software, just can be easily accomplished ANSYS parallel computation and appoint
The work such as the preparation of business, execution, greatly reduce use threshold.
It is greatly improved service efficiency.The order line operation Hide All of very complicated is at bottom, automatic at bottom
Batch performs, and can save the substantial amounts of manual operation time, improves service efficiency.
The success rate that raising task is submitted to.The web method for packing provided according to embodiment, can be to user
Parameter and the data submitted in web interface carry out the validity checking of different latitude, such as, check user
Whether the calculating resource of application exceedes its authority, and the parameter of user's input is the most legal, the input file of user
Form is the most correct, if it is determined that make mistake, can provide corresponding prompting at web interface, by these
Validity checking can be greatly improved the success rate that parallel task is submitted to.
Easily realize sophisticated functions.Some complexity or Premium Features when ANSYS concurrent program runs, than
As calculated the selection of network, start cpu process binding etc., if needing to specify again by command line mode
Miscellaneous parameter, complex operation, use difficulty relatively big, after web encapsulates, user has only to pass through boundary
Some Option Boxs on face can be achieved with these functions.
Improve the safety in utilization of HPCC.Operation is submitted to be encapsulated in the task of domestic consumer
After web interface, what user performed is all enclosed operation, largely avoids and affects system stability
Or user's illegal operation of safety.
Software Graphics interface and job scheduling seamless combination.Achieve in job scheduling system, realize figure
Interactive operation, the head automatically distributed in operating system calculates the figure of the softwares such as Remote Open CAE on node
Shape interface, after graphical interfaces sets up calculating exercise question, clicks on computed push-buttom and can directly be delivered to operation make
On the calculating node that industry scheduling is distributed.
In sum, by means of the technique scheme of the present invention, by obtaining user in graphical interfaces
The computations of input and/or resource bid instruction in parameter input frame, and will resolve from instruction and obtain
Parameter information be updated to corresponding command statement, and perform this command statement, it is possible to make the meter of ANSYS
The process that realizes of calculation task, without by order line, is substantially reduced operation easier, improves execution efficiency, reduces
Error probability, and, the parsing instructed by the resource request that user is inputted and calculating scheduling of resource
The execution of statement, it is possible to reasonable distribution and utilization calculate resource, improve calculating resource utilization, this
Outward, by the validity judgement to user's input information, it is possible to ensure that ANSYS calculates journey well
The safe and stable operation of sequence.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all at this
Within bright spirit and principle, any modification, equivalent substitution and improvement etc. made, should be included in this
Within bright protection domain.