Running PBS jobs in KUBERNETS

By converting PBS job inputs into Kubernetes job configuration files, the high cost and low efficiency of PBS in high-performance computing clusters are resolved, enabling efficient operation of PBS jobs in the Kubernetes system and reducing learning and operational costs.

CN115280283BActive Publication Date: 2025-11-14TENCENT AMERICA LLC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202180019702.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-09
Filing Date
2021-03-19
Publication Date
2025-11-14
Estimated Expiration
2041-03-19

AI Technical Summary

Technical Problem

Existing portable batch processing systems (PBS) are costly and inefficient to use in high-performance computing clusters, resulting in wasted resources and unnecessary costs. Furthermore, users need to learn the new Kubernetes system to use it, which increases learning and operational costs.

Method used

A conversion tool is used to convert PBS job inputs into Kubernetes job configuration files, enabling PBS jobs to run on the Kubernetes system. This tool converts PBS job inputs into Kubernetes job configuration files and executes jobs through the Kubernetes system, thus achieving the effective operation of PBS jobs in the Kubernetes environment.

Benefits of technology

It reduces the cost for users to learn a new system, improves the efficiency and economy of job execution, avoids resource waste, and enables PBS jobs to run efficiently in the Kubernetes system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115280283B_ABST
    Figure CN115280283B_ABST
Patent Text Reader

Abstract

The system is configured to run jobs in Kubernetes based on PBS job input. The system can convert PBS input, for example, in the form of PBS job command-line input and / or PBS job scripts, into Kubernetes job configuration files. The Kubernetes system can then execute the job based on the Kubernetes job configuration file. Through this conversion processing implementation, PBS users can leverage Kubernetes capabilities to execute jobs without needing to know how to use Kubernetes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer job scheduling software tools, and more specifically to running portable batch system (PBS) jobs in a Kubernetes environment. Background Technology

[0002] Portable Batch Systems (PBS) are cluster management tools, particularly popular in academia, for Unix high-performance computing (HPC) clusters. However, using computer clusters with PBS can be expensive and inefficient. For example, universities may spend millions of dollars on computer clusters, and even more on operators maintaining and operating them. Furthermore, the number of computers and resources within a cluster is finite, so at times when the cluster faces more jobs than it can handle, some jobs may be unintentionally delayed. At other times, cluster resources may not be used, leading to wasted power and other unnecessary costs and resource consumption. Therefore, there is a need for a way for PBS environments and PBS users to use clusters more efficiently for job execution. Summary of the Invention

[0003] This specification describes a system, method, and apparatus for running Portable Batch System (PBS) jobs in a Kubernetes system or environment and / or for converting PBS job input into Kubernetes job profiles. In one example embodiment, a method includes: receiving Portable Batch System (PBS) job input using at least one processor; parsing the PBS job input using at least one processor to determine a plurality of PBS job attributes; generating a Kubernetes job profile based on data values ​​of the PBS job attributes using at least one processor; and executing the Kubernetes job according to the Kubernetes job profile using at least one processor. In another embodiment, a system includes at least one processor configured to execute computer code to perform the above-described method. In yet another embodiment, a non-transitory computer-readable storage medium stores instructions executable by at least one processor to perform the above-described method. Further embodiments are described in detail below.

[0004] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit the scope of this disclosure. Attached Figure Description

[0005] The accompanying drawings, which are incorporated herein and constitute a part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the principles of this disclosure.

[0006] Figure 1 This is a schematic diagram of an example system including a Portable Batch Processing System (PBS) system and a Kubernetes system.

[0007] Figure 2 This is a block diagram of an example system for executing jobs in Kubernetes based on PBS job input.

[0008] Figure 3 This is a flowchart illustrating the method for executing jobs in Kubernetes based on PBS job input.

[0009] Figure 4 It is a block diagram of the structural components of the equipment, which can represent Figure 1 or Figure 2 One or more components of the system. Detailed Implementation

[0010] This document describes exemplary embodiments in detail, and examples of exemplary embodiments are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise stated, the same reference numerals in different drawings denote the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this disclosure. Rather, the implementations described in the following exemplary embodiments are merely examples of devices and methods consistent with some aspects of this disclosure as described in detail in the appended claims.

[0011] This specification describes a system for running Portable Batch System (PBS) jobs on or in a Kubernetes system. Kubernetes systems can execute jobs more efficiently and / or more economically than PBS systems, and therefore, one or more users may expect to use Kubernetes instead of PBS to execute one or more jobs over a period of time. However, users may already have PBS integrated into their computer systems and may know how to program and run jobs in PBS. For example, PBS is a popular software tool used in universities, and many professors, other faculty members, and students know how to program and otherwise use PBS to perform various assignments. Kubernetes is a completely different tool that operates according to different specifications and rules. Therefore, in order to execute jobs in Kubernetes, users not only incur the additional cost of accessing Kubernetes but also the additional cost and time of learning how to program and otherwise use Kubernetes tools.

[0012] This specification describes a computer-implemented conversion tool that converts PBS job input, such as PBS job scripts and / or PBS job command-line inputs, into Kubernetes job profiles used by the Kubernetes system to run the job. Users can enter PBS inputs into the system to run jobs, for example, through a computer terminal interface, just as users would normally do with PBS, except for relatively minor differences in the formatting of the input commands to run the job in Kubernetes instead of PBS. For example, a user might enter "kube-qsub" instead of "qsub". Furthermore, users can create PBS job inputs, for example, in the form of scripts and command-line inputs, just as they would normally run jobs in the PBS system. After detecting the input commands, the system is configured to convert the PBS job inputs into Kubernetes job profiles, which the Kubernetes system then uses to run the job in Kubernetes.

[0013] PBS job input, when entered into a computer system, is data that is at least temporarily stored in the computer system's memory. This data includes data values ​​that inform the computer configured with PBS tools how to run the PBS job. The transformation tool obtains these data values ​​and, according to a predetermined set of transformation rules, includes or populates these data values ​​into specific locations or fields of a data structure defined by the Kubernetes job template to generate a Kubernetes job profile. The Kubernetes computer system then accesses the data structure defining the Kubernetes job profile and uses the data values ​​from the Kubernetes job profile to run the associated job in Kubernetes.

[0014] Effectively, the transformation tool forms an improved PBS computer processing for running jobs because it provides the following computer function: it links the PBS job input to the Kubernetes system and, according to a predetermined set of transformation rules, transforms a first dataset formatted for running jobs by the PBS computer system into a second dataset formatted for running jobs more efficiently by the Kubernetes system.

[0015] Figure 1 This is a schematic diagram of an example electronic system or implementation environment 100 configured to use Kubernetes to execute or run Portable Batch Processing System (PBS) jobs. (Example...) Figure 1As shown, system 100 includes PBS system 102 and Kubernetes system 104. Typically, PBS system 102 is at least one computing device configured to perform PBS jobs, such as a single computing device, multiple computing devices, or a network of computing devices. The computing device in PBS system 102 may include at least one processor, such as a single processor or multiple processors, configured to execute computer code or instructions of PBS software (or PBS software tools, packages, platforms, etc.) stored in the memory of PBS system 102. Non-limiting examples of PBS software include OpenPBS, Terascale Open-source Resource and QUEue Manager (TORQUE), or Altair PBS Professional. TM .

