Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
PBS Works is a brand of
PBS Application Services 13.2
Programmer’s Guide
PAS 13.2 Programmer’s Guide
Altair Packaged Solution Offerings (PSOs): Automated Reporting Director™ ©2008-2017; GeoMechanics Director ©2011-2017; Impact Simulation Director™ ©2010-2017; Model Mesher Director™ ©2010-2017; Model Verification Director™ ©2013-2017; NVH Director™ ©2010-2017; Squeak and Rattle Director™ ©2012-2017; Virtual Gauge Director™ ©2012-2017; Weight Analytics™ ©2013-2017; Weld Certification Director™ ©2014-2017; Multi-Disciplinary Optimization™ ©2012-2017.
Altair Simulation Cloud Suite: Simulation Manager™ ©2003-2016; Compute Manager™ ©2003-2017; Display Manager™ ©2003–2017; and Process Manager™ ©2003-2016.
Software products of solidThinking, Inc., a wholly owned subsidiary of Altair Engineering:solidThinking Inspire® 2017 ©2009-2017; solidThinking Evolve®2017 ©1993-2017; solidThinking Compose® 2017 ©2007-2017, solidThinking Activate® 2017 ©1989-2017, solidThinking Embed® 2017 ©1989-2017, solidThinking Embed® SE 2017 ©1989-2017; Click2Extrude™ Metal 2017 ©1996-2017; Click2Extrude™ Polymer 2017 ©1996-2017; Click2Cast® 4.0 ©2011-2017; Click2Form™ 2017 ©1998-2017; Envision® 4.0 ©2013-2017.
Altair intellectual property rights are protected under U.S. and international laws and treaties. Additionally, Altair software is protected under patent #6,859,792 and other patents pending. All other marks are the property of their respective owners.
ALTAIR ENGINEERING INC. Proprietary and Confidential. Contains Trade Secret Information.
Not for use or disclosure outside of Altair and its licensed clients. Information contained in Altair software shall not be decompiled, disassembled, “unlocked”, reverse translated, reverse engineered, or publicly displayed or publicly performed in any manner. Usage of the software is only as explicitly permitted in the end user software license agreement. Copyright notice does not imply publication.
Third party software licenses
AcuConsole contains material licensed from Intelligent Light (www.ilight.com) andused by permission.
iii
http://www.altairhyperworks.com/ClientCenter3rdPartyLicense.aspxhttp://www.altairhyperworks.com/ClientCenter3rdPartyLicense.aspxhttp://www.ilight.com
PAS 13.2 Programmer’s Guide
Software Security Measures:
Altair Engineering Inc. and its subsidiaries and affiliates reserve the right to embed software security mechanisms in the Software for the purpose of detecting the installation and/or use of illegal copies of the Software. The Software may collect and transmit non-proprietary data about those illegal copies. Data collected will not include any customer data created by or used in connection with the Software and will not be provided to any third party, except as may be required by law or legal process or to enforce our rights with respect to the use of any illegal copies of the Software. By using the Software, each user consents to such detection and collection of data, as well as its transmission and use if an illegal copy of the Software is detected. No steps may be taken to avoid or detect the purpose of any such security mechanisms.
Technical Support
This document is proprietary information of Altair Engineering, Inc.
Location Telephone e-mail
North America +1 248 614 2425 [email protected] +86 (0)21 6117 1666 [email protected] +33 (0)1 4133 0992 [email protected] +49 (0)7031 6208 22 [email protected] +91 80 66 29 4500 [email protected] +39 800 905595 [email protected] +81 3 5396 2881 [email protected] +82 70 4050 9200 [email protected] +46 (0) 46 460 2828 [email protected] +44 (0)1926 468 600 [email protected]
iv
PAS 13.2 Programmer’s Guide
Intellectual Property Rights Notice: Copyrights, Trademarks, and Third Party Licenses
Updated: June 9, 2017.
Altair® PBS Works™ 13.2Enabling On-Demand Computing™Copyright© 1994-2017 Altair Engineering Inc. All Rights Reserved.
Altair PBS Works™: Compute Manager™ ©2012-2017; Display Manager™ ©2013-2017; PBS Pro™ ©1994-2017; PBSProfessional® ©1994-2017; PBS Application Services™ ©2008-2017; PBS Analytics™ ©2008-2016;PBS Desktop™ ©2008-2012; and e-Compute™ ©2000-2010.
HyperWorks® products: HyperMesh® ©1990-2017; HyperCrash® ©2001-2017; OptiStruct® ©1996-2017; RADIOSS® ©1986-2017; HyperView® ©1999-2017; HyperView Player® ©2001-2017; HyperMath® ©2007-2017; HyperStudy® ©1999-2017; HyperGraph® ©1995-2017; MotionView® ©1993-2017; MotionSolve® ©2002-2017; HyperForm® ©1998-2017; HyperXtrude® ©1999- 2017; Process Manager™ ©2003-2016; Templex™ ©1990-2017; TextView™ ©1996-2017; MediaView™ ©1999-2017; TableView™ ©2013-2017; BatchMesher™ ©2003-2017; HyperWeld® ©2009-2017; HyperMold® ©2009-2017; Manufacturing Solutions™ ©2005-2017; solidThinking Inspire® 2017 ©2009-2017; solidThinking Evolve®2017 ©1993-2017; Durability Director™ ©2009-2017; Suspension Director™ ©2009-2017; AcuSolve® ©1997-2017; AcuConsole® ©2006-2017; SimLab® ©2004-2017; Virtual Wind Tunnel™ ©2012-2017; FEKO® (©1999-2014 Altair Development S.A. (Pty) Ltd.; ©2014-2017 Altair Engineering, Inc.); ConnectMe™ ©2014-2017; Click2Extrude™ Polymer 2017 ©1996-2017; Click2Extrude™ Metal 2017 ©1996-2017; Click2Form™ 2017 ©1998-2017.
Additional Altair Products: Multiscale Designer™ ©2011-2017; Flux v.12.2 ©1983-2017; InCa3D v.3.1©1996-2016; CDE v.2 ©2012-2016; Got-It v.3 ©2002-2016; WinProp v.14.5 ©2000-2017
Special Notice: Pre-release versions of Altair software are provided ‘as is’, without warranty of any kind. Usage is strictly limited to non-production purposes.
ii
Contents
About this Guide xi
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiRelated Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiDocument Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiAcronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Chapter 1: Programmer's Guide for PBS Application Services 1
What’s New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Introduction to the Programmer's Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1PBS Application Services Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Benefits of PBS Application Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Functionality of PBS Application Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Compatibility and Portability of PBS Application Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
PBS Application Services Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chapter 2: Jobs Submission and Control Web Services Interfaces 7
GetApplicationAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15ExecuteCustomAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19GetApplicationDefinitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22GetApplicationRefreshScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27RefreshApplicationDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31SubmitJob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37GetJobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41GetJobsSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49GetJobsCompact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55MoveJob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59OrderJobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61CheckpointJob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63RestartJob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65TerminateJob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67DeleteFinishedJob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Chapter 3: Administration Services Interfaces 73
AddApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
v
GetApplications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82UpdateApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88RemoveApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97AddApplicationVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99GetApplicationVersions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102RemoveApplicationVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105AddHostPlatform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108GetHostPlatforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111RemoveHostPlatform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113AddPolicy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116GetPolicies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119UpdatePolicy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121RemovePolicy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123AddBillingAccount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126GetBillingAccounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128RemoveBillingAccount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130EnableHostApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132DisableHostApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135GetHostApplications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137GetServerStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139GetServerVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144GetHosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146GetQueues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149SetLmutils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151GetLmutils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154RefreshConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156GetModificationTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158lsAdmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Chapter 4: Unified Web Services Interfaces for Basic File Operations 163
RunPythonScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164DirectoryCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170DirectoryDelete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176getHomeDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181FileList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183FileRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191FileSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
vi Contents
FileDelete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200FileWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205FileDataReplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210FileCompress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215FileUncompress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219FileCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224FileMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228FileExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232GetFileTransferProtocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236getStageRoot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Chapter 5: File Upload and Download Requests 241
File Upload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242File Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Chapter 6: General Fault Result Example 245
Appendix: Web Services Definitions 251
Administration.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251bes-factory-wms.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293FileOperations.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310HcpcJobs.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326ogsa-bes-factory.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327ogsa-bes-management.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337PbsEifl.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341PbsJobs.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346PbsMonitor.wsdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Appendix: XML Schemas 367
Administration.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367advancedfilter.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386app-actions.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388app-arguments-actions.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389app-arguments-def.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396app-conv.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Contents vii
app-def.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403attr-map.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404bes-factory.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404bes-wms.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407FileOperations.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417jsdl.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425jsdl-hpcp.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434log4j.dtd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436PbsEifl.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441pbsjob-description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445PbsMonitor.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451pbsnodes.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454portal.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456resource-type.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462site-config.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463soap-envelope.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466ws-addr.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469xinclude.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Appendix: Application Parameter Examples 473
app-conv-optistruct.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473app-inp-optistruct-resolved.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474app-inp-optistruct.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Appendix: Tutorials 481
Create a Client that will Submit a Job to PAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481Generating Java classes from PbsJobs WSDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482Customizing the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483Compiling the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487Testing PBS Application Services Job Submission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489Test notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490Additional tools recommended for development process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
viii Contents
Appendix: Glossary 493
Appendix: Index 501
Contents ix
x Contents
About this Guide
This document describes the application programming interfaces (API) available for integration with PBS Professional and PBS Application Services. These APIs expose all functionality sup-ported by PBS Professional and is a neutral interface for the client applications to easily integrate with the PBS Professional complex.
This chapter contains the following topics:• Audience• Related Documentation• Document Conventions• Acronyms
AudienceThis document is intended for developers who are programmatically integrating software compo-nents with PBS Professional.
Related DocumentationThe other PAS related documents are as follows:
• PAS Commands User Guide• PAS Administrator’s Guide• Diving Into Application Definitions
Documentation can be found at the following URL:
http://www.pbsworks.com/SupportGT.aspx?d=PBS-Professional,-Documentation
xi
http://www.pbsworks.com/SupportGT.aspx?d=PBS-Professional,-Documentation
PAS 13.2 Programmer’s Guide
Document ConventionsThe following typographical conventions are used in this document:
PAS Home Directory
PAS_HOME is where the PAS configuration and log files are stored. The location of this directory is platform dependent. For example:
PAS_HOME/repository/applications
PAS Execution Directory
PAS_EXEC is where the PAS binaries are stored. The location of this directory is platform depen-dent. For example:
PAS_EXEC/pas-commands/bin
File Pathname
Names of a file or a directory are displayed as follows:
/home/user1/submission_dir/PBSJobApp/174.hwesuse113.oe
Keyboard Inputs
Keyboard inputs, for example commands that are entered are displayed as follows:
./etc/init.d/pbsworks-pbsa start
Code Example and File Contents
Examples of programming code or the contents of a file are displayed as follows:
Parameters, Environment Variables, XML tags
Environment variables, XML tags, parameters, and references to a snippet of a file are displayed as follows:
Set the value of the MaxBackupIndex parameter to the maximum number of log files to keep.
if userInputs['ACCOUNT']: job.attr_accounting_label =userInputs['ACCOUNT']
xii
PAS 13.2 Programmer’s Guide
UI Controls
User Interface controls such as command buttons, tab names, menu options, application fields, or items in a list are displayed as follows:
Click the Settings button.
Document References
References to an external document are displayed as follows:
For more information see the PBS Works 13.1 Administrator’s Guide.
Messages
Log file messages or messages returned from a command are displayed as follows:Please make sure PBSA engine and Monetdb Server are not running.
Notes
Information or notes that supplement or emphasize important points are displayed as follows:
Tips
Tips that makes your work easier are displayed as follows:
Cautions
Cautions draw special attention to any action that could cause damage to the product or cause the loss of data. For example:
The default TOC type for a result file is set in the plugin_def.xml file
If you get an error during registration of the HyperView Player, right click on the shortcut and choose the Run as Administrator option from the context menu.
Do not turn the monitor off by unplugging it from the computer or wall socket. Severe damage to the monitor may result. Turn the monitor off before unplugging it.
xiii
PAS 13.2 Programmer’s Guide
AcronymsThe following acronyms are used in this guide.
Table 1. Acronyms
Acronym DescriptionAPI Application Programming InterfaceHPC High Performance ComputingHPCBP High Performance Computing Basic ProfileMOM Machine Oriented MiniserverPAS PBS Application ServicesSOA Service Oriented ArchitecturePBS Portable Batch SystemWS Web ServicesXML Extensible Markup Language
xiv
1. Programmer's Guide for PBS Application Services
The PBS Application Services (PAS) Programmer's Guide provides developers with the informa-tion required to integrate with the PAS Server. For more information, see the following topics:
• Introduction to the Programmer's Guide• Jobs Submission and Control Web Services Interfaces• Administration Services Interfaces• Web Services Interfaces for HPCBP Jobs• Unified Web Services Interfaces for Basic File Operations• General Fault Result Example
What’s NewWhat's new in the PBS Application Services Programmer’s Guide:
• Foreign character support has been added for Job Submission APIs - see Jobs Submission and Control Web Services Interfaces on page 7.
• Foreign character support has been added for File Operation APIs - see Unified Web Ser-vices Interfaces for Basic File Operations on page 163.
• Special character support for Job Submission and File Operations APIs has been updated. For more information see the section “Special Character Support” in the relevant chapters.
• A new chapter has been added for file upload and download requests - File Upload and Download Requests on page 241.
Introduction to the Programmer's GuidePBS Application Services (PAS) is a middleware component that communicates with the PBS Pro-fessional complex and the operating system, and provides services for the front end client applica-tions such as graphical user interfaces. This middleware component is used as the preferred method of communication between the integration of client applications and the PBS Professional complex. PBS Application Services allows users to quickly create application portals that boost productivity and accelerate innovation. Application administrators can use PBS Application Ser-vices to create custom, solver specific application definitions. Leveraging key industry standards
1
PAS 13.2 Programmer’s Guide
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.
Web Services (WS) are used as the underlying technology for communication between PBS Appli-cation Services and the front end client applications. The PBS Application Services component exposes all functionality supported by PBS Professional and is a neutral interface for the client applications to easily integrate with the PBS Professional complex.
PBS Application Services provides an integration layer built upon the service oriented architecture (SOA) for easy integration of end user applications with the PBS Professional complex.
The Application Services component provides the following:
Administration WS Port• Administration of applications scheduled by PBS Professional• Site configuration• Application licensing management
Application Job WS Port• Application job submission, monitoring, and management• Authentication and identity management• Data Management and staging• Custom actions
File Operations WS Port• Basic file operations• File operations for running jobs, and expand options for staging user files
2 Programmer's Guide for PBS Application Services
PAS 13.2 Programmer’s Guide
PBS Application Services OverviewThe following figure illustrates a high level overview of PBS Application Services:
Figure 1. High Level Overview of PBS Application Services
Benefits of PBS Application Services• Stable WS-based application programming interface (API) for integration into bigger sys-
tems• Streamlined APIs for integration of applications into PBS Professional for the independent
software vendors• Front end graphical user interface application building is made easier• Independent software vendors and the community can define new application definitions
and exchange them within the PBS Professional complex in a turn-key fashion• Platform neutrality allowing PAS to run on Windows and Linux platforms• Customized application definition files can be shared across all supported platforms• Transactional manner of operations (e.g. eliminates out of sync issues with resources not
included in scheduling, etc.)• Grid-friendly as it uses the same extensible markup language/web services (XML/WS) as
largescale grid solutions• Easier integration into Enterprise SOA and business process management• Standards-based implementation using Web Services, WS-Security, high performance
computing basic profile (HPCBP)
Programmer's Guide for PBS Application Services 3
PAS 13.2 Programmer’s Guide
Functionality of PBS Application ServicesApplication Services provides the following major groups of functionality:
• Installation and management of application definitions by administrators• Site configuration such as billing accounts and MPROC by administrators• User submission and management of PBS Professional jobs• File operations services
Compatibility and Portability of PBS Application Services• 75% of the code is written in Java 7• 15% of the code is written in ANSI C• 5% of the code is written in Python• 5% of the code is written in shell scripts• PBS Professional static libraries are required in order to link the ANSI C++ component
4 Programmer's Guide for PBS Application Services
PAS 13.2 Programmer’s Guide
PBS Application Services WorkflowThe following figure illustrates the PBS Application Services workflow:
1. The administrator/user creates a new application definition using HPCBP and PBS Appli-cation Services guidelines, or modifies an existing application definition.
2. The administrator uses PBS Application Services WSi for installation of the application definition.
3. The end user, via a front-end graphical user interface, obtains a list of available applica-tions.
4. The end user selects the application and provides the required and optional parameters.5. Input data from the user is transformed into a JSDL-HPCBP format job description using
the application definition documents for the specified application.6. The JSDL-HPCBP job is converted to PBS Professional submission syntax in the PBS spe-
cific port and submitted to PBS Professional.7. PBS Professional executes and terminates the job in an application specific way.
Programmer's Guide for PBS Application Services 5
PAS 13.2 Programmer’s Guide
6 Programmer's Guide for PBS Application Services
2. Jobs Submission and Control Web Services Interfaces
The Web Services interfaces (WSi) for Application Job Submission and Control are used for web portals, HyperWorks desktop applications, and other third party GUI applications to submit, con-trol and monitor Application jobs (i.e. PBS Professional jobs with parameters required by Solver Applications). These WSi are an Altair extension of High Performance Computing Basic Profile/Basic Execution Services (HPCBP/BES) and use XML schemas developed by Altair located in Appendix B. XML Schemas.
Application Job Submission and Control Overview• The PBS Application Services Application Job WSi Submission and Controls are imple-
mented as Web Services.• Operations defined in these WSi perform only data conversion from ApplicationJob
schema to Job Submission Description Language (JSDL) and rely on operations in HPCBP WSi to submit, monitor and control jobs.
• Authentication is provided by a Username-Password security token and the transport-level security Hypertext Transfer Protocol Secure/Secure Socket Layer (HTTPS/SSL) is used for message encryption as defined in the HPCBP specifications.
• All commands go to the default PBS Professional Server exposing a HPCBP instance. The choice to select the server is not available for users at the WSi level.
• ApplicationDefinitionType is a generic way to describe applications.Typical instances include:- A list of available versions of this application- Max RAM- Max CPU- Types of required files- Associated file name extensions- Command line options
For an example, see app-inp-optistruct-resolved.xml in Appendix C. Application Parameter Examples.
7
PAS 13.2 Programmer’s Guide
URL Format
anyURI represents a Uniform Resource Identifier Reference (URI). The syntax confirms W3C standard and it can be relative URI or absolute URI.
An example of absolute URI is shown below:
pbscp://PRETZEL/C:/Program%20Files/PBSWorks/11.1.0/PAS/home/applications/optistruct/runtime
URI parts:• The protocol: pbscp• The host or hostname: PRETZEL• The path: C:/Program%20Files/PBSWorks/11.1.0/PAS/home/applications/optistruct/run-
time.The path typically refers to a file or location on the server.
Staging: Files and Directories
The staging of files and directories are similar. An example of directory staging is shown below:
An example of file staging is shown below:
pbs_spawn overwrite pbscp://PRETZEL/C:/Program%20Files/PBSWorks/11.1.0/PAS/exec/pbs_spawn
-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzfem overwrite pbscp/://PRETZEL/C:/pas-11.1.0/ApplicationsPortalClient/testBooleanExpres-sions/useCaseSpecialChars/-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzfem
8 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Usage of " * "
“*” is a regular expression pattern which means 0 or more occurrences of the item. For example, it means “all files from the directory”.
An example of using * in staging element is shown below:
Foreign Character Support
As of PAS 13.1, foreign character support has been added for the Job Submission APIs, except for the following entities:
• the username • the name of the job• any files or directories that are staged in• any files or directories that are staged out
Foreign characters are supported in the password passed in the POST request.
Some of these APIs rely on PBS Professional or the underlying Operating System to perform the action which may not provide support for foreign characters. For instance, the GetJobs, Get-JobsSummary, and GetJobsCompact APIs rely on PBS Professional which does not support multi-byte UTF8 foreign characters requiring greater than 2 bytes for representation. PBS Professional returns a hardcoded “n/a” in place of these foreign characters.
* overwrite pbscp://PRETZEL/C:/demo_files/optistruct/*
Jobs Submission and Control Web Services Interfaces 9
PAS 13.2 Programmer’s Guide
Special Character Support
The subset of safe characters supported by the PAS server for job submission on Windows plat-forms are:
Table 1. Special characters supported for job submission on Windows
Supported UnsupportedDirectory name
Note: A space at the beginning or the end of a directory name is not supported.
Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]Space (see Note)Tilde ( ~ ) Dollar sign ( $ ) Underscore ( _ ) Dash ( - ) Equal ( = ) Square brackets [ ] Dot ( . )
Backtick ( ` )Exclamation mark ( ! )At sign ( @ )Hashtag ( # )Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * ) Parenthesis ( ) Plus sign ( + )Curly braces { }
Vertical bar ( | )Backslash ( \ )Colon ( : )Semi-colon ( ; ) Double quotes ( " )Single quotes ( ' )Angle brackets < >Comma ( , )Question mark ( ? )Slash ( / )
Directory path Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]SpaceTilde ( ~ ) Right parenthesis )Underscore ( _ ) Dash( - ) Dot ( . )
Backtick ( ` )Exclamation mark ( ! )At sign ( @ )Hashtag ( # )Dollar sign( $ ) Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * ) Left parenthesis (Plus sign ( + )Equal ( = )
Curly braces { }Square brackets [ ]Vertical bar ( | )Backslash ( \ )Colon ( : )Semi-colon ( ; ) Double quotes ( " )Single quotes ( ' )Angle brackets < >Comma ( , ) Question mark ( ? )Slash ( / )
10 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Filename
Note: A space at the beginning or the end of a filename is not supported.
Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]Space (see Note)Tilde ( ~ ) Exclamation mark ( ! )Hashtag ( # ) Underscore ( _ ) Dash( - ) Plus sign ( + )Dot ( . )
Backtick ( ` )At sign ( @ )Dollar sign( $ ) Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * ) Parenthesis ( ) Equal ( = )Curly braces { }Square brackets [ ]
Vertical bar ( | )Backslash ( \ )Colon ( : )Semi-colon ( ; ) Double quotes ( " )Single quotes ( ' )Angle brackets < >Comma ( , )Question mark ( ? )Slash ( / )
User input fields - For example:• ·billing
accounts • ·job
names• ·custom
resources• ·other
user input fields of type string
Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]SpaceTilde ( ~ )Backtick ( ` )At sign ( @ )Hashtag ( # )Dollar sign( $ ) Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * )Parenthesis ( )Underscore ( _ )
Dash( - ) Plus sign ( + )Equal ( = )Curly braces { }Square brackets [ ]Vertical bar ( | )Colon ( : )Angle brackets < >Comma ( , )Dot ( . ) Question mark ( ? )Slash ( / )
Exclamation mark ( ! )Backslash ( \ )Semi-colon ( ; ) Double quotes ( " )Single quotes ( ' )
Table 1. Special characters supported for job submission on Windows
Supported Unsupported
Jobs Submission and Control Web Services Interfaces 11
PAS 13.2 Programmer’s Guide
The subset of safe characters supported by the PAS server for job submission on Linux platforms are:
Table 2. Special characters supported for job submission on Linux
Supported UnsupportedDirectory name
Note: A space at the beginning or the end of a directory name is not supported.
Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]Space (see Note)Tilde ( ~ ) Dollar sign( $ ) Underscore ( _ ) Dash( - )Equal ( = )Square brackets [ ]Backslash ( \ )Dot ( . )
Backtick ( ` )Exclamation mark ( ! )At sign ( @ )Hashtag ( # ) Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * ) Parenthesis ( )Plus sign ( + )Curly braces { }
Vertical bar ( | )Colon ( : )Semi-colon ( ; ) Double quotes ( " )Single quotes ( ' )Angle brackets < >Comma ( , )Question mark ( ? )Slash ( / )
Directory path Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]SpaceTilde ( ~ )Right parenthesis )Underscore ( _ ) Dash( - ) Dot ( . )
Backtick ( ` )Exclamation mark ( ! )At sign ( @ )Hashtag ( # )Dollar sign( $ ) Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * ) Left parenthesis (Plus sign ( + )Equal ( = )
Curly braces { }Square brackets [ ]Vertical bar ( | )Backslash ( \ )Colon ( : )Semi-colon ( ; ) Double quotes ( " )Single quotes ( ' )Angle brackets < >Comma ( , )Question mark ( ? )Slash ( / )
12 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Use the links below to view the Application Job Submission and Control Web Services interfaces:• GetApplicationAction• ExecuteCustomAction• GetApplicationDefinitions• GetApplicationRefreshScript• RefreshApplicationDefinition• SubmitJob• GetJobs• GetJobsSummary• GetJobsCompact• MoveJob• OrderJobs
Filename
Note: A space at the beginning or the end of a filename is not supported.
Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]Space (see Note)Tilde ( ~ ) Exclamation mark ( ! )Underscore ( _ ) Dash( - ) Plus sign ( + )Dot ( . )
Backtick ( ` )At sign ( @ )Hashtag ( # )Dollar sign( $ ) Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * ) Parenthesis ( )Equal ( = )Curly braces { }
Square brackets [ ]Vertical bar ( | )Backslash ( \ )Colon ( : )Semi-colon ( ; ) Double quotes ( " )Single quotes ( ' )Angle brackets < >Comma ( , )Question mark ( ? )Slash ( / )
User input fields - For example:• ·billing
accounts • ·job
names• ·custom
resources• ·other
user input fields of type string
Alphabetic [ A-Z , a-z ]Numeric [ 0-9 ]SpaceTilde ( ~ )Backtick ( ` )Exclamation mark ( ! )At sign ( @ )Hashtag ( # )Dollar sign( $ ) Percent sign ( % )Caret ( ^ )Ampersand ( & )Asterisk ( * ) Parenthesis ( )
Underscore ( _ ) Dash( - ) Plus sign ( + )Equal ( = )Curly braces { }Square brackets [ ]Vertical bar ( | )Colon ( : )Single quotes ( ' )Angle brackets < >Comma ( , )Dot ( . ) Question mark ( ? )Slash ( / )
Backslash ( \ )Semi-colon ( ; ) Double quotes ( " )
Table 2. Special characters supported for job submission on Linux
Supported Unsupported
Jobs Submission and Control Web Services Interfaces 13
PAS 13.2 Programmer’s Guide
• CheckpointJob• RestartJob• TerminateJob• DeleteFinishedJob
14 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
GetApplicationActionReturns the XML structure which contains application-specific custom action definitions for the current job state and the application associated with a specified job. The XML structure validates against the schema:http://schemas.altair.com/pbs/2009/01/app-actions
This WSi is accessible to Administrators and Regular users.
PARAMETERJobId
RETURNAction definitions: List
ApplicationActions_TypeApplicationId ApplicationName CustomAction
EXAMPLES
ecompute e-compute123 232.blrm153
Jobs Submission and Control Web Services Interfaces 15
PAS 13.2 Programmer’s Guide
Expected Result
optistruct RUNNING QUEUED SEND_SIGNAL Send Signal Send Signal SIGNAL Select Signal and Send It SIGNAL true STOP PRINT EXIT PYTHON SendSignal.py true RUNNING ‘ CREATE_PLOT Create Plot Create a Plot
16 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
TITLE Title for the Plot Title true PLOT_TYPE Type of the Plot true Pie Chart Line Bars Pie Chart PYTHON Plot.py RUNNING TERMINATE_IMMEDIATELY Terminate Immediately Terminate Computations Immediately PYTHON MyTerminate.py
Jobs Submission and Control Web Services Interfaces 17
PAS 13.2 Programmer’s Guide
FAULTS
The following faults can be generated:• NotAuthorized - Incorrect or insufficient user credentials provided to execute this method• InvalidRequestMessage - User request does not correspond to the schema definition. In
most of the cases this fault is thrown when a user specifies some value that does not com-ply with PBS Application Services – for example, empty string for a job name.
• OperationFailed - Unspecified error occurred due to a system or other infrastructure issue. Causes can be numerous, e.g. not enough disk space, not enough memory, some compo-nent is missing, network configuration issue, the request cannot be executed due to limita-tions of the technology or underlying system, other. More details can be found in the log file.
• ApplicationUnknown - Application definition for this application does not existSEE ALSO
• ExecuteCustomAction• GetApplicationDefinitions• GetApplicationRefreshScript• RefreshApplicationDefinition
18 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
ExecuteCustomActionMethod for executing applications-specific custom actions for PBS Professional jobs implemented by running a Python script associated with the requested custom action.
The XML structure validates against the schemas:http://schemas.altair.com/pbs/2009/01/app-actions
This WSi is accessible to Administrators and Regular users.
PARAMETERapplicationId JobId action
CustomAction_Type:JobStates Name DisplayName Description ArgumentChoices Executable ShowOutput
RETURNresult
runPythonScriptResult:exitCode isStdOutTruncated isstdErrTruncated stdErr stdOut
Jobs Submission and Control Web Services Interfaces 19
PAS 13.2 Programmer’s Guide
EXAMPLES
Input
ecompute e-compute123 optistruct 232.blrm153 RUNNING QUEUED SEND_SIG-NAL Send Signal Send Signal SIGNAL Select Signal and Send It SIGNAL true STOP PRINT EXIT PYTHON SendSignal.py true
20 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Expected Result
FAULTS
The following faults can be generated:• NotAuthorized - Incorrect or insufficient user credentials provided to execute this method• ApplicationUnknown - Application definition for this application does not exist• InvalidRequestMessage - User request does not correspond to the schema definition. In
most of the cases this fault is thrown when a user specifies some value that does not com-ply with PBS Application Services rules - for example, empty string for a job name.
• OperationFailed - Unspecified error occurred due to a system or other infrastructure issue. Causes can be numerous, e.g. not enough disk space, not enough memory, some compo-nent is missing, network configuration issue, the request cannot be executed due to limita-tions of the technology or underlying system, other. More details can be found in the log file.
SEE ALSO• GetApplicationAction• GetApplicationDefinitions• GetApplicationRefreshScript• RefreshApplicationDefinition
0 false false RXhlY3V0aW5nIHNjcmlwdDogcGJzX3NwYXduXEk4T0tOTk05QjdOMkpOTFBTVlNXUEFMNC1zY3JpcHQgd2l0aCBzaWduYWwgOiBudWxsCg==
Jobs Submission and Control Web Services Interfaces 21
PAS 13.2 Programmer’s Guide
GetApplicationDefinitionsThe GetApplicationDefinitions API returns a list of applications available on the PBS Professional complex. Applications can be filtered based on a file extension indicating that the application requires that type of input file.
For instance, the Optistruct application requires a .fem input file. Therefore, the application defi-nition for Optistruct will contain an XML element .fem. If the GetApplicationDefinitions API is called and an extension of .fem is specified, then only those application tagged with this XML element will be returned.
If a file extension is not specified, then all available applications are returned.
A new feature available with versions of PAS 12.1 and greater is dynamic applications. See the "Using a Dynamic Application" tutorial in Diving Into Application Definitions (DIAD) for an exam-ple of a dynamic application. Also, refer to the section "Dynamic Application Refresh Utility" in DIAD for information about methods that are available for use in the dynamic application refresh script.
This WSi is accessible to Administrators and Regular users.
PARAMETERextensions: List
RETURNList
TemplateApplicationInput_TypeApplicationId ApplicationName ApplicationExtension ArgumentChoice RefreshScript DefaultRefresh
22 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
EXAMPLES
Input
ecompute ecompute123 f9rG6u2KHKIc+GDhw+FAIg== 2014-07-01T17:17:24.593Z .fem
Jobs Submission and Control Web Services Interfaces 23
PAS 13.2 Programmer’s Guide
Expected Result
optistruct Optistruct .fem VERSION Version true 11.0 12.0 JOB_NAME Job Name true BILLING_ACCOUNT Billing Account true Ford_456 BMW NCPU Number of CPUs true 1 2
24 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
MEM Memory (MB) true 0 2000 SOLVER_OPTIONS Advanced solver options POST_PROCESSING Post process results ZIP_RESULTS Create Zip archive with job results false false SUBMISSION_DIRECTORY Project Directory true MASTER Master File true true
Jobs Submission and Control Web Services Interfaces 25
PAS 13.2 Programmer’s Guide
FAULTS
The following faults can be generated:• NotAuthorized - Incorrect or insufficient user credentials provided to execute this method• InvalidRequestMessage - User request does not correspond to the schema definition. In
most of the cases this fault is thrown when a user specifies some value that does not com-ply with PBS Application Services rules - for example, empty string for a job name.
• OperationFailed - Unspecified error occurred due to a system or other infrastructure issue. Causes can be numerous, e.g. not enough disk space, not enough memory, some compo-nent is missing, network configuration issue, the request cannot be executed due to limita-tions of the technology or underlying system, other. More details can be found in the log file.
SEE ALSO• GetApplicationAction• ExecuteCustomAction• GetApplicationRefreshScript• RefreshApplicationDefinition
INCLUDE Include File(s) false true RESTART Restart File false
26 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
GetApplicationRefreshScriptThe GetApplicationRefreshScript API returns the Base64 encoded Python refresh script code body.
The XML structure validates against the schema:http://schemas.altair.com/pbs/2007/03/portal/GetApplicationRefreshScript
This WSi is accessible to Administrators and Regular users.
PARAMETERApplicationId
RETURNgetApplicationRefreshScript:
exitCode - a zero exit code indicates that the refresh script was returned suc-cessfully
stdOut - contains the refresh scriptstdErr
Jobs Submission and Control Web Services Interfaces 27
PAS 13.2 Programmer’s Guide
EXAMPLES
Input
ecompute ecompute123 wsWUeoPCO4N9rYZRVfktMQ== 2015-04-29T03:24:17.828Z OptiStruct
28 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Expected Result
0 aW1wb3J0IG9zLHN5cwojbmV3QXJnMT17Im5hbWUiOiJFTkdJTkUiLCJ0eXBlIjoiRklMRV9NVUxUSSIsImRpc3BsYXlOYW1lIjoiRW5naW5lIEZpbGUiLCJpbnB1dFJlcXVpcmVkIjpUcnVlfTsKbmV3QXJnMT17Im5hbWUiOiJORVdfU1RSSU5HIiwidHlwZSI6IlNUUklORyIsICJ2YWx1ZSI6IiIsImRlZmF1bHRWYWx1ZSI6IiIsImRlc2NyaXB0aW9uIjoiVGVzdF8xLiBDcmVhdGUgYXJnIFNUUklORy4iLCJkaXNwbGF5TmFtZSI6Ik5FV19TVFJJTkciLCJpbnB1dFJlcXVpcmVkIjpUcnVlLCJyZWZyZXNoT25VcGRhdGUiOkZhbHNlfQppbnNlcnRBcmcobmV3QXJnMSwgMikKcHJpbnRBcHBsaWNhdGlvbkFyZ3MoKQpuZXdBcmcxPXsibmFtZSI6Ik5FV19TVFJJTkdfTVVMVEkiLCJ0eXBlIjoiU1RSSU5HX01VTFRJIiwgIm9wdGlvbnMiOlsiT1BUXzEiLCJPUFRfMiIsIk9QVF8zIl0sICJ2YWx1ZSI6IiIsImRlZmF1bHRWYWx1ZSI6IiIsImRlc2NyaXB0aW9uIjoiVGVzdF8yLiBDcmVhdGUgYXJnIFNUUklOR19NVUxUSS4iLCJkaXNwbGF5TmFtZSI6Ik5FV19TVFJJTkdfTVVMVEkiLCJpbnB1dFJlcXVpcmVkIjpUcnVlLCJyZWZyZXNoT25VcGRhdGUiOkZhbHNlfQppbnNlcnRBcmcobmV3QXJnMSwgMikKbmV3QXJnMT17Im5hbWUiOiJORVdfU1RSSU5HX0VOVU0iLCJ0eXBlIjoiU1RSSU5HX0VOVU0iLCJvcHRpb25zIjpbIk9QVF8xIiwiT1BUXzIiLCJPUFRfMyJdLCJ2YWx1ZSI6IiIsImRlZmF1bHRWYWx1ZSI6IiIsImRlc2NyaXB0aW9uIjoiVGVzdF8zLiBDcmVhdGUgYXJnIFNUUklOR19FTlVNLiIsImRpc3BsYXlOYW1lIjoiTkVXX1NUUklOR19FTlVNIiwiaW5wdXRSZXF1aXJlZCI6VHJ1ZSwicmVmcmVzaE9uVXBkYXRlIjpGYWxzZX0KaW5zZXJ0QXJnKG5ld0FyZzEsIDIpCm5ld0FyZzE9eyJuYW1lIjoiTkVXX0lOVCIsInR5cGUiOiJJTlQiLCJ2YWx1ZSI6MjUsImRlZmF1bHRWYWx1ZSI6MjMsImRlc2NyaXB0aW9uIjoiVGVzdF80LiBDcmVhdGUgYXJnIElOVC4iLCJkaXNwbGF5TmFtZSI6Ik5FV19JTlQiLCJpbnB1dFJlcXVpcmVkIjpUcnVlLCJyZWZyZXNoT25VcGRhdGUiOkZhbHNlfQppbnNlcnRBcmcobmV3QXJnMSwgMikKbmV3QXJnMT17Im5hbWUiOiJORVdfSU5UX0VOVU0iLCJ0eXBlIjoiSU5UX0VOVU0iLCJvcHRpb25zIjpbMSwyLDRdLCJ2YWx1ZSI6MiwiZGVmYXVsdFZhbHVlIjoxLCJkZXNjcmlwdGlvbiI6IlRlc3RfNS4gQ3JlYXRlIGFyZyBJTlRfRU5VTS4iLCAiZGlzcGxheU5hbWUiOiJORVdfSU5UX0VOVU0iLCJpbnB1dFJlcXVpcmVkIjpUcnVlLCJyZWZyZXNoT25VcGRhdGUiOkZhbHNlfQppbnNlcnRBcmcobmV3QXJnMSwgMikKbmV3QXJnMT17Im5hbWUiOiJORVdfRklMRSIsInR5cGUiOiJGSUxFIiwgImRpc3BsYXlOYW1lIjoiRW5naW5lIEZpbGUiLCJ2YWx1ZSI6IiIsImRlZmF1bHRWYWx1ZSI6IiIsImRlc2NyaXB0aW9uIjoiVGVzdF82LiBDcmVhdGUgYXJnIEZJTEUuIiwiaW5wdXRSZXF1aXJlZCI6VHJ1ZSwicmVmcmVzaE9uVXBkYXRlIjpGYWxzZX0KaW5zZXJ0QXJnKG5ld0FyZzEsIDIpCm5ld0FyZzE9eyJuYW1lIjoiTkVXX0ZJTEVfTVVMVEkiLCJ0eXBlIjoiRklMRV9NVUxUSSIsICJkaXNwbGF5TmFtZSI6Ik5FV19GSUxFX01VTFRJIiwib3B0aW9ucyI6WyJwYnNjcDovL2NhLXBjMjIvYzovRGVja3Mvb3B0aS9qYXkzLmZlbSIsInBic2NwOi8vY2EtcGMyMi9jOi9EZWNrcy9vcHRpL2pheS5mZW0iXSwiZGVzY3JpcHRpb24iOiJUZXN0XzcuIENyZWF0ZSBhcmcgRklMRV9NVUxUSS4iLCAiaW5wdXRSZXF1aXJlZCI6VHJ1ZSwicmVmcmVzaE9uVXBkYXRlIjpGYWxzZX0KaW5zZXJ0QXJnKG5ld0FyZzEsIDIpCm5ld0FyZzE9eyJuYW1lIjoiTkVXX0RJUkVDVE9SWSIsInR5cGUiOiJGSUxFIiwgInZhbHVlIjoicGJzY3A6Ly9jYS1wYzIyL2M6L0RlY2tzL29wdGkiLCJkZWZhdWx0VmFsdWUiOiIiLCJkZXNjcmlwdGlvbiI6IlRlc3RfOC4gQ3JlYXRlIGFyZyBESVJFQ1RPUlkuIiwiZGlzcGxheU5hbWUiOiJORVdfRElSRUNUT1JZIiwiaW5wdXRSZXF1aXJlZCI6VHJ1ZSwicmVmcmVzaE9uVXBkYXRlIjpGYWxzZX0KaW5zZXJ0QXJnKG5ld0FyZzEsIDIpCm5ld0FyZzE9eyJuYW1lIjoiTkVXX0JPT0xFQU4iLCJ0eXBlIjoiQk9PTEVBTiIsICJkaXNwbGF5TmFtZSI6Ik5FV19CT09MRUFOIiwgImRlc2NyaXB0aW9uIjoiVGVzdF85LiBDcmVhdGUgYXJnIEJPT0xFQU4uIiwiZmVhdHVyZUVuYWJsZWQiOlRydWUsICJpbnB1dFJlcXVpcmVkIjpUcnVlLCJyZWZyZXNoT25VcGRhdGUiOkZhbHNlfQppbnNlcnRBcmcobmV3QXJnMSwgMikKbmV3QXJnMT17Im5hbWUiOiJORVdfREFURV9USU1FIiwidHlwZSI6IkRBVEVfVElNRSIsICJkaXNwbGF5TmFtZSI6Ik5FV19EQVRFX1RJTUUiLCAiZGVzY3JpcHRpb24iOiJUZXN0XzEwLiBDcmVhdGUgYXJnIERBVEVfVElNRS4iLCJpbnB1dFJlcXVpcmVkIjpUcnVlLCJyZWZyZXNoT25VcGRhdGUiOkZhbHNlfQppbnNlcnRBcmcobmV3QXJnMSwgMikKc3lzLnN0ZG91dC5mbHVzaCgpCnN5cy5zdGRlcnIuZmx1c2goKQ==
Jobs Submission and Control Web Services Interfaces 29
PAS 13.2 Programmer’s Guide
FAULTS
The following faults can be generated:• NotAuthorized - Incorrect or insufficient user credentials provided to execute this method• InvalidRequestMessage - User request does not correspond to the schema definition. In
most of the cases this fault is thrown when a user specifies some value that does not com-ply with PBS Application Services rules - for example, empty string for a job name.
• OperationFailed - Unspecified error occurred due to a system or other infrastructure issue. Causes can be numerous, e.g. not enough disk space, not enough memory, some compo-nent is missing, network configuration issue, the request cannot be executed due to limita-tions of the technology or underlying system, other. More details can be found in the log file.
• ApplicationUnknown - Application definition for this application does not exist.SEE ALSO
• GetApplicationAction• ExecuteCustomAction• GetApplicationDefinitions• RefreshApplicationDefinition
30 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
RefreshApplicationDefinitionThis API is called to update the list of the arguments for a dynamic application. Dynamic applica-tions are a feature available with versions of PAS 12.1 and greater. The client application must call this method when an application argument is modified and the argument has the XML element set to true in the application input file.
See the "Using a Dynamic Application" tutorial in Diving Into Application Definitions (DIAD) for an example of a dynamic application. Also, refer to the section "Dynamic Application Refresh Utility" in DIAD for information about methods that are available for use in the dynamic applica-tion refresh script.
PARAMETER
applicationParameters - contains all values entered by the user from the job submission form
refreshSourceName - name of the argument (as defined by the application definition input file) that triggered the refresh when the value of the argument was changed.TemplateApplicationInput_Type
ApplicationId ApplicationName ApplicationExtension ArgumentChoice RefreshScript DefaultRefresh
RETURN
applicationParameters - contains the new job submission form with any arguments that have been added or deleted.TemplateApplicationInput_Type
ApplicationId ApplicationName ApplicationExtension ArgumentChoice RefreshScript DefaultRefresh
Jobs Submission and Control Web Services Interfaces 31
PAS 13.2 Programmer’s Guide
EXAMPLES
Input
ecompute ecompute123 QfYHPbCu85WTU42UdD0Zpg== 2008-10-08T20:57:59.630Z optistruct Optistruct .fem VERSION Version true 11.0 12.0 11.0 JOB_NAME Job Name true opti_20 NCPU Number of CPUs true 1 2 1
32 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
MEM Memory (MB) true 0 2000 SOLVER_OPTIONS Advanced solver options option1;option2;option3 ZIP_RESULTS Create Zip archive with job results true SUBMISSION_DIRECTORY mandatory description pbscp://meta-105/Decks/opti/ MASTER mandatory description pbscp://meta-105/Decks/opti/jay3.fem refresh.py VERSION
Jobs Submission and Control Web Services Interfaces 33
PAS 13.2 Programmer’s Guide
Expected Result
optistruct Optistruct .fem TEST_BOOLEAN2 argument, boolean type argument, boolean type true false false VERSION Version true 11.0 12.0 11.0 JOB_NAME Job Name true opti_20 NCPU Number of CPUs true 1 2 1
34 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
MEM Memory (MB) true 0 2000 SOLVER_OPTIONS Advanced solver options option1;option2;option3 ZIP_RESULTS Create Zip archive with job results true SUBMISSION_DIRECTORY mandatory description pbscp://meta-105/Decks/opti/ MASTER mandatory description pbscp://meta-105/Decks/opti/jay3.fem TEST_BOOLEAN1 argument, boolean type argument, boolean type true false true refresh.py true
Jobs Submission and Control Web Services Interfaces 35
PAS 13.2 Programmer’s Guide
FAULTS
The following faults can be generated:• NotAuthorized - Incorrect or insufficient user credentials provided to execute this method• InvalidRequestMessage - User request does not correspond to the schema definition. In
most of the cases this fault is thrown when a user specifies some value that does not com-ply with PBS Application Services rules - for example, empty string for a job name.
• OperationFailed - Unspecified error occurred due to a system or other infrastructure issue. Causes can be numerous, e.g. not enough disk space, not enough memory, some compo-nent is missing, network configuration issue, the request cannot be executed due to limita-tions of the technology or underlying system, other. More details can be found in the log file.
• WmsUnavailable - Cannot contact the underlying Work Load ManagerSEE ALSO
• GetApplicationAction• ExecuteCustomAction• GetApplicationDefinitions• GetApplicationRefreshScript
36 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
SubmitJobSubmits a PBS Professional Job ID on behalf of the authenticated user using application parame-ters provided by the user.
Successful submissions result in a PBS Job ID being returned. A failed submission result in an empty string being returned. The user name and password are provided in the Username and Password elements in the simple object access protocol (SOAP) envelope. The job parameters are provided as children elements of the SubmitJob element of the SOAP body.
This WSi is accessible to Administrators and Regular users.
PARAMETERApplication parameters
applicationDefinition TemplateApplicationInput_Type
ApplicationId ApplicationName ApplicationExtension ArgumentChoice RefreshScript DefaultRefresh
RETURNJobId
EXAMPLES
Optistruct job submission
The user name and password are provided in "wsse:Username" and "wsse:Password" elements (highlighted). The Optistruct job parameters are provided as children elements of the "ns5:Sub-mitJob" element (highlighted).
Jobs Submission and Control Web Services Interfaces 37
PAS 13.2 Programmer’s Guide
Input
ecompute ecompute123 optistruct Optistruct .fem VERSION mandatory description 6.0 7.0 6.0 JOB_NAME mandatory description testOptistruct1 MEM mandatory description 20
38 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
BILLING_ACCOUNT mandatory description Honda_Motors BMW Honda_Motors SUBMISSION_DIRECTORY mandatory description pbscp://PRETZEL/C:/Documents and Settings/ghavin/optistruct MASTER mandatory description pbscp://PRETZEL/C:/Documents and Settings/ghavin/optistruct/jay3.fem NCPU mandatory description 1
Jobs Submission and Control Web Services Interfaces 39
PAS 13.2 Programmer’s Guide
Expected Result
FAULTS
The following faults can be generated:• NotAuthorized - Incorrect or insufficient user credentials provided to execute this method• IncorrectApplicationParameter - A sanity check performed by PAS on a job object has
failed. The request as submitted is valid but not sufficient - part of the job object used as a parameter for job submission is missing. For example, App Services converts an applica-tion job to jsdl job and then to pbs job. This error will be thrown if some part of the previ-ous transformation fails or if App Services encounters an unsupported use case.
• InvalidRequestMessage - User request does not correspond to the schema definition. In most of the cases this fault is thrown when a user specifies some value that does not com-ply with PBS Application Services rules - for example, empty string for a job name.
• OperationFailed - Unspecified error occurred due to a system or other infrastructure issue. Causes can be numerous, e.g. not enough disk space, not enough memory, some compo-nent is missing, network configuration issue, the request cannot be executed due to limita-tions of the technology or underlying system, other. More details can be found in the log file.
• WmsUnavailable - Cannot contact the underlying Work Load ManagerSEE ALSO
• GetJobs• GetJobsSummary• GetJobsCompact• MoveJob• OrderJobs• CheckpointJob• RestartJob• TerminateJob• DeleteFinishedJob
680.pretzel
40 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
GetJobs
GetJobs returns job information for all jobs known to the PBS Professional server. If the PBS Pro-fessional job history is enabled, finished and moved jobs are included along with non-history jobs.
PBS Professional version 12.1.1 and greater can accommodate a request for multiple job identifi-ers. For versions of PAS prior to 12.1, PAS must be configured to use this new feature by setting the value of SCALABLE_PBS_QSTAT=true in the PAS server configuration file:
on Windows: C:\Program Files\altair\pas\\PAS\home\conf\server.conf
on Linux: /var/spool/pas/conf/server.conf
With versions of PAS 12.1 and greater, PAS is configured to handle multiple job identifiers in a GetJobs request by default. To disable this behavior, the SCALABLE_PBS_QSTAT must be set to false explicitly in the server configuration file.
If multiple job identifiers are provided within a single GetJobs request, PAS will retrieve jobs from the server associated with the first job identifier in the list. PAS strips the server name from the job identifier of the first job, and requests job information from that server for all of the successive job identifiers.
The number of returned jobs can be reduced by using filters. Jobs can be filtered by:• USER_ID• QUEUE• JOB_ID• STATUS
- Q - queued- R - running- H - held- E - exiting- M - moved to another server (new state)- F - finished (new state)
As of PAS 13.1, foreign character support has been added for this API. However, PBS Professional does not support multi-byte UTF8 foreign characters requiring greater than 2 bytes for representation. PBS Profes-sional returns a hardcoded “n/a” in place of these foreign characters. For more information see Foreign Character Support.
Jobs Submission and Control Web Services Interfaces 41
PAS 13.2 Programmer’s Guide
- W - waiting- S - suspended
• HISTORY_JOBS - true - (default) include history jobs- false - exclude history jobs
• SUB_JOBS - true - (default) for job arrays include sub-jobs- false - for job arrays exclude sub-jobs only display the primary job
For queued jobs, the estimated start time will be returned as "Thu Jan 01 05:30:00 1970", unlike the PBS Professional qstat command which shows the estimated start time as "UNKNOWN".
This WSi is accessible to Administrators and Regular users.
PARAMETER
Valid values for the filter attribute for the GetJobs API are listed below. Other values defined in the schema for extendedFilterAttrs are for use with other APIs.
- used to retrieve only those jobs that meet the filter criteriafilter
currentFilter filterValueStr
extendedFilterAttrs filterAttrs valid values - {JOB_ID, USER_ID, QUEUE, STATUS, SUB_JOBS}filterAttrsExt valid values - {HISTORY_JOBS}
RETURNVector
descr T_JobDescription:
pbs_jobid pbs_ResourceList pbs_resources_used pbs_state_variables
The sub-state provides for differentiation between jobs which finished by themselves and those terminated by the user or due to a system error.
42 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Data in pbs_state_variables will include:• status (with sub-status if applicable)• all job attributes• all requested and assigned resources
EXAMPLES
Input
ecompute ecompute123 TPJROuvS0TbeywODWilT4A== 2010-10-27T09:43:19.949Z QUEUE workq STATUS Q
Jobs Submission and Control Web Services Interfaces 43
PAS 13.2 Programmer’s Guide
Expected Result
5891.linux-jvxx 1000 mb 1 1 free 1 1000 mb 1 GridWorks 5000 Q workq linux-jvxx n/a 0923T1612_HwFdm InspireUser@linux-jvxx u Wed Sep 23 16:12:06 2015 linux-jvxx:0923T1612_HwFdm.e5891 n/a n/a n n oe a
44 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Thu Sep 24 10:12:09 2015 linux-jvxx:0923T1612_HwFdm.o5891 0 Wed Sep 23 16:12:06 2015 True n/a 0 private n/a runtime@linux-jvxx:/var/spool/pas/repository/applications/HwFdmFeProcessor/runtime,pbs_spawn@linux-jvxx:/opt/altair/pas/13.1/pas/pbs_spawn n/a PAS_APPLICATION=HwFdmFeProcessor,PAS_HPCBP_EXECUT-ABLE=/opt/pbs/default/bin/pbs_python,PAS_CLIENT_HOST=172.16.81.222,PAS_SERVER_VER-SION=13.1.0,AIF_MODE=enterprise,PAS_ARGUMENTS=RmtOpTst2.stmod ./ ./ topoOpt.fem ./ -mesh 1 -ncpu 2,PAS_VERSION=13.1,PAS_SERVER_PORT=17084,[email protected],PBS_HOME=/var/spool/PBS,PAS_HPCBP_ARGUMENTS=runtime/start.py,PAS_NCPU=1,PAS_SUBMISSION_DIREC-TORY=pbscp://192.168.33.22/stage/InspireUser/0923T1612_HwFdmFeProcessor,PAS_-JOB_NAME=0923T1612_HwFdm,PAS_PYTHON_PATH=/opt/pbs/default/bin/pbs_python,PAS_MASTERFILE=pbscp://192.168.33.22/stage/InspireUser/0923T1612_HwFdmFeProcessor/RmtOpTst2.stmod,AIF_USER=InspireUser,PAS_MEM=1000,PBS_O_QUEUE=workq,PBS_O_HOST=linux-jvxx Can Never Run: Insufficient amount of server resource Grid-Works (R: 5000 A: 0 T: 0) Wed Sep 23 16:12:06 2015 11 n/a n/a n/a n/a _pbs_project_default 18:07:03 Thu Jan 01 05:30:00 1970
Jobs Submission and Control Web Services Interfaces 45
PAS 13.2 Programmer’s Guide
Input (sub case: foreign character support)
ecompute ecompute123 TPJROuvS0TbeywODWilT4A== 2010-10-27T09:43:19.949Z QUEUE workq STATUS Q
46 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
Expected Result (sub case: foreign character support) HTTP/1.1 200 OKServer: Apache-Coyote/1.1Content-Type: text/xml;charset=utf-8Transfer-Encoding: chunkedDate: Tue, 10 May 2016 22:08:00 GMT
1287
225.carmen.pbspro.comHwFdmFeProcessor11000mb1000:00:000kb0kb00:00:011Fworkqcarmen.pbspro.comn/[email protected] May 10 15:07:30 2016car-men.pbspro.com:0510T15072651_H.e225carmen/0(car-men:ncpus=1:mem=1024000kb)nnoeaTue May 10 15:07:31 2016carmen.pbspro.com:0510T15072651_H.o2250Tue May 10 15:07:30 2016TrueTue May 10 15:07:31 201611193private/home/ecompute/[email protected]:/opt/altair/pas/13.1/pas/pbs_spawn*@carmen:/stage/ecompute/0510T15072651_HwFdmFeProcessor
Jobs Submission and Control Web Services Interfaces 47
PAS 13.2 Programmer’s Guide
FAULTS
The following faults can be generated:• NotAuthorized - Incorrect or insufficient user credentials provided to execute this method• UnknownJobIdentifier - Job Identifier not recognized by the underlying work load man-
ager• UnknownQueueIdentifier - Queue Identifier not recognized by the underlying work load
manager• InvalidRequestMessage - User request does not correspond to the schema definition. In
most of the cases this fault is thrown when a user specifies some value that does not com-ply with PBS Application Services rules - for example, empty string for a job name.
• OperationFailed - Unspecified error occurred due to a system or other infrastructure issue. Causes can be numerous, e.g. not enough disk space, not enough memory, some compo-nent is missing, network configuration issue, the request cannot be executed due to limita-tions of the technology or underlying system, other. More details can be found in the log file.
• WmsUnavailable - Cannot contact the underlying Work Load Manager
PAS_APPLICATION=HwFdmFeProcessor,PAS_SUBMISSION_DIRECTORY=pbscp://carmen/stage/ecompute/0510T15072651_HwFdmFeProcessor,PAS_USERDOMAIN=null,PAS_CLIENT_HOST=127.0.0.1,PAS_SERVER_VERSION=13.1.0,AIF_MODE=enterprise,SOLVER_OPTIONS=,VERSION=13.1,PAS_VERSION=13.1,PAS_MEM=1000,PAS_SERVER_PORT=17094,PAS_ApplicationId=HwFdmFeProcessor,PAS_MASTERFILE_NAME=RmtOpTst2_галина.stmod,[email protected],PAS_ARGUMENTS=RmtOpTst2_галина.stmod ./ ./ topoOpt.fem ./ -mesh 1 -ncpu 2,PBS_HOME=/var/spool/PBS,PAS_HPCBP_ARGUMENTS=runtime/start.py -len 1000 RmtOpT-st2_галина.stmod,PAS_NCPU=1,PAS_HPCBP_EXECUTABLE=/opt/pbs/default/bin/pbs_python,PAS_PYTHON_PATH=/opt/pbs/default/bin/pbs_python,PAS_JOB_NAME=0510T15072651_H,PAS_MASTERFILE=pbscp://carmen/stage/ecompute/0510T15072651_HwFdmFeProcessor/RmtOpTst2_галина.stmod,PAS_EXECUTABLE=/opt/altair/Inspire/2016_5353/.altair/hwfdmfeprocessor,RESTART=,AIF_USER=ecom-pute,PBS_O_QUEUE=workq,PBS_O_HOST=carmen.pbspro.comJob run at Tue May 10 at 15:07 on (carmen:ncpus=1:mem=1024000kb) and failedTue May 10 15:07:30 2016true293n/an/an/an/a_pbs_project_defaultn/an/a
48 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
SEE ALSO• SubmitJob• GetJobsSummary• GetJobsCompact• MoveJob• OrderJobs• CheckpointJob• RestartJob• TerminateJob• DeleteFinishedJob
GetJobsSummary
GetJobsSummary returns job information for all jobs known to the PBS Professional server. If the PBS Professional job history is enabled, finished and moved jobs are included along with non-his-tory jobs. It is similar to the GetJobs API, but it returns a subset of the GetJobs information. Get-JobsSummary returns the following information:
• job identifier• job name• owner• state• queue
PBS Professional version 12.1.1 and greater can accommodate a request for multiple job identifi-ers. For versions of PAS prior to 12.1, PAS must be configured to use this new feature by setting the value of SCALABLE_PBS_QSTAT=true in the PAS server configuration file:
on Windows: C:\Program Files\altair\pas\\PAS\home\conf\server.conf
on Linux: /var/spool/pas/conf/server.conf
As of PAS 13.1, foreign character support has been added for this API. However, PBS Professional does not support multi-byte UTF8 foreign characters requiring greater than 2 bytes for representation. PBS Profes-sional returns a hardcoded “n/a” in place of these foreign characters. For more information see Foreign Character Support.
Jobs Submission and Control Web Services Interfaces 49
PAS 13.2 Programmer’s Guide
With versions of PAS 12.1 and greater, PAS is configured to handle multiple job identifiers in a GetJobsSummary request by default. To disable this behavior, the SCALABLE_PBS_QSTAT must be set to false explicitly in the server configuration file.
If multiple job identifiers are provided within a single GetJobsSummary request, PAS will retrieve jobs from the server associated with the first job identifier in the list. Therefore, PAS will strip the server name from the job identifier of the first job, and request job information from that server for all of the following job identifiers.
The number of returned jobs can be reduced by using filters. Jobs can be filtered by:• USER_ID• QUEUE• JOB_ID• STATUS
- Q - queued- R - running- H - held- E - exiting- M - moved to another server (new state)- F - finished (new state)- W - waiting- S - suspended
• HISTORY_JOBS - true - (default) include history jobs- false - exclude history jobs
• SUB_JOBS - true - (default) for job arrays include sub-jobs- false - for job arrays exclude sub-jobs only display the primary job
This WSi is accessible to Administrators and Regular users.
50 Jobs Submission and Control Web Services Interfaces
PAS 13.2 Programmer’s Guide
PARAMETER
Valid values for the filter attribute for the GetJobsSummary API are listed below. Other values defined in the schema for extendedFilterAttrs are for use with other APIs.
- used to retrieve only those jobs that meet the filter criteriafilter
currentFilter filterValueStr
extendedFilterAttrs filterAttrs valid values - {JOB_ID, USER_ID, QUEUE, STATUS, SUB_JOBS}filterAttrsExt valid values - {HISTORY_JOBS}
RETURN
List - a list of job informationdescr
:pbs_jobid - job identifier assigned by PBS Professionalpbs_Job_Name - name of job given by user submitting the jobpbs_Job_Owner - the job ownerpbs_cput - the cpu time used, time used by the job for all processes on
all nodespbs_job_state - the job statepbs_queue - the queue in which the job resides
Jobs Submission and Control Web Services Interfaces 51