Table of Contents
Part I Administrator's Guide
2
... 3 1 Introduction to PBS Application Services
... 4 Copyrights, Tradem arks, and Third Party Licenses
... 5 Supported Platform s
... 6 System Requirem ents
... 8 2 Installation
... 9 Install
... 19 Com m and Line Install
... 28 Uninstall ... 32 3 Configuration ... 36 4 Application Definitions ... 37 Overview of Application Definition Com ponents
... 38 Sitew ide Settings
... 40 Adm inistration of Application Definitions
... 41 Add Application Definitions
... 43 Update Application Definitions
... 44 Remove Application Definitions
... 45 Application Input File
... 47 Argument Choice ... 48 ArgumentString ... 50 ArgumentInt ... 51 ArgumentFileName ... 52 ArgumentDirectoryName ... 53 Application Converter File
... 55 Environment
... 56 Resources
... 57 Job Wide and Chunk Resources
... 58 Using Site Policies
... 60 Data Staging
... 62 Conditional Expressions in Application Definitions
... 66 Application Runtim e Scripts and Actions
... 67 Start ... 68 Epilogue ... 69 Restart ... 70 Terminate ... 71 Runtime Actions - Common UNIX/Linux Example
... 72 Custom
... 75 Application Definition PBSJobApp
... 76 Reserved Words ... 77 5 Troubleshooting ... 82 6 License Agreement
Index
90
Copyright © 1992 - 2011 Altair Engineering Inc.
Administrator's Guide
Introduction to Application Services Installation
Configuration
Application Definitions Troubleshooting License Agreement
Today, doing more with less is simply business as usual. Enterprises and institutions are placing higher demands upon their high performance computing infrastructure – larger and more complex applications and dynamic end-user work loads. Optimizing end-user productivity and getting the most from limited resources and complex application work loads can seem to be an impossible challenge.
The Application Services (formerly known as AIF) component of PBS Professional allows users to quickly and cost effectively customize their PBS Works configuration in response to dynamic market, user and application requirements.
PBS Application Services uses a Service Oriented Architecture (SOA) design to provide an array of customizable services for creating an integrated application aware solution.
Specifically, PBS Application Services communicates with your PBS Professional servers and compute nodes. Application administrators can use PBS Application Services to create custom, solver specific application definitions. Leveraging key industry standards like the Open Grid Forum High Performance Computing Basic Profile, PBS Application Services makes it easy to respond to dynamic changes to your users and applications.
Benefits of PBS Application Services:
Define the services needed to integrate custom or third party vertical applications.
Standards-based service interfaces and APIs for web access, security, and HPC Basic Profile. Create and provide a customized but cost effective Software as a Service (SaaS) based access and delivery.
Customized application definition files can be shared across all supported platforms. Easier integration into Enterprise SOA and business process management (BPM.) Standards-based implementation using Web Services, WS-Security, high performance computing basic profile (HPCBP.)
See also
Copyrights, Trademarks, and Third Party Licenses Supported Platforms
Copyright © 1992 - 2011 Altair Engineering Inc.
Copyright © 1992 - 2011 Altair Engineering Inc. All rights reserved. No part of this online help may
be reproduced, transmitted, transcribed, stored in a retrieval system, or translated to another
language without the written permission of Altair Engineering, Inc.
Copyright© Altair Engineering Inc. All Rights Reserved for: PBSWorks, PBS™, PBS™
Professional®, PBS™ Pro®, PBS™, Personal™ PBS®, and Portable Batch System® are
trademarks of ALTAIR ENGINEERING INC. Patent #6,859,792 and other patents pending. All
are protected under U.S. and international laws and treaties. Copyright© 1994-2011
[b1] .ALTAIR ENGINEERING INC. Proprietary and Confidential. Contains Trade Secret Information.
Not for use or disclosure outside ALTAIR and its licensed clients. Information contained herein shall
not be decompiled, disassembled, duplicated, or disclosed in whole or in part for any purpose.
Usage of the software is only as explicitly permitted as stated in the end user software license
agreement. Except as expressly permitted in the Altair Software License Agreement, any use or
disclosure, in whole or in part, of this information without the express prior written permission of
ALTAIR is prohibited.
Copyright notice does not imply publication.
All other copyrights and trademarks are the property of their respective owners. License terms
governing use of third party software provided with PBS is governed by the terms and conditions in
the owner’s license agreements.
The PBS Application Services Server is supported on the following platforms:
Novell SUSE Linux Enterprise Server (SLES) 9.X, 10.X, and 11.X on x86 and x86_64 Red Hat Enterprise Linux (RHEL) 4 (AS, ES, and WS) on x86 and x86_64
Red Hat Enterprise Linux (RHEL) 5 and 6 (server and desktop) on x86 and x86_64 Windows XP Professional on x86 and x86_64
Windows Vista on x86 and x86_64 Windows Server 2003 on x86 and x86_64 Windows Server 2008 on x86 and x86_64 Windows Server 2008 R2 on x86_64
CentOS 5.4, 5.5, and 5.6 on x86 and x86_64
Note PBS Application Services does not preclude the client applications from executing on other platforms not listed above.
Supported Configuration
The PBS Application Services server and the PBS Professional Server are required to be installed on the same host.
Copyright © 1992 - 2011 Altair Engineering Inc.
Minimum Hardware Requirements
Hardware Requirement
CPU 1 CPU
Memory (Physical) 1 GB
Disk Space 1.2 GB
Minimum Software Requirements
PBS Professional Server 11.1.0 For further information on the installation of PBS Professional, please refer to the PBS Professional Installation and Administrator’s Guide.
On Linux systems, the Open SSH daemon using the SSH2 protocol is required.
PBS Application Services also includes three third party software packages. PBS Application Services will install and configure these three packages during installation:
- JRE 1.6 (Java Runtime Environment) - Apache Tomcat 6.0x
- Python 2.5.x
Note Python 2.5.x must be installed on every execution node, and so is included with the PBS Professional execution node installation option.
See Advance Configuration Parameters
Security
Supported authentication using NIS and UNIX/Linux password security infrastructure Supported Windows NT LAN Manager (NTLM) authentication
Supported High Performance Computing Basic Profile/Basic Execution Services (HPCBP/BES)-compatible Web Services Interoperability (I), Web Services Architecture (A), and WS-security message format
Assumptions, Constraints, and Dependencies
The PBS Application Services server and the PBS Professional server are installed on the same host
PBS Professional infrastructure for file staging: cp or passwordless rcp or scp
Copyright © 1992 - 2011 Altair Engineering Inc. PBS Application Services is supported on Linux and Windows platforms. Therefore, separate steps for Linux and Windows are referenced in the install and uninstall process.
GUI install or command line install Uninstall
Installation of this product requires:
System administrator privileges (Windows Administrator or root on Linux) Existing installation of PBS Professional 11.1.0
Existing PBS Application Services Administrator account (default is pbsadmin) Removal of any old instances of PBS Application Services (formerly known as AIF) Removal of any instances of Python and Tomcat installed with previous versions of PBS Application Services
NOTE:
The first step in the installation process is the extraction of the installer to the %tmp% directory on Windows, or the /tmp directory on Linux. There should be enough space in this directory to extract the installer (approximately 3 times the installation size). Also, while the installer is being extracted, nothing should be deleted from this directory.
To install PBS Application Services, follow the steps below:
1. Download the installer appropriate for your platform from the user area.
2. For Windows, invoke the installer by double clicking on the exe file. For Linux, invoke the installer by executing the binary file. The installer will be extracted. This may take a few moments.
Once the extraction process is complete, a PBS Professional Application Services dialog box will be displayed. You may cancel the install at any time during the installation process by clicking on the Cancel button.
Copyright © 1992 - 2011 Altair Engineering Inc. 3. To begin the installation process, click Next.
4.Click on the button next to I accept the terms of the License Agreement and click Next.
A Select Install Directory dialog will be displayed. You may install PBS Application Services in the default directory, or you may select a custom directory by clicking on the Choose button. To restore the default directory, click on the Restore Default Folder button. Default installation directory is:
on Windows x86: C:\Program Files\PBSWorks\11.0.1
on Windows x86_64: C:\Program Files (x86)\PBSWorks\11.0.1
on Unix/Linux: /opt/pbsworks/11.0.1
5. Select a directory where PBS Applications Services will be installed and click Next.
Once a location has been established, a dialog box will be displayed. Please wait until all pre-checks have been validated.
Copyright © 1992 - 2011 Altair Engineering Inc. For Windows, after the pre-checks have been validated a Enter the pbsadmin password dialog box will be displayed. The pbsadmin password will be the one established when you installed PBS Professional.
6. For Windows, enter the pbsadmin password and click Next.
A Select Job File Stage Area dialog will be displayed. You may select a custom directory by clicking on the Choose button. Select the Restore Default Folder button to reset the directory to the default location. The default staging directory is:
on Windows: C:\stage on Linux : /stage
7. Select a directory where user's job files will be staged prior to execution and click Next.
Note The Stage Area can grow quite large, depending on the size of the average job. Give careful consideration to the disk usage and disk capacity.
Copyright © 1992 - 2011 Altair Engineering Inc. 8. Enter the License Server and click Next.
r
A Pre-Installation Summary will be displayed. Review all your locations before initiating the installation. You may click Previous to go back and make any changes.
A Installing PBS Professional Application Services dialog box will be displayed. You can monitor the progression of your installation via the installation progress toolbar.
Once the components of PBS Application Services are installed, you will be asked to wait while the system is being configured.
Copyright © 1992 - 2011 Altair Engineering Inc. 10.Start PBS Application Services.
- Click Yes, if you want to start PBS Application Services now. - Click No, to manually start, see below:
For Windows: Start the service from the command prompt (Start > Run > cmd).
net start PBSProAppSvc
For Linux: Start the daemon from a command prompt:
/etc/init.d/aif start
11.Click the Done button to complete the installation.
A dialog box will be displayed asking you to restart your computer. The computer must be restarted to complete the installation.
Installation of this product requires:
System administrator privileges (root privileges) Existing installation of PBS Professional 11.1 or newer
Existing PBS Application Services Administrator account (default is pbsadmin) Removal of any old instances of PBS Application Services (formerly known as AIF) Removal of any instances of Python and Tomcat installed with previous versions of PBS Application Services
Installation
To install PBS Application Services using the command line installer, follow the steps below:
1. Run the command line installer by executing the appropriate installer binary: For example: ./PBSProAppSvc_11.0.1_Linux_x86_64.bin
Copyright © 1992 - 2011 Altair Engineering Inc. The command line installer will launch and you will be prompted to either cancel or continue the installation.
Note: You may cancel the install at any time during the installation process by entering "quit" and pressing <Enter>.
3. Several pages of License Agreement information will be displayed. Page through the License Agreement by continuing to press <Enter> until you are prompted to accept the terms of the License Agreement.
Copyright © 1992 - 2011 Altair Engineering Inc. 4. To accept the terms of the License Agreement enter "y" and press <Enter>.
5. Enter a directory where PBS Applications Services will be installed and press <Enter>. To accept the default directory, /opt/pbsworks/11.0.1, just press <Enter>.
Copyright © 1992 - 2011 Altair Engineering Inc. 6. Enter a directory where user's job files will be staged prior to execution and press <Enter>. To
accept the default staging directory, /stage, just press <Enter>.
Note The Stage Area can grow quite large, depending on the size of the average job. Give careful consideration to the disk usage and disk capacity.
7. Enter the License Server and press <Enter>.
A Pre-Installation Summary will be displayed. Review all your locations before initiating the installation.
Copyright © 1992 - 2011 Altair Engineering Inc. 8. To install PBS Application Services press <Enter>.
9. Once the installation is complete a message will be displayed asking if PBS Application Services should be started. Enter "1" and press <Enter> to start PBS Application Services. Note: You may manually start PBS Application Services by entering "2", pressing <Enter> and starting the PBS Application Services daemon from a command prompt.:
/etc/init.d/aif start
An Installation Complete message will be displayed indicating your installation is complete.
10. Press <Enter> to complete the installation.
See also
Uninstall Troubleshooting
Copyright © 1992 - 2011 Altair Engineering Inc. To uninstall PBS Application Services, select your platform and complete the following steps below:
For Linux For Windows
For Linux
1. As root, change directory to Uninstall PBS Application Services directory. This directory will be located in the base install directory, or the location you provided during install.
cd /opt/pbsworks/11.0.0/ Uninstall\ PBS\ Professional\ Applications\ Services
2. Execute the Uninstall_PBS_Professional_Applications_Services script
./Uninstall_PBS_Professional_Applications_Services
3. An Uninstall PBS Professional Applications Services dialog will be displayed. 4. Click Next to start the uninstall process.
5. A dialog box will be displayed indicating the uninstall process has started.
6. The uninstall is complete.
Any items that could not be removed will be listed, as shown below
.
Copyright © 1992 - 2011 Altair Engineering Inc. For Windows
1. As the Windows Administrator navigate to Add or Remove Programs (Start >Control Panel > Add or Remove Programs).
2. Select PBS Professional Application Services and click on the Change/Remove button. 3. An Uninstall PBS Professional Application Services dialog will be displayed.
4. Click Next to start the uninstall process.
Any items that could not be removed will be listed, as shown below
.
6. Click Done.
Note If the installer could not remove files or directories, please take a moment to manually remove them.
See also
Install
Copyright © 1992 - 2011 Altair Engineering Inc.
Standard server.conf parameters
The PBS Application Services (formerly known as AIF) server has a few configurable parameters
available to you. PBS Application Services stores its configuration data in AIF_HOME/conf/server. conf. All parameters are stored in key=value pairs. Spaces and tabs are preserved (as spaces) and providing quotes around values is optional. As spaces are preserved, do not use key = value (notice the space surrounding the =) unless spaces are intentional. Empty lines beginning with a comment symbol (ie. #) are ignored.
LOGGING_CONFIG_FILE_RELATIVE
The PBS Application Services logging configuration file (Log4J). Since the PBS Application Services uses Log4J as its logging and tracing API, you can access additional information on Log4J via the Apache Log4J website.
Default Value:server-log.xml
DEBUG
The PBS Application Services debugging property. If enabled true, PBS Application Services will send intermittent results to files stored in AIF_HOME/temp. This can be an effective debugging mechanism.
Default Value: false
ADMIN_USER
The PBS Application Services administration account (for example, pbsadmin) that has complete control over the PBS Application Services server. This account is required for any remote PBS Application Services administration tasks.
On Windows this will be the same pbsadmin account as specified during the installation of PBS Professional and cannot be changed.
On Linux the administration account can be a non-privileged user account that has been granted manager status for PBS Professional, and can be changed after installation.
Default Value: pbsadmin
LOGIN_MODULE_NAME
The PBS Application Services authentication module. PBS Application Services uses the Java Authentication and Authorization Service (JAAS) as its authentication abstraction layer.
Default Value - Linux: UnixLogin
STAGE_ROOT
The PBS Application Services file staging location. The staging directory is where the necessary files for jobs submitted, via the clients (for example, PBS Portals), are transferred prior to the portal submitting the job to PBS Application Services, for transfer to PBS Professional for execution. When PBS
Professional selects the job for execution, the files are staged-in to the execution host from the staging directory. Upon job completion, any files the job wants to retain are staged-out by PBS Professional to the staging directory, and the portal retrieves them from there when it is ready to do so. Customer written portals may choose to do the same, but are not required to do so.
Default Value - Linux:/stage
Default Value - Windows:C:/stage
FILE_TRANSFER_PROTOCOL
The PBS Application Services file transfer mechanism. Default Value: http
FILE_EXPIRATION_TIME
The PBS Application Services stage area file expiration time. That is, the age in days after which data is removed from "STAGE_ROOT" and its subdirectories with the exception of STAGE_ROOT/profiles. Files in STAGE_ROOT/profiles are never removed by PBS Application Services.
Default Value:14
DYN_RES_PATTERN
The PBS Application Services dynamic resource string. Pattern for creation of server_dyn_res
records in the PBS Scheduler configuration file (PBS_HOME/sched_priv/sched_config). The following elements are substituted with literal values defined by PBS Application Services admin server
$FEATURE, $PYTHON_PATH. Default
Value:
server_dyn_res: '$FEATURE !"$PYTHON_PATH" "$LICSTATUS_PATH" --get-licenses -F $FEATURE'
AIF_SCHEDULING
The PBS Application Services scheduling policy. This Boolean attribute determines if PBS Professional should enable an application resource on a given execution host. If set to true, PBS Application Services will:
Copyright © 1992 - 2011 Altair Engineering Inc. If set to false, PBS Application Services will consider all available nodes for job execution, regardless if the physical application exists on that node or not.
Default Value: true
Advanced Configuration Parameters
The PBS Application Services (formerly known as AIF) server also has a few optional parameters available to you that are appropriate for advanced configurations. These parameters would also be set in
AIF_HOME/conf/server.conf and follow the same formatting requirements as the standard configuration parameters.
PYTHON_PATH
The PBS Application Services Python binary. The PBS Application Services require that each PBS execution host provide a standard Python binary. The full path to your systems Python binary can be changed here.
Note The PBS Professional daemon pbs_mom will look for a binary called pbs_python in PBS_EXEC/bin. If using custom actions or any other operations that involve the pbs_mom
accessing this pbs_python (aka python binary) there may be problems if the python libraries are not located in the std locations relative to PBS_EXEC/bin/pbs_python. If Python is installed elsewhere a link to (Linux) or copy of (Windows) the actual python binary must exist as PBS_EXEC/bin/pbs_python.
Note As of PBS Professional 11.0 a Python distribution is included as part of the pbs_mom installation.
Default Value: $PBS_EXEC/bin/python
LICSTATUS_PATH
When the PBS Scheduler needs to know the number of licenses available with which to run jobs
submitted via PBS Application Services, it uses the lic_status.py utility to query the license server. This parameter can be configured to point to the location of lic_status.py. See the
DYN_RES_PATTERN parameter above.
Default Value: AIF_EXEC/scripts/lic_status.py
ALTAIR_LICENSE_PATH
The location of the Altair license server. This is the license server from which PBS Application Services itself attempts to pull license(s).
FEATURE
The application licensing feature, as known to the FLEXlm server. The custom resource created for PBS Professional must be the same as this feature name.
Copyright © 1992 - 2011 Altair Engineering Inc. PBS Application Services (formerly known as AIF) requires a predefined set of instructions, called application definitions, to describe your application parameters to users, store their responses, and prepare those responses for job execution via PBS Professional. An application definition provides a flexible set of instructions that can be manipulated to allow for precise control over all aspects of application-specific parameters and job execution. These application definitions are stored in a central repository and will make PBS Professional aware of each of them upon server startup.
The following sections will provide you with an overview of an application definition and how to manually administer your application definitions. A working example of an application definition is also included.
Overview of Application Definition Components Administration of Application Definition Application Definition PBSJobApp
An application definition is comprised of a set of Python scripts and two XML files which could include references to site wide configuration settings. A separate application definition with application-specific details is required for each application that will be integrated into PBS Application Services. Application definitions are compliant with the Open Grid Forum High Performance Computing Basic Profile
(HPCBP), Business Process Execution Language (BPEL), and Job Submission Description Language (JSDL) standards.
site-config.xml, Sitewide Information File
The site config file is meant to make application definitions more portable by consolidating data that may change from cluster to cluster in a central location. It is where administrators can define things like policies, version, and path information for all the available applications, billing account information, etc. The data in this file is used by the input and converter files.
app-inp-appname.xml, Application Input File
The input file is where administrators can define the allowed arguments for a given application. This file is also used by Graphical, Web Based and even Command-Line tools to display these arguments to users for job submission.
app-conv-appname.xml, Application Converter File (The HPCBP Converter)
The converter file is where administrators take the values received by the user via the input file and communicates this information to PBS Application Services and PBS Professional. This file allows the PBS Application Services administrator to configure the job submission environment.
start.py, Application Runtime Scripts
The scripts in the runtime directory are what really get executed on the execution hosts. The startup script is what the WLM will execute as the “job script”. Administrators can directly edit these runtime script(s), taking full advantage of Python to add further inspection and complexity to job submission and finally execution of the application itself. This adds tremendous flexibility as nearly infinite possibilities for job control exist at this phase of job description
Copyright © 1992 - 2011 Altair Engineering Inc. Sitewide Settings (site-config.xml)
By putting some site specific application information in the site-config.xml, application definitions can be made more portable and reusable among different PBS Professional complexes: for example, putting binaries locations and version availability information here, makes the rest of the application definition reusable on a different cluster just by modifying that cluster's site-config.xml.
This file can hold virtually any sort of information, since it's used by inclusion from other XML files composing the application definitions. Altair has included certain data in the site-config.xml file for the integration and support of other products from the PBS Professional family. The example below shows a sample of a site-config.xml with the sections currently used by the PBS Professional product suite:
XML header - It is mandatory to have the XML header.
Applications - This section hold application specific information.
Application versions - For each application, you can insert site supported versions and for each version its binary pathname.
Job projects (billing accounts) - This section is for integrating PBS Application Services with other products from Altair. Here you can list a set of strings to be used as “accounting”
information to be attached to jobs.
Policies - Site policies are values that can be used in a site’s application definition XML constituents and/or as values available in job runtime environment (policies are included as environment variables for the jobs).
<?xml version="1.0" encoding="UTF-8"?>
<SiteConfiguration xmlns="http://schemas.altair.com/pbs/2007/01/site-config" xmlns:site-config="http://schemas.altair.com/pbs/2007/01/site-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation="http://schemas.altair.com/pbs/2007/01/site-config ../ schemas/site-config.xsd"> <Applications> <Application id="app1"> <ApplicationVersions> <ApplicationVersion> <Option>1.0</Option> <Executable>/apps/bin/bogus_v1.0.sh</Executable> </ApplicationVersion> <ApplicationVersion> <Option>1.1</Option> <Executable>/aps/bin/bogus_v1.1.sh</Executable> </ApplicationVersion> </ApplicationVersions> </Application> <Application id="app2"> <ApplicationVersions> <ApplicationVersion>
<Executable>/apps/Altair/v1.0/bin/test</Executable> </ApplicationVersion> <ApplicationVersion> <Option>2.2</Option> <Executable>/apps/Altair/v2.2/bin/testing</Executable> </ApplicationVersion> </ApplicationVersions> </Application> </Applications> <JobProjects id="BILLING_ACCOUNT"> <Option>PDD</Option> <Option>Test</Option> <Option>NotBillable</Option> <Option>Customer</Option> </JobProjects> <Policies> <Policy> <Option>POLICY_APP1</Option> <Value>single_precision</Value> </Policy> <Policy> <Option>MPROC_APP2</Option> <Value>2</Value>
</Policy> <Policy> <Option>MPIPROCS</Option> <Value>4</Value> </Policy> </Policies> </SiteConfiguration>
Copyright © 1992 - 2011 Altair Engineering Inc. The PBS Application Services has a central location for keeping application definitions and will make PBS Professional aware of each of them upon server startup. You may also wish to perform various administrative tasks against your newly installed application definitions.
Add Application Definitions Update Application Definitions Remove Application Definitions Application Definition PBSJobApp
If application definitions fail to meet key criteria, they will be moved to an invalid application directory. The directory will be created if it does not exist:
AIF_HOME/invalid_applications
The criteria the PBS Application Services server will check for include: 1. Application converter file is missing
2. Application input file is missing
3. Application Runtime Script start.py is missing
4. Licensing feature element is present but contains an empty string or a white space in application converter file.
The move of the invalid application definitions will show in the server logs. The application definitions can be retrieved from the invalid application directory and modified to meet the criteria necessary to be considered valid.
Converter file does not exist for <application>
Or
Application <application> has <ApplicationLicensingFeature> element – it is an empty string
Adding an application definition into the applications directory, followed by a restart of PBS Application Services, will expose your application definition to the user, as well as notify PBS Professional. For Linux
1. Shutdown the PBS Application Services server.
/etc/init.d/aif stop
2. Navigate to AIF_HOME/applications.
cd AIF_HOME/applications
Note Location of AIF_HOME can be found in the /etc/aif.conf file (i.e., AIF_HOME=/ var/spool/aif).
3. Create a directory called appname, and subdirectory called runtime.
mkdir appname appname/runtime
4. Place app-inp-appname.xml, app-conv-appname.xml in appname. 5. Place any runtime scripts into appname/runtime.
6. Start the PBS Application Services server.
/etc/init.d/aif start
For Windows
1. Shutdown the PBS Application Services server by opening a command prompt (Start > Run > cmd ).
net stop PBSProAppSvc
2. Navigate to AIF_HOME\applications.
cd AIF_HOME\applications
Note Location of AIF_HOME can be found in the C:\Program Files\PBSWorks\11.0.0 \AIF\aif.conf file
3. Create a directory called appname, and subdirectory called runtime.
mkdir appname appname\runtime
4. Place app-inp-appname.xml, app-conv-appname.xml in appname. 5. Place any runtime scripts into appname\runtime.
Copyright © 1992 - 2011 Altair Engineering Inc. See also
Update Application Definitions Remove Application Definitions Application Definition PBSJobApp
You can easily modify an existing application definition using your favorite XML editor. No restart is required for modifications that do not modify the name or ID of your application definition (core changes). If the name or ID of your application definition has changed (this includes the name of app-inp-appname as well as app-conv-appname), you will need to restart PBS Application Services before any changes will take effect.
For Linux
1. Restart the PBS Application Services server.
/etc/init.d/aif restart
For Windows
1. Stop and Start the PBS Application Services server.
net stop PBSProAppSvc net start PBSProAppSvc
See also
Add Application Definitions Remove Application Definitions Application Definition PBSJobApp
Copyright © 1992 - 2011 Altair Engineering Inc. Removing an application definition from PBS Application Services is also very simple. Simply remove the application definition directory and restart PBS Application Services to remove your application definition from both Application Services and PBS Professional.
For Linux
1. Navigate to AIF_HOME/applications.
cd AIF_HOME/applications
Note Location of AIF_HOME can be found in the /etc/aif.conf file (i.e., AIF_HOME=/ var/spool/aif).
2. Remove application definition directory; for example, appname.
rm -rf appname
3. Restart the PBS Application Services server.
/etc/init.d/aif restart
For Windows
1. Navigate to AIF_HOME\applications via a command prompt (Start > Run > cmd).
cd AIF_HOME\applications
Note Location of AIF_HOME can be found in the C:\Program Files\PBSWorks\11.0.0 \AIF\aif.conf file.
2. Remove the application directory and all of its content; for example appname.
rd /s appname
3. Stop and Start the PBS Application Services server.
net stop PBSProAppSvc net start PBSProAppSvc
See also
Add Application Definitions Update Application Definitions Application Definition PBSJobApp
XML character entity references and special characters
Unlike traditional HTML with its large range of character entity references, in XML there are only five predefined character entity references. If any of the five special characters are used, for example:
a. in an <expression> to be evaluated for convertIf function, like: converterIf($NCPUS>2? <argument1>:<argument2>),
b. as part of an argument for convertIf function, like: use che’apos;ck as <argument1>, c. or are used within an XML element, like: <Description>This does this & that!</Description> we need to use the W3C standard on special characters to escape them. The 5 special characters and their XML character entity references are:
& (ampersand) ? & < (less-than sign) ? < > (greater-than sign) ? > " (quotation mark) ? " ' (apostrophe) ? '
The above examples would be entered as:
a. converterIf($NCPUS>2?<argument1>:<argument2>) b. use che'ck as <argument1>
c. <Description>This does this & that!</Description>
These XML character entity references should be used when authoring XML documents related to application definitions. The general structure of an input file is very simple. It is an XML document, which contains the name of the application as well as any options (arguments) you would like to make available to the user for submission.
Root XML Element with XML Namespace Inclusions
An input file must contain the usual XML encoding directive, as well as the root element with XML Namespace inclusions. The Namespace and Schema inclusions configured here should not be modified, as they articulate the w3c and Altair schema information required for use with an input file.
<?xml version="1.0" encoding="UTF-8"?> <TemplateApplicationInput
Copyright © 1992 - 2011 Altair Engineering Inc.
def ../../schemas/app-def.xsd"> </TemplateApplicationInput>
Application ID and Name
Application definitions require an internal identifier with a formally displayed name. The
ApplicationId is an internal name used by PBS Application Services for the application definition. It is case sensitive, allows no spaces, and should be considered the true name of your application
definition from inside PBS Application Services. The ApplicationName is a formal name, and the name displayed to users and administrators via GUI's or administrative tools.
<ApplicationId>appname</ApplicationId> <ApplicationName>appname</ApplicationName> See also Argument Choice ArgumentString ArgumentInt ArgumentFileName ArgumentDirectoryName
Arguments can be displayed to the user in various forms, with multiple options or even default values assigned to those options. Arguments can require a value to be input by the user, or possibly require no input at all. The XML element ArgumentChoice is used to define an argument segment within the input file. An ArgumentChoice contains an ArgumentType, which determines the data type of the argument. An ArgumentType can have special extensions which can enable Enumeration of multiple predefined options for a single argument to the user, or the ability to receive Multiple inputs from the user.
<ArgumentChoice>
<ArgumentStringEnumerated>
<Name>VERSION</Name>
<Description>Select a version to use.</Description> <DisplayName>Version</DisplayName> <InputRequired>true</InputRequired> <option>1.0</option> <option>2.0</option> <option default='true'>3.0</option> </ArgumentStringEnumerated> </ArgumentChoice>
The following example shows typical argument elements. Here you will see an ArgumentType labeled as ARG_NAME, using the Name element inside ArgumentType. You can think of the value of Name as a case sensitive, no spaces allowed variable name used by PBS Application Services to hold the value input by the user (ala Python: variable = 'value' ). The DisplayName element is the name of your argument as displayed to the user. The Description element provides a mechanism to explain the purpose of your argument to front-end users. The InputRequired element is a Boolean, and lets PBS Application Services know if user input for this argument is required or not. The Value element enables you to predefine a default value for your argument, which can be overwritten by the user if necessary.
<ArgumentChoice> <ArgumentType>
Copyright © 1992 - 2011 Altair Engineering Inc. <DisplayName>Argument Name</DisplayName> <InputRequired>true</InputRequired> <Value>default_val</Value> </ArgumentType> </ArgumentChoice> See also
Application Definition PBSJobApp
ArgumentString ArgumentInt ArgumentFileName ArgumentDirectoryName
1.4.4.1.1 ArgumentString
String arguments can be configured to require a single value using ArgumentString, receive
consecutive stringed inputs using ArgumentStringMulti, and to display multiple predefined options using ArgumentStringEnumerated. The options available to Enumerated strings can have a default option already selected for the user by using the default Boolean attribute to option as demonstrated below.
<ArgumentChoice> <ArgumentString>
<Name>JOB_NAME</Name>
<Description>Input the name of your job.</Description> <DisplayName>Job Name</DisplayName>
<InputRequired>true</InputRequired> <Value>My Job</Value>
</ArgumentString> </ArgumentChoice>
<ArgumentChoice>
<ArgumentStringMulti>
<Name>SOLVER_OPTIONS</Name>
<Description>Advanced solver options</Description>
<DisplayName>Solver Option(s)</DisplayName> </ArgumentStringMulti> </ArgumentChoice> <ArgumentChoice> <ArgumentStringEnumerated> <Name>EXTRA_OPTIONS</Name> <DisplayName>Extra Options</DisplayName> <Description>Select additional option.</Description> <InputRequired>false</InputRequired> <option>command_1</option> <option default='true'>command_2</option> <option>command_3</option> </ArgumentStringEnumerated> </ArgumentChoice>
Copyright © 1992 - 2011 Altair Engineering Inc. Integer arguments can be configured to require a single value using ArgumentInt, and to display multiple predefined options using ArgumentIntEnumerated. The options available to Enumerated
integers can have a default option already selected for the user by assigning the default Boolean attribute to option as demonstrated in the following example. Integer arguments can also have specific ranges (minimum and maximum integer) defined using the LowerBound and UpperBound elements.
<ArgumentChoice> <ArgumentInt>
<Name>MEMORY</Name>
<Description>The desired memory to use.</Description> <DisplayName>Memory (MB)</DisplayName> <InputRequired>true</InputRequired> <LowerBound>100</LowerBound> <UpperBound>2000</UpperBound> <Value>512</Value> </ArgumentInt> </ArgumentChoice> <ArgumentChoice> <ArgumentIntEnumerated> <Name>NCPU</Name> <Description>Number of CPUs</Description> <DisplayName>Cores</DisplayName> <InputRequired>true</InputRequired> <Option default="true">1</Option> <Option>2</Option> <Option>3</Option> <Option>4</Option>
</ArgumentChoice>
1.4.4.1.3 ArgumentFileName
File name arguments can be configured to require a single value using ArgumentFileName, and receive consecutive file inputs using ArgumentFileNameMulti. You may also associate an
ApplicationExtension with a given input file.
<ArgumentChoice>
<ArgumentFileName>
<Name>MASTER</Name>
<Description>Upload your solver master file.</Description> <DisplayName>Master File</DisplayName> <ApplicationExtension>.k</ApplicationExtension> <ApplicationExtension>.dyn</ApplicationExtension> <InputRequired>true</InputRequired> </ArgumentFileName> </ArgumentChoice> <ArgumentChoice> <ArgumentFileNameMulti> <ApplicationExtension>.txt</ApplicationExtension> <Name>INPUT</Name>
<Description>Add input files.</Description> <DisplayName>Input File(s)</DisplayName>
Copyright © 1992 - 2011 Altair Engineering Inc. 1.4.4.1.4 ArgumentDirectoryName
Directory name arguments can be configured to require a single value using
ArgumentDirectoryName.
<ArgumentChoice>
<ArgumentDirectoryName>
<Name>SUBMISSION_DIRECTORY</Name>
<Description>Local directory to return output files.</ Description> <DisplayName>Local Directory</DisplayName> <InputRequired>true</InputRequired> </ArgumentDirectoryName> </ArgumentChoice>
The converter file describes the information obtained from the user via the input file to the workload manager. The values of arguments selected by the users are available within this file as variables containing their assigned values. It is in this XML document that you begin to prepare your applications resources and job execution environment.
This configuration file is consists of several sections: - Header
- Root XML Element
- Application names references - Software licenses request
- Job runtime environment configuration - Run time scripts parameters - Environment variables definitions - Resources requests
- Data staging directives
Software Licenses Request
This section contains the needed information to generate license aware job submissions. This section is meant for integrating application definitions with other tools from Altair Engineering and should not be edited manually;if this is manually populated and modified, customizations in other PBS Application Services configuration files and PBS Professional configuration is necessary to accomplish a successful job submission and execution.
<ApplicationLicensing>
<ApplicationLicensingFeature>PBSWorks</ApplicationLicensingFeature> </ApplicationLicensing>
Root XML Element with XML Namespace Inclusions
The converter file must contain the usual XML encoding directive, as well as the root element with XML Namespace inclusions. The Namespace and Schema inclusions configured here should not be modified, as they articulate the w3c and Altair schema information required for use with an input file.
Copyright © 1992 - 2011 Altair Engineering Inc. xmlns:app-def="http://schemas.altair.com/pbs/2007/02/app-def" xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl" xmlns:jsdl-hpcp="http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://schemas.altair.com/pbs/2007/02/app-conv ../../ schemas/app-conv.xsd"> </TemplateApplicationConverter>
Application ID and Name
Application definitions require an internal identifier, with a formally displayed name. The
ApplicationId is an internal name used by PBS Application Services for the application definition. It is case sensitive, allows no spaces, and should be considered the true name of your application
definition from inside PBS Application Services. The ApplicationName is a formal name, and the name displayed to users and administrators via GUI's or administrative tools.
<ApplicationId>appname</ApplicationId> <ApplicationName>appname</ApplicationName> See also Environment Resources Data Staging
The HPC Profile will enable you to define your job submission environment. The
HPCProfileApplication element will open this section, and enable you to use JSDL submission elements such as jsdl-hpcp:Executable and jsdl-hpcp:Argument, which tells PBS Application Services to use the Python interpreter and the name of the Runtime Script as its first argument. The jsdl-hpcp:Environment element allows you to define OS environment variables for use within your job submission environment. This adds amazing flexibility and ease when authoring your job scripts, as any value received from your input file by way of a Name associated with an
ArgumentType can be accessed as an environment variable.
Using Python, for instance inside start.py, you can access such variables like:
if os.environ['NCPU'] == 1:
print "Serial processing requested." else:
print "Parallel processing requested."
<HPCProfileApplication> <jsdl-hpcp:Executable>$PYTHONPATH</jsdl-hpcp:Executable> <jsdl-hpcp:Argument>runtime/start.py</jsdl-hpcp:Argument> <jsdl-hpcp:Environment name="MASTER">$MASTER</jsdl-hpcp: Environment> <jsdl-hpcp:Environment name="INPUT">$INPUT</jsdl-hpcp: Environment> <jsdl-hpcp:Environment name="MEMORY">$MEMORY</jsdl-hpcp: Environment> <jsdl-hpcp:Environment name="NCPU">$NCPU</jsdl-hpcp:Environment> </HPCProfileApplication>
Copyright © 1992 - 2011 Altair Engineering Inc. The JSDL provides a mechanism for describing the resources required to properly schedule your
application with a workload manager. The jsdl:Resources element will open up this section, allowing you to describe your resources. The TotalCPUCount and TotalPhysicalMemory reflect the corresponding values received from your input file. The CustomResource element is used to enable your application definition within the workload manager.
In regards to TotalPhysicalMemory, it is important to remember that PBS Professional expresses memory units in bytes. This is relevant within the Input File since you will need to know how memory is being requested of PBS Professional. This is especially relevant here, within the Converter File as you will need to convert from your desired unit type into bytes using a simple math expression as
demonstrated below. <jsdl:Resources> <TotalCPUCount> <Exact>$NCPUS</Exact> </TotalCPUCount> <TotalPhysicalMemory> <Exact>$MEMORY * 1024 * 1024</Exact> </TotalPhysicalMemory> <CustomResource> <Name>aif_applications_enabled</Name> <Value>appname</Value> </CustomResource> </jsdl:Resources> See also
Job Wide and Chunk Resources Using Site Policies
Speaking in terms of PBS Professional resource handling, when we specify something like:
<CustomResource>
<Name>aif_applications_enabled</Name> <Value>appname</Value>
</CustomResource>
we are using a "job level" resource; this means it could be defined and matched against cluster wide resources, defined as properties of the PBS complex (ie. Licensing resources), or nodal resources (ie. Memory, ncpus).
When we are submitting a job spawning to a single node it doesn't make much difference where the resource is defined, but when multiple execution hosts are involved, it is important to distinguish job wide resources from nodal resources. For instance, we might ask for multiple execution hosts with multiple cpus, but we would probably want to check a floating license availability just for the job itself, and not for every execution host. Instead we might ask for specific nodes, matching against properties (ie. Installed operating system, application availability, architecture).
For more details on resources in PBS Professional and how to customize them, refer to the PBS Professional Administration Guide.
Jobs required to spawn on multiple execution hosts must be composed of multiple chunks. A chunk, in PBS Professional, is the smallest allocated job constituent; an execution host can hold several chunks from the same job, but a chunk can be only on a single execution host.
Node level resources are defined as:
<CustomResource> <Name>aif_applications_enabled</Name> <Value>RadiossSPMD</Value> <NodeLevel>true</NodeLevel> </CustomResource> <CustomResource> <Name>mpiprocs</Name> <Value>2</Value> <NodeLevel>true</NodeLevel> </CustomResource>
The above node level requests, combined in the same converter file, will result in a submission request equivalent to:
qsub -l select=1:aif_applications_enabled=RadiossSPMD:mpiprocs=2
Multiple chunks jobs are generated specifying the number of chunks we need and then customizing our chunks attributes. Here's an example combining job level and chunk level resources:
Copyright © 1992 - 2011 Altair Engineering Inc. <CustomResource> <Name>ncpus</Name> <Value>2</Value> <NodeLevel>true</NodeLevel> </CustomResource>
<CustomResource> <Name>mpiprocs</Name> <Value>2</Value> <NodeLevel>true</NodeLevel> </CustomResource> <CustomResource> <Name>mem</Name>
<Value>( $MEMORY * 1024 * 1024 ) / ( $NCPUS / 2 ) </Value> <NodeLevel>true</NodeLevel> </CustomResource> <CustomResource> <Name>aif_applications_enabled</Name> <Value>RadiossSPMD</Value> <NodeLevel>true</NodeLevel> </CustomResource>
The above, assuming we input in the submission interface 8 as NCPUS and 16 as MEMORY, will result in a submission like:
qsub -l place=scatter -l select=4:ncpus=2:mpiprocs=2:mem=4194304: aif_applications_enabled=RadiossSPMD
See also
Resources
1.4.5.2.2 Using Site Policies
We can further polish conversion rules applying PBS Application Services Site Policies: they are defined in site-config.xml and are site wide constants we can reuse during conversion and at runtime.
If we insert policies definitions in site-config.xml:
<Policies> <Policy> <Option>MPROC_VALUE</Option> <Value>2</Value> </Policy> <Policy> <Option>ALLOCATIONPOLICY</Option> <Value>BigDisk</Value> </Policy> </Policies>
<Name>node_property</Name> <Value>$ALLOCATIONPOLICY</Value> <NodeLevel>true</NodeLevel> </CustomResource> <Chunks>$NCPUS/$MPROC_VALUE</Chunks> <CustomResource> <Name>ncpus</Name> <Value>$MPROC_VALUE</Value> <NodeLevel>true</NodeLevel> </CustomResource>
And also at runtime, inside the runtime scripts; this is sample code from an hypothetical Python startup runtime script (note the “AIF_” prefix):
cmd="/opt/bin/run_application.sh -threads " + os.environ['AIF_MPROC_VALUE'] print cmd
os.system(cmd)
Site policies are useful to make application definitions more portable: if properly built they can be
exported to a new (compatible) PBS Professional complex and adapted to it just by customizing the site configuration, not by touching again the application definition itself.
See also
Copyright © 1992 - 2011 Altair Engineering Inc. The JSDL provides a mechanism for describing the way workload managers should handle data staging for your application. The jsdl:DataStaging element will open up this section allowing you to describe the file names and directory paths required. You will want to configure how each file and directory received are to be staged. The jdsl:FileName element should contain the name of your file or directory as defined by the user via the input file. A jdsl:CreationFlag needs to be specified, as well as the jdsl:Source of the file or location of the jdsl:Target directory.
<jsdl:DataStaging> <jsdl:FileName>name($MASTER)</jsdl:FileName> <jsdl:CreationFlag>overwrite</jsdl:CreationFlag> <jsdl:Source> <jsdl:URI>$MASTER</jsdl:URI> </jsdl:Source> </jsdl:DataStaging> <jsdl:DataStaging> <jsdl:FileName>name($INCLUDE)</jsdl:FileName> <jsdl:CreationFlag>overwrite</jsdl:CreationFlag> <jsdl:Source> <jsdl:URI>$INCLUDE</jsdl:URI> </jsdl:Source> </jsdl:DataStaging> <jsdl:DataStaging> <jsdl:FileName>*</jsdl:FileName> <jsdl:CreationFlag>overwrite</jsdl:CreationFlag> <jsdl:Target> <jsdl:URI>$SUBMISSION_DIRECTORY/*</jsdl:URI> </jsdl:Target>
Copyright © 1992 - 2011 Altair Engineering Inc. Many application job scripts expect specific values for the arguments passed by a client.
For example, a job script expects Boolean -check/-nocheck values for the argument that is represented by checkbox element of GUI client (and Boolean-based xml element in the PBS Application Services framework)
The resulting values could be:
1. When a value of Boolean is passed as true user intends to send -check option to the application where as when the value of Boolean is false user intends to pass -nocheck as the option to the application.
2. User wants to send -check for true and nothing for false and vice-versa. 3. User wants to send -check=true or -check=false
4. User wants to send -check=1 or -check=0
The place to control this transformation is app-conv-<applicationId>.xml. Boolean variables will be evaluated and their values will be replaced with user defined string values. In app-conv-<applicationId>. xml, an hpcbp application’s job arguments are represented by <jsdl-hpcp:Argument> elements. A Boolean based function could be represented as:
<jsdl-hpcp:Argument>converterIf(<expression>)</jsdl-hpcp:Argument>
The converterIf() function has one argument and one or two return options. Using the example scenario above, the converterIf() function would be evaluated like:
converterIf ($ARGVAL?-check:-nocheck)
Here we have variable $ARGVAL as an argument, and return options are -check and –nocheck. The expected result will be -check if $ARGVAL is evaluated to True because:
- xsd:int is defined in user input - xsd:boolean true
- xsd:string and not empty
The expected result will be -nocheck if $ARGVAL is evaluated to false because: - xsd:boolean false
- xsd:string and empty
- variable is not defined so its type is unknown and variable is treated as an empty xsd:string If they are part of the <expression> or part of an <argument> we need to escape them with the backslash to let the parser know this is not a separator, but the part of the <expression> or the
Other examples of the expression syntax:
Pass –check=true if $ARGVAL evaluates to True, nothing if $ARGVAL evaluates to False:
<jsdl-hpcp:Argument>converterIf($ARGVAL?-check=true) </jsdl-hpcp:Argument>
Pass nothing if $ARGVAL evaluates to True and –nocheck if $ARGVAL evaluates to False: <jsdl-hpcp:Argument>converterIf($ARGVAL?:-nocheck) </jsdl-hpcp:Argument
Various examples of what the result would be if $SOME_ARG were to evaluate as:
<jsdl-hpcp:Argument>converterIf($SOME_ARG?-topt $SOME_ARG:-fopt) </jsdl-hpcp:Argument> a. $SOME_ARG of xsd:string evaluated to “hello” : Result is (-topt hello)
b. $SOME_ARG of xsd:string evaluated to “true” : Result is (-topt true) c. $SOME_ARG of xsd:string evaluated to “false” : Result is (-topt false)
d. $SOME_ARG of xsd:string is empty(optional value not passed) : Result is (-fopt) e. $SOME_ARG of xsd:boolean evaluated to true : Result is (-topt true)
f. $SOME_ARG of xsd:boolean evaluated to false : Result is (-fopt) g. $SOME_ARG of xsd:int evaluated to 1 : Result is (-topt 0) h. $SOME_ARG of xsd: int evaluated to 0 : Result is (-topt 1)
A mathematical expression can be used in the function:
<jsdl-hpcp:Argument>converterIf(1 * 1000+1-1000?-check:-nocheck) </jsdl-hpcp:Argument> Or in setting a minimum value for a resource:
<Exact>converterIf($NCPUS<2?2:$NCPUS)
List of the xml elements that can use the converterIf():
- <jsdl-hpcp:Argument> converterIf(<expression>) </jsdl-hpcp:Argument> - <jsdl-hpcp:Environment> converterIf(<expression>) </jsdl-hpcp:Environment> - <Exact> element of <TotalPhysicalMemory> element of <jsdl:Resources> <jsdl:Resources>
<TotalPhysicalMemory>
<Exact> converterIf(<expression>)</Exact> </TotalPhysicalMemory>
Copyright © 1992 - 2011 Altair Engineering Inc. </TotalCPUCount>
</jsdl:Resources>
- <Chunks> element of <jsdl:Resources> <jsdl:Resources>
<Chunks> converterIf(<expression>) </Chunks> </jsdl:Resources>
- <jsdl:FileName> element of <jsdl:FileStaging> <jsdl:DataStaging>
<jsdl:FileName> converterIf(<expression>) </jsdl:FileName> </jsdl:DataStaging>
conveterIf() can use nested functions. The possible nested functions in converterIf() are: - name()
- nameMerge() - Jep math functions - Jep math expressions - aif variables
Nested functions in name(): - Jep math functions - Jep math expressions - aif variables
Nested functions in namMerge(): - Jep math functions
- Jep math expressions - aif variables
An example of a nested function used for determining the FileName for file staging: <jsdl:FileName>
converterIf($USE_MASTER?name($MASTER):name($RESTART)) </jsdl:FileName>
The order of evaluation:
1. All variables (e.g. $MASTER) get evaluated first.
(converterIf, name(), or nameMerge()).
a. If this function argument is math expression or Jep math function, it will be resolved with Jep. b. If the Jep evaluation results in an exception the exception will be propagated up and will show as
an “OperationFailed” fault in the response message. Job submission will be interrupted. 3. Successful evaluation of the function argument results in some function output.
4. The function output value may be an argument for the next outermost function, and so on – the process works recursively until the most outermost function is resolved.
Any errors will result in error messages in PBS Application Services server log files: If one of the brackets is missing or separator ‘?’ is missing:
“Invalid syntax in expression <expression> in function <function_name>” In case of unresolved variables or math expressions:
"Error while parsing expression <expression> in function <function name>" - AIF ignores the variable and replaces it with an empty string.
- The job submission will be interrupted if evaluation of a math expression results in an exception. WS method will return “OperationFailed” fault.
See also
Environment Resources Data Staging
Copyright © 1992 - 2011 Altair Engineering Inc. An application definition uses Python runtime scripts associated with runtime actions for controlling various aspects of job execution. Runtime scripts can take full advantage of core Python modules, OS-specific commands or virtually any programming task that may be required for job execution.
Runtime Actions
PBS Application Services checks for the existence of runtime scripts in a directory named runtime, located inside your application definition. The start and epilogue actions enable you to control the beginning and end of your job. The start action is the primary action, and should be considered the main job script for your application definition as it actually executes the application associated with the job. The epilogue action gives you the ability to conduct post job operations. The restart and
terminate actions provide you with the ability to customize the restart and termination of the job, should these actions be needed by the job's submitting user.
The epilogue, restart, and terminate actions are achieved with additional PBS-specific
configurations. It is important to note that any dependency scripts that runtime actions might need can also be included inside the runtime directory of your application definition.
Below is a complete list of runtime actions that you can create: start
epilogue restart terminate custom
The start runtime action should be considered the primary job execution script. The start action, file name start.py, is responsible for bringing together all information received prior to this point and executing the application associated with your application definition. As with any runtime action, you can use the Python 'os' module to retrieve environment variables defined in the converter file. The values retrieved can be used to build a system command line that executes your application.
import os
# for grabbing environment variables... input = os.environ['INPUT']
memory = os.environ['MEMORY'] ncpu = os.environ['NCPU'] # for job execution...
os.system( '/usr/bin/appname ' + input + ' –-ncpu=' + ncpu + ' --memory=' + memory )
Go to
Runtime Actions - Common UNIX/Linux Example
See also
Runtime Action Scripts and Actions Epilogue
Restart Terminate Custom
Copyright © 1992 - 2011 Altair Engineering Inc. The epilogue runtime action enables post job operations. This is achieved by modifying the PBS Professional epilogue mechanism (on each execution host) to execute your application's epilogue.py
script when necessary. To learn more about configuring PBS Professional for use with an epilogue script, please see the Integrating & Administration section of the PBS Professional Administrators Guide.
Go to
Runtime Actions - Common UNIX/Linux Example
See also
Runtime Action Scripts and Actions Start
Restart Terminate Custom
The restart runtime action enables the restarting of your application during its runtime phase. This is achieved by way of PBS Professional $action directives inside each nodes configuration file (please see Configuring MOM for Site-Specific Actions inside the PBS Professional Administrators Guide). As with the PBS Professional epilogue script used to execute your application's own 'epilogue' action, you can create a restart wrapper that can do the same.
Go to
Runtime Actions - Common UNIX/Linux Example
See also
Runtime Action Scripts and Actions Start
Epilogue Terminate Custom
Copyright © 1992 - 2011 Altair Engineering Inc. The terminate action enables the killing of your application during any phase. This is achieved by way of PBS $action directives inside each nodes configuration file (please see Configuring MOM for Site-Specific Actions inside the PBS Professional Administrators Guide). As with the PBS
Professional epilogue script used to execute your application's own 'epilogue' action, you can create a terminate wrapper that can do the same.
Go to
Runtime Actions - Common UNIX/Linux Example
See also
Runtime Action Scripts and Actions Start
Epilogue Restart Custom