[0016] Additionally, in PBS system 102, PBS jobs are associated with and / or defined by associated PBS job inputs, which include one or more fields, each containing or filled with one or more data values, which define and / or indicate one or more specifications, details, and / or parameters of the PBS job. PBS system 102 is configured to execute PBS jobs based on the data values ​​of the associated PBS job inputs. PBS system 102, including at least one computing device and / or at least one processor, can be configured to receive, identify, read, parse, recognize, and / or determine PBS job inputs formatted according to predetermined PBS formatting rules, definitions, and / or specifications, and execute PBS jobs based on the PBS job inputs and / or the data values ​​included in the PBS job inputs, wherein the PBS software is configured according to the predetermined PBS formatting rules, definitions, and / or specifications. PBS job inputs can include, or take the form of, a single job command or multiple job commands entered into one or more command lines, a PBS job script, or a combination thereof.

[0017] In various embodiments, at least one processor, when executing PBS software, is configured to read or parse PBS job input to identify one or more PBS jobs indicated by the PBS job input and to execute or run one or more PBS jobs. Furthermore, in various embodiments, PBS job input is human-generated user input entered into the PBS system 102 by a user of the PBS system 102, for example, by using an input device included in or otherwise coupled to the PBS system 102 (e.g., a keyboard, touchscreen, or microphone as non-limiting examples). In other example embodiments, PBS job input is non-human-generated input. For example, a robot or artificial intelligence may use an input device to enter or type PBS job input in the PBS system 102. As another example, a computing device may generate PBS job input and send it to the PBS system 102. As another example, the computing device of the PBS system 102 may internally generate PBS job input and then execute PBS jobs based on the PBS job input. Other examples may utilize a combination of human and machine input to generate and input PBS job input. For example, a person can input PBS job input from a non-PBS computing device that is not part of PBS system 102, and the non-PBS computing device can input PBS job input within PBS system 102. In other examples, PBS job input can be stored remotely from PBS system 102, and when triggered, PBS system 102 can remotely access the PBS job input and execute one or more PBS jobs based on the remotely accessed PBS job input. Various methods can exist to enable PBS system 102 to receive PBS job input to execute PBS jobs.

[0018] Furthermore, typically, a job is a unit of work executed from start to finish by at least one computing device and / or at least one processor to perform a computer task or function. A job can be the entirety of a given task or function, or a part of a given task or function. A job can be defined or identified by a set of one or more associated commands or instructions. Moreover, in various implementations, when at least one computing device or processor executes a job, it performs the job continuously from start to finish without user or other external intervention or interruption.

[0019] Additionally, Kubernetes system 104 is at least one computing device, such as a single computing device or a network of computing devices, configured to perform Kubernetes jobs. Typically, Kubernetes is a container cluster management system configured to perform automated deployment, scaling, and container operations across cluster hosts, using containers as its central infrastructure. Typically, a cluster (also called a computer cluster) is a collection of connected computers (called nodes) working together as a single system. Furthermore, typically, a container is software or a unit of software that packages application code along with the dependencies required when the code is executed at runtime. In various implementations, Kubernetes system 104 is implemented as an open-source platform. Alternatively or additionally, in various implementations, Kubernetes system 104 is implemented in cloud computing. For example, in various implementations, Kubernetes is a technology used by cloud service providers. The computing device in Kubernetes system 104 may include at least one processor, such as a single processor or multiple processors, configured to execute computer code or instructions of Kubernetes software stored in the memory of Kubernetes system 104.

[0020] Additionally, the Kubernetes system 104, including at least one computing device and / or at least one processor, can be configured to receive, identify, read, parse, recognize, and / or determine Kubernetes input formatted according to predetermined Kubernetes formatting rules, definitions, and / or specifications, and execute Kubernetes jobs based on the Kubernetes input, wherein the Kubernetes software is configured according to the predetermined Kubernetes formatting rules, definitions, and / or specifications. In a particular embodiment, the Kubernetes job creates one or more container groups (pods) and ensures that the one or more container groups terminate successfully. In Kubernetes, a container group is a group of one or more containers. In a particular embodiment, the containers in a container group have shared storage and shared specifications about how to run one or more given containers. Therefore, when the Kubernetes system 104 executes a Kubernetes job, the Kubernetes system 104 creates one or more associated container groups, executes instructions or code included in one or more container groups, detects the successful completion of one or more container groups, and determines that the Kubernetes job has completed when a predetermined number of one or more container groups have completed successfully. In various embodiments, the Kubernetes system 104 is configured to execute Kubernetes jobs by running or executing multiple container groups in parallel.

[0021] In a particular implementation, Kubernetes input is a Kubernetes job configuration file. Typically, Kubernetes system 104 can recognize various types of Kubernetes objects. A Kubernetes object is an entity in Kubernetes system 104 that represents the state of a given cluster. In various implementations, an object describes or indicates one or more of the following: which containerized applications are running and / or on which nodes they are running, the resources available for the containerized applications, and the policies surrounding how those applications operate (e.g., restart policies, upgrades, and fault tolerance). A given object in Kubernetes system 104 can be in the form of an object configuration file, which includes multiple fields containing data values ​​that characterize or define the given object. The given data values ​​can be numbers, alphabetic words or phrases (e.g., in the form of strings), or combinations of letters and numbers, depending on the type of information indicated by the fields of the object configuration file. One type of Kubernetes object is a Kubernetes job. Therefore, a given Kubernetes job can have an associated Kubernetes job configuration file and / or be defined by an associated Kubernetes job configuration file, which includes multiple fields populated with data values ​​that define or characterize the given Kubernetes job. Kubernetes system 104 can receive a Kubernetes job configuration file for a given Kubernetes job as Kubernetes input, or it can generate a Kubernetes job configuration file for a given Kubernetes job itself. Furthermore, the Kubernetes system 104 can analyze the Kubernetes job configuration file of a given Kubernetes job and execute the given Kubernetes job based on the data values ​​included in the associated Kubernetes job configuration file.

[0022] Figure 2This is a block diagram of an example system 200 configured to execute PBS jobs within a Kubernetes system. For this purpose, system 200 is configured to convert PBS job inputs associated with a PBS job into corresponding Kubernetes job profiles, and then execute the Kubernetes job based on the Kubernetes job profiles. In this way, PBS job inputs are generated, but instead of PBS system 102, Kubernetes system 104 executes the processing of the PBS job associated with the PBS job inputs as a Kubernetes job, for example, by using clusters, containers, and container groups available in Kubernetes system 104.

[0023] In various implementations, system 200 may be separated or organized into a transformation module 202 and a Kubernetes job execution module 204. The transformation module 202 is configured to perform a transformation process that converts PBS job inputs associated with a PBS job into corresponding Kubernetes job profiles. The Kubernetes job execution module 204 is configured to execute a Kubernetes job corresponding to a Kubernetes job profile generated or created by the transformation module 202. The Kubernetes job execution module 204 may be... Figure 1The conversion module 202 is a component of the Kubernetes system 104. The conversion module 202 can be implemented in any of a variety of ways. For example, in some embodiments, the conversion module 202 may be a component 202 of the PBS system 102. In other embodiments, the conversion module 202 may be a component of the Kubernetes system 104. In other embodiments, the conversion module 202 may be a standalone system or a component of a non-PBS and / or non-Kubernetes computer system that is not configured to perform any PBS or Kubernetes functions other than converting PBS job inputs into Kubernetes job profiles. Other implementations may include any combination of the various combinations of the previously mentioned implementations. For example, in various implementations, some elements of the conversion module 202 (e.g., hardware, software, and / or functional elements) may be part of the PBS system 102, while other elements of the conversion module 202 are part of the Kubernetes system 104; some elements of the conversion module 202 may be part of the PBS system 102, while other elements of the conversion module 202 are part of a non-PBS / non-Kubernetes computer system; some elements of the conversion module 202 may be part of the Kubernetes system 104, while other elements of the conversion module 202 are part of a non-PBS / non-Kubernetes computer system; or some elements of the conversion module 202 are part of the PBS system 102, other elements of the conversion module 202 are part of the Kubernetes system 104, and other still other elements are part of a non-PBS / non-Kubernetes computer system. Various ways may exist to implement the conversion module 202 as a computing system or a network of computing systems to convert PBS job inputs into Kubernetes job profiles configured to be executed by the Kubernetes system 104 and / or the Kubernetes job execution module 204.

[0024] Furthermore, as typically used herein, modules can be hardware or a combination of hardware and software. For example, each module may include one or more application-specific integrated circuits (ASICs), one or more field-programmable gate arrays (FPGAs), one or more circuits, one or more digital logic circuits, one or more analog circuits, discrete circuits, various combinations of gates, or any other type of hardware or combination thereof. In various embodiments, one or more hardware or software elements of a module may be implemented in a computer system or a network of computer systems in any of a variety of ways, including those configured to perform PBS functions of PBS system 102, Kubernetes functions of Kubernetes system 104, or combinations thereof. Alternatively or additionally, each module may include memory hardware comprising instructions executable using at least one processor or processor circuitry to implement one or more features of the module. When any module in the module includes a portion of memory comprising instructions executable using at least one processor, the module may include at least one processor or may not include at least one processor. In some examples, each module may simply be a portion of memory comprising instructions executable using at least one processor to implement the features of the corresponding module, and the module may not include any other hardware. Because each module includes at least some hardware—even if the hardware includes software—each module can be interchangeably referred to as a hardware module.

[0025] More specifically, the transformation module 202 includes multiple modules (or sub-modules), including a PBS input module 206, a PBS job script parsing module 208, a Kubernetes job template module 210, and a Kubernetes job profile generation module 212. As described further below, each of modules 206 through 212 performs a set of one or more associated functions to transform the PBS job input into a Kubernetes job profile. Other configurations of the transformation module 202 (e.g., including more, fewer, and / or more...) Figure 2 It is also possible to configure different modules (such as the modules shown) to perform conversion processing.

[0026] The PBS job input module 206 is configured to receive, identify, access, and / or store PBS job input. The PBS job input module 206 can also be configured to identify trigger events and, in response to these events, initiate a transformation process to convert the PBS job input into a corresponding Kubernetes job profile. In a particular implementation, after creating the corresponding Kubernetes job profile, the transformation start command also operates to cause the Kubernetes job execution module 204 to execute the Kubernetes job corresponding to the PBS job input without additional human intervention. That is, once the transformation module 202 creates the Kubernetes profile based on the PBS job input, no human intervention (e.g., user input) is required to execute the corresponding Kubernetes job.

[0027] In various implementations, the triggering event is a transformation start command input into the PBS job input module 206. The transformation start command can be user input entered into the PBS job input module 206 by a user using an input device (e.g., a keyboard, touchscreen, or microphone as non-limiting examples). In a particular implementation, the transformation start command is similar to (e.g., a derivative thereof) the PBS “qsub” command used in the PBS system 102 to run a PBS job. An example derivative is “kube-qsub”; however, other derivatives of “qsub” or other ways of configuring the transformation start command to resemble “qsub” are also possible. Configuring the transformation start command to resemble the PBS qsub command can facilitate transformation processing and / or job execution in Kubernetes, especially for users only familiar with PBS. For example, a PBS user creates a PBS job input for executing a PBS job as he / she would normally do, except instead of entering “qsub”, the PBS user enters a slightly different command such as “kube-qsub”. In response, the conversion module 202 converts the PBS job input associated with the conversion start command (e.g., “kube-qsub”) into a Kubernetes job profile, and then the Kubernetes job execution module 204 executes the Kubernetes job based on the created Kubernetes job profile.

[0028] Upon detecting a trigger event, the PBS job input module 206 can identify the PBS job input. For at least some implementations where the trigger event is a conversion start command, the PBS job input is a parameter of the conversion start command. Therefore, in such implementations, the PBS job input module 206 identifies the PBS job input by recognizing the parameter of the conversion start command.

[0029] Additionally, PBS input module 206 is configured to analyze or parse PBS input for PBS job scripts and PBS job command-line inputs. In various implementations, a given PBS job input may include one or more PBS job scripts, one or more PBS job command-line inputs, or a combination of one or more PBS job scripts and one or more PBS job command-line inputs. Typically, as described further below, PBS job input may include one or more PBS job attributes (also called PBS job options) that define or characterize a PBS job, wherein transformation module 202—specifically, Kubernetes job profile generation module 212—uses said one or more PBS job attributes to create a Kubernetes job profile. A PBS job script may include a collection of one or more PBS job attributes and may have an associated script name. A PBS job command-line input may be one or more PBS job attributes or may explicitly indicate one or more PBS job attributes rather than being part of a PBS job script. When analyzing or parsing PBS job input, if PBS input module 206 recognizes a PBS job script, PBS input module 206 may send the PBS job script to PBS job script parsing module 208 for further parsing or analysis. Additionally, if the PBS input module 206 recognizes the PBS job command line input, the PBS input module 206 can send the PBS job command line input as a PBS job attribute directly to the Kubernetes job configuration file generation module 212 for generating the Kubernetes job configuration file.

[0030] In various implementations, according to the PBS specification, PBS job attributes in the PBS job command line input or PBS job attributes in the PBS job command line input can be indicated by a predetermined flag or prefix (e.g., "-C"). In such implementations, the PBS input module 206 can be configured to search for and detect the predetermined flag when parsing the PBS command line. In response to detecting the predetermined flag, the PBS input module 206 can identify the PBS job attributes in the PBS job command line input and send the PBS job attributes to the Kubernetes job configuration file generation module 212.

[0031] Additionally, the PBS job script analysis module 208 is configured to analyze or parse PBS job scripts to determine the PBS job attributes to be sent to the Kubernetes job configuration file generation module 212. Based on this parsing, the PBS job script parsing module 208 is configured to identify two types of PBS job attributes: PBS directives and PBS content. Typically, PBS directives specify the resource requirements and other specifications or parameters of the PBS job. PBS content effectively includes information in the PBS job script other than the PBS directives.

[0032] According to the PBS specification, PBS instructions are statements that begin with a predefined prefix. In a specific configuration, the predefined prefix is ​​"#PBS", but other predefined prefixes may also exist. Once a given predefined prefix is ​​identified, the PBS job script parsing module 208 can identify that the data in a specific part of the PBS job script following the given predefined prefix is ​​a PBS instruction. After identifying the PBS instructions in the PBS job script, the PBS job script parsing module 208 can send the PBS instructions as PBS job attributes to the Kubernetes job configuration file generation module 212.

[0033] Additionally, as described above, the PBS job script parsing module 208 can identify PBS content in the PBS job script, excluding PBS instructions, as PBS job attributes. One type of PBS content identified by the PBS job script parsing module 208 is a shell interpreter, such as "bin / bash", "bin / csh", "bin / ksh", and "bin / tcsh" as non-limiting examples. For at least some implementations, shell interpreters are identified in the PBS job script by a predetermined character sequence (e.g., a predetermined index). In a particular configuration, the predetermined prefix is ​​shebang (#!), although other types of predetermined prefixes may also exist. Another type of PBS content is a shell script. After identifying the PBS content, the PBS job script parsing module 208 can send the PBS content to the Kubernetes job configuration file generation module 212. For at least some implementations, the PBS job script parsing module 208 can first determine the PBS instructions and then determine the PBS content items after determining all PBS instructions. In a particular implementation, the PBS job script parsing module 208 can perform a removal process, such that it identifies PBS instructions as removed or deleted from the PBS job script in order to identify the remaining PBS content in the PBS job script.

[0034] The Kubernetes job template module 210 is configured to select a Kubernetes job template from a plurality of Kubernetes job templates for creating a Kubernetes job configuration file. In a particular implementation, the Kubernetes job template module 210 has two templates to choose from: a default Kubernetes job template and a Message Passing Interface (MPI) job template. If the PBS job associated with a given PBS job input is an MPI job, the Kubernetes job template module 210 can select the MPI job template to create the Kubernetes job configuration file. Otherwise, if the PBS job associated with a given PBS job input is not an MPI job, the Kubernetes job template module 210 can select the default Kubernetes job template to create the Kubernetes job configuration file.

[0035] More specifically, in various implementations, a given PBS job may have an associated MPI status indicating whether the PBS job is an MPI job. In such implementations, the MPI status is included in the PBS job script or in the PBS job command-line input. In implementations where the MPI status is included in the PBS job script, the PBS job script parsing module 208 can determine the MPI status while parsing the PBS job script and send the MPI status to the Kubernetes job template module. Alternatively, in implementations where the MPI status is included in the PBS job command-line input, the PBS input module 206 can determine the MPI status and send it to the Kubernetes job template module 210. In response to receiving the MPI status, if the MPI status indicates that the PBS job is an MPI job, the Kubernetes job template module 210 can select an MPI job template; if the MPI status indicates that the PBS job is not an MPI job, the Kubernetes job template module 210 can select a default Kubernetes job template. After selecting a Kubernetes job template, the Kubernetes job template module 210 can send the selected Kubernetes job template to the Kubernetes job configuration file generation module 212 to create a Kubernetes job configuration file.

[0036] The Kubernetes job configuration file generation module 212 can generate or create a Kubernetes job configuration file by populating fields of a selected Kubernetes template with data values ​​of PBS job attributes received from the PBS job script parsing module 208 and the PBS input module 206. The Kubernetes job configuration file generation module 212 can populate fields with data values ​​according to predetermined conversion rules, as described in further detail below. Additionally, for at least some implementations, the Kubernetes job configuration file generation module 212 can initially generate or create a Kubernetes job configuration file in the form of a YAML data file. Then, the Kubernetes job configuration file generation module 212 can convert the YAML file, which can be converted by the Kubernetes job execution module 204, into a JavaScript Object Notation (JSON) file to execute or run the associated Kubernetes job. The Kubernetes job configuration file generation module 212 can also generate Kubernetes job configuration files in other formats.

[0037] Additionally, each PBS job attribute sent to the Kubernetes job profile generation module 212 may include an associated attribute type indicator indicating the type of the PBS job attribute and an associated data value. For at least some implementations, the attribute type indicator for the PBS instruction is indicated by "-α", where α is an uppercase or lowercase letter. The data value may be associated with a given attribute type indicator, for example, by following it. Upon receiving a given PBS job attribute, the Kubernetes job profile generation module 212 can use the attribute type indicator to determine the location or field in the selected Kubernetes job template and then include the associated data value in the determined location or field.

[0038] To illustrate, the PBS job attribute "-N job-example" consists of two parts: the attribute type indicator "-N" and the associated data value "job-example". The attribute type indicator "-N" indicates that the PBS descriptor is the "name" of the associated PBS job, and the data value "job-example" indicates that the name of the associated PBS job is "job-example". Therefore, upon receiving the PBS job attribute "-N job-example", the Kubernetes job configuration file generation module 212 recognizes that the received PBS job attribute is identifying the "name" of the PBS job, thereby determining the "name" position or field of the Kubernetes job configuration file it is creating, and then includes the data value "job-example" in the "name" position or field of the Kubernetes job configuration file.

[0039] Furthermore, in various implementations, some PBS directors include both an attribute type indicator and an attribute subtype indicator. For example, the PBS job attribute (or option) "-l walltime=hh:mm:ss" comprises three parts: the attribute type indicator "-l", the attribute subtype indicator "walltime", and the data value "hh:mm:ss". The combination of the type indicator and the subtype indicator "-l walltime" indicates that the PBS descriptor is identifying the amount of time required for the PBS job, and "hh:mm:ss" is the data value representing the amount of time in hours, minutes, and seconds. Different attribute subtypes can include the same attribute type indicator. For example, according to the PBS specification, the attribute type indicator "-l" is associated with several subtypes.

[0040] The following is a non-exhaustive list of PBS attribute type indicators and how the Kubernetes job configuration file generation module 212 populates the fields of the selected Kubernetes job template:

[0041] The PBS attribute type indicator "-N" indicates or declares the name of the corresponding Kubernetes job. The Kubernetes job profile generation module 212 populates the data value associated with "-N" into the metadata fields (e.g., the "metadata.labels.jobname" field) of the Kubernetes job template. If the PBS job descriptor with the name "-N" is not included in the given PBS job input, the Kubernetes job profile generation module 212 can assign a random name / string to that field. In various implementations, the conversion module 202 displays the Kubernetes job name by converting the output message of the start command (e.g., "kube-qsub").

[0042] The PBS attribute type indicator "-v" indicates a comma-separated list of strings in the form of "variable" or "variable = value". Upon detecting the "-v" attribute type indicator, the Kubernetes job configuration module 212 includes or populates the data values ​​in ("variable" or "variable = value") into the environment variable fields (e.g., the "spec.template.spec.containers[].env[]" field) of the Kubernetes job template.

[0043] The PBS attribute type indicator "-V" declares that all environment variables in the qsub command environment will be output to the batch job. After detecting the "-V" attribute type indicator, the Kubernetes job configuration module 212 includes all environment variables from the PBS job input in the environment variable fields of the Kubernetes job template (e.g., the "spec.template.spec.containers[].env[]" field).

[0044] The PBS attribute type indicator "-q" defines the destination of the job, such as a queue, a server, or a queue on a server. However, Kubernetes does utilize queue priorities. Therefore, the Kubernetes job configuration module 212 can identify the queue associated with "-q" as a marker for a special resource, such as a graphics processing unit (GPU) node, a high input / output (IO) node, etc. Additionally, a marker for the Kubernetes job profile can be created before job execution. Therefore, upon detecting the "-q" attribute type indicator, the Kubernetes job profile generation module 212 can include or populate the associated data values ​​in the Kubernetes node assignment field (e.g., the "spec.template.spec.nodeSelector.queue" field) of the Kubernetes job template. In various implementations, as indicated, the Kubernetes node assignment field is the "nodeSelector" field. Other Kubernetes node assignment fields, such as the Kubernetes nodeSelect group field (e.g., "spec.template.spec.nodeSelector.group"), are possible. Typically, when the Kubernetes job profile generation module 212 includes associated data values ​​in the Kubernetes node assignment (or nodeSelector) field, this field filters for the flags specified when the Kubernetes cluster is created.

[0045] The PBS attribute type indicator "-J" is used to start a list of jobs. Upon detecting the "-J" attribute type indicator, the Kubernetes job configuration file generation module 212 can generate multiple or several Kubernetes job configuration files, such as YAML files. In each Kubernetes job configuration file, the Kubernetes job configuration file generation module 212 can include or populate the environment variable "PBS_ARRAY_INDEX" in an environment variable field (e.g., the "spec.template.spec.contains[].env[]" field) and set PBS_ARRAY_INDEX to 1 up to its current value.

[0046] The PBS attribute type indicator "-t" specifies the task identifier (ID) of the job array. Upon detecting the "-t" attribute type indicator, the Kubernetes job configuration file generation module 212 can generate multiple Kubernetes job configuration files, such as YAML files. In each Kubernetes job configuration file, the Kubernetes job configuration file generation module 212 can include or populate the environment variable "PBS_ARRAYID" in an environment variable field (e.g., the "spec.template.spec.contains[].env[]" field) and set PBS_ARRAYID to 1 up to its current value.

[0047] Additionally, in various implementations, the Kubernetes job configuration file generation module 212 may ignore the following PBS attribute type indicators: "-a"; "-A"; "-c"; "-j"; "-m"; "-M"; "-p"; "-r"; "-S"; "-W"; "-z"; "-u"; "-e"; "-o".

[0048] Additionally, PBS directives that include the attribute type indicator "-1" or begin with the attribute type indicator "-1" are PBS resource statements that define resources for the associated PBS job. The following describes how the Kubernetes job configuration file generation module 212 can populate a Kubernetes template based on the PBS resource statements included in the PBS job input.

[0049] The PBS attribute type indicator "-l cput", "-l soft_walltime", or "-l walltime" can each set a time period, the expiration of which causes the PBS job to time out. Upon detecting one or more of the attribute type indicators "-l cput", "-l soft_walltime", or "-l walltime", the Kubernetes job profile generation module 212 can include the associated data values ​​in the expiration date field (e.g., spec.template.spec.activeDeadlineSeconds) of the Kubernetes job template.

[0050] The PBS attribute type indicator "-l node" can indicate the number of nodes to be used in the PBS job, and it can also be used to set the number of container groups used for the associated Kubernetes job. After detecting "-l node", the Kubernetes job configuration file generation module 212 can include the data values ​​associated with "-l node" in the parallelism field (e.g., spec.parallelism) and / or completion field (e.g., spec.completions) of the Kubernetes job template.

[0051] The PBS attribute type indicators "-l ncpus", "-l ppn", and "-l procs" each specify the number of processors allocated to each node. For at least some implementations, the Kubernetes system 104 runs one process per container group. In such implementations, upon detecting "-l ncpus", "-l ppn", or "-l procs", the Kubernetes job profile generation module 212 can set the number of container groups in the Kubernetes job profile to the product of the data values ​​associated with "-l ncpus", "-l ppn", or "-l procs" and the number of nodes. The Kubernetes job profile generation module 212 can set the number of container groups by including the product value in the parallelism field (e.g., spec.parallelism) and / or completion field (e.g., spec.completions) of the Kubernetes job template.

[0052] The PBS attribute type indicator “-l ngpus” indicates the number of GPUs required for a PBS job. Upon detecting “-lngpus”, the Kubernetes job profile generation module 212 can include the associated data value in the GPU count field of the Kubernetes job template. For at least some implementations, the GPU count and / or field may depend on plugins installed in one or more clusters of the Kubernetes system 104, such as NVIDIA’s k8s-device-plugin as a non-limiting example.

[0053] The PBS attribute type indicator “-l ompthreads” is used to set the number of threads used for the job. Upon detecting “-l ompthreads”, the Kubernetes job profile generation module 212 includes the associated data value OMP_NUM_THREADS in the container environment variable field (e.g., “spec.template.spec.containers[].env[]”) of the Kubernetes job template. In various implementations, the Kubernetes job profile generation module 212 may also include the data value OMP_NUM_THREADS in the container cpu field (e.g., “spec.template.spec.containers[].resources.requests.cpu”) of the Kubernetes job template.

[0054] The PBS attribute type indicator "-l pmem" indicates the total amount of physical memory used for a single process. Upon detecting "-l pmem", the Kubernetes job profile generation module 212 can include the associated data value in a resource field (e.g., the "spec.template.spec.containers[].resources.requests.memory" field) of the Kubernetes job template. In various implementations, the resource field can be one of several container fields. If the total amount of physical memory pmem is not specified in the PBS job input, the Kubernetes job profile generation module 212 can be configured to include a default value in the container field. For at least some of these implementations, the Kubernetes job profile generation module 212 first sets a default value in bytes, then converts the byte value to kilobytes (KB), and appends the KB suffix to the converted value in the container field.

[0055] The PBS attribute type indicator "-l mem" indicates the total amount of physical memory used for the job. Upon detecting "-lmem", the Kubernetes job profile generation module 212 can divide the associated data value by the number of container groups and include the resulting quotient in a resource field (e.g., the "spec.template.spec.containers[].resources.requests.memory" field) in the Kubernetes job template. In various implementations, the resource field can be one of several container fields.

[0056] The PBS attribute indicator "-l arch" specifies the required administrator-defined system architecture. Upon detecting "-l arch", the Kubernetes job profile generation module 212 can assign associated data values ​​to Kubernetes nodes, for example, by including the data values ​​in the Kubernetes node assignment fields (such as the "spec.template.spec.nodeSelector" field) of the Kubernetes job template.

[0057] In various implementations, if indicated in the PBS job input, the Kubernetes job profile generation module 212 may ignore one or more of the following PBS attribute indicators: accelerator, accelerator_memory, host, accelerator_model, aoe, energy, eoe, exec_vnode, file, hbmem, naccelerators, nchunk, nice, pcput, preempt_targets, pvmem, vmem, vnode, site, software, start_time, max_walltime, min_walltime, and vntype.

[0058] Additionally, to run a PBS job, the PBS system 102 can create multiple PBS environment variables at the qsub runtime and then use these PBS environment variables to execute the PBS job. Similarly, the Kubernetes job profile generation module 212 can populate a Kubernetes job template with multiple PBS environment variables indicated by the PBS job input to execute a Kubernetes job. In various implementations, the Kubernetes job profile generation module 212 is configured to include one or more PBS variables in one or more environment variable fields of the Kubernetes job template. In a particular implementation, the name of a given PBS environment variable is included in a name field (e.g., “spec.template.spec.containers[].env[].name”), and the data value associated with that name is included in an associated value field (e.g., “spec.template.spec.containers[].env[].value”). A non-exhaustive list of PBS environment variables (including their names and associated data values ​​included in the corresponding name and value fields of the environment variable field set) is provided below.

[0059] The environment variable name "PBS_O_HOME" has an associated data value, which is the environment $HOME of the current shell that executed the conversion start command (e.g., "kube-qsub").

[0060] The environment variable name "PBS_O_HOST" has an associated data value, which is the environment $HOST of the current shell that executed the conversion start command (e.g., "kube-qsub").

[0061] The environment variable name "PBS_O_LANG" has an associated data value, which is the environment $LANG of the current shell that executes the conversion start command (e.g., "kube-qsub").

[0062] The environment variable name "PBS_O_LOGNAME" has an associated data value, which is the environment $USER of the current shell that executed the conversion start command (e.g., "kube-qsub").

[0063] In various implementations, if the PATH environment used for the Kubernetes container is sufficiently different from the host device that executes the transition start command (e.g., "kube-qsub"), the Kubernetes job configuration file generation module 212 may ignore or disregard the environment variable name "PBS_O_PATH" (an environment variable initialized to environment $PATH).

[0064] The environment variable name "PBS_O_MAIL" has an associated data value, which is the environment $MAIL of the current shell that executed the conversion start command (e.g., "kube-qsub").

[0065] The environment variable name "PBS_O_SHELL" has an associated data value, which is the environment $SHELL of the current shell that executes the conversion start command (such as "kube-qsub").

[0066] The environment variable name “PBS_O_TZ” indicates the time zone information of PBS system 102. In various implementations, Kubernetes job configuration file generation module 212 ignores this environment variable, assuming that the Kubernetes job execution module 204 and / or the cluster of Kubernetes system 104 are running the associated Kubernetes job in a different time zone than PBS system 102.

[0067] The environment variable name “PBS_O_WORKDIR” specifies the directory for executing the conversion start command (e.g., “kube-qsub”). For at least some implementations, the Kubernetes job configuration file generation module 212 is configured to obtain this environment variable by including the Python statement “os.path.abspath(os.curdir)” in the Kubernetes job configuration file.

[0068] The Kubernetes job configuration file generation module 212 is configured to set the data value of the environment variable name "PBS_JOBID" to the same Kubernetes job ID included in the metadata field of the Kubernetes job template (e.g., the job ID data value included in the "metadata.labels.jobid" field).

[0069] The Kubernetes job configuration file generation module 212 is configured to set the data value of the environment variable name "PBS_JOBNAME" to the same Kubernetes job name included in the metadata field in the Kubernetes job template (e.g., the "jobname" data value included in the "metadata.labels.jobname" field).

[0070] Regarding the environment variable name "PBS_NODEFILE", for at least some implementations, for MPI jobs, such as Volcano MPI jobs, the Kubernetes job configuration file generation module 212 is configured to set the associated data value to " / etc / volcano / mpiworker.host." Alternatively, for non-MPI jobs, the Kubernetes job configuration file generation module 212 is configured to leave the associated value field empty.

[0071] The Kubernetes job configuration file generation module 212 is configured to leave the value fields associated with the environment variable names “PBS_ARRAY_INDEX” and “PBS_ARRAYID” blank, unless the PBS job attributes from the PBS job script or PBS command line input include PBS instructions with the predefined flags “-J” or “-t”.

[0072] Additionally, as part of the process of creating Kubernetes job profiles, the Kubernetes job profile generation module 212 can populate certain fields with values ​​it generates internally, such as excluding PBS job attributes from PBS job scripts or PBS job command-line input. In various implementations, the Kubernetes job profile generation module 212 may perform one or more of the following.

[0073] For at least some implementations, the Kubernetes job profile generation module 212 is configured to generate a unique identifier (ID) for a given Kubernetes job. In various implementations, the Kubernetes job profile generation module 212 generates the unique ID using random number generation. This has the advantage of allowing users to query Kubernetes jobs by entering the "get jobs" command (e.g., "kubectl get jobs -l jobid=ID" as a non-limiting example). Additionally, the Kubernetes job profile generation module 212 can include the unique job ID in metadata fields (e.g., "metadata.labels.jobid") of the Kubernetes job template.

[0074] Additionally, to prevent naming conflicts, the Kubernetes job configuration file generation module 212 can be configured to populate the metadata name field of the Kubernetes job template according to the following format: "jobname-jobid", where "jobname" is a name or data value associated with the PBS attribute type indicator "-N", and "jobid" is a random number.

[0075] Additionally, for at least some implementations, the Kubernetes job profile generation module 212 is configured to prevent Kubernetes job restarts if the successful execution of a Kubernetes job fails. For example, the Kubernetes job profile generation file may set the value of the `spec.backoffLimit` field in the Kubernetes job template to the value "1". Alternatively or alternatively, for at least some implementations, the Kubernetes job profile generation module 212 (or another component of the transformation module 202, the Kubernetes job execution module 204, or a component of the Kubernetes system 104) is configured to remove successfully completed Kubernetes jobs from the job history list. To enable this, in various implementations, the Kubernetes job profile generation module 212 may be configured to insert a value (e.g., "86,400") into the `spec.ttlSecondsAfterFinished` field of the Kubernetes job template. Alternatively or alternatively, the Kubernetes job profile generation module 212 may be configured to prevent Kubernetes job restarts by populating a restart policy field (e.g., "spec.template.spec.restartPolicy") in the Kubernetes job template with a "Never" data value.

[0076] Additionally, if the PBS job input indicates that the PBS job is an MPI job (e.g., a Volcano MPI job), causing the Kubernetes job template module 210 to select an MPI job template for the Kubernetes job template, then the Kubernetes job configuration file generation module 212 can populate one or more container fields of the Kubernetes job template (e.g., "spec.tasks[].template.spec.containers[].command") with the MPI data values ​​of both the master task and the slave task.

[0077] An example of a main task included in a Kubernetes job template is:

[0078] command:

[0079] - / bin / sh

[0080] --c

[0081] -|

[0082] export PBS_NODEFILE= / etc / volcano / mpiworker.host;

[0083] mkdir -p / var / run / sshd; / usr / sbin / sshd;

[0084] mpirun-hostfile=$PBS_NODEFILE contents-of-the-shell-script

[0085] Additionally, an example of a slave task included in a Kubernetes job template is:

[0086] command:

[0087] - / bin / sh

[0088] --c

[0089] -|

[0090] export PBS_NODEFILE= / etc / volcano / mpiworker.host;

[0091] mkdir -p / var / run / sshd; / usr / sbin / sshd;

[0092] The task only starts the sshd daemon from the slave worker.

[0093] On the other hand, if the PBS job input indicates that the PBS job is not an MPI job, causing the Kubernetes job template module 210 to select the default Kubernetes job template for the Kubemetes job template, then the Kubemetes job configuration file generation module 212 can populate one or more container fields of the Kubernetes job template with non-MPI data values ​​(e.g., "spec.tasks[].template.spec.containers[].command"). Examples of data values ​​for non-MPI or default Kubernetes job templates are as follows:

[0094] command:

[0095] - / bin / sh

[0096] --c

[0097] -contents-of-the-shcll-script

[0098] Based on the above, the following is an example PBS job script. The PBS input module 206 can receive this example PBS job script, and the PBS job script parsing module 208 can parse the example PBS job script to determine the PBS job attributes. These PBS job attributes are then provided to the Kubernetes job configuration file generation module 212 to generate the corresponding Kubernetes job configuration file.

[0099] #!bin / bash

[0100] #PBS-N job-example

[0101] #PBS-l ncpus=2, mem=16gb

[0102] #PBS-l walltime=01:00:00

[0103] #PBS-q tsmall

[0104] / home / jovyan / pi 1000000

[0105] As indicated, the PBS job script is a non-MPI job script. Therefore, the PBS job script parsing module 208 can send an MPI status indicating that the PBS job script is for a non-MPI PBS job. In response, the Kubernetes job template module 210 can select a default Kubernetes job template and send the default Kubernetes job template to the Kubernetes job configuration file generation module 212. Below is an example Kubernetes job configuration file generated by the Kubernetes job configuration file generation module 212 based on the above PBS job script using the default Kubernetes job template:

[0106]

[0107]

[0108] After generating the Kubernetes job configuration file, the Kubernetes job configuration file generation module 212 can send the Kubernetes job configuration file to the Kubernetes job execution module 204 for execution or running of the associated Kubernetes job. At various points during the execution of the Kubernetes job, including at the start, end, or in between, the Kubernetes job may have associated runtime states. For at least some implementations, the Kubernetes job execution module 204 is configured to send one or more runtime states associated with the Kubernetes job to the Kubernetes runtime state module 214. For at least some of these implementations, the Kubernetes runtime state module 214 includes a display or is coupled to a display configured to display one or more runtime states received from the Kubernetes job execution module 204.

[0109] Additionally, for at least some implementations, the Kubernetes runtime state module 214 is configured to send runtime state commands to the Kubernetes job execution module 204 in order to receive runtime state from the Kubernetes job execution module 204. In certain example implementations, the runtime state commands are functionally and / or have effects similar to the PBS command "qstat" and the Kubernetes command "kubectl get jobs". Furthermore, in various implementations, the runtime state commands may have names and / or formats similar to the PBS command "qstat", for example, as a derivative of the PBS command "qstat". An example name for the runtime state command is "kube-qstat". By using something similar to "qstat", a PBS user familiar with programming in PBS can utilize runtime commands in a manner similar to how he / she would use "qstat", and thus can take advantage of the benefits of executing jobs in Kubernetes without having to learn how to use Kubernetes.

[0110] Additionally, in various implementations, if the Kubernetes runtime state module 214 receives a runtime state command and / or sends a runtime state command to the Kubernetes job execution module 204 without any options (e.g., data values ​​associated with job attributes), the Kubernetes job execution module 204 may return, and / or the Kubernetes runtime state module 214 may output a list of all running jobs, for example by display (the equivalent of "kubectl get jobs –all-namespaces" in Kubernetes).

[0111] Alternatively or alternatively, in response to receiving a runtime status command and / or sending a runtime status command to the Kubernetes job execution module 204, the Kubernetes runtime status module 214 may receive one or more runtime statuses from the Kubernetes job execution module 204 and / or may (e.g., by display) output one or more runtime statuses. Example runtime statuses include, but are not limited to: job ID (job-id), job name (job-name), CPU time (cpu-time), and / or job status (job-status). Alternatively or alternatively, the Kubernetes runtime status module 214 may be configured to receive and / or display one or more runtime statuses in response to receiving and / or retrieving from the Kubernetes "kubectl get jobs" output. For example, the Kubernetes runtime status module 214 may be configured to obtain the job ID by accessing the data value of the output property metadata.labels.jobid from each item in the Kubernetes kubectl get jobs output. Alternatively, the Kubernetes runtime status module 214 can be configured to obtain the job name by accessing the data value of the output property `metadata.labels.jobname` for each item in the `Kubernetes kubectl get jobs` output. Alternatively, the Kubernetes runtime status module 214 can be configured to obtain the job start time (CPU-time) by accessing the data value of the output property `[].status.startTime`. If `[].status.completionTime` is available, the Kubernetes runtime status module 214 can calculate the job start time (CPU-time) based on the completion time. Otherwise, the Kubernetes runtime status module 214 can calculate the job start time (CPU-time) based on the timestamp of the current time.

[0112] Additionally, the Kubernetes runtime state module 214 can obtain one or more states associated with a PBS job. The table below lists seven job states, three of which (E, Q, and R) can be obtained for Kubernetes jobs, while the other four cannot. The Kubernetes runtime state module 214 can receive the following PBS states and / or output the following PBS states (e.g., by display) based on the actions of the Kubernetes jobs listed in the table below:

[0113]

[0114] Table 1: PBS Status and Kubernetes Job Actions

[0115] Additionally, for at least some example implementations, system 200 may include a Kubernetes job deletion module 216 configured to delete Kubernetes jobs. In various implementations, the Kubernetes job deletion module 216 may receive a deletion command (e.g., “kube-qdel”) and / or output the deletion command to the Kubernetes job execution module 204 to delete a given Kubernetes job. Furthermore, the Kubernetes job deletion module 216 may receive the job name (job-name) as a parameter and delete the PBS job with that job-name in response to the deletion command.

[0116] Figure 3 This is a flowchart of an example method 300 for running a PBS job in Kubernetes. At block 302, at least one processor (e.g., executing computer code and / or at least one processor configured with conversion module 202 and / or Kubernetes job execution module 204) can receive PBS job input to run the job. For example, a user can input PBS job input into a computer system using an input device, and / or at least one processor can access memory storing the PBS job input. The PBS job input may include a PBS job script and / or PBS job command-line input. Additionally, for at least some implementations, at block 302, at least one processor can receive a command that causes at least one processor to convert the PBS job input into a Kubernetes job profile. In various implementations, the command also causes the Kubernetes system to run the job (e.g., until completion) without additional human intervention. In response to detecting the command, at least one processor can recognize the PBS job input as a parameter of the command and use the parameter to generate a Kubernetes job profile.

[0117] At box 304, at least one processor parses the PBS job input to obtain PBS job attributes. For example, based on this parsing, at least one processor can identify one or more PBS command-line inputs that include one or more PBS job attributes and / or one or more PBS job scripts that include one or more PBS job attributes. After detecting a PBS job script, at least one processor can also parse the PBS job script to identify individual PBS job attributes, including identifying one or more PBS instructions and / or one or more PBS contents included in the PBS job script. Additionally, at box 304, at least one processor can select a PBS job template from multiple PBS job templates for generating a PBS job configuration file. For example, based on the parsing at box 304, at least one processor can determine whether the PBS input is for an MPI job. If it is for an MPI job, at least one processor can select an MPI job template to create a Kubernetes job template. If it is not for an MPI job, at least one processor can select a default Kubernetes job template.

[0118] At block 306, at least one processor can generate a Kubernetes job configuration file. As previously described, at least one processor can generate a Kubernetes job configuration file by populating fields of a selected Kubernetes job template with data values ​​of identified Kubernetes job attributes according to predefined or predetermined transformation rules. In various embodiments, at least one processor can first create the Kubernetes job configuration file as a YAML file. For at least some of these embodiments, at least one processor can convert the YAML file to JASN for use in executing the associated job in Kubernetes. At block 308, at least one processor, for example having Kubernetes system 104 and / or Kubernetes job execution module 204, can execute a Kubernetes job according to the Kubernetes job configuration file.

[0119] Additionally, in at least some implementations of method 300, for example, at least one processor having a Kubernetes runtime state module 214 may receive and / or (e.g., by displaying via a computer monitor) output one or more runtime states of the job executed at block 308. At block 312, at least one processor deletes the Kubernetes job executed at block 308. For example, as an action to be performed, at least one processor may delete or otherwise remove the associated Kubernetes job configuration file from Kubernetes system 104. In various other implementations, method 300 does not include outputting one or more runtime states at block 310 and / or deleting the job at block 312.

[0120] Figure 4 It means Figure 1 PBS system 102, PBS system 104 and / or Figure 2 A block diagram of the structural components of any module of system 200 and / or one or more components of device 400.

[0121] The device may include components such as a processor component 402 including at least one processor or at least one processing core, a memory 404 comprising one or more computer-readable storage media, a power supply 406, and at least one input device 408. Those skilled in the art will understand that... Figure 4 The illustrated device structure does not constitute a limitation on device 400. Device 400 may include, but is not limited to, devices with a specific structure. Figure 4 The components shown may have more or fewer parts, some parts may be combined, or there may be different arrangements of parts.

[0122] Processor component 402 may be the controller of device 400 and is connected to various other parts of the device through various interfaces and lines or other electrical connections. By running or executing software programs stored in memory 404 and calling data stored in memory 404, at least one processor 402 performs various functions of device 400 and performs data processing.

[0123] Memory 404 can be configured to store software programs in the form of computer code and / or instructions. At least one processor 402 runs the software programs in memory 404 to implement various functional applications and data processing. Memory 404 may primarily include a program storage area and a data storage area. The program storage area may store an operating system, application programs to perform at least one function (e.g., sound playback and image display functions), etc. The data storage area may store data created based on the use of device 400, etc. Additionally, in various embodiments, memory 404 may include random access memory and / or non-volatile memory, such as at least one disk storage device or flash memory. In various embodiments, memory 404 may also include a memory controller to provide at least one processor 402 with access to memory 404.

[0124] Power supply 406 supplies power to each component. In an example embodiment, power supply 406 may be logically connected to processor component 402 using a power management system, enabling functions such as charging, discharging, and power consumption management to be implemented using the power management system. Power supply 406 may also include one or more of the following: a DC or AC power supply, a recharging system, a power fault detection circuit, a power converter or inverter, a power status indicator, and any other components.

[0125] Input device 408 can be configured to receive input numeric or character information. Non-limiting examples of such input devices may include at least one of the following: keyboard, mouse, joystick, optical, touchscreen, or detection ball. Additionally or alternatively, input device 408 may be configured to receive and process audio input, for example, by being configured as a microphone. Other types of input devices that receive and send input (e.g., user input) to processor component 402 are also possible.

[0126] Output device 410 may be configured to output various information from processor component 402. Example output devices may include displays configured to provide video display, such as computer monitors or other display devices. For example, as previously described, the output device may be configured to display PBS job inputs and / or runtime status. Alternatively or additionally, output device 410 may include speakers configured to audibly output information from processor component 402.

[0127] It should be understood that this disclosure is not limited to the precise structures shown above and in the accompanying drawings, and various modifications and changes can be made without departing from the scope of this disclosure. The scope of this disclosure is defined only by the appended claims.

Claims

1. A system for running PBS jobs in Kubernetes, comprising: A parsing module is configured to parse the PBS job input to determine multiple PBS job attributes; A generation module is configured to generate a Kubernetes job configuration file based on multiple data values ​​of the plurality of PBS job attributes. The generation module is also configured to set the number of container groups used to execute the Kubernetes job according to the number of nodes indicated in the PBS job input in order to generate the Kubernetes job configuration file. Alternatively, the generation module is also configured to set the data values ​​in the parallelism field and / or completion field of the Kubernetes job template according to the number of nodes indicated in the PBS job input in order to generate the Kubernetes job configuration file. as well as An execution module, configured to execute the Kubernetes job according to the Kubernetes job configuration file.

2. The system according to claim 1, characterized in that, The PBS job input includes at least one of a PBS job script or a PBS command line input.

3. The system according to claim 1 or 2, characterized in that, The parsing module is also configured to parse the PBS job input to identify one or more PBS instructions.

4. The system according to claim 3, characterized in that, The parsing module is also configured to parse the PBS job input to identify one or more PBS contents.

5. The system according to claim 1, characterized in that, The generation module is also configured to select a Kubernetes job template from multiple Kubernetes job templates in order to generate the Kubernetes job configuration file.

6. The system according to claim 5, characterized in that, The generation module is configured to select the Kubernetes job template based on whether the PBS job input indicates an Message Passing Interface (MPI) job.

7. The system according to claim 1, characterized in that, The generation module is also configured to include data values ​​associated with PBS instructions in the container field of the Kubernetes job template in order to generate the Kubernetes job configuration file.

8. The system according to claim 1, characterized in that, The generation module is also configured to set the number of container groups based on the product of the number of nodes indicated in the PBS job input and the number of processors allocated to each node.

9. The system according to claim 1, characterized in that, The generation module is also configured to include PBS environment variables in the environment variable field of the Kubernetes job template in order to generate the Kubernetes job configuration file.

10. The system according to claim 1, characterized in that, The generation module is also configured to include the master task and slave task in a Kubernetes job template in response to determining the PBS job input instruction MPI job, so as to generate the Kubernetes job configuration file.

11. The system of claim 1, further comprising a display module configured to display at least one runtime state via a computer display.

12. The system of claim 1 further includes a deletion module configured to delete the Kubernetes job.

13. A method for running a PBS job in Kubernetes, executed by at least one processor, the method comprising: Receives job input from Portable Batch Processing System (PBS); The PBS job input is parsed to determine multiple PBS job attributes; Generating a Kubernetes job configuration file based on multiple data values ​​of the multiple PBS job attributes includes: setting the number of container groups used to execute the Kubernetes job according to the number of nodes indicated in the PBS job input, and generating the Kubernetes job configuration file; or setting the data values ​​in the parallelism field and / or completion field of the Kubernetes job template according to the number of nodes indicated in the PBS job input, and generating the Kubernetes job configuration file. as well as Execute the Kubernetes job according to the Kubernetes job configuration file.

14. The method according to claim 13, characterized in that, The PBS job input includes at least one of a PBS job script or a PBS command line input.

15. The method according to claim 13 or 14, further comprising: The Kubernetes job template is selected to generate the Kubernetes job configuration file based on whether the PBS job input indicates an MPI job.

16. A non-transitory computer-readable storage medium storing instructions executable by at least one processor, the instructions being used to perform the method according to any one of claims 13-15.

17. A computer device, comprising a processor and a memory, characterized in that, The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 13-15 according to the instructions in the program code.

Citation Information

Patent Citations

  • Method, system and related equipment for scheduling deep learning jobs

    CN108920259A

  • Containerized application snapshots

    US20190065323A1

  • Automated execution of batch job workflows

    US20190370058A1