Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Torque Resource ManagerAdministrator Guide 611
March 2017
copy 2017 Adaptive Computing Enterprises Inc All rights reserved
Distribution of this document for commercial purposes in either hard or soft copy form is strictly prohibited without priorwritten consent from Adaptive Computing Enterprises Inc
Adaptive Computing Cluster Resources Moab Moab Workload Manager Moab Viewpoint Moab Cluster Manager MoabCluster Suite Moab Grid Scheduler Moab Grid Suite Moab Access Portal and other Adaptive Computing products are eitherregistered trademarks or trademarks of Adaptive Computing Enterprises Inc The Adaptive Computing logo and the ClusterResources logo are trademarks of Adaptive Computing Enterprises Inc All other company and product names may betrademarks of their respective companies
Adaptive Computing Enterprises Inc1712 S East Bay Blvd Suite 300Provo UT 84606+1 (801) 717-3700wwwadaptivecomputingcom
Scan to open online help
ii
iii
Welcome 1Torque Administrator Guide Overview 2
Chapter 1 Introduction 5
Chapter 2 Overview 9Torque Installation Overview 9
Torque Architecture 9Installing Torque Resource Manager 10Compute Nodes 20Enabling Torque As A Service 22
InitializingConfiguring Torque On The Server (pbs_server) 23Specifying Compute Nodes 25Configuring Torque On Compute Nodes 27Configuring Ports 27Configuring Trqauthd For Client Commands 33Finalizing Configurations 34
Advanced Configuration 35Customizing The Install 35Server Configuration 43Setting Up The MOMHierarchy (Optional) 47Opening Ports In A Firewall 50
Manual Setup Of Initial Server Configuration 51Server Node File Configuration 53
Basic Node Specification 53Specifying Virtual Processor Count For A Node 53Specifying GPU Count For A Node 54Specifying Node Features (Node Properties) 54
Testing Server Configuration 55Configuring Torque For NUMA Systems 57
Torque NUMA-Aware Configuration 57Torque NUMA-Support Configuration 60
Torque Multi-MOM 65Multi-MOM Configuration 65Stopping Pbs_mom In Multi-MOMMode 67
Chapter 3 Submitting And Managing Jobs 69Job Submission 69
Multiple Job Submission 71Managing Multi-Node Jobs 72Requesting Resources 73Requesting NUMA-Aware Resources 83Requesting Generic Resources 84Requesting Floating Resources 84
Requesting Other Resources 85Exported Batch Environment Variables 85Enabling Trusted Submit Hosts 87Example Submit Scripts 87Job Files 88
Monitoring Jobs 90Canceling Jobs 92Job Preemption 92Keeping Completed Jobs 93Job Checkpoint And Restart 94
Introduction To BLCR 94Configuration Files And Scripts 95Starting A Checkpointable Job 102Checkpointing A Job 103Restarting A Job 104Acceptance Tests 104
Job Exit Status 104Service Jobs 108
Submitting Service Jobs 109Submitting Service Jobs In MCM 109Managing Service Jobs 109
Chapter 4 Managing Nodes 111Adding Nodes 111Node Properties 113Changing Node State 114Changing Node Power States 114Host Security 117Linux Cpuset Support 118Scheduling Cores 120
Geometry Request Configuration 120Geometry Request Usage 121Geometry Request Considerations 121
Scheduling Accelerator Hardware 122Node Resource Plug-in 122
Chapter 5 Setting Server Policies 127Queue Configuration 127
Example Queue Configuration 128Setting Queue Resource Controls With Resource Request Syntax 20 128Setting A Default Queue 129Mapping A Queue To Subset Of Resources 129Creating A Routing Queue 130
iv
v
Server High Availability 131Setting Min_threads AndMax_threads 148
Chapter 6 Integrating Schedulers For Torque 149
Chapter 7 Configuring Data Management 151SCP Setup 151
Generating SSH Key On Source Host 151Copying Public SSH Key To Each Destination Host 152Configuring The SSH Daemon On Each Destination Host 152Validating Correct SSH Configuration 153Enabling Bi-Directional SCP Access 153Compiling Torque To Support SCP 153Troubleshooting 154
NFS And Other Networked Filesystems 154File Stage-instage-out 155
Chapter 8 MPI (Message Passing Interface) Support 157MPICH 157Open MPI 158
Chapter 9 Resources 161
Chapter 10 Accounting Records 165
Chapter 11 Job Logging 167Job Log Location And Name 167Enabling Job Logs 167
Chapter 12 NUMA And Torque 169NUMA-Aware Systems 169
NUMA Tutorials 172NUMA Primer 173How NUMA Places Jobs 181NUMA Discovery And Persistence 185
-L NUMA Resource Request 188Pbsnodes With NUMA-Awareness 198
NUMA-Support Systems 200
Chapter 13 Troubleshooting 203Automatic Queue And Job Recovery 203Host Resolution 203Firewall Configuration 204Torque Log Files 204Using tracejob To Locate Job Failures 206
Using GDB To Locate Job Failures 208Other Diagnostic Options 209Stuck Jobs 209Frequently Asked Questions (FAQ) 210Compute Node Health Check 216
Configuring MOMs To Launch A Health Check 217Creating The Health Check Script 218Adjusting Node State Based On The Health Check Output 218Example Health Check Script 219
Debugging 219
Appendices 226Commands Overview 227
Momctl 228Pbs_mom 235Pbs_server 242Pbs_track 245Pbsdsh 247Pbsnodes 249Qalter 252Qchkpt 261Qdel 262Qgpumode 265Qgpureset 266Qhold 267Qmgr 269Qmove 272Qorder 274Qrerun 275Qrls 276Qrun 278Qsig 279Qstat 281Qsub 290Qterm 309Trqauthd 310
Server Parameters 315Node Manager (MOM) Configuration 343
Parameters 343Node Features And Generic Consumable Resource Specification 364Command-line Arguments 365
Diagnostics And Error Codes 367Considerations Before Upgrading 375
vi
vii
Large Cluster Considerations 377Scalability Guidelines 377End-User Command Caching 378Moab And Torque Configuration For Large Clusters 380Starting Torque In Large Environments 381Other Considerations 382
Prologue And Epilogue Scripts 385Script Order Of Execution 387Script Environment 387Per Job Prologue And Epilogue Scripts 391Prologue And Epilogue Scripts Time Out 392Prologue Error Processing 392
Running Multiple Torque Servers AndMOMs On The Same Node 397Security Overview 399Job Submission Filter (qsubWrapper) 401torquecfg Configuration File 403Torque Quick Start Guide 409BLCR Acceptance Tests 413
Test Environment 413Test 1 - Basic Operation 413Test 2 - Persistence Of Checkpoint Images 416Test 3 - Restart After Checkpoint 417Test 4 - Multiple CheckpointRestart 418Test 5 - Periodic Checkpoint 418Test 6 - Restart From Previous Image 419
Queue Attributes 421
viii
1
Welcome
Welcome to the Torque 611 Administrator GuideThis guide is intended as a reference for system administratorsFor more information about this guide see these topics
l Torque Administrator Guide Overviewl Introduction
Welcome
Torque Administrator Guide OverviewChapter 1 Introduction on page 5 provides basic introduction information tohelp you get started using TorqueChapter 2 Overview on page 9 provides the details for installation andinitialization advanced configuration options and (optional) qmgr optionnecessary to get the system up and running System testing is also coveredChapter 3 Submitting and Managing Jobs on page 69 covers different actionsapplicable to jobs The first section details how to submit a job and requestresources (nodes software licenses and so forth) and provides severalexamples Other actions include monitoring canceling preemption andkeeping completed jobsChapter 4 Managing Nodes on page 111 covers administrator tasks relating tonodes which include the following adding nodes changing node propertiesand identifying state Also an explanation of how to configure restricted useraccess to nodes is covered in Host SecurityChapter 5 Setting Server Policies on page 127 details server-sideconfigurations of queue and high availabilityChapter 6 Integrating Schedulers for Torque on page 149 offers informationabout using the native scheduler versus an advanced schedulerChapter 7 Configuring Data Management on page 151 deals with issues of datamanagement For non-network file systems SCP Setup details setting up SSHkeys and nodes to automate transferring data NFS and Other NetworkedFilesystems covers configuration for these file systems This chapter alsoaddresses the use of file staging using the stagein and stageout directives ofthe qsub commandChapter 8 MPI (Message Passing Interface) Support on page 157 offers detailssupporting MPIChapter 9 Resources on page 161 covers configuration utilization and statesof resourcesChapter 10 Accounting Records on page 165 explains how jobs are tracked byTorque for accounting purposesChapter 11 Job Logging on page 167 explains how to enable job logs thatcontain information for completed jobsChapter 12 NUMA and Torque on page 169 provides a centralized location forinformation on configuring Torque for NUMA systemsChapter 13 Troubleshooting on page 203 is a guide that offers help withgeneral problems It includes FAQ and instructions for how to set up and usecompute node checks It also explains how to debug Torque
Welcome
2 Torque Administrator Guide Overview
Torque Administrator Guide Overview 3
The appendices provide tables of commands parameters configurationoptions error codes the Quick Start Guide and so forth
l Commands Overview on page 227l Server Parameters on page 315l Node Manager (MOM) Configuration on page 343l Diagnostics and Error Codes on page 367l Considerations Before Upgrading on page 375l Large Cluster Considerations on page 377l Prologue and Epilogue Scripts on page 385l Running Multiple Torque Servers and MOMs on the Same Node on page397
l Security Overview on page 399l Job Submission Filter (qsub Wrapper) on page 401l torquecfg Configuration File on page 403l Torque Quick Start Guide on page 409l BLCR Acceptance Tests on page 413l Queue Attributes on page 421
Related TopicsIntroduction
Welcome
4 Torque Administrator Guide Overview
5
Chapter 1 Introduction
This section contains some basic introduction information to help you getstarted using Torque It contains these topics
l What is a Resource Managerl What are Batch Systemsl Basic Job Flow
What is a Resource ManagerWhile Torque has a built-in scheduler pbs_sched it is typically used solely as aresource manager with a scheduler making requests to it Resources managersprovide the low-level functionality to start hold cancel and monitor jobsWithout these capabilities a scheduler alone cannot control jobs
What are Batch SystemsWhile Torque is flexible enough to handle scheduling a conference room it isprimarily used in batch systems Batch systems are a collection of computersand other resources (networks storage systems license servers and so forth)that operate under the notion that the whole is greater than the sum of theparts Some batch systems consist of just a handful of machines runningsingle-processor jobs minimally managed by the users themselves Othersystems have thousands and thousands of machines executing users jobssimultaneously while tracking software licenses and access to hardwareequipment and storage systemsPooling resources in a batch system typically reduces technical administrationof resources while offering a uniform view to users Once configured properlybatch systems abstract awaymany of the details involved with running andmanaging jobs allowing higher resource utilization For example userstypically only need to specify the minimal constraints of a job and do not needto know the individual machine names of each host on which they are runningWith this uniform abstracted view batch systems can execute thousands andthousands of jobs simultaneouslyBatch systems are comprised of four different components (1) Master Node(2) SubmitInteractive Nodes (3) Compute Nodes and (4) Resources
Component Description
Master Node A batch system will have a master node where pbs_server runs Depending on the needs ofthe systems a master node may be dedicated to this task or it may fulfill the roles of othercomponents as well
Chapter 1 Introduction
Component Description
SubmitInteractiveNodes
Submit or interactive nodes provide an entry point to the system for users to manage theirworkload For these nodes users are able to submit and track their jobs Additionally somesites have one or more nodes reserved for interactive use such as testing and troubleshoot-ing environment problems These nodes have client commands (such as qsub and qhold)
Computer Nodes Compute nodes are the workhorses of the system Their role is to execute submitted jobsOn each compute node pbs_mom runs to start kill and manage submitted jobs It com-municates with pbs_server on the master node Depending on the needs of the systems acompute node may double as the master node (or more)
Resources Some systems are organized for the express purpose of managing a collection of resourcesbeyond compute nodes Resources can include high-speed networks storage systemslicense managers and so forth Availability of these resources is limited and needs to bemanaged intelligently to promote fairness and increased utilization
Basic Job FlowThe life cycle of a job can be divided into four stages (1) creation (2)submission (3) execution and (4) finalization
Stage Description
Creation Typically a submit script is written to hold all of the parameters of a job These parameters couldinclude how long a job should run (walltime) what resources are necessary to run and what toexecute The following is an example submit file
PBS -N localBlastPBS -S binshPBS -l nodes=1ppn=2walltime=2400000PBS -M usermyorganizationcomPBS -m easource ~bashrccd $HOMEworkdirsh myBlastsh -i -v
This submit script specifies the name of the job (localBlast) what environment to use (binsh)that it needs both processors on a single node (nodes=1ppn=2) that it will run for at most 10days and that Torque should email usermyorganizationcom when the job exits or abortsAdditionally the user specifies where and what to execute
Submission A job is submitted with the qsub command Once submitted the policies set by the administrationand technical staff of the site dictate the priority of the job and therefore when it will start execut-ing
Execution Jobs often spend most of their lifecycle executing While a job is running its status can be queriedwith qstat
Chapter 1 Introduction
6
7
Stage Description
Finalilzation When a job completes by default the stdout and stderr files are copied to the directorywhere the job was submitted
Chapter 1 Introduction
8
Torque Installation Overview 9
Chapter 2 Overview
This section contains some basic information about Torque including how toinstall and configure it on your system For details see these topics
l Torque Installation Overviewl InitializingConfiguring Torque on the Server (pbs_server)l Advanced Configurationl Manual Setup of Initial Server Configurationl Server Node File Configurationl Testing Server Configurationl Configuring Torque for NUMA Systemsl Torque Multi-MOM
Torque Installation OverviewThis section contains information about Torque architecture and explains howto install Torque It also describes how to install Torque packages on computenodes and how to enable Torque as a serviceFor details see these topics
l Torque Architecturel Installing Torque Resource Managerl Compute Nodesl Enabling Torque as a Service
Related TopicsTroubleshooting
Torque ArchitectureA Torque cluster consists of one head node and many compute nodes Thehead node runs the pbs_server daemon and the compute nodes run the pbs_momdaemon Client commands for submitting and managing jobs can be installedon any host (including hosts not running pbs_server or pbs_mom)The head node also runs a scheduler daemon The scheduler interacts withpbs_server to make local policy decisions for resource usage and allocatenodes to jobs A simple FIFO scheduler and code to construct more advanced
Chapter 2 Overview
schedulers is provided in the Torque source distribution Most Torque userschoose to use a packaged advanced scheduler such as Maui or MoabUsers submit jobs to pbs_server using the qsub command When pbs_serverreceives a new job it informs the scheduler When the scheduler finds nodesfor the job it sends instructions to run the job with the node list to pbs_serverThen pbs_server sends the new job to the first node in the node list andinstructs it to launch the job This node is designated the execution host and iscalledMother Superior Other nodes in a job are called sister MOMs
Related TopicsTorque Installation OverviewInstalling Torque Resource Manager
Installing Torque Resource Manager
If you intend to use Torque Resource Manager 611 with Moab WorkloadManager you must run Moab version 80 or later However some Torquefunctionality may not be available See Compatibility Requirements in theMoab HPC Suite Release Notes for more information
This topic contains instructions on how to install and start Torque ResourceManager (Torque)
For Cray systems Adaptive Computing recommends that you install Moaband Torque Servers (head nodes) on commodity hardware (not on Craycomputeservicelogin nodes)However youmust install the Torque pbs_mom daemon and Torqueclient commands on Cray login and mom service nodes since the pbs_mommust run on a Cray service node within the Cray system so it hasaccess to the Cray ALPS subsystemSee Installation Notes for Moab and Torque for Cray in the Moab WorkloadManager Administrator Guide for instructions on installing Moab andTorque on a non-Cray server
In this topicl Requirements on page 11l Open Necessary Ports on page 12l Install Dependencies Packages or Clients on page 12l Install Torque Server on page 14l Install Torque MOMs on page 17
Chapter 2 Overview
10 Torque Installation Overview
Torque Installation Overview 11
l Install Torque Clients on page 19l Configure Data Management on page 20
RequirementsIn this section
l Supported Operating Systems on page 11l Software Requirements on page 11
Supported Operating Systemsl CentOS 6x 7xl RHEL 6x 7xl Scientific Linux 6x 7xl SUSE Linux Enterprise Server 11 12 12-SP1
Software Requirementsl libxml2-devel package (package name may vary)l openssl-devel package (package name may vary)l TclTk version 8 or later if you plan to build the GUI portion of Torque oruse a Tcl-based scheduler
l cpusets and cgroupscgroups are supported and cpusets are handled by the cgroup cpusetsubsystem
It is recommended that you use --enable-cgroups instead of--enable-cpuset --enable-cpuset is deprecated and no new featureswill be added to it
o boost version 141 or latero libcgroup version Red Hat-based systemsmust use libcgroupversion 040rc1-16el6 or later SUSE-based systems need to use acomparative libcgroup version
o libhwloc version 191 is the minimum supported however NVIDIAK80 requires libhwloc 1110 Instructions for installing hwloc areprovided as part of the Torque Resource Manager install or upgradeinstructions
l if you build Torque from source (ie clone from github) the followingadditional software is required
Chapter 2 Overview
o gcco gcc-c++o posix-compatible version of makeo libtool 1522 or latero boost-devel 1360 or later
Red Hat 6-based systems come packaged with 1410 and RedHat 7-based systems come packaged with 1530 If neededuse the --with-boost-path=DIR option to change the packagedboost version See Customizing the Install on page 35 for moreinformation
Open Necessary PortsTorque requires certain ports to be open for essential communicationIf your site is running firewall software on its hosts you will need to configurethe firewall to allow connections to the necessary ports
Location Ports Functions WhenNeeded
TorqueServerHost
15001 Torque Client and MOM communication toTorque Server
Always
TorqueMOM Host(ComputeNodes)
15002 Torque Server communication to TorqueMOMs
Always
TorqueMOM Host(ComputeNodes)
15003 Torque MOM communication to other TorqueMOMs
Always
See alsol Opening Ports in a Firewall on page 50 for general instructions and anexample of how to open ports in the firewall
l Configuring Ports on page 27 for more information on how to configurethe ports that Torque uses for communication
Install Dependencies Packages or ClientsIn this section
Chapter 2 Overview
12 Torque Installation Overview
Torque Installation Overview 13
l Install Packages on page 13l Install hwloc on page 13
Install PackagesOn the Torque Server Host use the following commands to install thelibxml2-devel openssl-devel and boost-devel packages
l Red Hat 6-based or Red Hat 7-based systems
[root] yum install libtool openssl-devel libxml2-devel boost-devel gcc gcc-c++
l SUSE 11-based or SUSE 12-based systems
[root] zypper install libopenssl-devel libtool libxml2-devel boost-devel gcc gcc-c++make gmake
Install hwloc
Using yum install hwloc for Red Hat-based systems or zypper installhwloc for SUSE-based systemsmay install an older non-supportedversion
When cgroups are enabled (recommended) hwloc version 191 or later isrequired NVIDIA K80 requires libhwloc 1110 If cgroups are to be enabledcheck the Torque Server Host to see if the required version of hwloc is installedYou can check the version number by running the following command
[root] hwloc-info --version
The following instructions are for installing version 191If hwloc is not installed or needs to be upgraded to the required version do thefollowing1 On the Torque Server Host each Torque MOMHost and each Torque ClientHost do the followinga Download hwloc-191targz from httpswwwopen-mpiorgsoftwarehwlocv19
b Run each of the following commands in orderl Red Hat 6-based or Red Hat 7-based systems
[root] yum install gcc make[root] tar -xzvf hwloc-191targz[root] cd hwloc-191[root] configure[root] make[root] make install
Chapter 2 Overview
l SUSE 11-based or SUSE 12-based systems
[root] zypper install gcc make[root] tar -xzvf hwloc-191targz[root] cd hwloc-191[root] configure[root] make[root] make install
2 For Red Hat 6-based or Red Hat 7-based systems run the followingcommands on the Torque Server Host only
[root] echo usrlocallib gtetcldsoconfdhwlocconf[root] ldconfig
3 For SUSE 11- based systems run the following commands on the TorqueServer Host each Torque MOMHost and each Torque Client Host
[root] echo usrlocallib gtetcldsoconfdhwlocconf[root] ldconfig
4 For SUSE 12- based systems run the following commands on the TorqueServer Host only
[root] echo usrlocallib gtetcldsoconfdhwlocconf[root] ldconfig
Install Torque Server
Youmust complete the tasks to install the dependencies packages orclients before installing Torque Server See Install DependenciesPackages or Clients on page 12If your configuration uses firewalls youmust also open the necessaryports before installing the Torque Server See Open Necessary Ports onpage 12
On the Torque Server Host do the following1 Download the latest 611 build from the Adaptive Computing website It canalso be downloaded via command line (github method or the tarballdistribution)
Chapter 2 Overview
14 Torque Installation Overview
Torque Installation Overview 15
l Clone the source from github
If git is not installed
Red Hat 6-based or Red Hat 7-based systems[root] yum install git
SUSE 11-based or SUSE 12-based systems[root] zypper install git
For SUSE 11-based systems you will also need to install automake
[root] zypper install autotools automake pkg-config
[root] git clone httpsgithubcomadaptivecomputingtorquegit -b 611 611[root] cd 611[root] autogensh
l Get the tarball source distributiono Red Hat 6-based or Red Hat 7-based systems
[root] yum install wget[root] wget httpwwwadaptivecomputingcomdownloadtorquetorque-611targz -O torque-611targz[root] tar -xzvf torque-611targz[root] cd torque-611
o SUSE 11-based or SUSE 12-based systems
[root] zypper install wget[root] wget httpwwwadaptivecomputingcomdownloadtorquetorque-611targz -O torque-611targz[root] tar -xzvf torque-611targz[root] cd torque-611
2 Depending on your system configuration you will need to add configurecommand optionsAt a minimum you addl --enable-cgroupsl --with-hwloc-path=usrlocal See Requirements on page 11 for moreinformation
These instructions assume you are using cgroups When cgroups aresupported cpusets are handled by the cgroup cpuset subsystem If youare not using cgroups use --enable-cpusets instead
Chapter 2 Overview
For SUSE 12-based systems only If --enable-gui is part of yourconfiguration do the following
$ cd usrlib64$ ln -s libXextso640 libXextso$ ln -s libXssso1 libXssso
When finished cd back to your install directory
See Customizing the Install on page 35 for more information on whichoptions are available to customize the configure command
3 Run each of the following commands in order
[root] configure --enable-cgroups --with-hwloc-path=usrlocal add any otherspecified options[root] make[root] make install
4 Source the appropriate profile file to add usrlocalbin andusrlocalsbin to your path
[root] etcprofiledtorquesh
5 Initialize serverdb by executing the torquesetup script
[root] torquesetup root
6 Add nodes to the varspooltorqueserver_privnodes file SeeSpecifying Compute Nodes on page 25 for information on syntax andoptions for specifying compute nodes
7 Configure pbs_server to start automatically at system boot and then startthe daemonl Red Hat 6-based systems
[root] chkconfig --add pbs_server[root] service pbs_server restart
l Red Hat 7-based systems
[root] qterm[root] systemctl enable pbs_serverservice[root] systemctl start pbs_serverservice
l SUSE 11-based systems
[root] chkconfig --add pbs_server[root] service pbs_server restart
l SUSE 12-based systems
Chapter 2 Overview
16 Torque Installation Overview
Torque Installation Overview 17
[root] qterm[root] systemctl enable pbs_serverservice[root] systemctl start pbs_serverservice
Install Torque MOMsIn most installations you will install a Torque MOM on each of your computenodes
See Specifying Compute Nodes or Configuring Torque on Compute Nodesfor more information
Do the following1 On the Torque Server Host do the followinga Create the self-extracting packages that are copied and executed on yournodes[root] make packagesBuilding torque-package-clients-linux-x86_64sh Building torque-package-mom-linux-x86_64sh Building torque-package-server-linux-x86_64sh Building torque-package-gui-linux-x86_64sh Building torque-package-devel-linux-x86_64sh Done
The package files are self-extracting packages that can be copied and executedon your production machines Use --help for options
b Copy the self-extracting MOM packages to each Torque MOMHostAdaptive Computing recommends that you use a remote shell such asSSH to install packages on remote systems Set up shared SSH keys ifyou do not want to supply a password for each Torque MOMHost
[root] scp torque-package-mom-linux-x86_64sh ltmom-nodegt
c Copy the pbs_mom startup script to each Torque MOMHostl Red Hat 6-based systems
[root] scp contribinitdpbs_mom ltmom-nodegtetcinitd
l Red Hat 7-based systems
[root] scp contribsystemdpbs_momservice ltmom-nodegtusrlibsystemdsystem
l SUSE 11-based systems
[root] scp contribinitdsusepbs_mom ltmom-nodegtetcinitdpbs_mom
l SUSE 12-based systems
Chapter 2 Overview
[root] scp contribsystemdpbs_momservice ltmom-nodegtusrlibsystemdsystem
Not all sites see an inherited ulimit but those that do can change theulimit in the pbs_mom init script The pbs_mom init script isresponsible for starting and stopping the pbs_mom process
2 For a Red Hat 6-based system or a SUSE 11-based system on each TorqueMOMHost confirm that cgroups have been mounted if not mount thema Run lssubsys -amb If the command is not found or you do not see something similar to thefollowing then cgroups are notmounted continue with theseinstructions
nsperf_eventnet_priocpuset cgroupcpusetcpu cgroupcpucpuacct cgroupcpuacctmemory cgroupmemorydevices cgroupdevicesfreezer cgroupfreezernet_cls cgroupnet_clsblkio cgroupblkio
c For Red Hat 6-based systems install the cgroup library package andmount cgroups
[root] yum install libcgroup[root] service cgconfig start[root] chkconfig cgconfig on
d For SUSE 11-based systems do the followingi Install the cgroup library package
[root] zypper install libcgroup1
ii Edit etccgconfigconf and add the following
mount devices = mntcgroupsdevicescpuset = mntcgroupscpusetcpu = mntcgroupscpucpuacct = mntcgroupscpuacctmemory = mntcgroupsmemory
iii Mount cgroups
[root] service cgconfig start[root] chkconfig cgconfig on
Chapter 2 Overview
18 Torque Installation Overview
Torque Installation Overview 19
e Run lssubsys -am again and confirm cgroups are mounted3 On each Torque MOMHost do the followinga For Red Hat 7-based or SUSE 12-based systems install cgroup-tools
l Red Hat 7-based systems
[root] yum install libcgroup-tools
l SUSE 12-based systems
[root] zypper install libcgroup-tools
b Install the self-extracting MOM package
[root] torque-package-mom-linux-x86_64sh --install
c Configure pbs_mom to start at system boot and then start the daemonl Red Hat 6-based systems
[root] chkconfig --add pbs_mom[root] service pbs_mom start
l Red Hat 7-based systems
[root] systemctl enable pbs_momservice[root] systemctl start pbs_momservice
l SUSE 11-based systems
[root] chkconfig --add pbs_mom[root] service pbs_mom start
l SUSE 12-based systems
[root] systemctl enable pbs_momservice[root] systemctl start pbs_momservice
Install Torque ClientsIf you want to have the Torque client commands installed on hosts other thanthe Torque Server Host (such as the compute nodes or separate login nodes)do the following
Chapter 2 Overview
1 On the Torque Server Host do the followinga Copy the self-extracting client package to each Torque Client Host
Adaptive Computing recommends that you use a remote shell suchas SSH to install packages on remote systems Set up shared SSHkeys if you do not want to supply a password for each Torque ClientHost
[root] scp torque-package-clients-linux-x86_64sh lttorque-client-hostgt
b Copy the trqauthd startup script to each Torque Client Hostl Red Hat 6-based systems
[root] scp contribinitdtrqauthd lttorque-client-hostgtetcinitd
l Red Hat 7-based systems
[root] scp contribsystemdtrqauthdservice lttorque-client-hostgtusrlibsystemdsystem
l SUSE 11-based systems
[root] scp contribinitdsusetrqauthd lttorque-client-hostgtetcinitdtrqauthd
l SUSE 12-based systems
[root] scp contribsystemdtrqauthdservice lttorque-client-hostgtusrlibsystemdsystem
2 On each Torque Client Host install the self-extracting client package
[root] torque-package-clients-linux-x86_64sh --install
Configure Data ManagementWhen a batch job completes stdout and stderr files are generated and placedin the spool directory on the master Torque MOMHost for the job instead of thesubmit host You can configure the Torque batch environment to copy thestdout and stderr files back to the submit host See Configuring DataManagement for more information
Compute NodesUse the Adaptive Computing Torque package system to create self-extractingtarballs which can be distributed and installed on compute nodes The Torquepackages are customizable See the INSTALL file for additional options andfeatures
Chapter 2 Overview
20 Torque Installation Overview
Torque Installation Overview 21
If you installed Torque using the RPMs you must install and configure yournodes manually bymodifying the varspooltorquemom_privconfig file of each one This file is identical for all compute nodesand can be created on the head node and distributed in parallel to allsystems
[root] vi varspooltorquemom_privconfig
$pbsserver headnode hostname running pbs server$logevent 225 bitmap of which events to log
[root] service pbs_mom restart
To create Torque packages
1 Configure and make as normal and then run make packages
gt make packagesBuilding torque-package-clients-linux-i686sh Building torque-package-mom-linux-i686sh Building torque-package-server-linux-i686sh Building torque-package-gui-linux-i686sh Building torque-package-devel-linux-i686sh Done
The package files are self-extracting packages that can be copied and executed onyour production machines Use --help for options
2 Copy the desired packages to a shared location
gt cp torque-package-mom-linux-i686sh sharedstoragegt cp torque-package-clients-linux-i686sh sharedstorage
3 Install the Torque packages on the compute nodesAdaptive Computing recommends that you use a remote shell such as SSHto install Torque packages on remote systems Set up shared SSH keys ifyou do not want to supply a password for each host
The only required package for the compute node is mom-linuxAdditional packages are recommended so you can use clientcommands and submit jobs from compute nodes
The following is an example of how to copy and install mom-linux in adistributed fashion
gt for i in node01 node02 node03 node04 do scp torque-package-mom-linux-i686sh$itmp donegt for i in node01 node02 node03 node04 do scp torque-package-clients-linux-i686sh $itmp donegt for i in node01 node02 node03 node04 do ssh $i tmptorque-package-mom-linux-i686sh --install donegt for i in node01 node02 node03 node04 do ssh $i tmptorque-package-clients-linux-i686sh --install donegt for i in node01 node02 node03 node04 do ssh $i ldconfig done
Chapter 2 Overview
Alternatively you can use a tool like xCAT instead of dsh
To use a tool like xCAT
1 Copy the Torque package to the nodes
gt prcp torque-package-linux-i686sh noderangedestinationdirectory
2 Install the Torque package
gt psh noderange tmptorque-package-linux-i686sh --install
Although optional it is possible to use the Torque server as a compute nodeand install a pbs_momwith the pbs_server daemon
Related TopicsInstalling Torque Resource ManagerTorque Installation Overview
Enabling Torque as a Service
Enabling Torque as a service is optional In order to run Torque as aservice you must enable trqauthd (see Configuring trqauthd for ClientCommands)
The method for enabling Torque as a service is dependent on the Linux variantyou are using Startup scripts are provided in the contribinitd orcontribsystemd directory of the source package To enable Torque as aservice run the following as root on the host for the appropriate Torquedaemon
l Red Hat 6-based systems
gt cp contribinitdpbs_mom etcinitdpbs_momgt chkconfig --add pbs_momgt cp contribinitdpbs_server etcinitdpbs_servergt chkconfig --add pbs_server
l SUSE 11-based systems
gt cp contribinitdsusepbs_mom etcinitdpbs_momgt insserv -d pbs_momgt cp contribinitdsusepbs_server etcinitdpbs_servergt insserv -d pbs_server
l Red Hat 7-based or SUSE 12-based systems
gt cp contribsystemdpbs_momservice userlibsystemdpbs_serverservicegt systemctl enable pbs_momservicegt cp contribsystemdpbs_serverservice userlibsystemdpbs_serverservicegt systemctl enable pbs_serverservice
Chapter 2 Overview
22 Torque Installation Overview
InitializingConfiguring Torque on the Server (pbs_server) 23
You will need to customize these scripts to match your system
These options can be added to the self-extracting packages For more detailssee the INSTALL file
Related TopicsTorque Installation OverviewInstalling Torque Resource ManagerConfiguring trqauthd for Client Commands
InitializingConfiguring Torque on the Server (pbs_server)This section contains these topics
l Specifying Compute Nodesl Configuring Torque on Compute Nodesl Finalizing Configurations
The Torque server (pbs_server) contains all the information about a cluster Itknows about all of the MOM nodes in the cluster based on the information in theTORQUE_HOMEserver_privnodes file (See Configuring Torque on ComputeNodes) It also maintains the status of each MOM node through updates fromthe MOMs in the cluster (see pbsnodes) All jobs are submitted via qsub to theserver which maintains a master database of all jobs and their statesSchedulers such as Moab Workload Manager receive job queue and nodeinformation from pbs_server and submit all jobs to be run to pbs_serverThe server configuration is maintained in a file named serverdb located inTORQUE_HOMEserver_priv The serverdb file contains all parameterspertaining to the operation of Torque plus all of the queues that are in theconfiguration For pbs_server to run serverdbmust be initializedYou can initialize serverdb in two different ways but the recommended way isto use the torquesetup script
l As root execute torquesetup from the build directory (seetorquesetup)
l Use pbs_server -t create (see -t)Restart pbs_server after initializing serverdb
Chapter 2 Overview
l Red Hat 6-based or SUSE 11-based systems
gt qtermgt service pbs_server start
l Red Hat 7-based or SUSE 12-based systems
gt qtermgt systemctl start pbs_serverservice
torquesetupThe torquesetup script uses pbs_server -t create to initialize serverdb andthen adds a user as a manager and operator of Torque and other commonlyused attributes The syntax is as followstorquesetup username
gt torquesetup kengt qmgr -c p s
Create queues and set their attributes Create and define queue batchcreate queue batchset queue batch queue_type = Executionset queue batch resources_defaultnodes = 1set queue batch resources_defaultwalltime = 010000set queue batch enabled = Trueset queue batch started = True Set server attributesset server scheduling = Trueset server acl_hosts = kmnset server managers = kenkmnset server operators = kenkmnset server default_queue = batchset server log_events = 511set server mail_from = admset server node_check_rate = 150set server tcp_timeout = 6set server mom_job_sync = Trueset server keep_completed = 300
A single queue named batch and a few needed server attributes are created
pbs_server -t createThe -t create option instructs pbs_server to create the serverdb file andinitialize it with a minimum configuration to run pbs_server
gt pbs_server -t create
To see the configuration and verify that Torque is configured correctly useqmgr
Chapter 2 Overview
24 InitializingConfiguring Torque on the Server (pbs_server)
InitializingConfiguring Torque on the Server (pbs_server) 25
gt qmgr -c p s
Set server attributesset server acl_hosts = kmnset server log_events = 511set server mail_from = admset server node_check_rate = 150set server tcp_timeout = 6
Setting Up the Environment for pbs_server and pbs_momThe pbs_environment file (default location TORQUE_HOMEpbs_environment) will be sourced by pbs_mom and pbs_server when they arelaunched If there are environment variables that should be set for pbs_serverandor pbs_mom they can be placed in this fileA pbs_environment file with a non-default name andor location can bespecified before compilation with the --with-environ=PATH configuration optionSee Table 2-2 Optional Packages on page 39 for more information Todetermine whether a non-default pbs_environment file is in use run pbs_server --about
The pbs_environment file should not be confused with the PBS_ENVIRONMENT job environment variable
Related TopicsNode Manager (MOM) ConfigurationAdvanced ConfigurationDebugging
Specifying Compute NodesThe environment variable TORQUE_HOME holds the directory path whereconfiguration files are stored If you used the default locations duringinstallation you do not need to specify the TORQUE_HOME environmentvariableThe pbs_servermust recognize which systems on the network are its computenodes Specify each node on a line in the servers nodes file This file is locatedat TORQUE_HOMEserver_privnodes In most cases it is sufficient tospecify just the names of the nodes on individual lines however variousproperties can be applied to each node
Only a root user can access the server_priv directory
Syntax of nodes file
Chapter 2 Overview
node-name[ts] [np=] [gpus=] [properties]
l The node-namemust match the hostname on the node itself includingwhether it is fully qualified or shortened
l The [ts] option marks the node as timeshared Timeshared nodes arelisted by the server in the node status report but the server does notallocate jobs to them
l The [np=] option specifies the number of virtual processors for a givennode The value can be less than equal to or greater than the number ofphysical processors on any given node
l The [gpus=] option specifies the number of GPUs for a given node Thevalue can be less than equal to or greater than the number of physicalGPUs on any given node
l The node processor count can be automatically detected by the Torqueserver if auto_node_np is set to TRUE This can be set using thiscommand
qmgr -c set server auto_node_np = True
Setting auto_node_np to TRUE overwrites the value of np set in TORQUE_HOMEserver_privnodes
l The [properties] option allows you to specify arbitrary strings to identifythe node Property strings are alphanumeric characters only and mustbegin with an alphabetic character
l Comment lines are allowed in the nodes file if the first non-white spacecharacter is the pound sign ()
The following example shows a possible node file listingTORQUE_HOMEserver_privnodes
Nodes 001 and 003-005 are cluster nodesnode001 np=2 cluster01 rackNumber22 node002 will be replaced soonnode002ts waitingToBeReplaced node002 will be replaced soonnode003 np=4 cluster01 rackNumber24node004 cluster01 rackNumber25node005 np=2 cluster01 rackNumber26 RAM16GBnode006node007 np=2node008ts np=4
Related TopicsInitializingConfiguring Torque on the Server (pbs_server)
Chapter 2 Overview
26 InitializingConfiguring Torque on the Server (pbs_server)
InitializingConfiguring Torque on the Server (pbs_server) 27
Configuring Torque on Compute NodesIf you are using Torque self-extracting packages with default compute nodeconfiguration no additional steps are required and you can skip this sectionIf installing manually or advanced compute node configuration is needed editthe TORQUE_HOMEmom_privconfig file on each node The recommendedsettings followTORQUE_HOMEmom_privconfig
$logevent 1039 bitmap of which events to log
This file is identical for all compute nodes and can be created on the head nodeand distributed in parallel to all systems
Related TopicsInitializingConfiguring Torque on the Server (pbs_server)
Configuring PortsYou can optionally configure the various ports that Torque uses forcommunication Most ports can be configured multiple ways The ports you canconfigure are
l pbs_server listening portl pbs_mom listening portl port pbs_server uses to communicate to the pbs_moml port pbs_mom uses to communicate to the pbs_serverl port client commands use to communicate to the pbs_serverl port trqauthd uses to communicate to the pbs_server
If you are running PBS Professional on the same system be aware that ituses the same environment variables and etcservices entries
Configuring the pbs_server Listening PortTo configure the port the pbs_server listens on follow any of these steps
l Set an environment variable called PBS_BATCH_SERVICE_PORT to the portdesired
l Edit the etcservices file and set pbs port_numtcpl Start pbs_server with the -p option
Chapter 2 Overview
o Red Hat 6-based or SUSE 11-based systemso Edit etcsysconfigpbs_server
PBS_ARGS=-p
o Start the service
service pbs_server start
o Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_server
PBS_ARGS=-p
o Start the service
systemctl start pbs_serverservice
l Edit the $PBS_HOMEserver_name file and change server_name toserver_nameltport_numgt
l Start pbs_server with the -H optiono Red Hat 6-based or SUSE 11-based systems
o Edit etcsysconfigpbs_server
PBS_ARGS=-H
o Start the service
service pbs_server start
o Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_server
PBS_ARGS=-H
o Start the service
systemctl start pbs_serverservice
Configuring the pbs_mom Listening PortTo configure the port the pbs_mom listens on follow any of these steps
l Set an environment variable called PBS_MOM_SERVICE_PORT to the portdesired
l Edit the etcservices file and set pbs_mom port_numtcp
Chapter 2 Overview
28 InitializingConfiguring Torque on the Server (pbs_server)
InitializingConfiguring Torque on the Server (pbs_server) 29
l Start pbs_mom with the -M optiono Red Hat 6-based or SUSE 11-based systems
o Edit etcsysconfigpbs_mom
PBS_ARGS=-M
o Start the service
service pbs_mom start
o Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_mom
PBS_ARGS=-M
o Start the service
systemctl start pbs_momservice
l Edit the pbs_server nodes file to add mom_service_port=port_num
Configuring the Port pbs_server Uses to Communicate withpbs_momTo configure the port the pbs_server uses to communicate with pbs_momfollow any of these steps
l Set an environment variable called PBS_MOM_SERVICE_PORT to the portdesired
l Edit the etcservices file and set pbs_mom port_numtcpl Start pbs_mom with the -M option
o Red Hat 6-based or SUSE 11-based systemso Edit etcsysconfigpbs_mom
PBS_ARGS=-M
o Start the service
service pbs_mom start
o Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_mom
PBS_ARGS=-M
Chapter 2 Overview
o Start the service
systemctl start pbs_momservice
Configuring the Port pbs_mom Uses to Communicate withpbs_serverTo configure the port the pbs_mom uses to communicate with pbs_serverfollow any of these steps
l Set an environment variable called PBS_BATCH_SERVICE_PORT to the portdesired
l Edit the etcservices file and set pbs port_numtcpl Start pbs_mom with the -S option
o Red Hat 6-based or SUSE 11-based systemso Edit etcsysconfigpbs_mom
PBS_ARGS=-S
o Start the service
service pbs_mom start
o Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_mom
PBS_ARGS=-S
o Start the service
systemctl start pbs_momservice
l Edit the nodes file entry for that list add mom_service_port=port_num
Configuring the Port Client Commands Use to Communicatewith pbs_serverTo configure the port client commands use to communicate with pbs_serverfollow any of these steps
l Edit the etcservices file and set pbs port_numtcpl Edit the $PBS_HOMEserver_name file and change server_name toserver_nameltport_numgt
Chapter 2 Overview
30 InitializingConfiguring Torque on the Server (pbs_server)
InitializingConfiguring Torque on the Server (pbs_server) 31
Configuring the Port trqauthd Uses to Communicate withpbs_serverTo configure the port trqauthd uses to communicate with pbs_server do thefollowing
l Edit the $PBS_HOMEserver_name file and change server_name toserver_nameltport_numgt
Changing Default PortsThis section provides examples of changing the default ports (using non-standard ports)In this section
l MOMService Port on page 31l Default Port on the Server on page 32l MOMManager Port on page 32
MOM Service PortThe MOM service port is the port number on which MOMs are listening Thisexample shows how to change the default MOM service port (15002) to port30001Do the following1 On the server for the server_privnodes file change the node entry
nodename np=4 mom_service_port=30001
2 On the MOM start pbs_mom with the -M optionl Red Hat 6-based or SUSE 11-based systems
o Edit etcsysconfigpbs_mom
PBS_ARGS=-M
o Start the service
service pbs_mom start
l Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_mom
PBS_ARGS=-M
Chapter 2 Overview
o Start the service
systemctl start pbs_momservice
Default Port on the ServerDo the following1 Set the $(TORQUE_HOME)server_name file
hostnamenewportnuma3ac45001
2 On the MOM start pbs_mom with the -S optionl Red Hat 6-based or SUSE 11-based systems
o Edit etcsysconfigpbs_mom
PBS_ARGS=-S
o Start the service
service pbs_mom start
l Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_mom
PBS_ARGS=-S
o Start the service
systemctl start pbs_momservice
MOMManager PortThe MOMmanager port tell MOMs which ports on which other MOMs arelistening for MOM-to-MOM communication This example shows how to changethe default MOMmanager port (15003) to port 30002Do the following1 On the server nodes file
nodename np=4 mom_manager_port=30002
2 On the MOM start pbs_mom with the -R optionl Red Hat 6-based or SUSE 11-based systems
o Edit etcsysconfigpbs_mom
PBS_ARGS=-R
Chapter 2 Overview
32 InitializingConfiguring Torque on the Server (pbs_server)
InitializingConfiguring Torque on the Server (pbs_server) 33
o Start the service
service pbs_mom start
l Red Hat 7-based or SUSE 12-based systemso Edit etcsystemconfigpbs_mom
PBS_ARGS=-R
o Start the service
systemctl start pbs_momservice
Related TopicsInitializingConfiguring Torque on the Server (pbs_server)pbs_serverpbs_momtrqauthdclient commands
Configuring trqauthd for Client Commandstrqauthd is a daemon used by Torque client utilities to authorize userconnections to pbs_server Once started it remains resident Torque clientutilities then communicate with trqauthd on port 15005 on the loopbackinterface It is multi-threaded and can handle large volumes of simultaneousrequests
Running trqauthdtrqauthd must be run as root It must also be running on any host whereTorque client commands will executeBy default trqauthd is installed to usrlocalbin
If you run trqauthd before starting pbs_server you will receive a warningthat no servers are available To avoid this message start pbs_serverbefore running trqauthd
trqauthd can be invoked directly from the command line or by the use of scriptsthat are located in the Torque source tree
l For Red Hat 6-based or SUSE 11-based systems the initd scripts arelocated in the contribinitd directory
l For Red Hat 7-based or SUSE 12-based systems the systemd scripts arelocated in the contribsystemd directory
There are two scripts for trqauthd
Chapter 2 Overview
Script Description
susetrqauthd Used only for SUSE-based systems
trqauthd An example for other package managers (Redhat Scientific CentOS and Fedora are some com-mon examples)
You should edit these scripts to be sure they will work for your site
Inside each of the scripts are the variables PBS_DAEMON and PBS_HOMEThese two variables should be updated to match your Torque installation PBS_DAEMON needs to point to the location of trqauthd PBS_HOME needs to matchyour Torque installationDo the following1 Choose the script that matches your dist system and copy it to
etcinitd If needed rename it to trqauthd2 Restart the service
l Red Hat 6-based or SUSE 11-based systems
service trqauthd restart
l Red Hat 7-based or SUSE 12-based systems
systemctl restart trqauthdservice
If you receive an error that says Could not open socket in trq_simple_connect error 97 and you use a CentOS RedHat or Scientific Linux 6+operating system check your etchosts file for multiple entries of asingle host name pointing to the same IP address Delete the duplicate(s)save the file and launch trqauthd again
Related TopicsInitializingConfiguring Torque on the Server (pbs_server)
Finalizing ConfigurationsAfter configuring the serverdb and the server_privnodes files and afterensuring minimal MOM configuration restart the pbs_server on the server nodeand the pbs_mom on the compute nodes
Chapter 2 Overview
34 InitializingConfiguring Torque on the Server (pbs_server)
Advanced Configuration 35
l Compute Nodeso Red Hat 6-based or SUSE 11-based sysytems
gt service pbs_mom start
o Red Hat 7-based or SUSE 12-based systems
gt systemctl start pbs_momservice
l Server Nodeo Red Hat 6-based or SUSE 11-based sysytems
gt service pbs_server restart
o Red Hat 7-based or SUSE 12-based systems
gt systemctl restart pbs_serverservice
After waiting several seconds the pbsnodes -a command should list all nodesin state free
Related TopicsInitializingConfiguring Torque on the Server (pbs_server)
Advanced ConfigurationThis section contains information about how you can customize the installationand configure the server to ensure that the server and nodes arecommunicating correctly For details see these topics
l Customizing the Installl Server Configuration
Related TopicsServer Parameters
Customizing the InstallThe Torque configure command has several options available Listed below aresome suggested options to use when running configure
l By default Torque does not install the admin manuals To enable this use--enable-docs
l By default only children MOM processes use syslog To enable syslog forall of Torque use --enable-syslog
Chapter 2 Overview
Table 2-1 Optional Features
Option Description
--disable-cli-ents
Directs Torque not to build and install the Torque client utilities such as qsub qstat qdel etc
--disable-FEATURE
Do not include FEATURE (same as --enable-FEATURE=no)
--disable-lib-tool-lock
Avoid locking (might break parallel builds)
--disable-mom Do not include the MOM daemon
--disable-mom-check-spool
Dont check free space on spool directory and set an error
--disable-posixmemlock
Disable the MOMs use of mlockall Some versions of OSs seem to have buggy POSIX MEMLOCK
--disable-priv-ports
Disable the use of privileged ports for authentication Some versions of OSX have a buggy bind() and cannot bind to privileged ports
--disable-qsub-keep-override
Do not allow the qsub -k flag to override -o -e
--disable-server
Do not include server and scheduler
--disable-shell-pipe
Give the job script file as standard input to the shell instead of passing its name via a pipe
--disable-spool
If disabled Torque will create output and error files directly in $HOMEpbs_spool if it exists orin $HOME otherwise By default Torque will spool files in TORQUE_HOMEspool and copy themto the users home directory when the job completes
--disable-xopen-net-working
With HPUX and GCC dont force usage of XOPEN and libxnet
--enable-acct-x Enable adding x attributes to accounting log
Chapter 2 Overview
36 Advanced Configuration
Advanced Configuration 37
Option Description
--enable-array Setting this under IRIX enables the SGI Origin 2000 parallel support Normally autodetectedfrom the etcconfigarray file
--enable-autorun
Turn on the AUTORUN_JOBS flag When enabled Torque runs the jobs as soon as they are sub-mitted (destroys Moab compatibly) This option is not supported
--enable-blcr Enable BLCR support
--enable-cgroups
Enable cgroups When cgroups are enabled cpusets are handled by the cgroup cpuset sub-system
If you are building with cgroups enabled you must have boost version 141 or later
--enable-cpa Enable Crays CPA support
--enable-cpu-set
Enable Linux 26 kernel cpusets
It is recommended that you use --enable-cgroups instead of --enable-cpuset--enable-cpuset is deprecated and no new features will be added to it --enable-cgroupsand --enable-cpuset are mutually exclusive
--enable-debug Prints debug information to the console for pbs_server and pbs_mom while they are running(This is different than --with-debugwhich will compile with debugging symbols)
--enable-dependency-tracking
Do not reject slow dependency extractors
--enable-fast-install[=PKGS]
Optimize for fast installation [default=yes]
--enable-FEATURE[=ARG]
Include FEATURE [ARG=yes]
--enable-file-sync
Open files with sync on each write operation This has a negative impact on Torque per-formance This is disabled by default
--enable-force-nodefile
Forces creation of nodefile regardless of job submission parameters Not on by default
Chapter 2 Overview
Option Description
--enable-gcc-warnings
Enable gcc strictness and warnings If using gcc default is to error on any warning
--enable-geo-metry-requests
Torque is compiled to use procs_bitmap during job submission
When using --enable-geometry-requests do not disable cpusets Torque looks at thecpuset when killing jobs
--enable-gui Include the GUI-clients
--enable-main-tainer-mode
This is for the autoconf utility and tells autoconf to enable so called rebuild rules See main-tainer mode for more information
--enable-maxdefault
Turn on the RESOURCEMAXDEFAULT flag
Versions of Torque earlier than 245 attempted to apply queue and server defaults to ajob that didnt have defaults specified If a setting still did not have a value after thatTorque applied the queue and server maximum values to a job (meaning the maximumvalues for an applicable setting were applied to jobs that had no specified or defaultvalue)In Torque 245 and later the queue and server maximum values are no longer used asa value for missing settings To re-enable this behavior in Torque 245 and later use --enable-maxdefault
--enable-nochildsignal
Turn on the NO_SIGCHLD flag
--enable-nodemask
Enable nodemask-based scheduling on the Origin 2000
--enable-pemask
Enable pemask-based scheduling on the Cray T3e
--enable-plock-dae-mons[=ARG]
Enable daemons to lock themselves into memory logical-or of 1 for pbs_server 2 for pbs_sched-uler 4 for pbs_mom (no argument means 7 for all three)
--enable-quick-commit
Turn on the QUICKCOMMIT flag When enabled adds a check to make sure the job is in anexpected state and does some bookkeeping for array jobs This option is not supported
Chapter 2 Overview
38 Advanced Configuration
Advanced Configuration 39
Option Description
--enable-shared[=PKGS]
Build shared libraries [default=yes]
--enable-shell-use-argv
Enable this to put the job script name on the command line that invokes the shell Not on bydefault Ignores --enable-shell-pipe setting
--enable-sp2 Build PBS for an IBM SP2
--enable-srfs Enable support for SRFS on Cray
--enable-static[=PKGS]
Build static libraries [default=yes]
--enable-sys-log
Enable (default) the use of syslog for error reporting
--enable-tcl-qstat
Setting this builds qstat with Tcl interpreter features This is enabled if Tcl is enabled
--enable-unix-sockets
Enable the use of Unix Domain sockets for authentication
Table 2-2 Optional Packages
Option Description
--with-blcr=DIR BLCR installation prefix (Available in versions 256 and 302 and later)
--with-blcr-include=DIR Include path for libcrh (Available in versions 256 and 302 and later)
--with-blcr-lib=DIR Lib path for libcr (Available in versions 256 and 302 and later)
--with-blcr-bin=DIR Bin path for BLCR utilities (Available in versions 256 and 302 and later)
Chapter 2 Overview
Option Description
--with-boost-path=DIRBoost version 1360 or later is supported Red Hat 6-based systems comepackaged with 1410 and Red Hat 7-based systems come packaged with1530
Set the path to the Boost header files to be used during make This option does notrequire Boost to be built or installed
The --with-boost-path value must be a directory containing a sub-directory calledboost that contains the boost hpp filesFor example if downloading the boost 1550 source tarball to the adaptive usershome directory
[adaptive]$ cd ~[adaptive]$ wgethttpsourceforgenetprojectsboostfilesboost1550boost_1_55_0targzdownload[adaptive]$ tar xzf boost_1_55_0targz[adaptive]$ ls boost_1_55_0boostboost-buildjam
In this case use --with-boost-path=homeadaptiveboost_1_55_0 duringconfigure
Another example would be to use an installed version of Boost If the installedBoost header files exist in usrincludeboosthpp use --with-boost-path=usrinclude
--with-cpa-include=DIR Include path for cpalibh
--with-cpa-lib=DIR Lib path for libcpalib
--with-debug=no Do not compile with debugging symbols
--with-default-server-r=HOSTNAME
Set the name of the computer that clients will access when no machine name isspecified as part of the queue name It defaults to the hostname of the machine onwhich PBS is being compiled
--with-environ=PATH Set the path containing the environment variables for the daemons For SP2 andAIX systems suggested setting it to etcenvironment Defaults to the file pbs_environment in the server-home Relative paths are interpreted within the con-text of the server-home
--with-gnu-ld Assume the C compiler uses GNU ld [default=no]
Chapter 2 Overview
40 Advanced Configuration
Advanced Configuration 41
Option Description
--with-mail-domain=MAILDOMAIN
Override the default domain for outgoing mail messages ie usermaildomainThe default maildomain is the hostname where the job was submitted from
--with-modulefiles[=DIR] Use module files in specified directory [etcmodulefiles]
--with-momlogdir Use this directory for MOM logs
--with-momlogsuffix Use this suffix for MOM logs
--without-PACKAGE Do not use PACKAGE (same as --with-PACKAGE=no)
--without-readline Do not include readline support (default included if found)
--with-PACKAGE[=ARG] Use PACKAGE [ARG=yes]
--with-pam=DIR Directory that holds the system PAM modules Defaults to lib(64)security onLinux
--with-pic Try to use only PICnon-PIC objects [default=use both]
--with-qstatrc-file=FILE Set the name of the file that qstat will use if there is no qstatrc file in the dir-ectory where it is being invoked Relative path names will be evaluated relative tothe server home directory (see above) If this option is not specified the defaultname for this file will be set to qstatrc (no dot) in the server home directory
--with-rcp One of scp rcp mom_rcp or the full path of a remote file copy program scpis the default if found otherwise mom_rcp is used Some rcp programs dontalways exit with valid error codes in case of failure mom_rcp is a copy of BSD rcpincluded with this source that has correct error codes but it is also old unmain-tained and doesnt have large file support
--with-sched=TYPE Sets the scheduler type If TYPE is c the scheduler will be written in C If TYPE istcl the server will use a Tcl based scheduler If TYPE is basl Torque will usethe rule based scheduler If TYPE is no then no scheduling is done c is thedefault
Chapter 2 Overview
Option Description
--with-sched-code=PATH Sets the name of the scheduler to use This only applies to BASL schedulers andthose written in the C language For C schedulers this should be a directory nameand for BASL schedulers a filename ending in basl It will be interpreted relativeto srctreesrcschedulersSCHD_TYPEsamples As an example an appropriateBASL scheduler relative path would be nasbasl The default scheduler code forC schedulers is fifo
--with-scp In Torque 21 and later SCP is the default remote copy protocol See --with-rcp ifa different protocol is desired
--with-sendmail[=FILE] Sendmail executable to use
--with-server-home=DIR Set the server homespool directory for PBS use Defaults to varspooltorque
--with-server-name-file-e=FILE
Set the file that will contain the name of the default server for clients to use If thisis not an absolute pathname it will be evaluated relative to the server home dir-ectory that either defaults to usrspoolPBS or is set using the --with-server-home option to configure If this option is not specified the default name for thisfile will be set to server_name
--with-tcl Directory containing tcl configuration (tclConfigsh)
--with-tclatrsep=CHAR Set the Tcl attribute separator character this will default to if unspecified
--with-tclinclude Directory containing the public Tcl header files
--with-tclx Directory containing tclx configuration (tclxConfigsh)
--with-tk Directory containing tk configuration (tkConfigsh)
--with-tkinclude Directory containing the public Tk header files
--with-tkx Directory containing tkx configuration (tkxConfigsh)
--with-xauth=PATH Specify path to xauth program
HAVE_WORDEXPWordxp() performs a shell-like expansion including environment variables Bydefault HAVE_WORDEXP is set to 1 in srcpbs_configh If set to 1 will limitthe characters that can be used in a job name to those allowed for a file in the
Chapter 2 Overview
42 Advanced Configuration
Advanced Configuration 43
current environment such as BASH If set to 0 any valid character for the filesystem can be usedIf a user would like to disable this feature by setting HAVE_WORDEXP to 0 insrcincludepbs_configh it is important to note that the error and theoutput file names will not expand environment variables including $PBS_JOBID The other important consideration is that characters that BASH dislikessuch as () will not be allowed in the output and error file names for jobs bydefault
Related TopicsAdvanced ConfigurationServer Configuration
Server ConfigurationThis topic contains information and instructions to configure your serverIn this topic
l Server Configuration Overviewl Name Service Configurationl Configuring Job Submission Hostsl Configuring Torque on a Multi-Homed Serverl Architecture Specific Notesl Specifying Non-Root Administratorsl Setting Up Emaill Using MUNGE Authentication
Also see Setting Up the MOMHierarchy (Optional)
Server Configuration OverviewThere are several steps to ensure that the server and the nodes are completelyaware of each other and able to communicate directly Some of thisconfiguration takes place within Torque directly using the qmgr commandOther configuration settings are managed using the pbs_server nodes file DNSfiles such as etchosts and the etchostsequiv file
Name Service ConfigurationEach node as well as the server must be able to resolve the name of everynode with which it will interact This can be accomplished using etchostsDNS NIS or other mechanisms In the case of etchosts the file can beshared across systems in most cases
Chapter 2 Overview
A simple method of checking proper name service configuration is to verify thatthe server and the nodes can ping each other
Configuring Job Submission Hosts
Using RCmd authentication
When jobs can be submitted from several different hosts these hosts shouldbe trusted via the R commands (such as rsh and rcp) This can be enabled byadding the hosts to the etchostsequiv file of the machine executing the pbs_server daemon or using other R command authorization methods The exactspecification can vary from OS to OS (see the man page for ruserok to find outhow your OS validates remote users) In most cases configuring this file is assimple as adding a line to your etchostsequiv file as in the followingetchostsequiv
[+ | -] [hostname] [username]mynodemyorganizationcom
Either of the hostname or username fields may be replaced with a wildcardsymbol (+) The (+) may be used as a stand-alone wildcard but not connectedto a username or hostname eg +node01 or +user01 However a (-) may beused in that manner to specifically exclude a user
Following the Linuxman page instructions for hostsequivmay result in afailure You cannot precede the user or hostname with a (+) To clarifynode1 +user1 will not work and user1will not be able to submit jobs
For example the following lines will not work or will not have the desired effect
+node02 user1node02 +user1
These lines will work
node03 ++ jsmithnode04 -tjones
The most restrictive rules must precede more permissive rules For exampleto restrict user tsmith but allow all others follow this format
node01 -tsmithnode01 +
Please note that when a hostname is specified it must be the fully qualifieddomain name (FQDN) of the host Job submission can be further secured usingthe server or queue acl_hosts and acl_host_enabled parameters (fordetails see Queue Attributes)
Chapter 2 Overview
44 Advanced Configuration
Advanced Configuration 45
Using the submit_hosts service parameter
Trusted submit host access may be directly specified without using RCmdauthentication by setting the server submit_hosts parameter via qmgr as inthe following example
gt qmgr -c set server submit_hosts = host1gt qmgr -c set server submit_hosts += host2gt qmgr -c set server submit_hosts += host3
Use of submit_hosts is potentially subject to DNS spoofing and should notbe used outside of controlled and trusted environments
Allowing job submission from compute hosts
If preferred all compute nodes can be enabled as job submit hosts withoutsetting rhosts or hostsequiv by setting the allow_node_submit parameterto true
Configuring Torque on a Multi-Homed ServerIf the pbs_server daemon is to be run on a multi-homed host (a host possessingmultiple network interfaces) the interface to be used can be explicitly set usingthe SERVERHOST parameter
Architecture Specific NotesWith some versions of Mac OSX it is required to add the line $restrictedltDOMAINgt to the pbs_mom configuration file This is required to work aroundsome socket bind bugs in the OS
Specifying Non-Root AdministratorsBy default only root is allowed to start configure and manage the pbs_serverdaemon Additional trusted users can be authorized using the parametersmanagers and operators To configure these parameters use the qmgrcommand as in the following example
gt qmgrQmgr set server managers += joshfsccomQmgr set server operators += joshfsccom
All manager and operator specifications must include a user name and either afully qualified domain name or a host expression
To enable all users to be trusted as both operators and administratorsplace the + (plus) character on its own line in the server_privacl_svroperators and server_privacl_svrmanagers files
Chapter 2 Overview
Setting Up EmailMoab relies on emails from Torque about job events To set up email do thefollowing
To set up email
1 Specify the location of the sendmail executable You can do this using thesendmail_path server attribute
qmgr -c set server sendmail_path = ltpath_to_executablegt
If this server option is not set you can set a default location during the build
gt configure --with-sendmail=ltpath_to_executablegt
If a location for the sendmail executable is not specified Torque will attemptto find it
2 Set mail_domain in your server settings If your domain isclusterresourcescom execute
gt qmgr -c set server mail_domain=clusterresourcescom
3 (Optional) You can override the default mail_body_fmt and mail_subject_fmt values via qmgr
gt qmgr -c set server mail_body_fmt=Job i n Name j n On host h n n m nn dgt qmgr -c set server mail_subject_fmt=Job i - r
By default users receive e-mails on job aborts Each user can select which kindof e-mails to receive by using the qsub -m option when submitting the job Ifyou want to dictate when each user should receive e-mails use a submit filter(for details see Job Submission Filter (qsub Wrapper))
Using MUNGE Authentication
The same version on MUNGEmust be installed on all of your Torque Hosts(Server Client MOM)
MUNGE is an authentication service that creates and validates user credentialsIt was developed by Lawrence Livermore National Laboratory (LLNL) to behighly scalable so it can be used in large environments such as HPC clusters Tolearn more about MUNGE and how to install it seehttpsdungithubiomungeConfiguring Torque to use MUNGE is a compile time operation When you arebuilding Torque use --enable-munge-auth as a command line option withconfigure
gt configure --enable-munge-auth
Chapter 2 Overview
46 Advanced Configuration
Advanced Configuration 47
You can use only one authorization method at a time If--enable-munge-auth is configured the privileged port ruserokmethod isdisabledTorque does not link any part of the MUNGE library into its executables It callsthe MUNGE and UNMUNGE utilities which are part of the MUNGE daemon TheMUNGE daemonmust be running on the server and all submission hosts TheTorque client utilities call MUNGE and then deliver the encrypted credential topbs_server where the credential is then unmunged and the server verifies theuser and host against the authorized users configured in serverdbAuthorized users are added to serverdb using qmgr and the authorized_usersparameter The syntax for authorized_users is authorized_users=ltusergtlthostgt To add an authorized user to the server you can usethe following qmgr command
gt qmgr -c set server authorized_users=user1hostagt qmgr -c set server authorized_users+=user2hosta
The previous example adds user1 and user2 from hosta to the list of authorizedusers on the server Users can be removed from the list of authorized users byusing the -= syntax as follows
gt qmgr -c set server authorized_users-=user1hosta
Users must be added with the ltusergtlthostgt syntax The user and the hostportion can use the wildcard to allow multiple names to be accepted with asingle entry A range of user or host names can be specified using a [a-b]syntax where a is the beginning of the range and b is the end
gt qmgr -c set server authorized_users=user[1-10]hosta
This allows user1 through user10 on hosta to run client commands on theserver
Related TopicsSetting Up the MOM Hierarchy (Optional)Advanced Configuration
Setting Up the MOM Hierarchy (Optional)
Mom hierarchy is designed for large systems to configure how informationis passed directly to the pbs_server
The MOM hierarchy allows you to override the compute nodes default behaviorof reporting status updates directly to the pbs_server Instead you configurecompute nodes so that each node sends its status update information toanother compute node The compute nodes pass the information up a tree orhierarchy until eventually the information reaches a node that will pass the
Chapter 2 Overview
information directly to pbs_server This can significantly reduce network trafficand ease the load on the pbs_server in a large system
Adaptive Computing recommends approximately 25 nodes per pathNumbers larger than this may reduce the system performance
MOM Hierarchy ExampleThe following example illustrates how information is passed to the pbs_serverwithout and with mom_hierarchy
The dotted lines indicates an alternate path if the hierarchy-designatednode goes down
The following is the mom_hierachy_file for the with mom_hierarchy example
Chapter 2 Overview
48 Advanced Configuration
Advanced Configuration 49
ltpathgt ltlevelgthostAhostBltlevelgt ltlevelgthostBhostChostDltlevelgtltpathgtltpathgt ltlevelgthostEhostFltlevelgt ltlevelgthostEhostFhostGltlevelgtltpathgt
Setting Up the MOM HierarchyThe name of the file that contains the configuration information is named mom_hierarchy By default it is located in the varspooltorqueserver_privdirectory The file uses syntax similar to XML
ltpathgt ltlevelgtcomma-separated node listltlevelgt ltlevelgtcomma-separated node listltlevelgt ltpathgt
The ltpathgtltpathgt tag pair identifies a group of compute nodes Theltlevelgtltlevelgt tag pair contains a comma-separated list of compute nodenames listed by their hostnames Multiple paths can be defined with multiplelevels within each pathWithin a ltpathgtltpathgt tag pair the levels define the hierarchy All nodes in thetop level communicate directly with the server All nodes in lower levelscommunicate to the first available node in the level directly above it If the firstnode in the upper level goes down the nodes in the subordinate level will thencommunicate to the next node in the upper level If no nodes are available inan upper level then the node will communicate directly to the serverIf an upper level node has gone down and then becomes available the lowerlevel nodes will eventually find that the node is available and start sending theirupdates to that node
If you want to specify MOMs on a different port than the default you mustlist the node in the form hostnamemom_manager_portFor example
ltpathgt ltlevelgthostnamemom_manager_port ltlevelgt ltpathgt
Putting the MOM Hierarchy on the MOMsYou can put the MOM hierarchy file directly on the MOMs The default location isvarspooltorquemom_privmom_hierarchy This way the pbs_server
Chapter 2 Overview
doesnt have to send the hierarchy to all the MOMs during each pbs_serverstartup The hierarchy file still has to exist on the pbs_server and if the fileversions conflict the pbs_server version overwrites the local MOM file Whenusing a global file system accessible from both the MOMs and the pbs_server it isrecommended that the hierarchy file be symbolically linked to the MOMsOnce the hierarchy file exists on the MOMs start pbs_server with the -n optionwhich tells pbs_server to not send the hierarchy file on startup Instead pbs_server waits until a MOM requests it
Opening Ports in a FirewallIf your site is running firewall software on its hosts you will need to configurethe firewall to allow connections to the products in your installationThis topic provides an example and general instructions for how to open portsin your firewall The actual port numbers for the various products will beprovided in the installation instructions for that productIn this topic
l Red Hat 6-Based Systems on page 50l Red Hat 7-Based Systems on page 51l SUSE 11-Based Systems on page 51l SUSE 12-Based Systems on page 51
Red Hat 6-Based SystemsRed Hat 6-based systems use iptables as the default firewall software For theip6tables service replace all occurrences of iptables with ip6tables in theexample If you use different firewall software refer to your firewalldocumentation for opening ports in your firewallThe following is an example of adding port 1234 when using iptables
[root] iptables-save gt tmpiptablesmod
[root] vi tmpiptablesmod
Add the following lines immediately before the line matching -A INPUT -j REJECT --reject-with icmp-host-prohibited
-A INPUT -p tcp --dport 1234 -j ACCEPT
[root] iptables-restore lt tmpiptablesmod[root] service iptables save
Chapter 2 Overview
50 Advanced Configuration
Manual Setup of Initial Server Configuration 51
Red Hat 7-Based SystemsRed Hat 7-based systems use firewalld as the default firewall software If youuse different firewall software refer to your firewall documentation foropening ports in your firewallThe following is an example of adding port 1234 when using firewalld
[root] firewall-cmd --add-port=1234tcp --permanent[root] firewall-cmd --reload
SUSE 11-Based SystemsSUSE 11-based systems use SuSEfirewall2 as the default firewall software Ifyou use different firewall software refer to your firewall documentation foropening ports in your firewallThe following is an example of adding port 1234 when using SuSEfirewall2
[root] vi etcsysconfigSuSEfirewall2
FW_SERVICES_EXT_TCP=1234
[root] service SuSEfirewall2_setup restart
SUSE 12-Based SystemsSUSE 12-based systems use SuSEfirewall2 as the default firewall software Ifyou use different firewall software refer to your firewall documentation foropening ports in your firewallThe following is an example of adding port 1234 when using SuSEfirewall2
[root] vi etcsysconfigSuSEfirewall2
FW_SERVICES_EXT_TCP=1234
[root] service SuSEfirewall2 restart
Manual Setup of Initial Server ConfigurationOn a new installation of Torque the server database must be initialized usingthe command pbs_server -t create This command creates a file in$TORQUE_HOMEserver_priv named serverdb which contains the serverconfiguration informationThe following output from qmgr shows the base configuration created by thecommand pbs_server -t create
Chapter 2 Overview
qmgr -c p sSet server attributesset server acl_hosts = kmnset server log_events = 511set server mail_from = admset server node_check_rate = 150set server tcp_timeout = 6
This is a bare minimum configuration and it is not very useful By using qmgrthe server configuration can be modified to set up Torque to do useful workThe following qmgr commands will create a queue and enable the server toaccept and run jobs These commandsmust be executed by root
pbs_server -t createqmgr -c set server scheduling=trueqmgr -c create queue batch queue_type=executionqmgr -c set queue batch started=trueqmgr -c set queue batch enabled=trueqmgr -c set queue batch resources_defaultnodes=1qmgr -c set queue batch resources_defaultwalltime=3600qmgr -c set server default_queue=batch
When Torque reports a new queue to Moab a class of the same name isautomatically applied to all nodes
In this example the configuration database is initialized and the schedulinginterface is activated using (scheduling=true) This option allows thescheduler to receive job and node events which allow it to be more responsive(See scheduling for more information) The next command creates a queueand specifies the queue type Within PBS the queue must be declared anexecution queue in order for it to run jobs Additional configuration (iesetting the queue to started and enabled) allows the queue to accept jobsubmissions and launch queued jobsThe next two lines are optional setting default node and walltime attributesfor a submitted job These defaults will be picked up by a job if values are notexplicitly set by the submitting user The final line default_queue=batch isalso a convenience line and indicates that a job should be placed in the batchqueue unless explicitly assigned to another queueAdditional information on configuration can be found in the admin manual andin the qmgrmain page
Related TopicsTorque Installation Overview
Chapter 2 Overview
52 Manual Setup of Initial Server Configuration
Server Node File Configuration 53
Server Node File ConfigurationThis section contains information about configuring server node files Itexplains how to specify node virtual processor counts and GPU counts as wellas how to specify node features or properties See these topics for details
l Basic Node Specificationl Specifying Virtual Processor Count for a Nodel Specifying GPU Count for a Nodel Specifying Node Features (Node Properties)
Related TopicsTorque Installation OverviewServer ParametersNode FeaturesNode Properties
Basic Node SpecificationFor the pbs_server to communicate with each of the MOMs it needs to knowwhich machines to contact Each node that is to be a part of the batch systemmust be specified on a line in the server nodes file This file is located atTORQUE_HOMEserver_privnodes In most cases it is sufficient to specifyjust the node name on a line as in the following exampleserver_privnodes
node001node002node003node004
The server nodes file also displays the parameters applied to the nodeSee Adding nodes for more information on the parameters
Related TopicsServer Node File Configuration
Specifying Virtual Processor Count for a NodeBy default each node has one virtual processor Increase the number using thenp attribute in the nodes file The value of np can be equal to the number ofphysical cores on the node or it can be set to a value which represents availableexecution slots for the node The value used is determined by theadministrator based on hardware system and site criteria
Chapter 2 Overview
The following example shows how to set the np value in the nodes file In thisexample we are assuming that node001 and node002 have four physicalcores The administrator wants the value of np for node001 to reflect that it hasfour cores However node002 will be set up to handle multiple virtualprocessors without regard to the number of physical cores on the systemserver_privnodes
node001 np=4node002 np=12
Related TopicsServer Node File Configuration
Specifying GPU Count for a NodeAdministrators can manually set the number of GPUs on a node or if they areusing NVIDIA GPUs and drivers they can have them detected automaticallyFor more information about how to set up Torque with GPUS see Acceleratorsin the Moab Workload Manager Administrator GuideTo manually set the number of GPUs on a node use the gpus attribute in thenodes file The value of GPUs is determined by the administrator based onhardware system and site criteriaThe following example shows how to set the GPU value in the nodes file In theexample we assume node01 and node002 each have two physical GPUs Theadministrator wants the value of node001 to reflect the physical GPUs availableon that system and adds gpus=2 to the nodes file entry for node001 Howevernode002 will be set up to handle multiple virtual GPUs without regard to thenumber of physical GPUs on the systemserver_privnodes
node001 gpus=1node002 gpus=4
Related TopicsServer Node File Configuration
Specifying Node Features (Node Properties)Node features can be specified by placing one or more white space-delimitedstrings on the line for the associated host as in the following exampleserver_privnodes
Chapter 2 Overview
54 Server Node File Configuration
Testing Server Configuration 55
node001 np=2 fast ia64node002 np=4 bigmem fast ia64 smp
These features can be used by users to request specific nodes when submittingjobs For example
qsub -l nodes=1bigmem+1fast jobsh
This job submission will look for a node with the bigmem feature (node002)and a node with the fast feature (either node001 or node002)
Related TopicsServer Node File Configuration
Testing Server ConfigurationIf you have initialized Torque using the torquesetup script or started Torqueusing pbs_server -t create and pbs_server is still running terminate the serverby calling qterm Next start pbs_server again without the -t createarguments Follow the script below to verify your server configuration Theoutput for the examples below is based on the nodes file example in Specifyingnode features and Server configuration
Chapter 2 Overview
verify all queues are properly configuredgt qstat -q
serverkmn
Queue Memory CPU Time Walltime Node Run Que Lm State----- ------ -------- -------- ---- --- --- -- -----batch -- -- -- -- 0 0 -- ER --- --- 0 0
view additional server configurationgt qmgr -c p s Create queues and set their attributes Create and define queue batchcreate queue batchset queue batch queue_type = Executionset queue batch resources_defaultnodes = 1set queue batch resources_defaultwalltime = 010000set queue batch enabled = Trueset queue batch started = True Set server attributesset server scheduling = Trueset server acl_hosts = kmnset server managers = user1kmnset server operators = user1kmnset server default_queue = batchset server log_events = 511set server mail_from = admset server node_check_rate = 150set server tcp_timeout = 300set server job_stat_rate = 45set server poll_jobs = Trueset server mom_job_sync = Trueset server keep_completed = 300set server next_job_number = 0
verify all nodes are correctly reportinggt pbsnodes -anode001 state=free np=2 properties=bigmemfastia64smp ntype=cluster status=rectime=1328810402varattr=jobs=state=freenetload=6814326158gres=loadave=021ncpus=6physmem=8193724kbavailmem=13922548kbtotmem=16581304kbidletime=3nusers=3nsessions=18sessions=18761120 1912 1926 1937 1951 2019 2057 28399 2126 2140 2323 5419 17948 19356 27726 2225429569uname=Linux kmn 2638-11-generic 48-Ubuntu SMP Fri Jul 29 190255 UTC 2011x86_64opsys=linux mom_service_port = 15002 mom_manager_port = 15003 gpus = 0 submit a basic job - DO NOT RUN AS ROOTgt su - testusergt echo sleep 30 | qsub
verify jobs displaygt qstat
Job id Name User Time Use S Queue------ ----- ---- -------- -- -----
Chapter 2 Overview
56 Testing Server Configuration
Configuring Torque for NUMA Systems 57
0kmn STDIN knielson 0 Q batch
At this point the job should be in the Q state and will not run because ascheduler is not running yet Torque can use its native scheduler by runningpbs_sched or an advanced scheduler (such as Moab Workload Manager) SeeIntegrating schedulers for details on setting up an advanced scheduler
Related TopicsTorque Installation Overview
Configuring Torque for NUMA SystemsTorque supports these two types of Non-Uniform Memory Architecture (NUMA)systems
l NUMA-Aware ndash For Torque 60 and later supports multi-req jobs and jobsthat span hosts Requires the --enable-cgroups configurationcommand to support cgroups See Torque NUMA-Aware Configuration onpage 57 for instructions and additional information
l NUMA-Support ndash For Torque version 30 and later only for large-scaleSLES systems (SGI Altix and UV hardware) Requires the--enable-numa-support configuration command See Torque NUMA-Support Configuration on page 60 for instructions and additionalinformation
Torque cannot be configured for both systems at the same
Related Topics
l Torque NUMA-Aware Configuration on page 57l Torque NUMA-Support Configuration on page 60
Torque NUMA-Aware ConfigurationThis topic provides instructions for enabling NUMA-aware including cgroupsand requires Torque 60 or later For instructions on NUMA-supportconfigurations see Torque NUMA-Support Configuration on page 60 Thistopic assumes you have a basic understanding of cgroups See RedHatResource Management Guide (httpsaccessredhatcomdocumentationen-USRed_Hat_Enterprise_Linux6htmlResource_Management_Guidech01html) or cgroups on kernelorg(httpswwwkernelorgdocDocumentationcgroup-v1cgroupstxt) for basicinformation on cgroups
Chapter 2 Overview
Torque uses cgroups to better manage cpu and memory accounting memoryenforcement cpuset management and binding jobs to devices such as MICsand GPUs
Be aware of the followingl If you are building with cgroups enabled you must have boost version141 or later
l The pbs_mom daemon is the binary that interacts cgroups but both theserver and the MOMmust be built with --enable-cgroups to understandall of the new structures
l Beginning with Torque 602 Cray-enabled Torque may be configuredwith cgroups On the login node each job will have all of the cpus and allof the memory controllers in its cgroup
Prerequisites1 Install the prerequisites found in Installing Torque Resource Manager2 hwloc version 191 or later is required Version 1110 is needed if installingwith NVIDIA K80 or newer GPU hardwarel download hwloc-191targz from httpswwwopen-mpiorgsoftwarehwlocv19
l perform the following command line actions
$ tar -xzvf hwloc-191targz$ cd hwloc-191targz$ sudo configure
l You do not need to overwrite the default installation of hwloc By defaulthwloc will install to the usrlocal directory You can also configure hwlocwith the --prefix option to have it install to a location of your choosing Ifyou do not install hwloc to usr directory you can tell Torque where to findthe version you want it to use at configure time using the --with-hwloc-path option For example
configure --enable-cgroups --with-hwloc-path=usrlocal
l Run makel sudo make install
Installation InstructionsDo the following
Chapter 2 Overview
58 Configuring Torque for NUMA Systems
Configuring Torque for NUMA Systems 59
1 Install the libcgroup package
Red Hat-based Systemsmust use libcgroup version 040rc1-16el6 orlater SUSE-based systems need to use a comparative libcgroupversion
l Red Hat 6-based systems
yum install libcgroup
l Red Hat 7-based systems
yum install libcgroup-tools
l SUSE 11-based systems
zypper install libcgroup1
l SUSE 12-based systems
zypper install libcgroup-tools
2 Enable Torque to access cgroups
$ configure --enable-cgroups --with-hwloc-path=usrlocal
3 For a Red Hat 6-based system or a SUSE 11-based system on each TorqueMOMHost confirm that cgroups have been mounted if not mount thema Run lssubsys -amb If the command is not found or you do not see something similar to thefollowing then cgroups are notmounted continue with theseinstructions
nsperf_eventnet_priocpuset cgroupcpusetcpu cgroupcpucpuacct cgroupcpuacctmemory cgroupmemorydevices cgroupdevicesfreezer cgroupfreezernet_cls cgroupnet_clsblkio cgroupblkio
c For Red Hat 6-based systems install the cgroup library package andmount cgroups
[root] yum install libcgroup[root] service cgconfig start[root] chkconfig cgconfig on
Chapter 2 Overview
d For SUSE 11-based systems do the followingi Install the cgroup library package
[root] zypper install libcgroup1
ii Edit etccgconfigconf and add the following
mount devices = mntcgroupsdevicescpuset = mntcgroupscpusetcpu = mntcgroupscpucpuacct = mntcgroupscpuacctmemory = mntcgroupsmemory
iii Mount cgroups
[root] service cgconfig start[root] chkconfig cgconfig on
e Run lssubsys -am again and confirm cgroups are mounted
Multiple cgroup Directory ConfigurationIf your system hasmore than one cgroup directory configured you mustcreate the trq-cgroup-paths file in the $TORQUE_HOME directory This filehas a list of the cgroup subsystems and the mount points for each subsystem inthe syntax of ltsubsystemgt ltmount pointgtAll five subsystems used by pbs_mom must be in the trq-cgroup-paths fileIn the example that follows a directory exists at cgroup with subdirectories foreach subsystem Torque uses this file first to configure where it will look forcgroups
cpuset cgroupcpusetcpuacct cgroupcpuacctcpu cgroupcpumemory cgroupmemorydevices cgroupdevices
Torque NUMA-Support Configuration
This topic provides instructions for enabling NUMA-support on large-scaleSLES systems using SGI Altix and UV hardware and requires Torque 30 orlater For instructions on enabling NUMA-aware see Torque NUMA-AwareConfiguration on page 57
Do the following in order
Chapter 2 Overview
60 Configuring Torque for NUMA Systems
Configuring Torque for NUMA Systems 61
l Configure Torque for NUMA-Supportl Create the momlayout Filel Configure the server_privnodes Filel Limit Memory Resources (Optional)
Configure Torque for NUMA-SupportTo turn on NUMA-support for Torque the --enable-numa-support optionmust be used during the configure portion of the installation In addition to anyother configuration options add the --enable-numa-support option asindicated in the following example
$ configure --enable-numa-support
Dont use MOM hierarchy with NUMA
When Torque is enabled to run with NUMA support there is only a singleinstance of pbs_mom (MOM) that is run on the system However Torque willreport that there are multiple nodes running in the cluster While pbs_mom andpbs_server both know there is only one instance of pbs_mom theymanage thecluster as if there were multiple separate MOM nodesThe momlayout file is a virtual mapping between the system hardwareconfiguration and how the administrator wants Torque to view the systemEach line in momlayout equates to a node in the cluster and is referred to as aNUMA node
Create the momlayout FileThis section provides instructions to create the momlayout fileDo one of the following
l Automatically Create momlayout (Recommended) on page 61l Manually Create momlayout on page 62
Automatically Create momlayout (Recommended)A perl script named mom_gencfg is provided in the contrib directory thatgenerates the momlayout file for you The script can be customized by settinga few variables in itTo automatically create the momlayout file do the following1 Verify hwloc library and corresponding hwloc-devel package are installedSee Installing Torque Resource Manager for more information
2 Install SysHwloc from CPAN
Chapter 2 Overview
3 Verify $PBS_HOME is set to the proper value4 Update the variables in the Config Definitions section of the scriptEspecially update firstNodeId and nodesPerBoard if desired ThefirstNodeId variable should be set above 0 if you have a root cpuset thatyou wish to exclude and the nodesPerBoard variable is the number of NUMAnodes per board Each node is defined in sysdevicessystemnode in asubdirectory nodeltnode indexgt
5 Back up your current file in case a variable is set incorrectly or neglected6 Run the script
$ mom_gencfg
Manually Create momlayoutTo properly set up the momlayout file it is important to know how thehardware is configured Use the topology command line utility and inspect thecontents of sysdevicessystemnode The hwloc library can also be usedto create a custom discovery toolTyping topology on the command line of a NUMA system produces somethingsimilar to the following
Partition number 06 Blades72 CPUs37843 Gb Memory Total
Blade ID asic NASID Memory------------------------------------------------- 0 r001i01b00 UVHub 10 0 67089152 kB 1 r001i01b01 UVHub 10 2 67092480 kB 2 r001i01b02 UVHub 10 4 67092480 kB 3 r001i01b03 UVHub 10 6 67092480 kB 4 r001i01b04 UVHub 10 8 67092480 kB 5 r001i01b05 UVHub 10 10 67092480 kB
CPU Blade PhysID CoreID APIC-ID Family Model Speed L1(KiB) L2(KiB) L3(KiB)------------------------------------------------------------------------------- 0 r001i01b00 00 00 0 6 46 2666 32d32i 256 18432 1 r001i01b00 00 02 4 6 46 2666 32d32i 256 18432 2 r001i01b00 00 03 6 6 46 2666 32d32i 256 18432 3 r001i01b00 00 08 16 6 46 2666 32d32i 256 18432 4 r001i01b00 00 09 18 6 46 2666 32d32i 256 18432 5 r001i01b00 00 11 22 6 46 2666 32d32i 256 18432 6 r001i01b00 01 00 32 6 46 2666 32d32i 256 18432 7 r001i01b00 01 02 36 6 46 2666 32d32i 256 18432 8 r001i01b00 01 03 38 6 46 2666 32d32i 256 18432 9 r001i01b00 01 08 48 6 46 2666 32d32i 256 18432 10 r001i01b00 01 09 50 6 46 2666 32d32i 256 18432 11 r001i01b00 01 11 54 6 46 2666 32d32i 256 18432 12 r001i01b01 02 00 64 6 46 2666 32d32i 256 18432 13 r001i01b01 02 02 68 6 46 2666 32d32i 256 18432 14 r001i01b01 02 03 70 6 46 2666 32d32i 256 18432
From this partial output note that this system has 72 CPUs on 6 blades Eachblade has 12 CPUs grouped into clusters of 6 CPUs If the entire content of thiscommand were printed you would see each Blade ID and the CPU ID assignedto each blade
Chapter 2 Overview
62 Configuring Torque for NUMA Systems
Configuring Torque for NUMA Systems 63
The topology command shows how the CPUs are distributed but you likely alsoneed to know where memory is located relative to CPUs so go tosysdevicessystemnode If you list the node directory you will seesomething similar to the following
ls -altotal 0drwxr-xr-x 14 root root 0 Dec 3 1214 drwxr-xr-x 14 root root 0 Dec 3 1213 -r--r--r-- 1 root root 4096 Dec 3 1458 has_cpu-r--r--r-- 1 root root 4096 Dec 3 1458 has_normal_memorydrwxr-xr-x 2 root root 0 Dec 3 1214 node0drwxr-xr-x 2 root root 0 Dec 3 1214 node1drwxr-xr-x 2 root root 0 Dec 3 1214 node10drwxr-xr-x 2 root root 0 Dec 3 1214 node11drwxr-xr-x 2 root root 0 Dec 3 1214 node2drwxr-xr-x 2 root root 0 Dec 3 1214 node3drwxr-xr-x 2 root root 0 Dec 3 1214 node4drwxr-xr-x 2 root root 0 Dec 3 1214 node5drwxr-xr-x 2 root root 0 Dec 3 1214 node6drwxr-xr-x 2 root root 0 Dec 3 1214 node7drwxr-xr-x 2 root root 0 Dec 3 1214 node8drwxr-xr-x 2 root root 0 Dec 3 1214 node9-r--r--r-- 1 root root 4096 Dec 3 1458 online-r--r--r-- 1 root root 4096 Dec 3 1458 possible
The directory entries node0 node1node11 represent groups of memoryand CPUs local to each other These groups are a node board a grouping ofresources that are close together In most cases a node board is made up ofmemory and processor cores Each bank of memory is called a memory nodeby the operating system and there are certain CPUs that can access thatmemory very rapidly Note under the directory for node board node0 thatthere is an entry called cpulist This contains the CPU IDs of all CPUs local tothe memory in node board 0Now create the momlayout file The content of cpulist 0-5 are local to thememory of node board 0 and the memory and cpus for that node are specifiedin the layout file by saying nodes=0 The cpulist for node board 1 shows 6-11and memory node index 1 To specify this simply write nodes=1 Repeat thisfor all twelve node boards and create the following momlayout file for the 72CPU system
nodes=0nodes=1nodes=2nodes=3nodes=4nodes=5nodes=6nodes=7nodes=8nodes=9nodes=10nodes=11
Each line in the momlayout file is reported as a node to pbs_server by the pbs_mom daemon
Chapter 2 Overview
The momlayout file does not need to match the hardware layout exactly It ispossible to combine node boards and create larger NUMA nodes The followingexample shows how to do this
nodes=0-1
The memory nodes can be combined the same as CPUs The memory nodescombined must be contiguous You cannot combine mem 0 and 2
Configure the server_privnodes FileThe pbs_server requires awareness of how the MOM is reporting nodes sincethere is only one MOM daemon and multiple MOM nodesYou need to configure the server_privnodes file with the num_node_boards and numa_board_str attributes The attribute num_node_boardstells pbs_server howmany numa nodes are reported by the MOMThe following is an example of how to configure the nodes file with num_node_boards
numa-10 np=72 num_node_boards=12
In this example the nodes file tells pbs_server there is a host named numa-10and that it has 72 processors and 12 nodes The pbs_server divides the value ofnp (72) by the value for num_node_boards (12) and determines there are 6CPUs per NUMA nodeThe previous example showed that the NUMA system is uniform in itsconfiguration of CPUs per node board However a system does not need to beconfigured with the same number of CPUs per node board For systems withnon-uniform CPU distributions use the attribute numa_board_str to let pbs_server know where CPUs are located in the clusterThe following is an example of how to configure the server_privnodes filefor non-uniformly distributed CPUs
Numa-11 numa_board_str=6812
In this example pbs_server knows it has 3 MOM nodes and the nodes have 6 8and 12 CPUs respectively Notice that the attribute np is not used The npattribute is ignored because the number of CPUs per node is expressly given
Limit Memory Resources (Optional)Torque can better enforce memory limits with the use of the memacctd utilityThe memacctd utility is a daemon that caches memory footprints when it isqueried When configured to use the memorymonitor Torque queriesmemacctd
Chapter 2 Overview
64 Configuring Torque for NUMA Systems
Torque Multi-MOM 65
The memacctd utility is provided by SGI for SLES systems only It is up tothe user to make sure memacctd is installed See the SGI memacctd manpage for more information
To configure Torque to use memacctd for memory enforcement do thefollowing1 Startmemacctd as instructed by SGI2 Reconfigure Torque with --enable-memacct This will link in the necessarylibrary when Torque is recompiled
3 Recompile and reinstall Torque4 Restart all MOM nodes
You use the qsub filter to include a default memory limit for all jobs thatare not submitted with memory limit
TorqueMulti-MOMStarting in Torque version 30 users can run multiple MOMs on a single nodeThe initial reason to develop a multiple MOM capability was for testingpurposes A small cluster can be made to look larger since each MOM instanceis treated as a separate nodeWhen running multiple MOMs on a node each MOMmust have its own serviceand manager ports assigned The default ports used by the MOM are 15002and 15003 With the multi-mom alternate ports can be used without the needto change the default ports for pbs_server even when running a single instanceof the MOMFor details see these topics
l Multi-MOM Configurationl Stopping pbs_mom in Multi-MOMMode
Multi-MOM ConfigurationThere are three steps to setting up multi-MOM capability1 Configure server_privnodes2 etchosts file3 Starting pbs_mom with Multi-MOMOptions
Chapter 2 Overview
Configure server_privnodesThe attributesmom_service_port andmom_manager_portwere added tothe nodes file syntax to accommodate multiple MOMs on a single node Bydefault pbs_mom opens ports 15002 and 15003 for the service andmanagement ports respectively For multiple MOMs to run on the same IPaddress they need to have their own port values so they can be distinguishedfrom each other pbs_server learns about the port addresses of the differentMOMs from entries in the server_privnodes file The following is anexample of a nodes file configured for multiple MOMs
hosta np=2hosta-1 np=2 mom_service_port=30001 mom_manager_port=30002hosta-2 np=2 mom_service_port=31001 mom_manager_port=31002hosta-3 np=2 mom_service_port=32001 mom_manager_port=32002
Note that all entries have a unique host name and that all port values are alsounique The entry hosta does not have a mom_service_port or mom_manager_port given If unspecified then the MOM defaults to ports 15002 and15003
etchosts fileHost names in the server_privnodes file must be resolvable Creating analias for each host enables the server to find the IP address for each MOM theserver uses the port values from the server_privnodes file to contact thecorrect MOM An example etchosts entry for the previous server_privnodes example might look like the following
192657310 hosta hosta-1 hosta-2 hosta-3
Even though the host name and all the aliases resolve to the same IP addresseach MOM instance can still be distinguished from the others because of theunique port value assigned in the server_privnodes file
Starting pbs_mom with Multi-MOM OptionsTo start multiple instances of pbs_mom on the same node use the followingsyntax (see pbs_mom for details)
pbs_mom -m -M ltport value of MOM_service_portgt -R ltport value of MOM_manager_portgt -Altname of MOM aliasgt
Continuing based on the earlier example if you want to create four MOMs onhosta type the following at the command line
pbs_mom -m -M 30001 -R 30002 -A hosta-1 pbs_mom -m -M 31001 -R 31002 -A hosta-2 pbs_mom -m -M 32001 -R 32002 -A hosta-3 pbs_mom
Chapter 2 Overview
66 Torque Multi-MOM
Torque Multi-MOM 67
Notice that the last call to pbs_mom uses no arguments By default pbs_momopens on ports 15002 and 15003 No arguments are necessary because thereare no conflicts
Related TopicsTorque Multi-MOMStopping pbs_mom in Multi-MOM Mode
Stopping pbs_mom in Multi-MOM ModeTerminate pbs_mom by using the momctl -s command (for details seemomctl) For any MOM using the default manager port 15003 the momctl -scommand stops the MOM However to terminate MOMs with a manager portvalue not equal to 15003 you must use the following syntax
momctl -s -p ltport value of MOM_manager_portgt
The -p option sends the terminating signal to the MOMmanager port and theMOM is terminated
Related TopicsTorque Multi-MOMMulti-MOM Configuration
Chapter 2 Overview
68 Torque Multi-MOM
Job Submission 69
Chapter 3 Submitting and Managing Jobs
This section contains information about how you can submit and manage jobswith Torque See the following topics for details
l Job Submissionl Monitoring Jobsl Canceling Jobsl Job Preemptionl Keeping Completed Jobsl Job Checkpoint and Restartl Job Exit Statusl Service Jobs
Job SubmissionJob submission is accomplished using the qsub command which takes anumber of command line arguments and integrates such into the specified PBScommand file The PBS command file may be specified as a filename on theqsub command line or may be entered via STDIN
l The PBS command file does not need to be executablel The PBS command file may be piped into qsub (ie cat pbscmd |qsub)
l In the case of parallel jobs the PBS command file is staged to andexecuted on the first allocated compute node only (Use pbsdsh to runactions on multiple nodes)
l The command script is executed from the users home directory in allcases (The script may determine the submission directory by using the$PBS_O_WORKDIR environment variable)
l The command script will be executed using the default set of userenvironment variables unless the -V or -v flags are specified to includeaspects of the job submission environment
l PBS directives should be declared first in the job script
Chapter 3 Submitting and Managing Jobs
PBS -S binbashPBS -m abePBS -M ltyourEmailcompanycomgtecho sleep 300
This is an example of properly declared PBS directives
PBS -S binbashSOMEVARIABLE=42PBS -m abePBS -M ltyourEmailcompanycomgtecho sleep 300
This is an example of improperly declared PBS directives PBS directives belowSOMEVARIABLE=42 are ignored
By default job submission is allowed only on the Torque server host (hoston which pbs_server is running) Enablement of job submission fromother hosts is documented in Server Configuration
Versions of Torque earlier than 245 attempted to apply queue andserver defaults to a job that didnt have defaults specified If a setting stilldid not have a value after that Torque applied the queue and servermaximum values to a job (meaning the maximum values for anapplicable setting were applied to jobs that had no specified or defaultvalue)In Torque 245 and later the queue and server maximum values are nolonger used as a value for missing settings
This section contains these topicsl Multiple Job Submissionl Requesting Resourcesl Requesting Generic Resourcesl Requesting Floating Resourcesl Requesting Other Resourcesl Exported Batch Environment Variablesl Enabling Trusted Submit Hostsl Example Submit Scripts
Related TopicsMaui DocumentationhttpwwwlunarclusehttpwwwclustersumaineeduwikiindexphpExample_Submission_ScriptsJob Submission Filter (qsub Wrapper) ndash Allow local checking and modification of submitted job
Chapter 3 Submitting and Managing Jobs
70 Job Submission
Job Submission 71
Multiple Job SubmissionSometimes users will want to submit large numbers of jobs based on the samejob script Rather than using a script to repeatedly call qsub a feature known asjob arrays now exists to allow the creation of multiple jobs with one qsubcommand Additionally this feature includes a new job naming convention thatallows users to reference the entire set of jobs as a unit or to reference oneparticular job from the setJob arrays are submitted through the -t option to qsub or by using PBS -t inyour batch script This option takes a comma-separated list consisting of eithera single job ID number or a pair of numbers separated by a dash Each ofthese jobs created will use the same script and will be running in a nearlyidentical environment
gt qsub -t 0-4 job_script1098[]hostname
gt qstat -t1098[0]hostname 1098[1]hostname 1098[2]hostname 1098[3]hostname 1098[4]hostname
Versions of Torque earlier than 23 had different semantics for the -targument In these versions -t took a single integer numbermdasha count ofthe number of jobs to be created
Each 1098[x] job has an environment variable called PBS_ARRAYID which isset to the value of the array index of the job so 1098[0]hostname would havePBS_ARRAYID set to 0 This allows you to create job arrays where each job inthe array performs slightly different actions based on the value of this variablesuch as performing the same tasks on different input files One otherdifference in the environment between jobs in the same array is the value ofthe PBS_JOBNAME variable
These two examples are equivalent in Torque 22gt qsub -t 0-99gt qsub -t 100
You can also pass comma delimited lists of ids and rangesgt qsub -t 010203040gt qsub -t 0-50607080
Running qstat displays a job summary which provides an overview of thearrays state To see each job in the array run qstat -tThe qalter qdel qhold and qrls commands can operate on arraysmdasheitherthe entire array or a range of that array Additionally any job in the arraymaybe accessed normally by using that jobs ID just as you would with any otherjob For example running the following command would run only the specifiedjob
Chapter 3 Submitting and Managing Jobs
qrun 1098[0]hostname
Slot LimitThe slot limit is a way for administrators to limit the number of jobs from a jobarray that can be eligible for scheduling at the same time When a slot limit isused Torque puts a hold on all jobs in the array that exceed the slot limitWhen an eligible job in the array completes Torque removes the hold flagfrom the next job in the array Slot limits can be declared globally with themax_slot_limit parameter or on a per-job basis with qsub -t
Related TopicsJob Submission
Managing Multi-Node JobsBy default when a multi-node job runs the Mother Superior manages the jobacross all the sister nodes by communicating with each of them and updatingpbs_server Each of the sister nodes sends its updates and stdout and stderrdirectly to the Mother Superior When you run an extremely large job usinghundreds or thousands of nodes you may want to reduce the amount ofnetwork traffic sent from the sisters to the Mother Superior by specifying a jobradix Job radix sets a maximum number of nodes with which the MotherSuperior and resulting intermediate MOMs communicate and is specified usingthe -W option for qsubFor example if you submit a smaller 12-node job and specify job_radix=3Mother Superior and each resulting intermediate MOM is only allowed toreceive communication from 3 subordinate nodes
Chapter 3 Submitting and Managing Jobs
72 Job Submission
Job Submission 73
Image 3-1 Job radix example
The Mother Superior picks three sister nodes with which to communicate thejob information Each of those nodes (intermediate MOMs) receives a list of allsister nodes that will be subordinate to it They each contact up to three nodesand pass the job information on to those nodes This pattern continues until thebottom level is reached All communication is now passed across this newhierarchy The stdout and stderr data is aggregated and sent up the tree until itreaches the Mother Superior where it is saved and copied to the o and efiles
Job radix is meant for extremely large jobs only It is a tunable parameterand should be adjusted according to local conditions in order to producethe best results
Requesting ResourcesVarious resources can be requested at the time of job submission A job canrequest a particular node a particular node attribute or even a number ofnodes with particular attributes Either native Torque resources or externalscheduler resource extensions may be specifiedqsub -l supports
l All the native Torque resources See Native Torque Resources on page 74for a list of resources
Chapter 3 Submitting and Managing Jobs
l Some Moab scheduler job extensions (for legacy support) See Moab JobExtensions on page 82 for a list of resources
For Moab resource extensions qsub -W x= is recommendedinstead of qsub -l See Resource Manager Extensions in the MoabWorkload ManagerAdministrator Guide for a complete list ofscheduler-only job extensions
Native Torque ResourcesThe native Torque resources are listed in the following table
Resource Format Description
arch string Specifies the administrator defined system architecture required Thisdefaults to whatever the PBS_MACH string is set to in localmk
cput seconds or[[HH]MM]SS
Maximum amount of CPU time used by all processes in the job
Chapter 3 Submitting and Managing Jobs
74 Job Submission
Job Submission 75
Resource Format Description
cpuclock string Specify the CPU clock frequency for each node requested for this job Acpuclock request applies to every processor on every node in the requestSpecifying varying CPU frequencies for different nodes or different processorson nodes in a single job request is not supportedNot all processors support all possible frequencies or ACPI states If therequested frequency is not supported by the CPU the nearest frequency isusedALPS 14 or later is required when using cpuclock on CrayThe clock frequency can be specified via
l a number that indicates the clock frequency (with or without the SIunit suffix)
qsub -l cpuclock=1800nodes=2 scriptshqsub -l cpuclock=1800mhznodes=2 scriptsh
This job requests 2 nodes and specifies their CPU frequenciesshould be set to 1800 MHz
l a Linux power governor policy name The governor names areo performance This governor instructs Linux to operate each
logical processor at its maximum clock frequencyThis setting consumes the most power and workload executesat the fastest possible speed
o powersave This governor instructs Linux to operate eachlogical processor at its minimum clock frequencyThis setting executes workload at the slowest possible speedThis setting does not necessarily consume the least amount ofpower since applications execute slower and may actuallyconsume more energy because of the additional time neededto complete the workloads execution
o ondemand This governor dynamically switches the logicalprocessors clock frequency to the maximum value whensystem load is high and to the minimum value when thesystem load is lowThis setting causes workload to execute at the fastest possiblespeed or the slowest possible speed depending on OS loadThe system switches between consuming the most power andthe least power
Chapter 3 Submitting and Managing Jobs
Resource Format Description
The power saving benefits of ondemand might benon-existent due to frequency switching latency if thesystem load causes clock frequency changes too oftenThis has been true for older processors since changingthe clock frequency required putting the processor intothe C3 sleep state changing its clock frequency andthen waking it up all of which required a significantamount of timeNewer processors such as the Intel Xeon E5-2600Sandy Bridge processors can change clock frequencydynamically and much faster
o conservative This governor operates like the ondemandgovernor but is more conservative in switching betweenfrequencies It switches more gradually and uses all possibleclock frequenciesThis governor can switch to an intermediate clock frequency ifit seems appropriate to the system load and usage which theondemand governor does not do
qsub -l cpuclock=performancenodes=2 scriptsh
This job requests 2 nodes and specifies their CPU frequenciesshould be set to the performance power governor policy
l an ACPI performance state (or P-state) with or without the P prefix P-states are a special range of values (0-15) that map to specificfrequencies Not all processors support all 16 states however they allstart at P0 P0 sets the CPU clock frequency to the highestperformance state which runs at the maximum frequency P15 setsthe CPU clock frequency to the lowest performance state which runsat the lowest frequency
qsub -l cpuclock=3nodes=2 scriptshqsub -l cpuclock=p3nodes=2 scriptsh
This job requests 2 nodes and specifies their CPU frequenciesshould be set to a performance state of 3
When reviewing job or node properties when cpuclock was used be mindfulof unit conversion The OS reports frequency in Hz not MHz or GHz
Chapter 3 Submitting and Managing Jobs
76 Job Submission
Job Submission 77
Resource Format Description
epilogue string Specifies a user owned epilogue script which will be run before the systemepilogue and epilogueuser scripts at the completion of a job The syntax isepilogue=ltfilegt The file can be designated with an absolute or relativepathFor more information see Prologue and Epilogue Scripts
feature string Specifies a property or feature for the job Feature corresponds to Torquenode properties and Moab features
qsub scriptsh -l procs=10feature=bigmem
file size Sets RLIMIT_FSIZE for each process launched through the TM interfaceSee FILEREQUESTISJOBCENTRIC for information on how Moab schedules
host string Name of the host on which the job should be run This resource is providedfor use by the sites scheduling policy The allowable values and effect on jobplacement is site dependent
mem size Maximum amount of physical memory used by the job Ignored on DarwinDigital Unix Free BSD HPUX 11 IRIX NetBSD and SunOS Not implementedon AIX and HPUX 10The mem resource will only work for single-node jobs If your job requiresmultiple nodes use pmem instead
ncpus integer The number of processors in one task where a task cannot span nodes
You cannot request both ncpus and nodes in the same job
nice integer Number between -20 (highest priority) and 19 (lowest priority) Adjust theprocess execution priority
Chapter 3 Submitting and Managing Jobs
Resource Format Description
nodes ltnode_countgt |lthostnamegt[ppn=ltppngt][gpus=ltgpugt][ltpropertygt[ltpropertygt]][+ ]
Number andor type of nodes to be reserved for exclusive use by the job Thevalue is one or more node_specs joined with the + (plus) character node_spec[+node_spec] Each node_spec is a number of nodes required of the typedeclared in the node_spec and a name of one or more properties desired forthe nodes The number the name and each property in the node_spec areseparated by a (colon) If no number is specified one (1) is assumed Thename of a node is its hostname The properties of nodes are
l ppn= - Specify the number of virtual processors per node requestedfor this jobThe number of virtual processors available on a node by default is 1but it can be configured in the TORQUE_HOMEserver_privnodesfile using the np attribute (see Server Node File Configuration) Thevirtual processor can relate to a physical core on the node or it can beinterpreted as an execution slot such as on sites that set the node npvalue greater than the number of physical cores (or hyper-threadcontexts) The ppn value is a characteristic of the hardware systemand site and its value is to be determined by the administrator
l gpus= - Specify the number of GPUs per node requested for this jobThe number of GPUs available on a node can be configured in theTORQUE_HOMEserver_privnodes file using the gpu attribute (seeServer Node File Configuration) The GPU value is a characteristic ofthe hardware system and site and its value is to be determined bythe administrator
l property - A string assigned by the system administrator specifying anodes features Check with your administrator as to the node namesand properties available to you
Torque does not have a TPN (tasks per node) property You canspecify TPN in Moab Workload Manager with Torque as your resourcemanager but Torque does not recognize the property when it issubmitted directly to it via qsub
See qsub -l nodes for examples
By default the node resource is mapped to a virtual node (that isdirectly to a processor not a full physical compute node) Thisbehavior can be changed within Maui or Moab by setting theJOBNODEMATCHPOLICY parameter See Moab Parameters in the MoabWorkload Manager Administrator Guide for more information
All nodes in Torque have their own name as a property You mayrequest a specific node by using its name in the nodes requestMultiple nodes can be requested this way by using + as a delimiterFor example
qsub -l nodes=node01ppn=3+node02ppn=6
Chapter 3 Submitting and Managing Jobs
78 Job Submission
Job Submission 79
Resource Format Description
See the HOSTLIST RM extension in the Moab Workload Manager AdministratorGuide for more information
opsys string Specifies the administrator defined operating system as defined in the MOMconfiguration file
other string Allows a user to specify site specific information This resource is provided foruse by the sites scheduling policy The allowable values and effect on jobplacement is site dependent
This does not work for msub using Moab and Maui
pcput seconds or[[HH]MM]SS
Maximum amount of CPU time used by any single process in the job
pmem size Maximum amount of physical memory used by any single process of the job(Ignored on Fujitsu Not implemented on Digital Unix and HPUX)
procs procs=ltintegergt (Applicable in version 250 and later) The number of processors to be allocatedto a job The processors can come from one or more qualified node(s) Onlyone procs declaration may be used per submitted qsub commandgt qsub -l nodes=3 -1 procs=2
procs_bit-map
string A string made up of 1s and 0s in reverse order of the processor coresrequested A procs_bitmap=1110means the job requests a node that hasfour available cores but the job runs exclusively on cores two three and fourWith this bitmap core one is not usedFor more information see Scheduling Cores
prologue string Specifies a user owned prologue script which will be run after the systemprologue and prologueuser scripts at the beginning of a job The syntax isprologue=ltfilegt The file can be designated with an absolute or relativepathFor more information see Prologue and Epilogue Scripts
pvmem size Maximum amount of virtual memory used by any single process in the job(Ignored on Unicos)
size integer For Torque this resource has no meaning It is passed on to the scheduler forinterpretation In the Moab scheduler the size resource is intended for use inCray installations only
Chapter 3 Submitting and Managing Jobs
Resource Format Description
software string Allows a user to specify software required by the job This is useful if certainsoftware packages are only available on certain systems in the site Thisresource is provided for use by the sites scheduling policy The allowable val-ues and effect on job placement is site dependent See License Management inthe Moab Workload Manager Administrator Guide for more information
vmem size Maximum amount of virtual memory used by all concurrent processes in thejob (Ignored on Unicos)
walltime seconds or[[HH]MM]SS
Maximum amount of real time during which the job can be in the runningstate
sizeThe size format specifies the maximum amount in terms of bytes or words It isexpressed in the form integer[suffix] The suffix is a multiplier defined in thefollowing table (b means bytes [the default] and wmeans words) The sizeof a word is calculated on the execution server as its word size
Suffix Multiplier
b w 1
kb kw 1024
mb mw 1048576
gb gw 1073741824
tb tw 1099511627776
Interpreting Resource RequestsThe table below shows how various requests are interpreted in the qsub -lsyntax and corresponding cgroup usageMemory parameters (mem pmem vmem pvmem)may specify units(examples mem=1024mb mem=320kb mem=1gb) Recognized units arekb (kilobytes) mb (megabytes) gb (gigabytes) tb (terabyte) pb (petabytes)and eb (exabyte) If units are not specified mb (megabytes) is assumed
Chapter 3 Submitting and Managing Jobs
80 Job Submission
Job Submission 81
Example 3-1 Interpreting qsub -l requests
Usage Description
node=Xppn=Y Creates X tasks that will use Y lprocs per task
procs=X Creates X tasks that will use 1 lproc each
ncpus=X Creates 1 task that will use X lprocs
mem=X The entire job will use X memory divided evenly among the tasks
pmem=X Each task will use X memory In translation -l nodes=1ppn=4pmem=1gb will use 4 GB ofmemory
vmem=X The entire job will use X swap divided evenly among the tasks If legacy_vmem is set to true inthe server then the entire specified value will be given per host
pvmem=X Each task will use X swap In translation -l nodes=1ppn=4pvmem=1gb will use 4 GB ofswap
If both mem and pmem are specified the less restrictive of the two will beused as the limit for the job For example qsub jobsh -lnodes=2ppn=2mem=4gbpmem=1gb will apply the mem requested instead ofpmem because it will allow 2 GB per task (4 GB2 tasks) instead of 1 GB pertaskIf both vmem and pvmem are specified the less restrictive of the two will beused as the limit for the job For example qsub jobsh -lnodes=2ppn=2vmem=4gbpvmem=1gb will apply pvmem instead of vmembecause it will allow 2 GB swap per task (1 GB 2 ppn) instead of 5 GB per task(1 GB2 tasks)
Interpreting Node RequestsThe table below shows how various qsub -l nodes requests are interpreted
Example 3-2 qsub -l nodes
Usage Description
gt qsub -l nodes=12 Request 12 nodes of any type
Chapter 3 Submitting and Managing Jobs
Usage Description
gt qsub -l nodes=2server+14 Request 2 server nodes and 14 other nodes (atotal of 16) - this specifies two node_specs2server and 14
gt qsub -l nodes-s=serverhippi+10noserver+3bigmemhippi
Request (a) 1 node that is a server and has ahippi interface (b) 10 nodes that are not serv-ers and (c) 3 nodes that have a large amount ofmemory and have hippi
gt qsub -l nodes=b2005+b1803+b1813 Request 3 specific nodes by hostname
gt qsub -l nodes=4ppn=2 Request 2 processors on each of four nodes
gt qsub -l nodes=1ppn=4 Request 4 processors on one node
gt qsub -l nodes=2blueppn=2+redppn=3+b1014 Request 2 processors on each of two blue nodesthree processors on one red node and the com-pute node b1014
Example 3-3
This job requests a node with 200MB of available memory
gt qsub -l mem=200mb homeuserscriptsh
Example 3-4
This job will wait until node01 is free with 200MB of available memory
gt qsub -l nodes=node01mem=200mb homeuserscriptsh
Moab Job Extensionsqsub -l supports these Moab scheduler job extensions
Chapter 3 Submitting and Managing Jobs
82 Job Submission
Job Submission 83
advrescpuclockdeadlinedependddiskdmemenergy_usedepiloguefeatureflagsgattrgeometrygmetricgres
hostlistimagejgroupjobflagslatencyloglevelminprocspeedminpreempttimeminwclimitnaccesspolicynallocpolicynodesetopsysospartition
prefprocsprocs_bitmapprologueqosqueuejobreqattrretrycountretryccrmtypeselectsidsignalstagein
sprioritysubnodesubnode_listtaskdistpolicytemplate termsigtermtimetidtpntrigtrlvarvcoreswcrequeue
Related TopicsJob Submission
Requesting NUMA-Aware Resources
This topic only applies for NUMA-aware systems and requires TorqueResource Manager 60 and later
Various NUMA resources can be requested at the time of job submissionThe qsub -L option allows administrators the ability to place jobs at the task orOS process level to get maximum efficiency out of the available hardware Inaddition multiple non-symmetric resource requests can be made for thesame job using the -L job submission syntax See -L NUMA Resource Requeston page 188 for a complete list of -L valuesFor example
qsub -L tasks=4lprocs=2usecoresmemory=500mb -L tasks=8lprocs=4memory=2gb
Creates two requests The first will create 4 tasks with two logical processors per task and 500 mb ofmemory per task The logical processors will be placed on cores The second request calls for 8 taskswith 4 logical processors per task and 2 gb of memory per task The logical processors may be placed oncores or threads since the default placement is allowthreads
Chapter 3 Submitting and Managing Jobs
The queue attribute resources_default has several options which are notcompatible with the qsub -L syntax If a queue has any of the followingresources_default options set the job will be rejected from the queueresources_default options nodes size mppwidth mem hostlist ncpusprocs pvmem pmem vmem reqattr software geometry opsys tpnand trl
Requesting Generic ResourcesWhen generic resources have been assigned to nodes using the servers nodesfile these resources can be requested at the time of job submission using theother field SeeManaging Consumable Generic Resources on page 1 in theMoab Workload Manager Administrator Guide for details on configurationwithin Moab
Example 3-5 Generic
This job will run on any node that has the generic resourcematlab
gt qsub -l other=matlab homeuserscriptsh
This can also be requested at the time of job submission using the -Wx=GRESmatlab flag
Related TopicsRequesting ResourcesJob Submission
Requesting Floating ResourcesWhen floating resources have been set up inside Moab they can be requestedin the same way as generic resources Moab will automatically understand thatthese resources are floating and will schedule the job accordingly SeeManaging Shared Cluster Resources (Floating Resources) on page 1 inthe Moab Workload Manager Administrator Guide for details on configurationwithin Moab
Example 3-6 Floating
This job will run on any node when there are enough floating resourcesavailable
gt qsub -l other=matlab homeuserscriptsh
Chapter 3 Submitting and Managing Jobs
84 Job Submission
Job Submission 85
This can also be requested at the time of job submission using the -Wx=GRESmatlab flag
Related TopicsRequesting ResourcesJob Submission
Requesting Other ResourcesMany other resources can be requested at the time of job submission using theMoab Workload Manager See Resource Manager Extensions on page 1 inthe Moab Workload Manager Administrator Guide for a list of these supportedrequests and correct syntax
Related TopicsRequesting ResourcesJob Submission
Exported Batch Environment VariablesWhen a batch job is started a number of variables are introduced into the jobsenvironment that can be used by the batch script in making decisions creatingoutput files and so forth These variables are listed in the following table
Variable Description
PBS_ARRAYID Zero-based value of job array index for this job (in version 220 and later)
PBS_ENVIRONMENT
Set to PBS_BATCH to indicate the job is a batch job or to PBS_INTERACTIVE to indicate the jobis a PBS interactive job (see -I option)
PBS_GPUFILE Line-delimited list of GPUs allocated to the job located in TORQUE_HOMEauxjobidgpu Eachline follows the following formatlthostgt-gpultnumbergt
For example myhost-gpu1
PBS_JOBCOOKIE
Job cookie
PBS_JOBID Unique pbs job id
Chapter 3 Submitting and Managing Jobs
Variable Description
PBS_JOBNAME User specified jobname
PBS_MOMPORT Active port for MOM daemon
PBS_NODEFILE File containing line delimited list of nodes allocated to the job
PBS_NODENUM Node offset number
PBS_NP Number of execution slots (cores) for the job
PBS_NUM_NODES
Number of nodes allocated to the job
PBS_NUM_PPN Number of procs per node allocated to the job
PBS_O_HOME Home directory of submitting user
PBS_O_HOST Host on which job script is currently running
PBS_O_LANG Language variable for job
PBS_O_LOGNAME
Name of submitting user
PBS_O_PATH Path variable used to locate executables within job script
PBS_O_SHELL Script shell
PBS_O_WORKDIR
Jobs submission directory
PBS_QUEUE Job queue
PBS_TASKNUM Number of tasks requested
Related TopicsRequesting ResourcesJob Submission
Chapter 3 Submitting and Managing Jobs
86 Job Submission
Job Submission 87
Enabling Trusted Submit HostsBy default only the node running the pbs_server daemon is allowed to submitjobs Additional nodes can be trusted as submit hosts by taking any of thefollowing steps
l Set the allow_node_submit server parameter (see Allowing jobsubmission from compute hosts)Allows any host trusted as a compute host to also be trusted as a submithost
l Set the submit_hosts server parameter (see Using the submit_hostsservice parameter)Allows specified hosts to be trusted as a submit host
l Use rhosts to enable ruserok() based authentication (see Using RCmdauthentication)
See Configuring Job Submission Hosts for more information
When you enable allow_node_submit you must also enable the allow_proxy_user parameter to allow user proxying when submitting andrunning jobs
Related TopicsJob Submission
Example Submit ScriptsThe following is an example job test script
binshThis is an example script exampleshThese commands set up the Grid Environment for your jobPBS -N ExampleJobPBS -l nodes=1walltime=000100PBS -q np_workqPBS -M YOURUNIQNAMEumicheduPBS -m abe
print the time and datedate
wait 10 secondssleep 10
print the time and date againdate
Chapter 3 Submitting and Managing Jobs
Related TopicsJob Submission
Job FilesTorque 450 was updated to accept XML-based job files in addition to thebinary job files The change allows job files to be more human-readable andeasier to parse Below is a sample job file in the new XML format
Chapter 3 Submitting and Managing Jobs
88 Job Submission
Job Submission 89
ltxml version=10gtltjobgtltversiongt131842ltversiongtltstategt1ltstategtltsubstategt10ltsubstategtltserver_flagsgt33ltserver_flagsgtltstart_timegt0ltstart_timegtltjobidgt340ltjobidgtltfileprefixgt340ltfileprefixgtltqueuegtbatchltqueuegtltdestination_queuegtltdestination_queuegtltrecord_typegt1ltrecord_typegtltmom_addressgt0ltmom_addressgtltmom_portgt11ltmom_portgtltmom_rmportgt0ltmom_rmportgtltattributesgtltJob_Name flags=1gtjob2shltJob_NamegtltJob_Owner flags=1gtechanmoabServercnltJob_Ownergtltjob_state flags=1gtQltjob_stategtltqueue flags=3gtbatchltqueuegtltserver flags=1gtcompanycomltservergtltCheckpoint flags=1gtultCheckpointgtltctime flags=1gt1384292754ltctimegtltError_Path flags=1gtmoabServercnhomeechanworkjob2she340ltError_PathgtltHold_Types flags=1gtnltHold_TypesgtltJoin_Path flags=1gtnltJoin_PathgtltKeep_Files flags=1gtnltKeep_FilesgtltMail_Points flags=1gtaltMail_Pointsgtltmtime flags=1gt1384292754ltmtimegtltOutput_Path flags=1gtmoabServercnhomeechanworkjob2sho340ltOutput_PathgtltPriority flags=1gt0ltPrioritygtltqtime flags=1gt1384292754ltqtimegtltRerunable flags=1gtTrueltRerunablegtltResource_Listgtltepilogue flags=1gttmpepilogueshltepiloguegtltneednodes flags=1gtmoabServerppn=1ltneednodesgtltnodect flags=1gt1ltnodectgtltnodes flags=1gtmoabServerppn=1ltnodesgt
ltResource_Listgtltsubstate flags=1gt10ltsubstategtltVariable_List flags=1gtPBS_O_QUEUE=batch
PBS_O_HOME=homeechanPBS_O_LOGNAME=echanPBS_O_PATH=homeechaneclipseusrliblightdmlightdmusrlocalsbinusrlocalbinusrsbinusrbinsbinbinusrgamesoptmoabbinoptmoabsbinPBS_O_SHELL=binbashPBS_O_LANG=en_USPBS_O_WORKDIR=homeechanworkPBS_O_HOST=moabServercnPBS_O_SERVER=moabServerltVariable_Listgt
lteuser flags=1gtechanlteusergtltegroup flags=5gtcompanyltegroupgtlthop_count flags=1gt1lthop_countgtltqueue_rank flags=1gt2ltqueue_rankgtltqueue_type flags=1gtEltqueue_typegtltetime flags=1gt1384292754ltetimegtltsubmit_args flags=1gt-l nodes=leippn=1 -l epilogue=tmpepiloguesh
job2shltsubmit_argsgtltfault_tolerant flags=1gtFalseltfault_tolerantgtltjob_radix flags=1gt0ltjob_radixgt
Chapter 3 Submitting and Managing Jobs
ltsubmit_host flags=1gtleiacltsubmit_hostgtltattributesgt
ltjobgt
The above job was submitted with this submit command
qsub -l nodes=moabServerppn=1 -l epilogue=tmpepiloguesh job2sh
Related TopicsJob Submission
Monitoring JobsTorque allows users and administrators to monitor submitted jobs with theqstat commandIf the command is run by a non-administrative user it will output just thatusers jobs For example
gt qstatJob id Name User Time Use S Queue---------------- ---------------- ---------------- -------- - -----4807 scatter user01 125634 R batch
Monitoring NUMA Job Task Placement
NUMA-aware job task placement is available with Torque ResourceManager 60 and later
When using NUMA job resources are tracked per task To support this qstat -f produces a new category of information that begins with the req_information keyword Following each req_information keyword is anotherkeyword giving information about how the job was allocated See -L NUMAResource Request on page 188 for available allocation keywordsWhen the job has completed the output will also include the per task residentmemory used and per task cpu time used The following is a sample qstat -fcompleted job outputYou will see that req_informationtask_usage0task0cpu_list gives the coresto which the job is bound for the cpuset The same for mem_list The keywordsmemory_used and cput_used report the per task resident memory used andcpu time used respectively
Chapter 3 Submitting and Managing Jobs
90 Monitoring Jobs
Monitoring Jobs 91
Job Id 832pv-knielson-dtJob_Name = bigmemshJob_Owner = knielsonpv-knielson-dtresources_usedcput = 000000resources_usedenergy_used = 0resources_usedmem = 3628kbresources_usedvmem = 31688kbresources_usedwalltime = 000000job_state = Cqueue = secondserver = pv-knielson-dtCheckpoint = uctime = Tue Jul 28 232315 2015Error_Path = pv-knielson-dthomeknielsonjobsbigmemshe832exec_host = pv-knielson-dt0-3Hold_Types = nJoin_Path = nKeep_Files = nMail_Points = amtime = Tue Jul 28 232318 2015Output_Path = pv-knielson-dthomeknielsonjobsbigmemsho832Priority = 0qtime = Tue Jul 28 232315 2015Rerunable = TrueResource_Listwalltime = 000500session_id = 2708substate = 59Variable_List = PBS_O_QUEUE=routemePBS_O_HOME=homeknielsonPBS_O_LOGNAME=knielsonPBS_O_PATH=usrlocalsbinusrlocalbinusrsbinusrbinsbinbinusrgamesusrlocalgamesPBS_O_SHELL=binbashPBS_O_LANG=en_USPBS_O_WORKDIR=homeknielsonjobsPBS_O_HOST=pv-knielson-dtPBS_O_SERVER=pv-knielson-dteuser = knielsonegroup = companyhashname = 832pv-knielson-dtqueue_rank = 391queue_type = Eetime = Tue Jul 28 232315 2015exit_status = 0submit_args = -L tasks=2lprocs=2 scriptsbigmemshstart_time = Tue Jul 28 232318 2015start_count = 1fault_tolerant = Falsecomp_time = Tue Jul 28 232318 2015job_radix = 0total_runtime = 0093262submit_host = pv-knielson-dtreq_informationtask_count0 = 2req_informationlprocs0 = 2req_informationthread_usage_policy0 = allowthreadsreq_informationhostlist0 = pv-knielson-dtppn=4req_informationtask_usage0task0cpu_list = 26req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0memory_used = 258048req_informationtask_usage0task0cput_used = 18req_informationtask_usage0task0cores = 0req_informationtask_usage0task0threads = 0req_informationtask_usage0task0host =req_informationtask_usage0task1cpu_list = 37req_informationtask_usage0task1mem_list = 0req_informationtask_usage0task1memory_used = 258048req_informationtask_usage0task1cput_used = 18req_informationtask_usage0task1cores = 0req_informationtask_usage0task1threads = 2req_informationtask_usage0task1host = pv-knielson-dt
Chapter 3 Submitting and Managing Jobs
Related TopicsSubmitting and Managing Jobs
Canceling JobsTorque allows users and administrators to cancel submitted jobs with the qdelcommand The job will be sent TERM and KILL signals killing the runningprocesses When the top-level job script exits the job will exit The onlyparameter is the ID of the job to be canceledIf a job is canceled by an operator or manager an email notification will besent to the user Operators and managers may add a comment to this emailwith the -m option
$ qstatJob id Name User Time Use S Queue---------------- ---------------- ---------------- -------- - -----4807 scatter user01 125634 R batch$ qdel -m hey Stop abusing the NFS servers 4807$
Related TopicsSubmitting and Managing Jobs
Job PreemptionTorque supports job preemption by allowing authorized users to suspend andresume jobs This is supported using one of two methods If the node supportsOS-level preemption Torque will recognize that during the configure processand enable it Otherwise the MOMmay be configured to launch a customcheckpoint script in order to support preempting a job Using a customcheckpoint script requires that the job understand how to resume itself from acheckpoint after the preemption occurs
Configuring a Checkpoint Script on a MOMTo configure the MOM to support a checkpoint script the $checkpoint_script parameter must be set in the MOMs configuration file found inTORQUE_HOMEmom_privconfig The checkpoint script should have executepermissions set A typical configuration file might look as followsmom_privconfig
$pbsserver node06$logevent 255$restricted myclusterorg$checkpoint_script optmoabtoolsmom-checkpointsh
Chapter 3 Submitting and Managing Jobs
92 Canceling Jobs
Keeping Completed Jobs 93
The second thing that must be done to enable the checkpoint script is to changethe value of MOM_CHECKPOINT to 1 in srcincludepbs_configh (In someinstances MOM_CHECKPOINT may already be defined as 1) The new lineshould be as followssrcincludepbs_configh
define MOM_CHECKPOINT 1
Related TopicsSubmitting and Managing Jobs
Keeping Completed JobsTorque provides the ability to report on the status of completed jobs for aconfigurable duration after the job has completed This can be enabled bysetting the keep_completed attribute on the job execution queue or the keep_completed parameter on the server This should be set to the number ofseconds that jobs should be held in the queue If you set keep_completed onthe job execution queue completed jobs will be reported in the C state and theexit status is seen in the exit_status job attribute
If the Mother Superior and Torque server are on the same server expectthe following behavior
l When keep_completed is set the job spool files will be deleted whenthe specified time arrives and Torque purges the job from memory
l When keep_completed is not set Torque deletes the job spool filesupon job completion
l If you manually purge a job (qdel -p) before the job completes ortime runs out Torque will never delete the spool files
Bymaintaining status information about completed (or canceled failed etc)jobs administrators can better track failures and improve systemperformance This allows Torque to better communicate with Moab WorkloadManager and track the status of jobs This gives Moab the ability to trackspecific failures and to schedule the workload around possible hazards SeeNODEFAILURERESERVETIME in Moab Parameters in the Moab WorkloadManager Administrator Guide for more information
Related TopicsSubmitting and Managing Jobs
Chapter 3 Submitting and Managing Jobs
Job Checkpoint and RestartWhile Torque has had a job checkpoint and restart capability for many yearsthis was tied to machine specific features Now Torque supports BLCRmdashanarchitecture independent package that provides for process checkpoint andrestart
The support for BLCR is only for serial jobs not for any MPI type jobs
This section contains these topicsl Introduction to BLCRl Configuration Files and Scriptsl Starting a Checkpointable Jobl Checkpointing a Jobl Restarting a Jobl Acceptance Tests
Related TopicsSubmitting and Managing Jobs
Introduction to BLCRBLCR is a kernel level package It must be downloaded and installed fromBLCRAfter building and making the package it must be installed into the kernel withcommands as follows These can be installed into the file etcmodules but allof the testing was done with explicit invocations ofmodprobeInstalling BLCR into the kernel
sbininsmod usrlocallibblcr2612-1234blcr_importsko sbininsmod usrlocallibblcr2612-1234blcr_vmadumpko sbininsmod usrlocallibblcr2612-1234blcrko
The BLCR system provides four command line utilitiesl cr_checkpointl cr_infol cr_restartl cr_run
For more information about BLCR see the BLCR Administrators Guide
Chapter 3 Submitting and Managing Jobs
94 Job Checkpoint and Restart
Job Checkpoint and Restart 95
Related TopicsJob Checkpoint and Restart
Configuration Files and ScriptsConfiguring and Building Torque for BLCR
gt configure --enable-unixsockets=no --enable-blcrgt makegt sudo make install
Depending on where BLCR is installed you may also need to use the followingconfigure options to specify BLCR paths
Option Description
--with-blcr-include=DIR include path for libcrh
--with-blcr-lib=DIR lib path for libcr
--with-blcr-bin=DIR bin path for BLCR utilities
The pbs_mom configuration file located in varspooltorquemom_privmust be modified to identify the script names associated with invoking theBLCR commands The following variables should be used in the configurationfile when using BLCR checkpointing
Variable Description
$checkpoint_inter-val
How often periodic job checkpoints will be taken (minutes)
$checkpoint_script The name of the script file to execute to perform a job checkpoint
$restart_script The name of the script file to execute to perform a job restart
$checkpoint_run_exe
The name of an executable program to be run when starting a checkpointable job (forBLCR cr_run)
The following example shows the contents of the configuration file used fortesting the BLCR feature in Torque
The script files belowmust be executable by the user Be sure to usechmod to set the permissions to 754
Chapter 3 Submitting and Managing Jobs
Example 3-7 Script file permissions
chmod 754 blcr ls -ltotal 20-rwxr-xr-- 1 root root 2112 2008-03-11 1314 blcr_checkpoint_script-rwxr-xr-- 1 root root 1987 2008-03-11 1314 blcr_restart_script-rw-r--r-- 1 root root 215 2008-03-11 1313 configdrwxr-x--x 2 root root 4096 2008-03-11 1321 jobs-rw-r--r-- 1 root root 7 2008-03-11 1315 momlock
Example 3-8 mom_privconfig
$checkpoint_script varspooltorquemom_privblcr_checkpoint_script$restart_script varspooltorquemom_privblcr_restart_script$checkpoint_run_exe usrlocalbincr_run$pbsserver makuacridomain$loglevel 7
Chapter 3 Submitting and Managing Jobs
96 Job Checkpoint and Restart
Job Checkpoint and Restart 97
Example 3-9 mom_privblcr_checkpoint_script
Chapter 3 Submitting and Managing Jobs
usrbinperl Usage checkpoint_script This script is invoked by pbs_mom to checkpoint a jobuse strictuse SysSyslog
Log levels 0 = none -- no logging 1 = fail -- log only failures 2 = info -- log invocations 3 = debug -- log all subcommandsmy $logLevel = 3
logPrint(2 Invoked $0 join( ARGV) n)
my ($sessionId $jobId $userId $signalNum $checkpointDir $checkpointName)my $usage = Usage $0 n
Note that depth is not used in this script but could control a limit to the numberof checkpoint image files that are preserved on the disk Note also that a request was made to identify whether this script was invoked by thejobs owner or by a system administrator While this information is known to pbs_serverit is not propagated to pbs_mom and thus it is not possible to pass this to the script
Therefore a workaround is to invoke qmgr and attempt to set a trivial variable This will fail if the invoker is not a manager
if (ARGV == 7)
($sessionId $jobId $userId $checkpointDir $checkpointName $signalNum $depth)=
ARGVelse logDie(1 $usage)
Change to the checkpoint directory where we want the checkpoint to be createdchdir $checkpointDir or logDie(1 Unable to cd to checkpoint dir ($checkpointDir) $n) if $logLevel
my $cmd = cr_checkpoint$cmd = --signal $signalNum if $signalNum$cmd = --tree $sessionId$cmd = --file $checkpointNamemy $output = `$cmd 2gtamp1`my $rc = $ gtgt 8logDie(1 Subcommand ($cmd) failed with rc=$rcn$output) if $rc ampamp $logLevel gt= 1logPrint(3 Subcommand ($cmd) yielded rc=$rcn$output) if $logLevel gt= 3exit 0
logPrint($message) Write a message (to syslog) and diesub logPrint
Chapter 3 Submitting and Managing Jobs
98 Job Checkpoint and Restart
Job Checkpoint and Restart 99
my ($level $message) = _ my severity = (none warning info debug)
return if $level gt $logLevel
openlog(checkpoint_script user) syslog($severity[$level] $message) closelog()
logDie($message) Write a message (to syslog) and diesub logDie my ($level $message) = _ logPrint($level $message) die($message)
Chapter 3 Submitting and Managing Jobs
Example 3-10 mom_privblcr_restart_script
Chapter 3 Submitting and Managing Jobs
100 Job Checkpoint and Restart
Job Checkpoint and Restart 101
usrbinperl Usage restart_script This script is invoked by pbs_mom to restart a jobuse strictuse SysSyslog
Log levels 0 = none -- no logging 1 = fail -- log only failures 2 = info -- log invocations 3 = debug -- log all subcommandsmy $logLevel = 3
logPrint(2 Invoked $0 join( ARGV) n)
my ($sessionId $jobId $userId $checkpointDir $restartName)my $usage = Usage $0 nif (ARGV == 5)
($sessionId $jobId $userId $checkpointDir $restartName) =ARGV
else logDie(1 $usage)
Change to the checkpoint directory where we want the checkpoint to be createdchdir $checkpointDir or logDie(1 Unable to cd to checkpoint dir ($checkpointDir) $n) if $logLevel
my $cmd = cr_restart$cmd = $restartNamemy $output = `$cmd 2gtamp1`my $rc = $ gtgt 8logDie(1 Subcommand ($cmd) failed with rc=$rcn$output) if $rc ampamp $logLevel gt= 1logPrint(3 Subcommand ($cmd) yielded rc=$rcn$output) if $logLevel gt= 3exit 0
logPrint($message) Write a message (to syslog) and diesub logPrint my ($level $message) = _ my severity = (none warning info debug)
return if $level gt $logLevel openlog(restart_script user) syslog($severity[$level] $message) closelog()
logDie($message) Write a message (to syslog) and diesub logDie my ($level $message) = _
logPrint($level $message)
Chapter 3 Submitting and Managing Jobs
die($message)
Related TopicsJob Checkpoint and Restart
Starting a Checkpointable JobNot every job is checkpointable A job for which checkpointing is desirable mustbe started with the -c command line option This option takes a comma-separated list of arguments that are used to control checkpointing behaviorThe list of valid options available in the 24 version of Torque is show below
Option Description
none No checkpointing (not highly useful but included for completeness)
enabled Specify that checkpointing is allowed but must be explicitly invoked by either the qhold orqchkpt commands
shutdown Specify that checkpointing is to be done on a job at pbs_mom shutdown
periodic Specify that periodic checkpointing is enabled The default interval is 10 minutes and can bechanged by the $checkpoint_interval option in the MOM configuration file or by spe-cifying an interval when the job is submitted
interval=minutes Specify the checkpoint interval in minutes
depth=number Specify a number (depth) of checkpoint images to be kept in the checkpoint directory
dir=path Specify a checkpoint directory (default is varspooltorquecheckpoint)
Example 3-11 Sample test program
include stdiohint main( int argc char argv[] ) int i
for (i=0 ilt100 i++)
printf(i = dn i) fflush(stdout) sleep(1)
Example 3-12 Instructions for building test program
gt gcc -o test testc
Chapter 3 Submitting and Managing Jobs
102 Job Checkpoint and Restart
Job Checkpoint and Restart 103
Example 3-13 Sample test script
binbash test
Example 3-14 Starting the test job
gt qstatgt qsub -c enabledperiodicshutdowninterval=1 testsh77jakaacridomaingt qstatJob id Name User Time Use S Queue------------------------- ---------------- --------------- -------- - -----77jakaa testsh jsmith 0 Q batchgt
If you have no scheduler running you might need to start the job with qrunAs this program runs it writes its output to a file invarspooltorquespool This file can be observed with the commandtail -f
Related TopicsJob Checkpoint and Restart
Checkpointing a JobJobs are checkpointed by issuing a qhold command This causes an image filerepresenting the state of the process to be written to disk The directory bydefault is varspooltorquecheckpointThis default can be altered at the queue level with the qmgr command Forexample the command qmgr -c set queue batch checkpoint_dir=tmpwould change the checkpoint directory to tmp for the queue batchThe default directory can also be altered at job submission time with the -cdir=tmp command line optionThe name of the checkpoint directory and the name of the checkpoint imagefile become attributes of the job and can be observed with the command qstat-f Notice in the output the names checkpoint_dir and checkpoint_nameThe variable checkpoint_name is set when the image file is created and will notexist if no checkpoint has been takenA job can also be checkpointed without stopping or holding the job with thecommand qchkpt
Related TopicsJob Checkpoint and Restart
Chapter 3 Submitting and Managing Jobs
Restarting a Job
Restarting a Job in the Held StateThe qrls command is used to restart the hibernated job If you were using thetail -f command to watch the output file you will see the test program startcounting againIt is possible to use the qalter command to change the name of the checkpointfile associated with a job This could be useful if there were several jobcheckpoints and it restarting the job from an older image was specified
Restarting a Job in the Completed StateIn this case the job must be moved to the Queued state with the qreruncommand Then the job must go to the Run state either by action of thescheduler or if there is no scheduler through using the qrun command
Related TopicsJob Checkpoint and Restart
Acceptance TestsA number of tests were made to verify the functioning of the BLCRimplementation See BLCR Acceptance Tests for a description of the testing
Related TopicsJob Checkpoint and Restart
Job Exit StatusOnce a job under Torque has completed the exit_status attribute willcontain the result code returned by the job script This attribute can be seen bysubmitting a qstat -f command to show the entire set of informationassociated with a job The exit_status field is found near the bottom of theset of output lines
Chapter 3 Submitting and Managing Jobs
104 Job Exit Status
Job Exit Status 105
Example 3-15 qstat -f (job failure)
Job Id 179host Job_Name = STDIN Job_Owner = userhost job_state = C queue = batchq server = host Checkpoint = u ctime = Fri Aug 29 145555 2008 Error_Path = hostoptmoabSTDINe179 exec_host = node10 Hold_Types = n Join_Path = n Keep_Files = n Mail_Points = a mtime = Fri Aug 29 145555 2008 Output_Path = hostoptmoabSTDINo179 Priority = 0 qtime = Fri Aug 29 145555 2008 Rerunable = True Resource_Listncpus = 2 Resource_Listnodect = 1 Resource_Listnodes = node1 Variable_List = PBS_O_HOME=homeuserPBS_O_LOGNAME=user PBS_O_PATH=usrlocalsbinusrlocalbinusrsbinusrbinsbinPBS_O_SHELL=binbashPBS_O_HOST=host PBS_O_WORKDIR=optmoabPBS_O_QUEUE=batchq sched_hint = Post job file processing error job 179host on host node10Ba d UID for job execution REJHOST=palacridomain MSG=cannot find user user inpassword file etime = Fri Aug 29 145555 2008 exit_status = -1
The value of Resource_List is the amount of resources requested
This code can be useful in diagnosing problems with jobs that may haveunexpectedly terminatedIf Torque was unable to start the job this field will contain a negative numberproduced by the pbs_mom Otherwise if the job script was successfully startedthe value in this field will be the return value of the script
Example 3-16 Torque supplied exit codes
Name Value Description
JOB_EXEC_OK 0 Job execution successful
JOB_EXEC_FAIL1 -1 Job execution failed before files no retry
JOB_EXEC_FAIL2 -2 Job execution failed after files no retry
JOB_EXEC_RETRY -3 Job execution failed do retry
JOB_EXEC_INITABT -4 Job aborted on MOM initialization
Chapter 3 Submitting and Managing Jobs
Name Value Description
JOB_EXEC_INITRST -5 Job aborted on MOM init chkpt no migrate
JOB_EXEC_INITRMG -6 Job aborted on MOM init chkpt ok migrate
JOB_EXEC_BADRESRT -7 Job restart failed
JOB_EXEC_CMDFAIL -8 Exec() of user command failed
JOB_EXEC_STDOUTFAIL -9 Could not createopen stdout stderr files
JOB_EXEC_OVERLIMIT_MEM -10 Job exceeded a memory limit
JOB_EXEC_OVERLIMIT_WT -11 Job exceeded a walltime limit
JOB_EXEC_OVERLIMIT_CPUT -12 Job exceeded a CPU time limit
Chapter 3 Submitting and Managing Jobs
106 Job Exit Status
Job Exit Status 107
Example 3-17 Exit code from C program
$ cat errorc
includeinclude
intmain(int argc char argv)
exit(256+11)
$ gcc -o error errorc
$ echo error | qsub180xxxyyy
$ qstat -fJob Id 180xxxyyy Job_Name = STDIN Job_Owner = testxxxyyy resources_usedcput = 000000 resources_usedmem = 0kb resources_usedvmem = 0kb resources_usedwalltime = 000000 job_state = C queue = batch server = xxxyyy Checkpoint = u ctime = Wed Apr 30 112937 2008 Error_Path = xxxyyyhometestSTDINe180 exec_host = node010 Hold_Types = n Join_Path = n Keep_Files = n Mail_Points = a mtime = Wed Apr 30 112937 2008 Output_Path = xxxyyyhometestSTDINo180 Priority = 0 qtime = Wed Apr 30 112937 2008 Rerunable = True
Resource_Listneednodes = 1 Resource_Listnodect = 1 Resource_Listnodes = 1 Resource_Listwalltime = 010000 session_id = 14107 substate = 59 Variable_List = PBS_O_HOME=hometestPBS_O_LANG=en_USUTF-8 PBS_O_LOGNAME=test PBS_O_PATH=usrlocalperltestsbinhometestbinusrlocals binusrlocalbinusrsbinusrbinsbinbinusrgames PBS_O_SHELL=binbashPBS_SERVER=xxxyyy PBS_O_HOST=xxxyyyPBS_O_WORKDIR=hometest PBS_O_QUEUE=batch euser = test egroup = test hashname = 180xxxyyy queue_rank = 8 queue_type = E comment = Job started on Wed Apr 30 at 1129
etime = Wed Apr 30 112937 2008 exit_status = 11 start_time = Wed Apr 30 112937 2008 start_count = 1
Chapter 3 Submitting and Managing Jobs
Notice that the C routine exit passes only the low order byte of its argument Inthis case 256+11 is really 267 but the resulting exit code is only 11 as seen inthe output
Related TopicsJob Checkpoint and RestartSubmitting and Managing Jobs
Service JobsTorque service jobs are a special kind of job that is treated differently byTorque than normal batch jobs Torque service jobs are not related to Moabsdynamic service jobs A Torque service job cannot dynamically grow and shrinkin size over timeJobs are marked as service jobs at the time they are submitted to Moab orTorque Just like a normal job a script file is specified with the job In a batchjob the contents of the script file are taken by Torque and executed on thecompute nodes For a service job however the script file is assumed torespond to certain command-line arguments Instead of just executing thescript Torque will use these command-line arguments to start stop and checkon the status of the job Listed below are the three command-line argumentsthat must be supported by any script submitted as part of a Torque service job
l start The script should take this argument and launch itsserviceworkload The script should remain executingrunning until theservice stops
l stop The script should take this argument and stop the serviceworkloadthat was earlier started
l status The script should take this argument and return via standardout either running if the serviceworkload is running as expected orstopped if the service is not running
This feature was created with long-running services in mind The command-line arguments should be familiar to users who interact with Unix services aseach of the service scripts found in etcinitd also accept and respond tothe arguments as explained aboveFor example if a user wants to start the Apache 2 server on a compute nodethey can use a Torque service job and specify a script which will start stop andcheck on the status of the httpd daemon--possibly by using the alreadypresent etcinitdhttpd script
If you wish to submit service jobs only through Torque no special versionof Moab is required If you wish to submit service jobs using Moabs msubthen Moab 54 is required
Chapter 3 Submitting and Managing Jobs
108 Service Jobs
Service Jobs 109
For details see these topicsl Submitting Service Jobsl Submitting Service Jobs in MCMl Managing Service Jobs
Submitting Service JobsThere is a new option to qsub -s which can take either a y or n (yes or norespectively) When -s y is present then the job is marked as a service job
qsub -l walltime=1000000nodes=1 -s y service_jobpy
The example above submits a job to Torque with a walltime of 100 hours onenode and it is marked as a service job The script service_jobpy will be usedto start stop and check the status of the serviceworkload started on thecompute nodesMoab as of version 54 is able to accept the -s y option when msub is used forsubmission Moab will then pass this information to Torque when the job ismigrated
Related TopicsService Jobs
Submitting Service Jobs in MCMSubmitting a service job in MCM requires the latest Adaptive Computing Suitesnapshot of MCM It also requires MCM to be started with the --future=2optionOnce MCM is started open the Create Workloadwindow and verify ShowAdvanced Options is checked Notice that there is a Service checkbox thatcan be selected in the FlagsOptions area Use this to specify the job is aservice job
Related TopicsService Jobs
Managing Service JobsManaging a service job is done much like any other job only a few differencesexist
Chapter 3 Submitting and Managing Jobs
Examining the job with qstat -f will reveal that the job has the service =True attribute Non-service jobs will not make anymention of the serviceattributeCanceling a service job is done with qdel mjobctl -c or through any of theGUIs as with any other job Torque however cancels the job by calling theservice script with the stop argument instead of killing it directly Thisbehavior also occurs if the job runs over its wallclock and TorqueMoab isconfigured to cancel the jobIf a service job completes when the script exits after calling it with start or ifTorque invokes the script with status and does not get back running it willnot be terminated by using the stop argument
Related TopicsService Jobs
Chapter 3 Submitting and Managing Jobs
110 Service Jobs
Adding Nodes 111
Chapter 4 Managing Nodes
This chapter contains information about adding and configuring computenodes It explains how to work with host security for systems that requirededicated access to compute nodes It also contains information aboutscheduling specific cores on a node at job submissionFor details see these topics
l Adding Nodesl Node Propertiesl Changing Node Statel Host Securityl Linux Cpuset Supportl Scheduling Coresl Scheduling Accelerator Hardwarel Node Resource Plug-in
Adding NodesTorque can add and remove nodes either dynamically with qmgr or bymanually editing the TORQUE_HOMEserver_privnodes file SeeInitializingConfiguring Torque on the Server (pbs_server)
Be aware of the followingl Nodes cannot be added or deleted dynamically if there is a mom_hierarchy file in the server_priv directory
l When you make changes to nodes by directly editing the nodes file youmust restart pbs_server for those changes to take effect Changesmadeusing qmgr do not require a restart
l When you make changes to a nodes ip address you must clear the pbs_server cache Either restart pbs_server or delete the changed node andthen re-add it
l Before a newly added node is set to a free state the cluster must beinformed that the new node is valid and they can trust it for running jobsOnce this is done the node will automatically transition to free
l Adding or changing a hostname on a node requires a pbs_server restartin order to add the new hostname as a node
Chapter 4 Managing Nodes
Run-time Node ChangesTorque can dynamically add nodes with the qmgr command For example thefollowing command will add node node003
$ qmgr -c create node node003[node004node005] [np=n][[TTL=YYYY-MM-DDThhmmssZ][acl=useruser1[user2user3]][requestid=n]]
The optional parameters are used as followsl np ndash Number of virtual processorsl TTL ndash (Time to Live) Specifies the time in UTC format that the node issupposed to be retired by Moab Moab will not schedule any jobs on anode after its time to live has passed
l acl ndash (Access control list) Can be used to control which users have accessto the node in Moab
Except for temporary nodes andor the simplest of clusterconfigurations Adaptive Computing recommends avoiding the useof the acl parameter as this can lead to confusion about the rootcause of jobs being unable to run Use Moab reservations with userACLs instead
l requestid ndash An ID that can be used to track the request that created thenode
You can alter node parameters by following these examples
qmgr -c set node node003 np=6qmgr -c set node node003 TTL=2020-12-31T235959Zqmgr -c set node node003 requestid=23234qmgr -c set node node003 acl=useruser10user11user12qmgr -c set node node003 acl=
Torque does not use the TTL acl and requestid parameters Informationfor those parameters are simply passed to Moab
The set node subcommand of qmgr supports the += and -= syntax but hasknown problems when used to alter the acl parameter Do not use it forthis Instead simply reset the full user list as shown in the aboveexample
The create node and set node command examples above would append thefollowing line(s) to the bottom of the TORQUE_HOMEserver_privnodes file
node003 np=6 TTL=2020-12-31T235959Z acl=user1user2user3 requestid=3210node004
Nodes can also be removed with a similar command
gt qmgr -c delete node node003[node004node005]
Chapter 4 Managing Nodes
112 Adding Nodes
Node Properties 113
Related TopicsChanging Node StateManaging Nodes
Node PropertiesTorque can associate properties with nodes to aid in identifying groups ofnodes Its typical for a site to conglomerate a heterogeneous set of resourcesTo identify the different sets properties can be given to each node in a set Forexample a group of nodes that has a higher speed network connection couldhave the property ib Torque can set update or remove properties eitherdynamically with qmgr or bymanually editing the nodes file
Run-time Node ChangesTorque can dynamically change the properties of a node with the qmgrcommand For example note the following to give node001 the properties ofbigmem and dualcore
gt qmgr -c set node node001 properties = bigmemgt qmgr -c set node node001 properties += dualcore
To relinquish a stated property use the -= operator
Manual Node ChangesThe properties of each node are enumerated in TORQUE_HOMEserver_privnodes The feature(s) must be in a space delimited list after the nodename For example to give node001 the properties of bigmem anddualcore and node002 the properties of bigmem and matlab edit thenodes file to contain the followingserver_privnodes
node001 bigmem dualcorenode002 np=4 bigmem matlab
For changes to the nodes file to be activated pbs_server must berestarted
For a full description of this file please see the PBS Administrator Guide
Related TopicsJob SubmissionManaging Nodes
Chapter 4 Managing Nodes
Changing Node StateA common task is to prevent jobs from running on a particular node bymarkingit offline with pbsnodes -o nodename Once a node has been marked offlinethe scheduler will no longer consider it available for new jobs Simply usepbsnodes -c nodename when the node is returned to serviceAlso useful is pbsnodes -l which lists all nodes with an interesting state suchas down unknown or offline This provides a quick glance at nodes that mightbe having a problem (See pbsnodes for details)
Node RecoveryWhen a mom gets behind on processing requests pbs_server has a failsafe toallow for node recovery in processing the request backlog After three failureswithout having two consecutive successes in servicing a request pbs_serverwill mark that mom as offline for five minutes to allow the mom extra time toprocess the backlog before it resumes its normal activity If the mom has twoconsecutive successes in responding to network requests before the timeoutthen it will come back earlier
Related TopicsManaging Nodes
Changing Node Power StatesBeginning with Torque 500 the pbsnodes -m command can modify the powerstate of nodes Node cannot go from one low-power state to another low-power state Theymust be brought up to the Running state and then moved tothe new low-power state The supported power states are
State Description
Running l Physical machine is actively workingl Power conservation is on a per-device basisl Processor power consumption controlled by P-states
Chapter 4 Managing Nodes
114 Changing Node State
Changing Node Power States 115
State Description
Standby l System appears offl Processor halted (OS executes a halt instruction)l Processor maintains CPU and system cache statel RAM refreshed to maintain memory statel Machine in low-power model Requires interrupt to exit statel Lowest-latency sleep state - has no effect on software
Suspend l System appears offl Processor and support chipset have no powerl OS maintains CPU system cache and support chipset state in memoryl RAM in slow refreshl Machine in lowest-power statel Usually requires specific interrupt (keyboard mouse) to exit statel Third lowest-latency sleep state - system must restore power to processor and supportchipset
Hibernate l System is offl Physical machine state and memory saved to diskl Requires restoration of power and machine state to exit statel Second highest-latency sleep state - system performs faster boot using saved machine stateand copy of memory
Shutdown l Equivalent to shutdown now command as root
In order to wake nodes and bring them up to a running statel the nodesmust support and be configured to use Wake-on-LAN (WOL)l the pbsnodes command must report the nodes MAC address correctly
To configure nodes to use Wake-on-LAN
1 Enable WOL in the BIOS for each node If needed contact your hardwaremanufacturer for details
2 Use the ethtool command to determine what types of WOL packets yourhardware supports Torque uses the g packet If the g packet is not listedyou cannot use WOL with Torque
Chapter 4 Managing Nodes
[root] ethtool eth0Settings for eth0
Supported ports [ TP ]Supported link modes 10baseTHalf 10baseTFull
100baseTHalf 100baseTFull 1000baseTFull
Supported pause frame use NoSupports auto-negotiation YesAdvertised link modes 10baseTHalf 10baseTFull
100baseTHalf 100baseTFull 1000baseTFull
Advertised pause frame use NoAdvertised auto-negotiation YesSpeed 100MbsDuplex FullPort Twisted PairPHYAD 2Transceiver internalAuto-negotiation onMDI-X offSupports Wake-on pumbgWake-on pCurrent message level 0x00000007 (7)
drv probe linkLink detected yes
This Ethernet interface supports the gWOL packet but is currently set to use the p packet
3 If your Ethernet interface supports the g packet but is configured for adifferent packet use ethtool -s ltinterfacegtwol g to configure it to use g
[root] ethtool -s eth0 wol g[root] ethtool eth0Settings for eth0
Supported ports [ TP ]Supported link modes 10baseTHalf 10baseTFull
100baseTHalf 100baseTFull 1000baseTFull
Supported pause frame use NoSupports auto-negotiation YesAdvertised link modes 10baseTHalf 10baseTFull
100baseTHalf 100baseTFull 1000baseTFull
Advertised pause frame use NoAdvertised auto-negotiation YesSpeed 100MbsDuplex FullPort Twisted PairPHYAD 2Transceiver internalAuto-negotiation onMDI-X offSupports Wake-on pumbgWake-on gCurrent message level 0x00000007 (7)
drv probe linkLink detected yes
Now the power state of your nodes can be modified and they can be woken upfrom power-saving states
Chapter 4 Managing Nodes
116 Changing Node Power States
Host Security 117
Related Topicspbsnodes
Host Security
Enabling PAM with TorqueTorque is able to take advantage of the authentication services providedthrough Pluggable Authentication Modules (PAM) to help administratorsmanage access to compute nodes by users The PAMmodule available inTorque is located in the PAM security directory This module when used inconjunction with other PAMmodules restricts access to the compute nodeunless the user has a job currently running on the node The followingconfigurations are examples only For more information about PAM see thePAM (Pluggable Authentication Modules) documentation from LinuxDocsTo enable Torque PAM configure Torque using the --with-pam option Using --with-pam is sufficient but if your PAM security modules are not in the defaultlibsecurity or lib64security directory you can specify the locationusing --with-pam=ltDIRgtwhere ltDIRgt is the directory where you want themodules to be installed When Torque is installed the files pam_pbssimpleauthla and pam_pbssimpleauthso appear in libsecuritylib64security or the directory designated on the configuration linePAM is very flexible and policies vary greatly from one site to another Thefollowing example restricts users trying to access a node using SSHAdministrators need to assess their own installations and decide how to applythe Torque PAM restrictionsIn this example after installing Torque with PAM enabled you would add thefollowing two lines to etcpamdsshd
account required pam_pbssimpleauthsoaccount required pam_accessso
In etcsecurityaccessconfmake sure all users who access the computenode are added to the configuration This is an example which allows the usersroot george allen and michael access
-ALL EXCEPT root george allen michael torqueALL
With this configuration if user george has a job currently running on thecompute node george can use ssh to login to the node If there are currentlyno jobs running george is disconnected when attempting to loginTorque PAM is good at keeping users out who do not have jobs running on acompute node However it does not have the ability to force a user to log outonce they are in To accomplish this use epilogue or prologue scripts to forceusers off the system
Chapter 4 Managing Nodes
Legacy Torque PAM ConfigurationThere is an alternative PAM configuration for Torque that has been availablesince 2006 It can be found in the contribpam_authuser directory of thesource tree Adaptive Computing does not currently support this method butthe instructions are given here for those who are currently using it and forthose who wish to use itFor systems requiring dedicated access to compute nodes (for example userswith sensitive data) Torque prologue and epilogue scripts provide a vehicle toleverage the authentication provided by linux-PAMmodules (See Prologueand Epilogue Scripts for more information)
To allow only users with running jobs (and root) to access compute nodes
1 Untar contribpam_authusertargz (found in the src tar ball)2 Compile pam_authuserc with make and make install on every computenode
3 Edit etcsystem-auth as described in READMEpam_authuser again onevery compute node
4 Either make a tarball of the epilogue and prologue scripts (to preserve thesymbolic link) and untar it in the mom_priv directory or just copy epilogueand prologue to mom_priv
The prologue scripts are Perl scripts that add the user of the job toetcauthuser The epilogue scripts then remove the first occurrence of theuser from etcauthuser File locking is employed in all scripts to eliminatethe chance of race conditions There is also some commented code in theepilogue scripts which if uncommented kills all processes owned by the user(using pkill) provided that the user doesnt have another valid job on the samenodeprologue and epilogue scripts were added to the pam_authuser tarball inversion 21 of Torque
Related TopicsManaging Nodes
Linux Cpuset Supportl Cpuset Overviewl Cpuset Supportl Configuring Cpusetl Cpuset AdvantagesDisadvantages
Chapter 4 Managing Nodes
118 Linux Cpuset Support
Linux Cpuset Support 119
Cpuset OverviewLinux kernel 26 Cpusets are logical hierarchical groupings of CPUs and units ofmemory Once created individual processes can be placed within a cpuset Theprocesses will only be allowed to runaccess the specified CPUs and memoryCpusets are managed in a virtual file system mounted at devcpuset Newcpusets are created by simplymaking new directories Cpusets gain CPUs andmemory units by simply writing the unit number to files within the cpuset
Cpuset Support
All nodes using cpusets must have the hwloc library and correspondinghwloc-devel package installed See Installing Torque Resource Managerfor more information
When started pbs_mom will create an initial top-level cpuset atdevcpusettorque This cpuset contains all CPUs and memory of the hostmachine If this torqueset already exists it will be left unchanged to allow theadministrator to override the default behavior All subsequent cpusets arecreated within the torquesetWhen a job is started the jobset is created at devcpusettorque$jobidand populated with the CPUs listed in the exec_host job attribute Alsocreated are individual tasksets for each CPU within the jobset This happensbefore prologue which allows it to be easily modified and it happens on allnodesThe top-level batch script process is executed in the jobset Tasks launchedthrough the TM interface (pbsdsh and PWs mpiexec) will be executed withinthe appropriate tasksetOn job exit all tasksets and the jobset are deleted
Configuring Cpuset
To configure cpuset
1 As root mount the virtual filesystem for cpusets
mkdir devcpusetmount -t cpuset none devcpuset
Do this for each MOM that is to use cpusets
2 Because cpuset usage is a build-time option in Torque you must add --enable-cpuset to your configure options
configure --enable-cpuset
3 Use this configuration for the MOMs across your system
Chapter 4 Managing Nodes
Cpuset AdvantagesDisadvantagesPresently any job can request a single CPU and proceed to use everythingavailable in the machine This is occasionally done to circumvent policy butmost often is simply an error on the part of the user Cpuset support will easilyconstrain the processes to not interfere with other jobsJobs on larger NUMA systemsmay see a performance boost if jobs can beintelligently assigned to specific CPUs Jobs may perform better if stripedacross physical processors or contained within the fewest number of memorycontrollersTM tasks are constrained to a single core thus a multi-threaded process couldseriously suffer
Related TopicsManaging NodesGeometry Request Configuration
Scheduling CoresIn Torque 24 and later you can request specific cores on a node at jobsubmission by using geometry requests To use this feature specify theprocs_bitmap resource request of qsub-l (see qsub) at job submissionSee these topics for details
l Geometry Request Configurationl Geometry Request Usagel Geometry Request Considerations
Geometry Request ConfigurationA Linux kernel of 26 or later is required to use geometry requests because thisfeature uses Linux cpusets in its implementation In order to use this featurethe cpuset directory has to be mounted For more information on how to mountthe cpuset directory see Linux Cpuset Support If the operating environment issuitable for geometry requests configure Torque with the --enable-geometry-requests option
gt configure --prefix=homejohntorque --enable-geometry-requests
Torque is configured to install to homejohntorque and to enable thegeometry requests feature
Chapter 4 Managing Nodes
120 Scheduling Cores
Scheduling Cores 121
The geometry request feature uses a subset of the cpusets feature Whenyou configure Torque using --enable-cpuset and --enable-geometry-requests at the same time and use -l procs_bitmap=X the job will getthe requested cpuset Otherwise the job is treated as if only --enable-cpuset was configured
Related TopicsScheduling Cores
Geometry Request UsageOnce enabled users can submit jobs with a geometry request by using theprocs_bitmap=ltstringgt resource request procs_bitmap requires anumerical string made up of 1s and 0s A 0 in the bitmap means the jobcannot run on the core that matches the 0s index in the bitmap The index is inreverse order of the number of cores available If a job is submitted withprocs_bitmap=1011 then the job requests a node with four free cores anduses only cores one two and four
The geometry request feature requires a node that has all cores free Ajob with a geometry request cannot run on a node that has cores that arebusy even if the node hasmore than enough cores available to run thejob
qsub -l procs_bitmap=0011 osslsh
The job osslsh is submitted with a geometry request of 0011In the above example the submitted job can run only on a node that has fourcores When a suitable node is found the job runs exclusively on cores one andtwo
Related TopicsScheduling Cores
Geometry Request ConsiderationsAs previously stated jobs with geometry requests require a node with all of itscores available After the job starts running on the requested cores the nodecannot run other jobs even if the node has enough free cores to meet therequirements of the other jobs Once the geometry requesting job is done thenode is available to other jobs again
Related TopicsScheduling Cores
Chapter 4 Managing Nodes
Scheduling Accelerator HardwareTorque works with accelerators (such as NVIDIA GPUs and Intel MICs) and cancollect and report metrics from them or submit workload to them This featurerequires the use of the Moab scheduler See Accelerators on page 1 in theMoab Workload Manager Administrator Guide for information on configuringaccelerators in Torque
Node Resource Plug-inThere is now an API for creating a resource plug-in to allow the reporting ofcustom varattrs generic resources generic metrics and node featuresAdditionally jobs can be made to report custom resources through the sameplug-in The purpose of this plug-in is to allow some resource integration tohappen outside of the normal code release cycle and without having to be partof the main codebase for Torque This should allow specific sites to implementthings that are not of general interest as well as provide a tight integrationoption for resources that vary widely based on hardwareTorques resource plug-in capability provides an API through which a Torqueplug-in can add arbitrary generic resources generic metrics varattrs andfeatures to a node Additionally Torque plug-in can add arbitrary resourceusage per jobThe API can be found in trq_plugin_apih To implement a plug-in you mustimplement all of the API functions even if the function does nothing Animplementation that does nothing may be found in contribresource_plugincpp If you wish you may simply add the desired functionality to thisfile build the library and link it to the MOM at build time
Plug-in Implementation RecommendationsYour plug-in must execute very quickly in order to avoid causing problems forthe pbs_mom daemon The node resource portion of the plug-in has a 5second time limit and the job resource usage portion has a 3 second time limitThe node resource portion executes each time the MOM sends a status to pbs_server and the job resource usage portion executes once per job at the sametime interval The node resource and job resource portions block pbs_momwhile they are executing so they should execute in a short deterministicamount of timeRemember you are responsible for plug-ins so please design well and testthoroughly
Chapter 4 Managing Nodes
122 Scheduling Accelerator Hardware
Node Resource Plug-in 123
Building the Plug-inIf you do not change the name of the cpp file and wish to build it execute thefollowing
export TRQ_HEADER_LOCATION=usrlocalincludeg++ -fPIC -I $TRQ_HEADER_LOCATION resource_plugincpp -shared -o libresource_pluginso
NOTE Change TRQ_HEADER_LOCATION if you configured torque with the --prefix option
Testing the Plug-inNOTE You assume all responsibility for any plug-ins This document is intendedto assist you in testing the plug-ins but this list of suggested tests may not becomprehensive We do not assume responsibility if these suggested tests donot cover everything
Testing Basic FunctionalityOnce youve implemented and built your library you can begin testing Foryour convenience a simple test driver can be found in plugin_drivercppYou can build this executable and link it against your library as shown below inorder to manually verify the output
export PLUGIN_LIB_PATH=usrlocallibg++ plugin_drivercpp -I $TRQ_HEADER_LOCATION -L $PLUGIN_LIB_PATH -lresource_plugin -odriver
You can then execute the driver and manually inspect the output
driver
NOTE Change PLUGIN_LIB_PATH if you have installed the plug-in somewhereother than usrlocallibTo illustrate output a simple plug-in that reports
l 2 broams of stormlight used ignoring the random process ID found by thedriver
l 1024 hbmem for GRESl temperature of 752 for GMETRICSl octave = 324 for VARATTRSl haswell for features
will have the output
Chapter 4 Managing Nodes
$ driverYour plugin reported the following for the random pid 7976stormlight = 2broamsYour plugin reports the following for this host
GREShbmem = 1024
GMETRICStemperature = 7520
VARATTRSoctave = 324
FEATURES haswell
Testing for Memory LeaksIn order to prevent your compute nodes from being compromised for speed oreven going down due to out-of-memory conditions you should run your plug-inunder valigrind to test that it is correctly managing memoryAssuming you are executing the driver from the Testing Basic Functionalitysection you can run
valgrind --tool=memcheck --leak-check=full --log-file=plugin_valgrind_outputtxtdriver
If you are not familiar with valgrind a good primer can be found at TheValgrind Quick Start GuideWe recommend that you fix all errors reported by valgrind
Enabling the Plug-inOnce youve implemented built and thoroughly tested your plug-in(remember that our suggestions may not address everything) you will want toenable it in Torque Your plug-in can be linked in at build time
configure ltyour other optionsgt --with-resource-plugin=ltpath to your resourceplugingt
NOTE You will want to make sure that the path you specify is in $LD_LIBRARY_PATH or can otherwise be found by pbs_mom when you start the daemonOnce you build you can then start the new MOM and be able to observe theplug-ins output using pbsnodes qstat -f and in the accounting fileSample pbsnodes output
ltnormal outputgtgreshbmem = 20gmetrictemperature = 7620varattroctave = 324features = haswell
Chapter 4 Managing Nodes
124 Node Resource Plug-in
Node Resource Plug-in 125
The keywords at the front let Moab know what each line means so it can usethem accordinglySample accounting file entry
ltnormal entry until resources usedgt resources_usedcput=0resources_usedenergy_used=0 resources_usedmem=452kbresources_usedvmem=22372kb resources_usedwalltime=000500resources_usedstormlight=2broams
Your plug-in resources reported will appear in the form
resources_usedltname you suppliedgt=ltvalue you suppliedgt
The above example includes the arbitrary resource stormlight and the value of2broamsSample qstat -f output
ltnormal qstat -f outputgtresources_usedstormlight = 2broams
The resources used reported bythe plug-in will appear at the end of the qstat -foutput in the same format as in the accounting file
Chapter 4 Managing Nodes
126 Node Resource Plug-in
Queue Configuration 127
Chapter 5 Setting Server Policies
This section explains how to set up and configure your queue This section alsoexplains how to set up Torque to run in high availability mode For details seethese topics
l Queue Configurationl Server High Availability
Queue ConfigurationTo initially define a queue use the create subcommand of qmgr
gt qmgr -c create queue batch queue_type=execution
Once created the queue must be configured to be operational At a minimumthis includes setting the options started and enabled
gt qmgr -c set queue batch started=truegt qmgr -c set queue batch enabled=true
Further configuration is possible using any combination of the followingattributesFor Boolean attributes T t 1 Y and y are all synonymous with TRUE and Ff 0 N and n all mean FALSEFor queue_type E and R are synonymous with Execution and Routing(respectively)See these topics for more details
l Example Queue Configuration on page 128l Setting Queue Resource Controls with Resource Request Syntax 20 onpage 128
l Setting a Default Queue on page 129l Mapping a Queue to Subset of Resources on page 129l Creating a Routing Queue on page 130
Related TopicsQueue Attributes on page 421Server Parameters on page 315qalter - command which can move jobs from one queue to another
Chapter 5 Setting Server Policies
Example Queue ConfigurationThe following series of qmgr commands will create and configure a queuenamed batch
qmgr -c create queue batch queue_type=executionqmgr -c set queue batch started=trueqmgr -c set queue batch enabled=trueqmgr -c set queue batch resources_defaultnodes=1qmgr -c set queue batch resources_defaultwalltime=3600
This queue will accept new jobs and if not explicitly specified in the job willassign a nodecount of 1 and a walltime of 1 hour to each job
Related TopicsQueue Configuration
Setting Queue Resource Controls with Resource RequestSyntax 20Using the -L syntax you can set default minimum and maximum values forlproces memory swap disk sockets numanode cores and threads withresource request 20These can be set in the general format
qmgr -c set queue ltqueue_namegt req_information_[default|min|max][lprocs|memory|swap|disk|sockets|numanode|core|thread]
Example 5-1 Jobs using -L syntax
qmgr -c set queue q1 req_information_defaultlprocs=2qmgr -c set queue q1 req_information_minimummemory=2gbqmgr -c set queue q1 req_information_maximumcore=10
When req_information_default settings are set only jobs with the -Lsyntax are accepted Jobs submitted using the -l (resources_default)setting will be rejected with a message citing conflicting resourcerequests If you want a queue to be able to accept both kinds of jobs andstill be able to enforce defaults then simply set defaults for both resourcerequest types See Example 5-2 for more information
Example 5-2 Jobs using -L or -l syntax
This example shows how to enable a queue to be able to accept both kinds ofjobs and still be able to enforce defaults
Chapter 5 Setting Server Policies
128 Queue Configuration
Queue Configuration 129
qmgr -c create queue batchqmgr -c set queue batch queue_type = Executionqmgr -c set queue batch resources_defaultmem = 3gbqmgr -c set queue batch enabled = Trueqmgr -c set queue batch started = Trueqmgr -c set queue batch req_information_defaultmemory = 3gb
In this example jobs submitted that explicitly use the -L syntax will have thereq_information_defaultmemory setting applied If the job does not explicitlyuse this syntax then the resources_defaultmem setting will be applied
Related TopicsQueue Configuration
Setting a Default QueueBy default a job must explicitly specify which queue it is to run in To changethis behavior the server parameter default_queuemay be specified as in thefollowing example
qmgr -c set server default_queue=batch
Related TopicsQueue Configuration
Mapping a Queue to Subset of ResourcesTorque does not currently provide a simple mechanism for mapping queues tonodes However schedulers such as Moab and Maui can provide thisfunctionalityThe simplest method is using default_resourcesneednodes on anexecution queue setting it to a particular node attribute MauiMoab will usethis information to ensure that jobs in that queue will be assigned nodes withthat attribute For example suppose we have some nodes bought with moneyfrom the chemistry department and some nodes paid by the biologydepartment
TORQUE_HOMEserver_privnodesnode01 np=2 chemnode02 np=2 chemnode03 np=2 bionode04 np=2 bioqmgrset queue chem resources_defaultneednodes=chemset queue bio resources_defaultneednodes=bio
Chapter 5 Setting Server Policies
This example does not preclude other queues from accessing those nodesOne solution is to use some other generic attribute with all other nodesand queues
More advanced configurations can be made with standing reservations andQoSs
Related TopicsQueue Configuration
Creating a Routing QueueA routing queue will steer a job to a destination queue based on job attributesand queue constraints It is set up by creating a queue of queue_type Routewith a route_destinations attribute set as in the following example
qmgr
routing queuecreate queue routeset queue route queue_type = Routeset queue route route_destinations = reg_64set queue route route_destinations += reg_32set queue route route_destinations += regset queue route enabled = Trueset queue route started = True
queue for jobs using 1-15 nodescreate queue regset queue reg queue_type = Executionset queue reg resources_minncpus = 1set queue reg resources_minnodect = 1set queue reg resources_defaultncpus = 1set queue reg resources_defaultnodes = 1set queue reg enabled = Trueset queue reg started = True
queue for jobs using 16-31 nodescreate queue reg_32set queue reg_32 queue_type = Executionset queue reg_32 resources_minncpus = 31set queue reg_32 resources_minnodes = 16set queue reg_32 resources_defaultwalltime = 120000set queue reg_32 enabled = Trueset queue reg_32 started = True
queue for jobs using 32+ nodescreate queue reg_64set queue reg_64 queue_type = Executionset queue reg_64 resources_minncpus = 63set queue reg_64 resources_minnodes = 32set queue reg_64 resources_defaultwalltime = 060000set queue reg_64 enabled = Trueset queue reg_64 started = True
have all jobs go through the routing queueset server default_queue = routeset server resources_defaultncpus = 1set server resources_defaultwalltime = 240000
Chapter 5 Setting Server Policies
130 Queue Configuration
Server High Availability 131
In this example the compute nodes are dual processors and default walltimesare set according to the number of processorsnodes of a job Jobs with 32nodes (63 processors) or more will be given a default walltime of 6 hours Alsojobs with 16-31 nodes (31-62 processors) will be given a default walltime of 12hours All other jobs will have the server default walltime of 24 hoursThe ordering of the route_destinations is important In a routing queue a job isassigned to the first possible destination queue based on the resources_maxresources_min acl_users and acl_groups attributes In the precedingexample the attributes of a single processor job would first be checked againstthe reg_64 queue then the reg_32 queue and finally the reg queueAdding the following settings to the earlier configuration elucidates the queueresource requirements
qmgr
set queue reg resources_maxncpus = 30set queue reg resources_maxnodect = 15set queue reg_16 resources_maxncpus = 62set queue reg_16 resources_maxnodect = 31
Torque waits to apply the server and queue defaults until the job is assigned toits final execution queue Queue defaults override the server defaults If a jobdoes not have an attribute set the server and routing queue defaults are notapplied when queue resource limits are checked Consequently a job thatrequests 32 nodes (not ncpus=32) will not be checked against a min_resourcencpus limit Also for the preceding example a job without anyattributes set will be placed in the reg_64 queue since the server ncpus defaultwill be applied after the job is assigned to an execution queue
Routine queue defaults are not applied to job attributes in versions 210and before
If the error message qsub Job rejected by all possibledestinations is reported when submitting a job it may be necessary toadd queue location information (ie in the routing queues route_destinations attribute change batch to batchlocalhost)
Related TopicsQueue ConfigurationQueue Attributes
Server High AvailabilityTorque can run in a redundant or high availability mode This means that therecan be multiple instances of the server running and waiting to take over
Chapter 5 Setting Server Policies
processing in the event that the primary server fails
The high availability feature is available in the 23 and later versions ofTorque
The native high availability implementation as described here is onlysuitable for Moab Basic Edition Contact Adaptive Computing forinformation on high availability for Enterprise Edition
For more details see these sectionsl Redundant server host machinesl Enabling High Availabilityl Enhanced High Availability with Moabl How Commands Select the Correct Server Hostl Job Namesl Persistence of the pbs_server Processl High Availability of the NFS Serverl Installing Torque in High Availability Model Installing Torque in High Availability Mode on Headless Nodesl Example Setup of High Availability
Redundant server host machinesHigh availability enables Moab to continue running even if pbs_server isbrought down This is done by running multiple copies of pbs_server whichhave their torqueserver_priv directorymounted on a shared file system
Do not use symlinks when sharing the Torque home directory or server_priv directories A workaround for this is to use mount --rbindpathtoshare varspooltorque Also it is highly recommendedthat you only share the server_priv and not the entire TORQUE_HOMEDIR
The torqueserver_namemust include the host names of all nodes that runpbs_server All MOM nodes also must include the host names of all nodesrunning pbs_server in their torqueserver_name file The syntax of thetorqueserver_name is a comma delimited list of host namesFor example
host1host2host3
Chapter 5 Setting Server Policies
132 Server High Availability
Server High Availability 133
When configuring high availability do not use $pbsserver in the pbs_momconfiguration to specify the server host names You must use the TORQUE_HOMEDIRserver_name file
All instances of pbs_server need to be started with the --ha command lineoption that allows the servers to run at the same time Only the first server tostart will complete the full startup The second server to start will block veryearly in the startup when it tries to lock the file torqueserver_privserverlock When the second server cannot obtain the lock it will spinin a loop and wait for the lock to clear The sleep time between checks of thelock file is one secondNotice that not only can the servers run on independent server hardware therecan also be multiple instances of the pbs_server running on the same machineThis was not possible before as the second one to start would always write anerror and quit when it could not obtain the lock
Enabling High AvailabilityTo use high availability you must start each instance of pbs_server with the --ha optionThree server options help manage high availability The server parameters arelock_file lock_file_update_time and lock_file_check_timeThe lock_file option allows the administrator to change the location of the lockfile The default location is torqueserver_priv If the lock_file option isused the new location must be on the shared partition so all servers haveaccessThe lock_file_update_time and lock_file_check_time parameters are used bythe servers to determine if the primary server is active The primary pbs_server will update the lock file based on the lock_file_update_time (defaultvalue of 3 seconds) All backup pbs_servers will check the lock file as indicatedby the lock_file_check_time parameter (default value of 9 seconds) The lock_file_update_time must be less than the lock_file_check_time When a failureoccurs the backup pbs_server takes up to the lock_file_check_time value totake over
gt qmgr -c set server lock_file_check_time=5
In the above example after the primary pbs_server goes down the backuppbs_server takes up to 5 seconds to take over It takes additional time for allMOMs to switch over to the new pbs_server
The clock on the primary and redundant servers must be synchronized inorder for high availability to work Use a utility such as NTP to ensure yourservers have a synchronized time
Chapter 5 Setting Server Policies
Do not use anything but a simple NFS fileshare that is not used by anythingelse (ie only Moab can use the fileshare)
Do not use a general-purpose NAS parallel file system or company-wideshared infrastructure to set up Moab high availability using native highavailability
Enhanced High Availability with MoabWhen Torque is run with an external scheduler such as Moab and the pbs_server is not running on the same host as Moab pbs_server needs to knowwhere to find the scheduler To do this use the -l option as demonstrated inthe example below (the port is required and the default is 15004)
l Red Hat 6 or SUSE 11-based systems
gt pbs_server -l ltmoabhostportgt
l Red Hat 7 or SUSE 12-based systemsSet the PBS_ARGS environment variable in the etcsysconfigpbs_server file Set PBS_ARGS=-l ltmoabhostportgt where moabhost is thename of the alternate server node and port is the port on which Moab onthe alternate server node is listening (default 15004)
If Moab is running in HA mode set the -l option for each redundant serverl Red Hat 6 or SUSE 11-based systems
gt pbs_server -l ltmoabhost1portgt -l ltmoabhost2portgt
l Red Hat 7 or SUSE 12-based systemsSet the PBS_ARGS environment variable in the etcsysconfigpbs_server file to PBS_ARGS=-l ltmoabhostportgt -lltmoabhost2portgt
If pbs_server and Moab run on the same host use the --ha option asdemonstrated in the example below
l Red Hat 6 or SUSE 11-based systems
gt pbs_server --ha
l Red Hat 7 or SUSE 12-based systemsSet the PBS_ARGS environment variable in the etcsysconfigpbs_server file toPBS_ARGS=--ha
Chapter 5 Setting Server Policies
134 Server High Availability
Server High Availability 135
The root user of each Moab host must be added to the operators andmanagers lists of the server This enables Moab to execute root leveloperations in Torque
How Commands Select the Correct Server HostThe various commands that send messages to pbs_server usually have anoption of specifying the server name on the command line or if none isspecified will use the default server name The default server name comeseither from the environment variable PBS_DEFAULT or from the filetorqueserver_nameWhen a command is executed and no explicit server is mentioned an attemptis made to connect to the first server name in the list of hosts from PBS_DEFAULT or torqueserver_name If this fails the next server name is triedIf all servers in the list are unreachable an error is returned and the commandfailsNote that there is a period of time after the failure of the current server duringwhich the new server is starting up where it is unable to process commandsThe new server must read the existing configuration and job information fromthe disk so the length of time that commands cannot be received variesCommands issued during this period of time might fail due to timeoutsexpiring
Job NamesJob names normally contain the name of the host machine where pbs_server isrunning When job names are constructed only the server name in $PBS_DEFAULT or the first name from the server specification list TORQUE_HOMEserver_name is used in building the job name
Persistence of the pbs_server ProcessThe system administrator must ensure that pbs_server continues to run on theserver nodes This could be as simple as a cron job that counts the number ofpbs_servers in the process table and starts some more if needed
High Availability of the NFS Server
Before installing a specific NFS HA solution please contact AdaptiveComputing Support for a detailed discussion on NFS HA type andimplementation path
One consideration of this implementation is that it depends on NFS file systemalso being redundant NFS can be set up as a redundant service See thefollowing
Chapter 5 Setting Server Policies
l Setting Up A Highly Available NFS Serverl Making NFS Work On Your Networkl Sourceforge Linux NFS FAQl NFS v4main site
There are also other ways to set up a shared file system See the followingl Red Hat Global File Systeml Data sharing with a GFS storage cluster
Installing Torque in High Availability ModeThe following procedure demonstrates a Torque installation in high availability(HA) modeRequirements
l gcc (GCC) 412l BASH shelll Servers configured the following way
o 2main servers with identical architectureo server1mdash Primary server running Torque with a shared filesystem (this example uses NFS)
o server2mdashSecondary server running with Torque with ashared file system (this example uses NFS)
o fileServermdashShared file system (this example uses NFS)o Compute nodes
To install Torque in HA mode
1 Stop all firewalls or update your firewall to allow traffic from Torqueservicesl Red Hat 6 or SUSE 11-based systems
gt service iptables stopgt chkconfig iptables off
l Red Hat 7 or SUSE 12-based systems
gt systemctl stop firewalldgt systemctl disable firewalld
If you are unable to stop the firewall due to infrastructure restriction openthe following ports
Chapter 5 Setting Server Policies
136 Server High Availability
Server High Availability 137
l 15001[tcpudp]
l 15002[tcpudp]
l 15003[tcpudp]
2 Disable SELinux
gt vi etcsysconfigselinuxSELINUX=disabled
3 Update your main ~bashrc profile to ensure you are always referencingthe applications to be installed on all servers
Torqueexport TORQUE_HOME=varspooltorque
Library Path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH$TORQUE_HOMElib
Update system pathsexport PATH=$TORQUE_HOMEbin$TORQUE_HOMEsbin$PATH
4 Verify server1 and server2 are resolvable via either DNS or looking for anentry in the etchosts file
5 Configure the NFS Mounts by following these stepsa Create mount point folders on fileServer
fileServer mkdir -m 0755 varspooltorquefileServer mkdir -m 0750 varspooltorqueserver_priv
b Update etcexports on fileServer The IP addresses should be thatof server2
varspooltorqueserver_priv 192168002552552550(rwsyncno_root_squash)
c Update the list of NFS exported file systems
fileServer exportfs -r
6 If the NFS daemons are not already running on fileServer start theml Red Hat 6 or SUSE 11-based systems
gt service rpcbind restartgt service nfs-server startgt service nfs-lock startgt service nfs-idmap start
Chapter 5 Setting Server Policies
l Red Hat 7 or SUSE 12-based systems
gt systemctl restart rpcbindservicegt systemctl start nfs-serverservicegt systemctl start nfs-lockservicegt systemctl start nfs-idmapservice
7 Mount the exported file systems on server1 by following these stepsa Create the directory reference and mount them
server1 mkdir varspooltorqueserver_priv
Repeat this process for server2b Update etcfstab on server1 to ensure that NFS mount is performedon startup
fileServervarspooltorqueserver_priv varspooltorqueserver_priv nfsrsize= 8192wsize=8192timeo=14intr
Repeat this step for server28 Install Torque by following these stepsa Download and extract Torque611 on server1
server1 wget httpgithubcomadaptivecomputingtorquebranches611torque-611targzserver1 tar -xvzf torque-611targz
b Navigate to the Torque directory and compile Torque on server1
server1 configureserver1 makeserver1 make installserver1 make packages
c If the installation directory is shared on both head nodes then run makeinstall on server1
server1 make install
If the installation directory is not shared repeat step 8a-b (downloadingand installing Torque) on server2
9 Start trqauthdl Red Hat 6 or SUSE 11-based systems
server1 service trqauthd start
Chapter 5 Setting Server Policies
138 Server High Availability
Server High Availability 139
l Red Hat 7 or SUSE 12-based systems
server1 systemctl start trqauthd
10 Configure Torque for HAa List the host names of all nodes that run pbs_server in the
torqueserver_name file You must also include the host names of allnodes running pbs_server in the torqueserver_name file of eachMOM node The syntax of torqueserver_name is a comma-delimitedlist of host names
server1server2
b Create a simple queue configuration for Torque job queues on server1
server1 pbs_server -t createserver1 qmgr -c ldquoset server scheduling=truerdquoserver1 qmgr -c ldquocreate queue batch queue_type=executionrdquoserver1 qmgr -c ldquoset queue batch started=truerdquoserver1 qmgr -c ldquoset queue batch enabled=truerdquoserver1 qmgr -c ldquoset queue batch resources_defaultnodes=1rdquoserver1 qmgr -c ldquoset queue batch resources_defaultwalltime=3600rdquoserver1 qmgr -c ldquoset server default_queue=batchrdquo
Because server_priv is a shared drive you do not need torepeat this step on server2
c Add the root users of Torque to the Torque configuration as an operatorand manager
server1 qmgr -c ldquoset server managers += rootserver1rdquoserver1 qmgr -c ldquoset server managers += rootserver2rdquoserver1 qmgr -c ldquoset server operators += rootserver1rdquoserver1 qmgr -c ldquoset server operators += rootserver2rdquo
Because server_priv is a shared drive you do not need torepeat this step on Server 2
d You must update the lock file mechanism for Torque in order todetermine which server is the primary To do so use the lock_file_update_time and lock_file_check_time parameters The primarypbs_server will update the lock file based on the specified lock_file_update_time (default value of 3 seconds) All backup pbs_servers willcheck the lock file as indicated by the lock_file_check_timeparameter (default value of 9 seconds) The lock_file_update_timemust be less than the lock_file_check_time When a failure occursthe backup pbs_server takes up to the lock_file_check_time value totake over
Chapter 5 Setting Server Policies
server1 qmgr -c ldquoset server lock_file_check_time=5rdquoserver1 qmgr -c ldquoset server lock_file_update_time=3rdquo
Because server_priv is a shared drive you do not need torepeat this step on server2
e List the servers running pbs_server in the Torqueacl_hosts file
server1 qmgr -c ldquoset server acl_hosts += server1rdquoserver1 qmgr -c ldquoset server acl_hosts += server2rdquo
Because server_priv is a shared drive you do not need torepeat this step on server2
f Restart the running pbs_server in HA model Red Hat 6 or SUSE 11-based systems
service pbs_server stop
l Red Hat 7 or SUSE 12-based systems
systemctl stop pbs_server
g Start the pbs_server on the secondary serverl Red Hat 6 or SUSE 11-based systems
service pbs_server start
l Red Hat 7 or SUSE 12-based systems
systemctl start pbs_server
11 Check the status of Torque in HA mode
server1 qmgr -c ldquop srdquoserver2 qmgr -c ldquop srdquo
The commands above returns all settings from the active Torque server from either node
a Drop one of the pbs_servers to verify that the secondary server picks upthe requestl Red Hat 6 or SUSE 11-based systems
service pbs_server stop
Chapter 5 Setting Server Policies
140 Server High Availability
Server High Availability 141
l Red Hat 7 or SUSE 12-based systems
systemctl stop pbs_server
b Stop the pbs_server on server2 and restart pbs_server on server1 toverify that both nodes can handle a request from the other
12 Install a pbs_mom on the compute nodesa Copy the install scripts to the compute nodes and installb Navigate to the shared source directory of Torque and run the following
node1 torque-package-mom-linux-x86_64sh --installnode2 torque-package-clients-linux-x86_64sh --install
Repeat this for each compute node Verify that thevarspooltorqueserver-name file shows all your compute nodes
c On server1 or server2 configure the nodes file to identify all availableMOMs To do so edit the varspooltorqueserver_privnodes file
node1 np=2node2 np=2
Change the np flag to reflect number of available processors on thatnode
d Recycle the pbs_servers to verify that they pick up the MOM configurationl Red Hat 6 or SUSE 11-based systems
service pbs_server stop
l Red Hat 7 or SUSE 12-based systems
systemctl stop pbs_server
e Start the pbs_mom on each execution nodel Red Hat 6 or SUSE 11-based systems
service pbs_mom start
l Red Hat 7 or SUSE 12-based systems
systemctl start pbs_mom
Installing Torque in High Availability Mode on HeadlessNodesThe following procedure demonstrates a Torque installation in high availability(HA) mode on nodes with no local hard drive
Chapter 5 Setting Server Policies
Requirements
l gcc (GCC) 412l BASH shelll Servers (these cannot be two VMs on the same hypervisor) configuredthe following way
o 2main servers with identical architectureo server1mdash Primary server running Torque with a file systemshare (this example uses NFS)
o server2mdashSecondary server running with Torque with a filesystem share (this example uses NFS)
o Compute nodeso fileServermdashA shared file system server (this example usesNFS)
To install Torque in HA mode on a node with no local hard drive
1 Stop all firewalls or update your firewall to allow traffic from Torqueservicesl Red Hat 6 or SUSE 11-based systems
gt service iptables stopgt chkconfig iptables off
l Red Hat 7 or SUSE 12-based systems
gt systemctl stop firewalldgt systemctl disable firewalld
If you are unable to stop the firewall due to infrastructure restriction openthe following portsl 15001[tcpudp]
l 15002[tcpudp]
l 15003[tcpudp]
2 Disable SELinux
gt vi etcsysconfigselinux
SELINUX=disabled
3 Update your main ~bashrc profile to ensure you are always referencingthe applications to be installed on all servers
Chapter 5 Setting Server Policies
142 Server High Availability
Server High Availability 143
Torqueexport TORQUE_HOME=varspooltorque
Library Path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH$TORQUE_HOMElib
Update system pathsexport PATH=$TORQUE_HOMEbin$TORQUE_HOMEsbin$PATH
4 Verify server1 and server2 are resolvable via either DNS or looking for anentry in the etchosts file
5 Configure the NFS Mounts by following these stepsa Create mount point folders on fileServer
fileServer mkdir -m 0755 varspooltorque
b Update etcexports on fileServer The IP addresses should be thatof server2
varspooltorque 192168002552552550(rwsyncno_root_squash)
c Update the list of NFS exported file systems
fileServer exportfs -r
6 If the NFS daemons are not already running on fileServer start theml Red Hat 6 or SUSE 11-based systems
gt service rpcbind restartgt service nfs-server startgt service nfs-lock startgt service nfs-idmap start
l Red Hat 7 or SUSE 12-based systems
gt systemctl restart rpcbindservicegt systemctl start nfs-serverservicegt systemctl start nfs-lockservicegt systemctl start nfs-idmapservice
7 Mount the exported file systems on server1 by following these stepsa Create the directory reference and mount them
server1 mkdir varspooltorque
Repeat this process for server2b Update etcfstab on server1 to ensure that NFS mount is performedon startup
Chapter 5 Setting Server Policies
fileServervarspooltorqueserver_priv varspooltorqueserver_priv nfsrsize= 8192wsize=8192timeo=14intr
Repeat this step for server28 Install Torque by following these stepsa Download and extract Torque611 on server1
server1 wget httpgithubcomadaptivecomputingtorquebranches611torque-611targzserver1 tar -xvzf torque-611targz
b Navigate to the Torque directory and compile Torque with the HA flag onserver1
server1 configure --prefix=varspooltorqueserver1 makeserver1 make installserver1 make packages
c If the installation directory is shared on both head nodes then run makeinstall on server1
server1 make install
If the installation directory is not shared repeat step 8a-b (downloadingand installing Torque) on server2
9 Start trqauthdl Red Hat 6 or SUSE 11-based systems
server1 service trqauthd start
l Red Hat 7 or SUSE 12-based systems
server1 systemctl start trqauthd
10 Configure Torque for HAa List the host names of all nodes that run pbs_server in the
torqueserver_name file You must also include the host names of allnodes running pbs_server in the torqueserver_name file of eachMOM node The syntax of torqueserver_name is a comma-delimitedlist of host names
server1server2
b Create a simple queue configuration for Torque job queues on server1
Chapter 5 Setting Server Policies
144 Server High Availability
Server High Availability 145
server1 pbs_server -t createserver1 qmgr -c ldquoset server scheduling=truerdquoserver1 qmgr -c ldquocreate queue batch queue_type=executionrdquoserver1 qmgr -c ldquoset queue batch started=truerdquoserver1 qmgr -c ldquoset queue batch enabled=truerdquoserver1 qmgr -c ldquoset queue batch resources_defaultnodes=1rdquoserver1 qmgr -c ldquoset queue batch resources_defaultwalltime=3600rdquoserver1 qmgr -c ldquoset server default_queue=batchrdquo
Because TORQUE_HOME is a shared drive you do not need to repeatthis step on server2
c Add the root users of Torque to the Torque configuration as an operatorand manager
server1 qmgr -c ldquoset server managers += rootserver1rdquoserver1 qmgr -c ldquoset server managers += rootserver2rdquoserver1 qmgr -c ldquoset server operators += rootserver1rdquoserver1 qmgr -c ldquoset server operators += rootserver2rdquo
Because TORQUE_HOME is a shared drive you do not need to repeatthis step on server2
d You must update the lock file mechanism for Torque in order todetermine which server is the primary To do so use the lock_file_update_time and lock_file_check_time parameters The primarypbs_server will update the lock file based on the specified lock_file_update_time (default value of 3 seconds) All backup pbs_servers willcheck the lock file as indicated by the lock_file_check_timeparameter (default value of 9 seconds) The lock_file_update_timemust be less than the lock_file_check_time When a failure occursthe backup pbs_server takes up to the lock_file_check_time value totake over
server1 qmgr -c ldquoset server lock_file_check_time=5rdquoserver1 qmgr -c ldquoset server lock_file_update_time=3rdquo
Because TORQUE_HOME is a shared drive you do not need to repeatthis step on server2
e List the servers running pbs_server in the Torqueacl_hosts file
server1 qmgr -c ldquoset server acl_hosts += server1rdquoserver1 qmgr -c ldquoset server acl_hosts += server2rdquo
Because TORQUE_HOME is a shared drive you do not need to repeatthis step on server2
f Restart the running pbs_server in HA mode
Chapter 5 Setting Server Policies
l Red Hat 6 or SUSE 11-based systems
service pbs_server stop
l Red Hat 7 or SUSE 12-based systems
systemctl stop pbs_server
g Start the pbs_server on the secondary serverl Red Hat 6 or SUSE 11-based systems
service pbs_server start
l Red Hat 7 or SUSE 12-based systems
systemctl start pbs_server
11 Check the status of Torque in HA mode
server1 qmgr -c ldquop srdquoserver2 qmgr -c ldquop srdquo
The commands above returns all settings from the active Torque server from either node
a Drop one of the pbs_servers to verify that the secondary server picks upthe requestl Red Hat 6 or SUSE 11-based systems
service pbs_server stop
l Red Hat 7 or SUSE 12-based systems
systemctl stop pbs_server
b Stop the pbs_server on server2 and restart pbs_server on server1 toverify that both nodes can handle a request from the other
12 Install a pbs_mom on the compute nodesa On server1 or server2 configure the nodes file to identify all availableMOMs To do so edit the varspooltorqueserver_privnodesfile
node1 np=2node2 np=2
Change the np flag to reflect number of available processors on thatnode
b Recycle the pbs_servers to verify that they pick up the MOM configuration
Chapter 5 Setting Server Policies
146 Server High Availability
Server High Availability 147
l Red Hat 6 or SUSE 11-based systems
service pbs_server stop
l Red Hat 7 or SUSE 12-based systems
systemctl stop pbs_server
You can specify command line arguments for pbs_server using thePBS_ARGS environment variable in the etcsysconfigpbs_server file Set PBS_ARGS=--ha -l lthostgtltportgt wherelthostgt is the name of the alternate server node and ltportgt is theport on which pbs_server on the alternate server node is listening(default 15004)
c Start the pbs_mom on each execution nodel Red Hat 6 or SUSE 11-based systems
service pbs_mom start
l Red Hat 7 or SUSE 12-based systems
systemctl start pbs_mom
Example Setup of High Availability1 The machines running pbs_server must have access to a shared server_
priv directory (usually an NFS share on a MoM)2 All MoMsmust have the same content in their server_name file This can bedone manually or via an NFS share The server_name file contains acomma-delimited list of the hosts that run pbs_server
List of all servers running pbs_serverserver1server2
3 The machines running pbs_server must be listed in acl_hosts
gt qmgr -c set server acl_hosts += server1gt qmgr -c set server acl_hosts += server2
4 Start pbs_server with the --ha optionl Red Hat 6 or SUSE 11-based systems
[rootserver1]$ pbs_server --ha[rootserver2]$ pbs_server --ha
Chapter 5 Setting Server Policies
l Red Hat 7 or SUSE 12-based systems
[rootserver1]$ systemctl start pbs_server[rootserver2]$ systemctl start pbs_server
Related TopicsSetting Server PoliciesQueue Configuration
Setting min_threads andmax_threadsThere are two threadpools in Torque one for background tasks and one forincoming requests from the MOMs and through the API (client commandsMoab and so forth) The min_threads and max_threads parameters controlthe number of total threads used for both not for each individually Theincoming requests threadpool has three-quarters of min_threads for itsminimum and three-quarters of max_threads for its maximum with thebackground pool receiving the other one-quarterAdditionally pbs_server no longer allows incoming requests to pile upindefinitely When the threadpool is too busy for incoming requests it indicatessuch returning PBSE_SERVER_BUSY with the accompanying message thatPbs Server is currently too busy to service this request Please retry thisrequest The threshold for this message if the request is from a manager isthat at least two threads be available in the threadpool If the request comesfrom a non-manager 5 of the threadpool must be available for the requestto be serviced Note that availability is calculated based on the maximumthreads and not based on the current number of threads allocatedIf an undesirably large number of requests are given a busy response oneoption is to increase the number of maximum threads for the threadpool If theload on the server is already very high then this is probably not going to helpbut if the CPU load is lower then it may help Remember that by default thethreadpool shrinks down once the extra threads are no longer needed This iscontrolled via the thread_idle_seconds server parameter
Any change in the min_threads max_threads or thread_idle_secondsparameters requires a restart of pbs_server to take effect
Chapter 5 Setting Server Policies
148 Setting min_threads and max_threads
149
Chapter 6 Integrating Schedulers for Torque
Selecting the cluster scheduler is an important decision and significantly affectscluster utilization responsiveness availability and intelligence The defaultTorque scheduler pbs_sched is very basic and will provide poor utilization ofyour clusters resources Other options such as Maui Scheduler or MoabWorkload Manager are highly recommended If you are using Maui or MoabseeMoab-Torque Integration Guide on page 1 in the Moab WorkloadManager Administrator Guide If using pbs_sched simply start the pbs_scheddaemon
If you are installing Moab Cluster Manager Torque and Moab wereconfigured at installation for interoperability and no further action isrequired
Chapter 6 Integrating Schedulers for Torque
150
SCP Setup 151
Chapter 7 Configuring Data Management
This chapter provides instructions to configure Torque for data managementpurposes For example if you want to copy stdout and stderr files back to thesubmit hostIn this chapters
l SCP Setupl NFS and Other Networked Filesystemsl File stage-instage-out
SCP SetupTo use SCP-based data management Torque must be authorized to migratedata to any of the compute nodes If this is not already enabled within thecluster this can be achieved with the process described below This processenables uni-directional access for a particular user from a source host to adestination host
These directions were written using OpenSSH version 36 and may nottransfer correctly to older versions
To set up Torque for SCP follow the directions in each of these topicsl Generating SSH Key on Source Hostl Copying Public SSH Key to Each Destination Hostl Configuring the SSH Daemon on Each Destination Hostl Validating Correct SSH Configurationl Enabling Bi-Directional SCP Accessl Compiling Torque to Support SCPl Troubleshooting
Related TopicsConfiguring Data Management
Generating SSH Key on Source HostOn the source host as the transfer user execute the following
gt ssh-keygen -t rsa
Chapter 7 Configuring Data Management
This will prompt for a passphrase (optional) and create two files (id_rsa andid_rsapub) inside ~ssh
Related TopicsSCP SetupCopying Public SSH Key to Each Destination Host
Copying Public SSH Key to Each Destination HostTransfer public key to each destination host as the transfer userEasy key copy
ssh-copy-id [-i [identity_file]] [user]machine
Manual steps to copy keys
gt scp ~sshid_rsapub destHost~ (enter password)
Create an authorized_keys file on each destination host
gt ssh destHost (enter password)gt cat id_rsapub gtgt sshauthorized_keys
If the ssh directory does not exist create it with 700 privileges (mkdir sshchmod 700 ssh)
gt chmod 700 sshauthorized_keys
Related TopicsGenerating SSH Key on Source HostSCP Setup
Configuring the SSH Daemon on Each Destination HostSome configuration of the SSH daemonmay be required on the destinationhost (Because this is not always the case see Validating Correct SSHConfiguration and test the changesmade to this point If the tests fail proceedwith this step and then try testing again) Typically this is done by editing theetcsshsshd_config file (root access needed) To verify correctconfiguration see that the following attributes are set (not commented)
RSAAuthentication yesPubkeyAuthentication yes
If configuration changes were required the SSH daemon will need to berestarted (root access needed)
gt etcinitdsshd restart
Chapter 7 Configuring Data Management
152 SCP Setup
SCP Setup 153
Related TopicsSCP Setup
Validating Correct SSH ConfigurationIf all is properly configured the following command issued on the source hostshould succeed and not prompt for a password
gt scp destHostetcmotd tmp
If this is your first time accessing destination from source it may ask you ifyou want to add the fingerprint to a file of known hosts If you specify yesthis message should no longer appear and should not interfere with scpcopying via Torque Also it is important that the full hostname appear inthe known_hosts file To do this use the full hostname for destHost as inmachinedomainorg instead of just machine
Related TopicsSCP Setup
Enabling Bi-Directional SCP AccessThe preceding steps allow source access to destination without prompting for apassword The reverse however is not true Repeat the steps but this timeusing the destination as the source etc to enable bi-directional SCP access(ie source can send to destination and destination can send to source withoutpassword prompts)
Related TopicsSCP Setup
Compiling Torque to Support SCP
In Torque 21 and later SCP is the default remote copy protocol Theseinstructions are only necessary for earlier versions
Torque must be re-configured (and then rebuilt) to use SCP by passing in the --with-scp flag to the configure script
gt configure --prefix=xxx --with-scpgt make
Chapter 7 Configuring Data Management
If special SCP flags are required in your local setup these can be specifiedusing the $rcpcmd parameter
Related TopicsSCP Setup
TroubleshootingIf after following all of the instructions in this section (see SCP Setup) Torqueis still having problems transferring data with SCP set the PBSDEBUGenvironment variable and restart the pbs_mom for details about copying Alsocheck the MOM log files for more details
Related TopicsSCP Setup
NFS and Other Networked FilesystemsWhen a batch job starts its stdin file (if specified) is copied from thesubmission directory on the remote submission host This file is placed in the$PBSMOMHOME directory on the mother superior node (ieusrspoolPBSspool) As the job runs stdout and stderr files aregenerated and placed in this directory using the naming convention $JOBIDOUand $JOBIDERWhen the job completes the MOM copies the files into the directory from whichthe job was submitted By default this file copying will be accomplished using aremote copy facility such as rcp or scpIf a shared file system such as NFS DFS or AFS is available a site can specifythat the MOM should take advantage of this by specifying the $usecp directiveinside the MOM configuration file (located in the $PBSMOMHOMEmom_privdirectory) using the following format$usecp ltHOSTgtltSRCDIRgt ltDSTDIRgt
ltHOSTgt can be specified with a leading wildcard () character The followingexample demonstrates this directive
mom_privconfig
home is NFS mounted on all hosts$usecp home home submission hosts in domain ftecom should map data directory on submit host to usrlocaldata on compute host$usecp ftecomdata usrlocaldata
Chapter 7 Configuring Data Management
154 NFS and Other Networked Filesystems
File stage-instage-out 155
If for any reason the MOM daemon is unable to copy the output or error files tothe submission directory these files are instead copied to the undelivereddirectory also located in $PBSMOMHOME
Related TopicsConfiguring Data Management
File stage-instage-outFile staging requirements are specified using the stagein and stageoutdirectives of the qsub command Stagein requests occur before the job startsexecution while stageout requests happen after a job completesOn completion of the job all staged-in and staged-out files are removed fromthe execution system The file_list is in the form local_filehostnameremote_file[] regardless of the direction of the copyThe name local_file is the name of the file on the system where the jobexecuted It may be an absolute path or relative to the home directory of theuser The name remote_file is the destination name on the host specified byhostname The name may be absolute or relative to the users home directoryon the destination host The use of wildcards in the file name is notrecommendedThe file namesmap to a remote copy program (rcpscpcp depending onconfiguration) called on the execution system in the following mannerFor stagein rcpscp hostnameremote_file local_file
For stageout rcpscp local_file hostnameremote_file
Examples stage homejohninput_sourcetxt from node13fsc to homejohninput_destinationtxt on master compute nodegt qsub -l nodes=1walltime=100 -W stagein=input_sourcetxtnode13fschomejohninput_destinationtxt
stage homebilloutput_sourcetxt on master compute node to tmpoutput_destinationtxt on node15fscgt qsub -l nodes=1walltime=100 -W stageout=tmpoutput_sourcetxtnode15fschomebilloutput_destinationtxt
$ fortune gtxxxecho cat xxx|qsub -W stagein=xxx`hostname`xxx199myhostmydomain$ cat STDIN199Anyone who has had a bull by the tail knows five or six more thingsthan someone who hasnt-- Mark Twain
Chapter 7 Configuring Data Management
Related TopicsConfiguring Data Management
Chapter 7 Configuring Data Management
156 File stage-instage-out
MPICH 157
Chapter 8 MPI (Message Passing Interface) Support
A message passing library is used by parallel jobs to augment communicationbetween the tasks distributed across the cluster Torque can run with anymessage passing library and provides limited integration with some MPIlibrariesFor more information see these topics
l MPICHl Open MPI
MPICHOne of the most popular MPI libraries is MPICH available from ArgonneNational Lab If using this release you may want to consider also using thempiexec tool for launching MPI applications Support for mpiexec has beenintegrated into Torque
MPIExec Overviewmpiexec is a replacement program for the scriptmpirun which is part of thempich package It is used to initialize a parallel job from within a PBS batch orinteractive environment mpiexec uses the taskmanager library of PBS tospawn copies of the executable on the nodes in a PBS allocationReasons to use mpiexec rather than a script (mpirun) or an external daemon(mpd)
l Starting tasks with the taskmanager (TM) interface is much faster thaninvoking a separate rsh once for each process
l Resources used by the spawned processes are accounted correctly withmpiexec and reported in the PBS logs because all the processes of aparallel job remain under the control of PBS unlike when using mpirun-like scripts
l Tasks that exceed their assigned limits of CPU time wallclock timememory usage or disk space are killed cleanly by PBS It is quite hard forprocesses to escape control of the resource manager when usingmpiexec
l You can use mpiexec to enforce a security policy If all jobs are forced tospawn using mpiexec and the PBS execution environment it is notnecessary to enable rsh or ssh access to the compute nodes in the cluster
For more information see the mpiexec homepage
Chapter 8 MPI (Message Passing Interface) Support
MPIExec TroubleshootingAlthough problems with mpiexec are rare if issues do occur the followingsteps may be useful
l Determine current version using mpiexec --version and review thechange log available on the MPI homepage to determine if the reportedissue has already been corrected
l Send email to the mpiexec mailing list at mpiexecoscedul Browse the mpiexec user list archives for similar problems andresolutions
l Read the FAQ contained in the README file and the mpiexec man pagescontained within the mpiexec distribution
l Increase the logging of mpiexec operation with mpiexec --verbose(reports messages to stderr)
l Increase logging of the master and slave resource manager executiondaemons associated with the job (with Torque use $loglevel to 5 orhigher in $TORQUEROOTmom_privconfig and look for tm messagesafter associated join jobmessages)
l Use tracejob (included with Torque) or qtracejob (included with OSCspbstools package) to isolate failures within the cluster
l If the message exec Error get_hosts pbs_connect Accessfrom host not allowed or unknown host appears this indicatesthat mpiexec cannot communicate with the pbs_server daemon In mostcases this indicates that the $TORQUEROOTserver_name file points to thewrong server or the node cannot resolve the servers name The qstatcommand can be run on the node to test this
General MPI TroubleshootingWhen using MPICH some sites have issues with orphaned MPI child processesremaining on the system after the master MPI process has been terminatedTo address this Torque epilogue scripts can be created that properly clean upthe orphaned processes (see Prologue and Epilogue Scripts)
Related TopicsMPI (Message Passing Interface) Support
OpenMPIOpen MPI is a new MPI implementation that combines technologies frommultiple projects to create the best possible library It supports the TMinterface for integration with Torque More information is available in the FAQ
Chapter 8 MPI (Message Passing Interface) Support
158 OpenMPI
OpenMPI 159
TM AwareTo make use of Moabs TM interface MPI must be configured to be TM awareUse these guidelines1 If you have installed from source you need to use configure --with-tmwhen you configure and make openmpi
2 Runmpirun without the -machinefile Moab will copy down theenvironment PATH and Library path down to each sister MOM If -machinefile is used mpirun will bypass the TM interface
Example 8-1 Without TM aware
[jboothsupport-mpi1 ~]$ usrlib64openmpibinmpirun -np 4 -machinefile $PBS_NODEFILE echosh=============support-mpi1=============usrlib64openmpibinusrlib64openmpibinusrlib64qt-33binusrlocalsbinusrlocalbinsbinbinusrsbinusrbinrootbinoptmoabbinoptmoabsbinhomejboothbin
usrlib64openmpilibusrlib64openmpilib
=============support-mpi1=============usrlib64openmpibinusrlib64openmpibinusrlib64qt-33binusrlocalsbinusrlocalbinsbinbinusrsbinusrbinrootbinoptmoabbinoptmoabsbinhomejboothbin
usrlib64openmpilibusrlib64openmpilib
=============support-mpi2=============usrlib64openmpibinusrlib64openmpibinusrlib64qt-33binusrlocalbinbinusrbin
usrlib64openmpilibusrlib64openmpilib
=============support-mpi2=============usrlib64openmpibinusrlib64openmpibinusrlib64qt-33binusrlocalbinbinusrbin
usrlib64openmpilibusrlib64openmpilib
The paths optmoabbin and optmoabsbin were not passed down to the sister MOMs
Chapter 8 MPI (Message Passing Interface) Support
Example 8-2 With TM aware
[jboothsupport-mpi1 ~]$ usrlocalbinmpirun -np 4 echosh=============support-mpi1=============usrlocalbinusrlocalbinusrlib64qt-33binusrlocalsbinusrlocalbinsbinbinusrsbinusrbinrootbinoptmoabbinoptmoabsbinhomejboothbin
usrlocallibusrlocallib
=============support-mpi1=============usrlocalbinusrlocalbinusrlib64qt-33binusrlocalsbinusrlocalbinsbinbinusrsbinusrbinrootbinoptmoabbinoptmoabsbinhomejboothbin
usrlocallibusrlocallib
=============support-mpi2=============usrlocalbinusrlocalbinusrlocalbinusrlib64qt-33binusrlocalsbinusrlocalbinsbinbinusrsbinusrbinrootbinoptmoabbinoptmoabsbinhomejboothbin
usrlocallibusrlocallibusrlocallib
=============support-mpi2=============usrlocalbinusrlocalbinusrlocalbinusrlib64qt-33binusrlocalsbinusrlocalbinsbinbinusrsbinusrbinrootbinoptmoabbinoptmoabsbinhomejboothbin
usrlocallibusrlocallibusrlocallib
The paths optmoabbin and optmoabsbin were passed down to the sister MOMs
Related TopicsMPI (Message Passing Interface) Support
Chapter 8 MPI (Message Passing Interface) Support
160 OpenMPI
161
Chapter 9 Resources
A primary task of any resource manager is to monitor the state healthconfiguration and utilization of managed resources Torque is specificallydesigned to monitor compute hosts for use in a batch environment Torque isnot designed to monitor non-compute host resources such as softwarelicenses networks file systems and so forth although these resources can beintegrated into the cluster using some scheduling systemsWith regard to monitoring compute nodes Torque reports about a number ofattributes broken into three major categories
l Configurationl Utilizationl Node States
ConfigurationConfiguration includes both detected hardware configuration and specifiedbatch attributes
Attribute Description Details
Architecture(arch)
operating sys-tem of thenode
The value reported is a derivative of the operating system installed
NodeFeatures(properties)
arbitrarystring attrib-utes asso-ciated with thenode
No node features are specified by default If required they are set using thenodes file located in the TORQUE_HOMEserver_priv directory They mayspecify any string and are most commonly used to allow users to request cer-tain subsets of nodes when submitting jobs
Local Disk(size)
configuredlocal disk
By default local disk space is not monitored If the MOM configuration size[fs=ltFSgt] parameter is set Torque will report in kilobytes configured diskspace within the specified directory
Memory(physmem)
localmemoryRAM
Local memoryRAM is monitored and reported in kilobytes
Chapter 9 Resources
Attribute Description Details
Processors(ncpusnp)
realvirtualprocessors
The number of processors detected by Torque is reported via the ncpus attrib-ute However for scheduling purposes other factors are taken into account Inits default configuration Torque operates in dedicated mode with eachnode possessing a single virtual processor In dedicated mode each job taskwill consume one virtual processor and Torque will accept workload on eachnode until all virtual processors on that node are in use While the number ofvirtual processors per node defaults to 1 this may be configured using thenodes file located in the TORQUE_HOMEserver_priv directory An altern-ative to dedicated mode is timeshared mode If Torques timeshared modeis enabled Torque will accept additional workload on each node until thenodesmaxload limit is reached
Swap (tot-mem)
virtualmemorySwap
Virtual memorySwap is monitored and reported in kilobytes
UtilizationUtilization includes information regarding the amount of node resourcescurrently in use as well as information about who or what is consuming it
Attribute Description Details
Disk (size) local diskavailability
By default local disk space is not monitored If the MOM configuration size[fs=ltFSgt] parameter is set Torque will report configured and currently avail-able disk space within the specified directory in kilobytes
Memory(availmem)
realmemoryRAM
Available real memoryRAM is monitored and reported in kilobytes
Network(netload)
local networkadapterusage
Reports total number of bytes transferred in or out by the network adapter
ProcessorUtilization(loadave)
nodes cpuload average
Reports the nodes 1 minute bsd load average
Node StatesState information includes administrative status general node healthinformation and general usage status
Chapter 9 Resources
162
163
Attribute Description Details
Idle Time(idletime)
time since local key-boardmouse activity has beendetected
Time in seconds since local keyboardmouse activity has beendetected
State(state)
monitoredadmin node state A node can be in one or more of the following statesl busy - node is full and will not accept additional workl down - node is failing to report is detecting local failureswith node
l free - node is ready to accept additional workl job-exclusive - all available virtual processors areassigned to jobs
l job-sharing - node has been allocated to run multipleshared jobs and will remain in this state until jobs arecomplete
l offline - node has been instructed by an admin to nolonger accept work
l reserve - node has been reserved by the serverl time-shared - node always allows multiple jobs to runconcurrently
l unknown - node has not been detected
Chapter 9 Resources
164
165
Chapter 10 Accounting Records
Torque maintains accounting records for batch jobs in the following directory$TORQUEROOTserver_privaccountingltTIMESTAMPgt
$TORQUEROOT defaults to varspooltorque and ltTIMESTAMPgt is in theformat YYYYMMDDThese records include events time stamps and information on resourcesrequested and usedRecords for four different event types are produced and are described in thefollowing table
Recordmarker
Recordtype Description
A abort Job has been aborted by the server
C checkpoint Job has been checkpointed and held
D delete Job has been deleted
E exit Job has exited (either successfully or unsuccessfully)
Q queue Job has been submittedqueued
R rerun Attempt to rerun the job has been made
S start Attempt to start the job has been made (if the job fails to properly start it may havemultiple job start records)
T restart Attempt to restart the job (from checkpoint) has been made (if the job fails to prop-erly start it may have multiple job start records)
Accounting VariablesThe following table offers accounting variable descriptions Descriptions foraccounting variables not indicated in the table particularly those prefixed withResources_List are available at Job Submission
Jobs submitted with the -L request syntax will have the -L submissionrecorded in the accounting log
Chapter 10 Accounting Records
Variable Description
ctime Time job was created
etime Time job became eligible to run
qtime Time job was queued
start Time job started to run
A sample record in this file can look like the following
08262014 170744Q11923napaliqueue=batch08262014 170750S11923napaliuser=dbeer group=company jobname=STDIN queue=batchctime=1409094464 qtime=1409094464 etime=1409094464 start=1409094470 owner=dbeernapaliexec_host=napali0+napali1+napali2+napali3+napali4+napali5+torque-devtest-030+torque-devtest-031+torque-devtest-032+torque-devtest-033+torque-devtest-034+torque-devtest-035 Resource_Listneednodes=2ppn=6 Resource_Listnodect=2Resource_Listnodes=2ppn=608262014 170804E11923napaliuser=dbeer group=company jobname=STDIN queue=batchctime=1409094464 qtime=1409094464 etime=1409094464 start=1409094470 owner=dbeernapaliexec_host=napali0+napali1+napali2+napali3+napali4+napali5+torque-devtest-030+torque-devtest-031+torque-devtest-032+torque-devtest-033+torque-devtest-034+torque-devtest-035 Resource_Listneednodes=2ppn=6 Resource_Listnodect=2Resource_Listnodes=2ppn=6 session=11352 total_execution_slots=12 unique_node_count=2end=1409094484 Exit_status=265 resources_usedcput=000000 resources_usedmem=82700kbresources_usedvmem=208960kb resources_usedwalltime=000014 Error_Path=devpts11Output_Path=devpts11
The value of Resource_List is the amount of resources requestedand the value of resources_used is the amount of resources actuallyused
total_execution_slots and unique_node_count display additional informationregarding the job resource usage
Chapter 10 Accounting Records
166
Job Log Location and Name 167
Chapter 11 Job Logging
New in Torque 253 is the ability to log job information for completed jobs Theinformation stored in the log file is the same information produced with thecommand qstat -f The log file data is stored using an XML format Data canbe extracted from the log using the utility showjobs found in the contribdirectory of the Torque source tree Custom scripts that can parse the XML datacan also be usedFor details about job logging see these topics
l Job Log Location and Namel Enabling Job Logs
Job Log Location and NameWhen job logging is enabled (see Enabling Job Logs) the job log is kept atTORQUE_HOMEjob_logs The naming convention for the job log is the same asfor the server log or MOM log The log name is created from the currentyearmonthdayFor example if todays date is 26 October 2010 the log file is named20101026A new log file is created each new day that data is written to the log
Related TopicsEnabling Job LogsJob Logging
Enabling Job LogsThere are five new server parameters used to enable job logging Theseparameters control what information is stored in the log and manage the logfiles
Parameter Description
record_job_info
This must be set to true in order for job logging to be enabled If not set to true the remainingserver parameters are ignored Changing this parameter requires a restart of pbs_server to takeeffect
Chapter 11 Job Logging
Parameter Description
record_job_script
If set to true this adds the contents of the script executed by a job to the log
job_log_file_max_size
This specifies a soft limit (in kilobytes) for the job logs maximum size The file size is checkedevery five minutes and if the current day file size is greater than or equal to this value it is rolledfrom ltfilenamegt to ltfilename1gt and a new empty log is opened If the current day file size exceedsthe maximum size a second time the ltfilename1gt log file is rolled to ltfilename2gt the current log isrolled to ltfilename1gt and a new empty log is opened Each new log causes all other logs to roll toan extension that is one greater than its current number Any value less than 0 is ignored by pbs_server (meaning the log will not be rolled)
job_log_file_roll_depth
This sets the maximum number of new log files that are kept in a day if the job_log_file_max_sizeparameter is set For example if the roll depth is set to 3 no file can roll higher than ltfilename3gtIf a file is already at the specified depth such as ltfilename3gt the file is deleted so it can bereplaced by the incoming file roll ltfilename2gt
job_log_keep_days
This maintains logs for the number of days designated If set to 4 any log file older than 4 daysold is deleted
Related TopicsJob Log Location and NameJob Logging
Chapter 11 Job Logging
168 Enabling Job Logs
NUMA-Aware Systems 169
Chapter 12 NUMA and Torque
Torque supports two types of Non-Uniform Memory Architecture (NUMA)systems This chapter serves as a central information repository for the variousconfiguration settings involved when using either NUMA system configuration
Torque cannot be configured for both systems at the same
In this chapterl Supported NUMA Systems on page 169l NUMA-Aware Systems on page 169l NUMA-Support Systems on page 200
Supported NUMA SystemsTorque supports these two NUMA system configurations
l NUMA-Aware ndash Introduced with Torque version 60 this configurationsupports multi-req jobs and jobs that span hosts Moab version 90 andlater is also required
l NUMA-Suppport ndash Introduced with Torque version 30 this configurationsupports only a single instance for pbs_mom that as treated as if therewhere were multiple nodes running in the cluster This configuration isonly for large-scale SLES systems using SGI Altix and UV hardware
NUMA-Aware SystemsThis topic serves as a central information repository for NUMA-aware systemsThis topic provides basic information and contains links to the various NUMA-aware topics found throughout the documentation
Support for NUMA-aware systems is available only with Torque ResourceManager 60 and later and Moab Workload Manager 90 and later
In this topicl About NUMA-Aware Systems on page 170l Installation and Configuration on page 171l Job Resource Requests on page 171l Job Monitoring on page 172l MoabTorque NUMA Configuration on page 172
Chapter 12 NUMA and Torque
l Considerations When Upgrading Versions or Changing Hardware on page172
About NUMA-Aware SystemsThe NUMA-aware architecture is a hardware design which separates its coresinto multiple clusters where each cluster has its own local memory region andstill allows cores from one cluster to access all memory in the system Howeverif a processor needs to use memory that is not its ownmemory region it willtake longer to access that (remote) memory For applications whereperformance is crucial preventing the need to access memory from otherclusters is criticalTorque uses cgroups to better manage cpu and memory accounting memoryenforcement cpuset management and binding jobs to devices such as MICsand GPUs Torque will try to place jobs which request GPUs or MICs on NUMAnodes next to the GPU or MIC device to be usedPCIe devices are similar to cores in that these devices will be closer to thememory of one NUMA node than another Examples of PCIe devices are GPUsNICs disks etcThe resources of a processor chip have a hierarchy The largest unit is a socketA socket can contain one or more NUMA nodes with its cores and memory ANUMA node will contain a set of cores and threads and memory which is local tothe NUMA node A core may have 0 or more threads
l A socket refers to the physical location where a processor package plugsinto a motherboard The processor that plugs into the motherboard is alsoknown as a socket The socket can contain one or more NUMA nodes
l A core is an individual execution unit within a processor that canindependently execute a software execution thread and maintains itsexecution state separate from the execution state of any other coreswithin a processor
l A thread refers to a hardware-based thread execution capability Forexample the Intel Xeon 7560 has eight cores each of which hashardware that can effectively execute two software execution threadssimultaneously yielding 16 threads
The following image is a simple depiction of a NUMA-aware architecture In thisexample the system has two NUMA nodes with four cores per NUMA node Thecores in each NUMA node have access to their ownmemory region but they canalso access the memory region of the other NUMA node through the inter-connect
If the cores from NUMA chip 0 need to get memory from NUMA chip 1there will be a greater latency to fetch the memory
Chapter 12 NUMA and Torque
170 NUMA-Aware Systems
NUMA-Aware Systems 171
Installation and ConfigurationOnce Torque is first installed you need to perform configuration stepsSee
l Torque NUMA-Aware Configuration on page 57
Job Resource RequestsNUMA-aware resources can be requested at the time of job submission usingthe qsubmsub -L parameter In addition the req_infomation_max and req_information_min queue attributes let you specify the maximum and minimumresource limits allowed for jobs submitted to a queue
Jobs requesting resources with -L can be run via qrun without a hostlist
Seel Requesting NUMA-Aware Resources on page 83l -L NUMA Resource Request on page 188l Queue Attributes on page 421
Chapter 12 NUMA and Torque
Job MonitoringWhen using NUMA-aware job resources are tracked per task qstat -fproduces a new category of information that begins with the req_informationkeyword Following each req_information keyword is another keyword givinginformation about how the job was allocated When the job has completed theoutput will also include the per task resident memory used and per task cputime usedSee
l Monitoring NUMA Job Task Placement on page 90
MoabTorque NUMA ConfigurationMoab does not require special configuration to support this NUMA-awaresystem However there are a few Moab-specific things that would be helpful toknow and understandSee
l Using NUMA with Moab in the Moab Workload Manager AdministratorGuide
Considerations When Upgrading Versions or ChangingHardwareAfter upgrading server software or updating the hardware for a compute nodeyou should start the pbs_mom daemon with the -f flag to force the server torecognize the new configurationSee
l Documentation for the pbs_mom on page 235 -f flag
NUMA TutorialsThis section contains links to tutorials and other documentation useful inunderstanding NUMA-Aware systemsIn section
l NUMA Primer on page 173l How NUMA Places Jobs on page 181l NUMA Discovery and Persistence on page 185
Related Topics
NUMA-Aware Systems on page 169
Chapter 12 NUMA and Torque
172 NUMA-Aware Systems
NUMA-Aware Systems 173
NUMA PrimerTorque 60 provides users with two brand newmajor features First cgroupsare now used to manage each job Second resource request syntax has beenupdated which gives users the ability to request resources on a per task basishave multiple asymmetric resource requests in the same job and controlwhere jobs execute on cores and memory within NUMA hardwareControl groups (cgroups) provide the ability to partition sets of tasks and theirchildren into hierarchical groups with specialized behavior In RHEL 7 thedefault directory for cgroups became sysfscgroup The following examplesuse this standard
If you are building with cgroups enabled you must have boost version141 or later
Torque cgroup HierarchyTorque 60 only uses the cpu devices cpuacct cpuset and memorysubsystems While cpu and devices subsystems are required for Torque 60they are not yet fully implemented When pbs_mom is initialized it creates asub-directory named torque in each of the five subsystem directories When ajob is started on the MOM a directory that is the full job id is created under eachtorque directory The following is an ls -al submission command examplefrom the cpusettorque hierarchy
total 0drwxr-xr-x 3 root root 0 Aug 28 1336 drwxr-xr-x 4 root root 0 Aug 28 1335 drwx------ 4 root root 0 Aug 31 1020 1301hosta-rw-r--r-- 1 root root 0 Aug 28 1335 cgroupclone_children--w--w--w- 1 root root 0 Aug 28 1335 cgroupevent_control-rw-r--r-- 1 root root 0 Aug 28 1335 cgroupprocs-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetcpu_exclusive-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetcpus-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetmem_exclusive-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetmem_hardwall-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetmemory_migrate-r--r--r-- 1 root root 0 Aug 28 1335 cpusetmemory_pressure-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetmemory_spread_page-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetmemory_spread_slab-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetmems-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetsched_load_balance-rw-r--r-- 1 root root 0 Aug 28 1335 cpusetsched_relax_domain_level-rw-r--r-- 1 root root 0 Aug 28 1335 notify_on_release-rw-r--r-- 1 root root 0 Aug 28 1335 tasks
Line 4 shows that the subdirectory is 1301hosta This is the cpuset cgroup forjob 1301hosta If you were to issue an ls command on the 1301hostasubdirectory in this example you would see the following
total 0drwx------ 4 root root 0 Aug 31 1024
Chapter 12 NUMA and Torque
drwxr-xr-x 3 root root 0 Aug 31 1022 -rw-r--r-- 1 root root 0 Aug 31 1024 cgroupclone_children--w--w--w- 1 root root 0 Aug 31 1024 cgroupevent_control-rw-r--r-- 1 root root 0 Aug 31 1024 cgroupprocs-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetcpu_exclusive-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetcpus-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetmem_exclusive-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetmem_hardwall-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetmemory_migrate-r--r--r-- 1 root root 0 Aug 31 1024 cpusetmemory_pressure-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetmemory_spread_page-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetmemory_spread_slab-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetmems-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetsched_load_balance-rw-r--r-- 1 root root 0 Aug 31 1024 cpusetsched_relax_domain_level-rw-r--r-- 1 root root 0 Aug 31 1024 notify_on_releasedrwx------ 2 root root 0 Aug 31 1024 R0t0drwx------ 2 root root 0 Aug 31 1024 R0t1-rw-r--r-- 1 root root 0 Aug 31 1024 tasks-rw-r--r-- 1 root root 0 Aug 28 1335 tasks
For this job the -L resource request was
qsub -L tasks=2lprocs=2
This job has a single request and two tasks The R0 represents request 0 andthe t0 and t1 represent the two tasks In this case cpuset information would beset for each task in their respective subdirectories The cpu cpuacct memoryand devices subsystems also utilize the same subdirectory structure
cpuset subsystemThe Linux cpuset functionality was integrated into cgroups so that when Torqueis configured with the --enable-cgroups option cpuset functionality is alsoincluded When jobs are submitted using the -L resource request syntaxTorque allocates a cpu set and memory set for each task in the job requestExamples of how cpusets and memory sets are allocated will be shown in theexamples at the end of this primer
cpuacct subsystemThe cpuacct subsystem keeps track of cpu time used for a cgroup Torque nowuses the cpuacct data to calculate cpu time used for a job Also when using the -L resource request cpu time per task is also recorded Another advantage ofcgroups is that the accounting information of a job does not disappear whenthe job process exits So if pbs_mom goes down for any reason while runningjobs the cpu time and memory used can still be tracked when pbs_mom isrestarted
Chapter 12 NUMA and Torque
174 NUMA-Aware Systems
NUMA-Aware Systems 175
memory subsystemThe memory subsytem keeps track of the maximum memory used by a cgroupand also can be used to limit the maximum amount of resident memory a taskcan use or the maximum amount of swap a task can use The -L resourcerequest syntax has a memory and a swap option Following are examples ofhow to request memory restrictions with the -L resource request
qsub -L tasks=2memory=300mb
Two tasks are created The memory=300mb option restricts each task to a maximum of 300 megabytestof resident memory If a task exceeds 300 mb then the excess memory is sent to swap
qsub -L tasks=2swap=1Gb
Two tasks are created The swap limit for each task is set to 1 GB
In order to be able to set swap and memory limits the Linux kernel mustbe built using the options CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=yand CONFIG_MEMCG_SWAP_ENABLED=y For Red Hat 7-based systemsthese options are set by defaultFor SUSE 12-based systems you will also need to modify theetcdefaultgrub file Do the following
1 Edit etcdefultgrub2 Add the following inside of the GRUB_CMDLINE_LINUX_DEFAULT variable
cgroup_enable=memory swapaccount=1
3 Run the following
root update-bootloader --refresh
4 Reboot your machine
Resource Request 20Following are several different types of -L resource requests The examplesshow how to use the syntax to be able to have resources allocated which canbest fit your job needs
Single Resource Request With Two Tasks and Defaultsettingsqsub -L tasks=2lprocs=1
After this job runs the summarized qstat -f output is shown
Chapter 12 NUMA and Torque
Job Id 1306hostaJob_Name = bigmemshJob_Owner = knielsonhostaresources_usedcput = 000001resources_usedenergy_used = 0resources_usedmem = 1956984kbresources_usedvmem = 2672652kbresources_usedwalltime = 000010job_state = C exit_status = 0submit_args = -L tasks=2lprocs=1 scriptsbigmemsh req_informationtask_count0 = 2req_informationlprocs0 = 1req_informationthread_usage_policy0 = allowthreadsreq_informationhostlist0 = hostappn=2req_informationtask_usage0task0cpu_list = 0req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0memory_used = 976816kbreq_informationtask_usage0task0cores = 0req_informationtask_usage0task0threads = 1req_informationtask_usage0task0host = hostareq_informationtask_usage0task1cpu_list = 4req_informationtask_usage0task1mem_list = 0req_informationtask_usage0task1memory_used = 976752kbreq_informationtask_usage0task1cores = 0req_informationtask_usage0task1threads = 1req_informationtask_usage0task1host = hosta
resources_used is the same as in previous versions of Torque In this job 1second of cpu time was used 1956984kb of resident memory was used butwith the new -L syntax there is a new set of information which starts with req_information This is the per task information of the job
Output Description
req_informationtask_count0 = 2 Two tasks are requested for this resource request namedtasks 0 and 1 respectively
req_informationlprocs0 = 1 One logical processor is requested per task The lprocs valuebecomes the number of processing units per task allocatedin the cpuset
req_informationthread_usage_policy0 = allow-threads
The processing unit allocation policy for the task allow-threads is the user-specified default policy allowthreadsuses the first available core or thread Processing units alloc-ated in the cpuset are adjacent to each other unless otherprocessors are also allocated
req_informationhostlist0 = hostappn=2 On hostname hosta two processing units are necessary Asingle resource request can run on more than one host
Chapter 12 NUMA and Torque
176 NUMA-Aware Systems
NUMA-Aware Systems 177
Output Description
req_informationtask_usage0task0cpu_list = 0 The task_usage keyword refers to the per task resourceusage 0 is the processing unit assigned to this task In req_informationtask_usage0cpu_list1 the processing unitassigned is 4 This particular hardware is a 4 core systemwith hyper threading So the core numbering is (04) (15)(26) and (37) Because the thread_usage_policy is allow-threads the first two processing units are taken by default
req_informationtask_usage0task0mem_list = 0 Memory location 0 is allocated to this task
req_informationtask_usage0task0memory_used =976816kb
The amount of resident memory used at task 0 is976816kb
req_informationtask_usage0task0cores = 0 This is the number of cores used by the task In this case nocores were used because the allowthreads policy uses onlythreads and not discrete cores
req_informationtask_usage0task0host = hosta The task was run on hostname hosta
The information for req_informationtask_usage0task1 as opposed totask0 means that the information displayed is referring to what wasperformed on task 1 rather than task 0
Multiple lprocsqsub -L tasks=1lprocs=2
Two logical processors are specified with one task The output of this job is asfollows
req_informationtask_count0 = 1req_informationlprocs0 = 2req_informationthread_usage_policy0 = allowthreadsreq_informationhostlist0 = hostappn=2req_informationtask_usage0task0cpu_list = 04req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0cores = 0req_informationtask_usage0task0threads = 2req_informationtask_usage0task0host = hosta
The req_information for this syntax shows a cpu_list with two processing units0 and 4 are the first two processing units available so they are in the cpu_listNotice that now there are two threads running
Chapter 12 NUMA and Torque
usecoresThe following example shows how a request to use cores changes the cpu_listallocation
qsub -L tasks=1lprocs=4usecores
req_informationtask_count0 = 1req_informationlprocs0 = 4req_informationthread_usage_policy0 = usecoresreq_informationhostlist0 = hostappn=4req_informationtask_usage0task0cpu_list = 0-3req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0cores = 4req_informationtask_usage0task0threads = 8req_informationtask_usage0task0host = hosta
Output Description
req_informationtask_usage0task0cores = 4 Four cores are used for task 0
req_informationtask_usage0task0threads= 8
When a core is requested any threads for that core are no longeravailable for use by another task In this case each core has twothreads As a result when one core is used two threads are alsoused In this case 8 threads are used in total
usethreadsqsub -L tasks=1lprocs=4usethreads
The output of this job is as follows
req_informationtask_count0 = 1req_informationlprocs0 = 4req_informationthread_usage_policy0 = usecoresreq_informationhostlist0 = hostappn=4req_informationtask_usage0task0cpu_list = 0415req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0cores = 0req_informationtask_usage0task0threads = 4req_informationtask_usage0task0host = hosta
Requesting usethreads gives adjacent processing units 0415 and uses only 4threads as indicated by req_informationtask_usage0task0threads = 4
Multiple Resource RequestsThe -L resource requests makes it easier to request asymmetric resources fora single job For example you might have a job which needs severalprocessors on a host to do work but only one or two processors on anotherhost The -L syntax easily accommodates this
Chapter 12 NUMA and Torque
178 NUMA-Aware Systems
NUMA-Aware Systems 179
qsub -L tasks=2lprocs=6usecores -L tasks=1lprocs=1place=socket
req_informationtask_count0 = 2req_informationlprocs0 = 6req_informationthread_usage_policy0 = usecoresreq_informationhostlist0 = hostbppn=12req_informationtask_usage0task0cpu_list = 0-5req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0cores = 6req_informationtask_usage0task0threads = 12req_informationtask_usage0task0host = hostbreq_informationtask_usage0task1cpu_list = 6-11req_informationtask_usage0task1mem_list = 1req_informationtask_usage0task1cores = 6req_informationtask_usage0task1threads = 12req_informationtask_usage0task1host = hostbreq_informationtask_count1 = 1req_informationlprocs1 = 1req_informationsocket1 = 1req_informationthread_usage_policy1 = allowthreadsreq_informationhostlist1 = hostbppn=1req_informationtask_usage1task0cpu_list = 0req_informationtask_usage1task0mem_list = 0req_informationtask_usage1task0cores = 1req_informationtask_usage1task0threads = 1req_informationtask_usage1task0host = hostb
Output Description
req_informationtask_count1=1 Only one task on request 1
req_informationsocket1 = 1 One socket is requested and then allocated for use
place DirectivesThe place directive takes one of five arguments node socket numanodecore and thread The node core and thread arguments do not take anassignment however socket and numanode can be assigned a number valuerequesting the number of sockets or numanodes per task The use ofplace=core or place=thread is the equivalent of using the usecores orusethreads syntaxWhen processes share the same memory cache and are run on adjacent coresor threads the likelihood of swapping out a cache line is high When memoryneeds to be fetched from primarymemory instead of the cache processingexecution times are increased and become less predictable In theseexamples Torque disables linearly allocating cores To help ensure bestperformance by avoiding the sharing of caches between processors cores arespread as far apart as possibleThe following examples show the results of each directive
Chapter 12 NUMA and Torque
place=socket
If a socket is not given a number it defaults to the number 1
qsub -L tasks=2lprocs=2place=socket
This request allocates two tasks with two logical processors each Each task isplaced on its own socket
req_informationtask_count0 = 2req_informationlprocs0 = 2req_informationsocket0 = 1req_informationthread_usage_policy0 = allowthreadsreq_informationhostlist0 = hostappn=4req_informationtask_usage0task0cpu_list = 03req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0cores = 2req_informationtask_usage0task0threads = 4req_informationtask_usage0task0host = hostareq_informationtask_usage0task1cpu_list = 69req_informationtask_usage0task1mem_list = 1req_informationtask_usage0task1cores = 2req_informationtask_usage0task1threads = 4req_informationtask_usage0task1host = hostacpuset_string = hosta0369memset_string = hosta0-1
For the last example the job was run on a dual socket host with 12 cores Eachcore has one thread for a total of 24 processing units Each socket has 6 coresand 12 threads The cores for socket 0 are numbered 0 1 2 3 4 The coresfor socket 1 are numbered 5 6 7 8 Task0 uses cores 0 and 3 and task1 usescores 6 and 9
place=numanode=2
qsub -L tasks=2lprocs=2place=numanode=2
This request allocates two numanodes one for each task
req_informationtask_count0 = 2req_informationlprocs0 = 2req_informationnumanode0 = 2req_informationthread_usage_policy0 = allowthreadsreq_informationhostlist0 = hostbppn=2req_informationtask_usage0task0cpu_list = 0 3req_informationtask_usage0task0mem_list = 0req_informationtask_usage0task0cores = 0req_informationtask_usage0task0threads = 0req_informationtask_usage0task0host = hostbreq_informationtask_usage0task1cpu_list = 6 9req_informationtask_usage0task1mem_list = 1req_informationtask_usage0task1cores = 2req_informationtask_usage0task1threads = 4req_informationtask_usage0task1host = hostb
Chapter 12 NUMA and Torque
180 NUMA-Aware Systems
NUMA-Aware Systems 181
pbsnodes and Dedicated ResourcesWhen a resource is requested (core numanode socket etc) the entireresource is no longer available for other jobs to use and enters a dedicatedstate Starting with Torque 60 pbsnodes tracks total sockets numanodescores and threads per node pbsnodes also tracks dedicated socketsnumanodes cores and threads Following is and example of node output inpbsnodes for Torque 60
state = freepower_state = Runningnp = 12ntype = clusterstatus =rectime=1441054213macaddr=78e3b50ac058cpuclock=Fixedvarattr=jobs=state=freemom_service_port = 15002mom_manager_port = 15003total_sockets = 2total_numa_nodes = 2total_cores = 12total_threads = 12dedicated_sockets = 0dedicated_numa_nodes = 0dedicated_cores = 0dedicated_threads = 0
This node has a total of 2 sockets 2 numanodes 12 cores and 12 threads Thenumber of dedicated sockets numanodes cores and threads are set to 0indicating there are currently no jobs running on this nodes If a job is run witha syntax of
qsub -L tasks=2lprocs=2
the number of dedicated threads becomes fourOnce a job is completed dedicated_threads returns to 0
Related Topics
NUMA Tutorials on page 172
How NUMA Places JobsThis topic discusses how jobs are placed on their specific NUMA resources
In this topic placing is defined as determining where on the node the jobwill go
Moab determines where to place a job on a node and pbs_server places thatjob inside the node pbs_server decides where to place the job based on theparameters specified by the job itself and optimal locality
Chapter 12 NUMA and Torque
The Placement AlgorithmThe following diagram shows the decision making process for each request notusing the place= syntaxWhenever possible jobs are given placement preference next to the GPUs thatthey will use If the jobs tasks memory and CPUs are available on the socketthat has the GPUs that job will be placed at that location
This placement fails if either there is no socket that contains all of therequired resources or if jobs are and the GPUs are on socket - but all ofthe cores are used by another job
Chapter 12 NUMA and Torque
182 NUMA-Aware Systems
NUMA-Aware Systems 183
Chapter 12 NUMA and Torque
Chapter 12 NUMA and Torque
184 NUMA-Aware Systems
NUMA-Aware Systems 185
For jobs using the place= syntax the decision making algorithm is muchsimpler When the place is specified it will become reserved and the job will beplaced at that location
For a job to occupy the user-requested place option that option must becompletely available for use
The following is an example of a job submitted using the -L option
-L tasks=1lprocs=2sockets=2
This job placed on two sockets with one core reserved per socket
The use of the word core is intentional If a place=socket orplace=numanode is requested and the lprocs request is less that thenumber of cores inside the socket or NUMA node then the job is given onlycores
Once pbs_server has determined where each task should run that decision isstored in attributes on the job itself The complete_req attribute stores whereeach task is allocated and the mom reads that information to createappropriate cgroups for the job and for the entire task This information isavailable to the user via qstat
Related Topics
NUMA Tutorials on page 172
NUMA Discovery and Persistence
Initial DiscoveryFirst The mom performs the initial discovery of the hosts layout including thenumber of sockets numa nodes pci devices cores and threads This is doneusing the hwloc library Next the mom sends that information to pbs_serverwhich notes it Last pbs_server writes files with the nodes layout informationlocally Following restarts node information is gathered from these files
Job Placement DecisionsJob placement decisions are done by pbs_server so that it immediately knowswhich NUMA resources have been used by which job As a result the second ajob starts or finishes the information for available numa resources is updatedand accurate This information is then communicated to the mom daemonFor more information on how jobs are placed see How NUMA Places Jobs onpage 181
Chapter 12 NUMA and Torque
Persistence Across RestartsTo maintain correct usage information pbs_server writes files to a newdirectory in server_privnode_usage The files are written in JSON formatThe following is a reqresentation of what these files look like
Simple Nodenode socket os_index 0numanode os_index 0cores 0-5threads mem 16435852
More Complicated Nodenode socket os_index 0numanode os_index 0cores 0-7threads mem 16775316
numanode os_index 1cores 8-15threads mem 16777216
socket os_index 1numanode os_index 2cores 16-23threads mem 8388608
numanode os_index 3cores 24-31threads mem 8388608
Chapter 12 NUMA and Torque
186 NUMA-Aware Systems
NUMA-Aware Systems 187
When jobs are present an allocation object will also be there to record whatresources are being used by the job The allocation object will be beneath thenumanode object so it is possible to have more than one per job An exampleof an allocation object is shown below
Allocation object
allocation cores_only 0cpus 0exclusive 6jobid 39rosharmem 0
An example of a complete node usage file is shown below
Node usage
node [socket numanodes [numanode allocations [allocation cores_only 0cpus 0exclusive 6jobid 39rosharmem 0
]cores 0-7mem 16325348os_index 0threads
]os_index 0
]
Related Topics
NUMA Tutorials on page 172
Chapter 12 NUMA and Torque
-L NUMA Resource RequestThe -L option is available in the qsub and msub commands to allowadministrators the ability to place jobs at the task or OS process level to getmaximum efficiency out of the available hardwareUsing the -L option requires a basic knowledge of the topologies of theavailable hardware where jobs will run You will need to know howmany coresnumanodes sockets etc are available on the hosts within the cluster The -Lsyntax is designed to allow for a wide variety of requests However if requestsdo not match the available hardware you may have unexpected resultsIn addition multiple non-symmetric resource requests can be made for thesame job using the -L job submission syntaxFor example the following command
qsub -L tasks=4lprocs=2usecoresmemory=500mb -L tasks=8lprocs=4memory=2gb
Creates two requests The first request creates 4 tasks with two logical processors and 500 mb ofmemory per task The logical processors are placed on cores The second request calls for 8 tasks with 4logical processors and 2 gb of memory per task Logical processors may be placed on cores or threadssince the default placement is allowthreads
This topic provides the -L option syntax and a description of the valid value andallocation options
Syntax-L tasks=[lprocs=|all]
[usecores|usethreads|allowthreads][place=socket|numanode|core|thread[=]node][memory=][swap=][maxtpn=][gpus=[ltmodegt]][mics=][gres=ltgresgt][feature=ltfeaturegt][[cpt|cgroup_per_task]|[cph|cgroup_per_host]]
Chapter 12 NUMA and Torque
188 NUMA-Aware Systems
NUMA-Aware Systems 189
Valid Value
Value Description
tasks Specifies the quantity of job tasks for which the resource request describes the resources needed by asingle task
l Distributed memory systems - A single task must run within a single compute nodeserverie the tasks resources must all come from the same compute nodeserver
l Shared memory systems - A single task may run on multiple compute nodes ie the tasksresources may come from multiple compute nodes
This option is required for task-based resource allocation and placement
qsub -L tasks=4
Creates four tasks each with one logical process The tasks can be run on a core or thread(default allowthreads)
Available OptionsThe following table identifiers the various allocation options you can specify pertask
Chapter 12 NUMA and Torque
Value Description
lprocs Specifies the quantity of logical processors required by a single task to which it will be pinned byits control-group (cgroup)
The place value specifies the total number of physical coresthreads to which a single taskhas exclusive access The lprocs= keyword indicates the actual number of coresthreads towhich the task has exclusive access for the tasks cgroup to pin to the task
l When lprocs is specified and nothing is specified for the default is 1l When lprocs=all is specified all cores or threads in any compute nodeserversavailable resource locality placement specified by the place option is eligible for taskplacement (the user has not specified a quantity other than give me all logical processorswithin the resource locality or localities) which allows a user application to take whateverit can get and adapt to whatever it receives which cannot exceed one node
qsub -L tasks=1lprocs=4
One task is created which allocates four logical processors to the task When the job isexecuted the pbs_mom where the job is running will create a cpuset with four processors inthe set Torque will make a best effort to allocate the four processors next to each other butthe placement is not guaranteed
qsub -L tasks=1lprocs=allplace=node
Places one task on a single node and places all processing units in the cpuset of the taskThe lprocs=all parameter specifies that the task will use all cores andor threadsavailable on the resource level requested
Chapter 12 NUMA and Torque
190 NUMA-Aware Systems
NUMA-Aware Systems 191
Value Description
usecoresusethreadsallowthreads
The usecores usethreads and allowthreads parameters are used to indicate whether the cgrouppins cores threads or either to a task respectively If no logical processor definition is given thedefault is allowthreads for backward-compatible Moab scheduler and Torque resource managerbehaviorIn this context cores means an AMD Opteron core a hyperthread-disabled Intel Xeon core orthread 0 and only thread 0 of a hyperthread-enabled Intel Xeon core The term threads refers to ahyperthread-enabled Intel Xeon thread Likewise either refers to an AMD Opteron core ahyperthread-disabled Intel Xeon core or any thread of a hyperthread-enabled Intel Xeon
l usecores ndash Denotes that the logical processor definition for a task resource request is aphysical core This means if a core has hyper-threading enabled the task will use onlythread 0 of the core
qsub -L tasks=2lprocs=2usecores
Two tasks are allocated with two logical processors per task The usecoresparameter indicates the processor types must be a core or thread 0 of a hyper-threaded core
l usethreads ndash Specifies the logical processor definition for a task resource request is ahardware-based thread or virtual core
qsub -L tasks=2lprocs=2usethreads
Two tasks are allocated with two logical processors per task The usethreadsparameter indicates that any type of hardware-based thread or virtual core can beused
l allowthreads ndash Specifies that the logical processor definition for a task resource requestcan be either a physical core (eg AMD Opteron) or hardware-based thread of a core(hyperthread-enabled Intel Xeon)
qsub -L tasks=2lprocs=2allowthreads
Two tasks are allocated with two logical processors per task The allowthreadsparameter indicates hardware threads or cores can be used
Chapter 12 NUMA and Torque
Value Description
place Specifies placement of a single task on the hardware Specifically this designates what hardwareresource locality level and identifies the quantity of locality-level resources Placement at a specificlocality level is always exclusive meaning a job task has exclusive use of all logical processor andphysical memory resources at the specified level of resource locality even if it does not use them
Valid Options
If a valid option is not specified the usecusecores usethreads and allowthreads parametersare used
l socket[=] ndash Refers to a socket within a compute nodeserver and specifies that each taskis placed at the socket level with exclusive use of all logical processors and memoryresources of the socket(s) allocated to a task If a count is not specified the default setting is1
qsub -L tasks=2lprocs=4place=socket
Two tasks are allocated with four logical processors each Each task is placed on asocket where it will have exclusive access to all of the cores and memory of thesocket Although the socket may have more coresthreads than four only fourcoresthreads will be bound in a cpuset per task per socket as indicated bylprocs=4
l numanode[=] ndash Refers to the numanode within a socket and specifies that each task isplaced at the NUMA node level within a socket with exclusive use of all logical processor andmemory resources of the NUMA node(s) allocated to the task If a count is not given thedefault value is 1 If a socket does not contain multiple numanodes by default the socketcontains one numanodeTo illustrate the locality level to which this option refers the following examples areprovidedFirst a Haswell-based Intel Xeon v3 processor with 10 or more cores is divided internallyinto two separate nodes each with an equal quantity of cores and its own local memory(referred to as a numanode in this topic)Second an AMD Opteron 6xxx processor is a multi-chip module that contains twoseparate physical silicon chips each with its own local memory (referred to as anumanode in this topic)In both of the previous examples a core in one node of the processor can access its ownlocal memory faster than it can access the remote memory of the other node in theprocessor which results in NUMA behavior
qsub -L tasks=2lprocs=4place=numanode
Places a single task on a single numanode and the task has exclusive use of all thelogical processors and memory of the numanode
Chapter 12 NUMA and Torque
192 NUMA-Aware Systems
NUMA-Aware Systems 193
Value Description
qsub -L tasks=2lprocs=allplace=numanode=2
Allocates two tasks with each task getting two numanodes each The lprocs=allspecification indicates all of the coresthreads of each numanode will be bound inthe cpuset for the task
l core[=] ndash Refers to a core within a numanode or socket and specifies each task is placed atthe core level within the numanode or socket and has exclusive use of all logical processorand memory resources of the core(s) allocated to the task Whether a core has SMThyper-threading enabled or not is irrelevant to this locality level If a number of cores is notspecified it will default to the number of lprocs specified
The amount of cores specified must be greater than or equal to the number oflprocs available otherwise the job submission will be rejected
qsub -L tasks=2place=core=2
Two tasks with one logical processor each will be placed on two cores per task
qsub -L tasks=2lprocs=2place=core
Two tasks are allocated with two logical processors per task Each logical processwill be assigned to one core each (two cores total the same as the number oflprocs) Torque will attempt to place the logical processors on non-adjacent cores
l thread[=] ndash Specifies each task is placed at the thread level within a core and has exclusiveuse of all logical processor and memory resources of the thread(s) allocated to a taskThis affinity level refers to threads within a core and is applicable only to nodes with SMTor hyper-threading enabled If a node does not have SMT or hyper-threading enabledMoab will consider the node ineligible when allocating resources for a task If a specificnumber of threads is not specified it will default the the number of lprocs specified
qsub -L tasks=2lprocs=4place=thread
Allocates two tasks each with four logical processors which can be bound to anythread Torque will make a best effort to bind the threads on the same numanodebut placement is not guaranteed Because the amount of threads is not specifiedTorque will place the number of lprocs requested
l node ndash Specifies that each task is placed at the node level and has exclusive use of all theresources of the node(s) allocated to a task This locality level usually refers to a physicalcompute node blade or server within a cluster
Chapter 12 NUMA and Torque
Value Description
qsub -L tasks=2lprocs=allplace=node
Two tasks are allocated with one task per node where the task has exclusive accessto all the resources on the node The lprocs=all specification directs Torque tocreate a cpuset with all of the processing units on the node The place=nodespeficiation also claims all of the memory for the nodeserver
memorymemory is roughly equivalent to the mem request for the qsubmsub -l resource requestHowever with the -L qsub syntax cgroups monitors the job memory usage and puts aceiling on resident memory for each task of the job
Specifies the maximum resident memory allocated per task Allowable suffixes are kb (kilobytes)mb (megabytes) gb (gigabytes) tb (terabyte) pb (petabytes) and eb (exabyte) If a suffix is notprovided by the user kb (kilobytes) is default
If a task uses more resident memory than specified the excess memory is moved to swap
qsub -L tasks=4lprocs=2usecoresmemory=1gb
Allocates four tasks with two logical processors each Each task is given a limit of 1 gb ofresident memory
qsub -L tasks=2memory=3500
Allocates two tasks with 3500 kb (the suffix was not specified so kilobytes is assumed)
Chapter 12 NUMA and Torque
194 NUMA-Aware Systems
NUMA-Aware Systems 195
Value Description
swap Specifies the maximum allocated resident memory and swap space allowed per taskAllowable suffixes are kb (kilobytes) mb (megabytes) gb (gigabytes) tb (terabyte) pb(petabytes) and eb (exabyte) If a suffix is not given kb (kilobytes) is assumed
If a task exceeds the specified limit the task will be killed the associated job will be terminated
If the swap limit is unable to be set the job will still be allowed to run All other cgroup-related failures will cause the job to be rejected
When requesting swap it is not required that you give a value for the memory optionl If using swap without a specified memory value Torque will supply a memory value up tothe value of swap but not larger than available physical memory
qsub -L tasks=4lprocs=2swap=4gb
Allocates four tasks with two logical processors each Each task is given acombined limit of 4 gb of resident memory and swap space If a task exceeds thelimit the task is terminated
l If using swap with a specified memory value Torque will only supply resident memory upto the memory value The rest of the swap can only be supplied from the swap space
The memory value must be smaller than or equal to the swap value
qsub -L tasks=2memory=35gbswap=5gb
Allocates two tasks and each task has up to 35 gb of resident memory and amaximum of 5 gb of swap If a task exceed 35 gb of resident memory the excesswill be moved to the swap space However if the task exceed 5 gb of total swap thetask and job will be terminated
maxtpn Specifies the maximum tasks per node where is the maximum tasks allocated per physical com-pute node This restricts a task type to no more than tasks per compute node and allows it toshare a node with other task types or jobs For example a communication-intensive task may sharea compute node with computation-intensive tasks
The number of nodes and tasks per node will not be known until the job is run
qsub -L tasks=7maxtpn=4
Allocates seven tasks but a maximum of four tasks can run on a single node
Chapter 12 NUMA and Torque
Value Description
gpus Specifies the quantity of GPU accelerators to allocate to a task which requires placement at the loc-ality-level to which an accelerator is connected or higher ltMODEgt can be exclusive_processexclusive_thread or reseterrThe task resource request must specify placement at the numanode- (AMD only) socket- or node-level place=core and place=thread are invalid placement options when a task requests aPCIe-based accelerator device since allowing other tasks to use cores and threads on the sameNUMA chip or socket as the task with the PCIe device(s) would violate the consistent job executiontime principle since these other tasks would likely interfere with the data transfers between thetasks logical processors and its allocated accelerator(s)
gpus=1
Allocates one GPU per task
gpus=2exclusive_processreseterr
Allocates two GPUs per task with exclusive access by process and resets error counters
mics Specifies the quantity of Intel MIC accelerators to allocate to a task which requires placement at thelocality-level to which a MIC is connected or higherThe task resource request must specify placement at the NUMA chip- (makes sense for AMD only)socket- or node-level place=core and place=thread are invalid placement options when a taskrequests a PCIe-based accelerator device since allowing other tasks to use cores and threads on thesame NUMA chip or socket as the task with the PCIe device(s) would violate the consistent jobexecution time principle since these other tasks would likely interfere with the data transfersbetween the tasks logical processors and its allocated accelerator(s)
Allocating resources for MICs operates in the exact same manner as for GPUs See gpus
mics=1
Allocates on MIC per task
mics=2
Allocates two MICs per task
Chapter 12 NUMA and Torque
196 NUMA-Aware Systems
NUMA-Aware Systems 197
Value Description
gres Specifies the quantity of a specific generic resource ltgresgt to allocate to a task If a quantity is notgiven it defaults to one
Specify multiple GRES by separating them with commas and enclosing all the GRES namestheir quantities and the commas within single quotation marks
gres=matlab=1
Allocates one Matlab license per task
gres=dvdblu=2
Allocates one DVD drive and two Blu-ray drives per task represented by the dvd andblu generic resource names respectively
When scheduling if a generic resource is node-locked only compute nodes with the genericresource are eligible for allocation to a job task If a generic resource is floating it does notqualify or disqualify compute node resources from allocation to a job task
feature Specifies one or more node feature names used to qualify compute nodes for task resources ie acompute node must have all (amp) or and (|) of the specified feature name(s) assigned or thecompute nodes resources are ineligible for allocation to a job task
feature=bigmemfeature=bmemampfiofeature=bmem|fio
Chapter 12 NUMA and Torque
Value Description
cptcgroup_per_taskcphcgroup_per_host
Specifies whether cgroups are created per-task or per-host If submitting using msub thisinformation is passed through to Torque there is no affect to Moab operations
This option lets you specify how cgroups are created during job submission This option canbe used to override the Torque cgroup_per_task sever parameter If this option is notspecified the server parameter value is used See cgroup_per_task for more information
l cpt cgroup_per_task ndash Job request will have one cgroup created per task all theprocesses on that host will be placed in the first tasks cgroup
l cph cgroup_per_host ndash Job request will have one cgroup created per host this is similarto pre-60 cpuset implementations
Some MPI implementations only launch one process through the TM API and then forkeach subsequent process that should be launched on that host If the job is set to have one
cgroup per task this means that all of the processes on that host will be placed in the firsttasks cgroup Confirm that the cgroup_per_task Torque server parameter is set to FALSE(default) or specify cph or cgroup_per_host at job submissionIf you know that your MPI will communicate each process launch to the mom individuallythen set the cgroup_per_task Torque server parameter is set to TRUE or specify cpt orcgroup_per_task at job submission
Related Topics
l qsubl Requesting NUMA-Aware Resources on page 83
pbsnodes with NUMA-Awareness
When Torque is configured with NUMA-awareness and configured with --enable-cgroups the number of total and the number of available socketsnumachips (numa nodes) cores and threads are returned when the status ofnodes are queried by Moab (a call is made to pbsnodes)The example output that follows shows a node with two sockets fournumachips 16 cores and 32 threads In this example no jobs are currentlyrunning on this node therefore the available resources are the same as thetotal resources
Chapter 12 NUMA and Torque
198 NUMA-Aware Systems
NUMA-Aware Systems 199
torque-devtest-01state = freepower_state = Runningnp = 16ntype = clusterstatus =
rectime=1412732948macaddr=00266cf466a0cpuclock=Fixedvarattr=jobs=state=freenetload=17080856592gres=loadave=1074ncpus=16physmem=49416100kbavailmem=50056608kbtotmem=51480476kbidletime=29nusers=2nsessions=3sessions=86658671 1994uname=Linux torque-devtest-01 2632-358el6x86_64 1 SMPFri Feb 22 003126 UTC 2013 x86_64opsys=linux
mom_service_port = 15002mom_manager_port = 15003total_sockets = 2total_numachips = 4total_cores = 16total_threads = 32available_sockets = 2available_numachips = 4available_cores = 16available_threads = 32
However if a job requesting only a single core was started on this node thepbsnodes output will look like
torque-devtest-01state = freepower_state = Runningnp = 16ntype = clusterjobs = 0112torque-devtest-01status =
rectime=1412732948macaddr=00266cf466a0cpuclock=Fixedvarattr=jobs=state=freenetload=17080856592gres=loadave=1074ncpus=16physmem=49416100kbavailmem=50056608kbtotmem=51480476kbidletime=29nusers=2nsessions=3sessions=86658671 1994uname=Linux torque-devtest-01 2632-358el6x86_64 1 SMPFri Feb 22 003126 UTC 2013 x86_64opsys=linux
mom_service_port = 15002mom_manager_port = 15003total_sockets = 2total_numachips = 4total_cores = 16total_threads = 32available_sockets = 1available_numachips = 3available_cores = 15available_threads = 30
In looking at the output for this example you will see that even though only onecore was requested the available sockets numachip cores and threads wereall reduced This is because the NUMA architecture is hierarchical socketcontains one or more numachips a numachip contains two or more corescores contain one or more threads (one thread in the case of non-threadedcores) In order for a resource to be available the entire resource must befree When a job uses one core the use of that core consumes part of theassociated socket and numa chip resources As a result the affected socketand numachip cannot be used when subsequent jobs request sockets andnumachips as resources Also because the job asked for one core the numberof threads for that core are consumed As a result the number of threadsavailable on the machine is reduced by the number of threads in the core
Chapter 12 NUMA and Torque
As another example suppose a user makes an job request and they want touse a socket The pbsnodes output will look like
torque-devtest-01state = freepower_state = Runningnp = 16ntype = clusterjobs = 113torque-devtest-01status =
rectime=1412732948macaddr=00266cf466a0cpuclock=Fixedvarattr=jobs=state=freenetload=17080856592gres=loadave=1074ncpus=16physmem=49416100kbavailmem=50056608kbtotmem=51480476kbidletime=29nusers=2nsessions=3sessions=86658671 1994uname=Linux torque-devtest-01 2632-358el6x86_64 1 SMPFri Feb 22 003126 UTC 2013 x86_64opsys=linux
mom_service_port = 15002mom_manager_port = 15003total_sockets = 2total_numachips = 4total_cores = 16total_threads = 32available_sockets = 1available_numa_chips = 2available_cores = 8available_threads = 16
In looking at the output in this example you will see that not only are theavailable sockets reduced to one but all of the numachips cores and threadsassociated with the socket are no longer available In other words byrequesting a job placement of socket all of the resources of the socket arereserved and are no longer available to other jobs
NUMA-Support SystemsThis topic serves as a central information repository for NUMA-supportsystems This topic provides basic information and contains links to the variousNUMA-aware topics found throughout the documentation
Support for NUMA-support systems is available only on large-scale SLESsystems using SGI Altix and UV hardware and requires Torque 30 or later
In this chapterl About NUMA-Supported Systems on page 200l Torque Installation and Configuration on page 201l MoabTorque NUMA Configuration on page 201
About NUMA-Supported SystemsWhen Torque is enabled to run with NUMA support there is only a singleinstance of pbs_mom (MOM) that is run on the system However Torque willreport that there are multiple nodes running in the cluster While pbs_mom and
Chapter 12 NUMA and Torque
200 NUMA-Support Systems
NUMA-Support Systems 201
pbs_server both know there is only one instance of pbs_mom theymanage thecluster as if there were multiple separate MOM nodesThe momlayout file is a virtual mapping between the system hardwareconfiguration and how the administrator wants Torque to view the systemEach line in momlayout equates to a node in the cluster and is referred to as aNUMA node
Torque Installation and ConfigurationTo enable Torque for NUMA-support you will need to add the --enable-numa-support option during the configure portion of the installation You will alsoneed create the momlayout file and configure the server_privnodes fileSeeTorque NUMA-Support Configuration on page 60
MoabTorque NUMA ConfigurationMoab requires additional configuration to enable NUMA-supportSeeMoab-NUMA-Support Integration Guide in the Moab Workload ManagerAdministrator Guide
Chapter 12 NUMA and Torque
202 NUMA-Support Systems
Automatic Queue and Job Recovery 203
Chapter 13 Troubleshooting
There are a few general strategies that can be followed to determine the causeof unexpected behavior These are a few of the tools available to helpdetermine where problems occur See these topics for details
l Automatic Queue and Job Recoveryl Host Resolutionl Firewall Configurationl Torque Log Filesl Using tracejob to Locate Job Failuresl Using GDB to Locate Job Failuresl Other Diagnostic Optionsl Stuck Jobsl Frequently Asked Questions (FAQ)l Compute Node Health Checkl Debugging
Automatic Queue and Job RecoveryWhen pbs_server restarts and recovers a job but cannot find that jobs queueit will create a new queue with the original name but with a ghost_queueattribute (as seen in qmgr) and then add the job to that queue This will happenfor each queue the server does not recognize Ghost queues will not acceptnew jobs but will allow the jobs in it to run and be in a running state If usersattempt to submit any new jobs to these queues the user will get an errorstating that the queue had an error on recovery and is in a ghost state Oncethe admin reviews and corrects the queues settings the admin may removethe ghost setting and then the queue will function normallySee ghost_queue for more information
Host ResolutionThe Torque server host must be able to perform both forward and reversename lookup on itself and on all compute nodes Likewise each compute nodemust be able to perform forward and reverse name lookup on itself theTorque server host and all other compute nodes In many cases name
Chapter 13 Troubleshooting
resolution is handled by configuring the nodes etchosts file although DNSand NIS services may also be used Commands such as nslookup or dig canbe used to verify proper host resolution
Invalid host resolution may exhibit itself with compute nodes reporting asdown within the output of pbsnodes-a and with failure of themomctl -d3command
Related TopicsTroubleshooting
Firewall ConfigurationBe sure that if you have firewalls running on the server or node machines youallow connections on the appropriate ports for each machine Torque pbs_mom daemons use UDP ports 1023 and below if privileged ports are configured(privileged ports is the default) The pbs_server and pbs_mom daemons useTCP and UDP ports 15001-15004 by defaultFirewall based issues are often associated with server to MOM communicationfailures and messages such as premature end of message in the log filesAlso the tcpdump program can be used to verify the correct network packetsare being sent
Related TopicsTroubleshooting
Torque Log Files
pbs_server and pbs_mom Log FilesThe pbs_server keeps a daily log of all activity in the TORQUE_HOMEserver_logs directory The pbs_mom also keeps a daily log of all activity in theTORQUE_HOMEmom_logs directory These logs contain information oncommunication between server and MOM as well as information on jobs as theyenter the queue and as they are dispatched run and terminated These logscan be very helpful in determining general job failures For MOM logs theverbosity of the logging can be adjusted by setting the $loglevel parameter inthe mom_privconfig file For server logs the verbosity of the logging can beadjusted by setting the server log_level attribute in qmgrFor both pbs_mom and pbs_server daemons the log verbosity level can alsobe adjusted by setting the environment variable PBSLOGLEVEL to a value
Chapter 13 Troubleshooting
204 Firewall Configuration
Torque Log Files 205
between 0 and 7 Further to dynamically change the log level of a runningdaemon use the SIGUSR1 and SIGUSR2 signals to increase and decrease theactive loglevel by one Signals are sent to a process using the kill commandFor example kill -USR1 `pgrep pbs_mom` would raise the log level up byoneThe current loglevel for pbs_mom can be displayed with the commandmomctl-d3
trqauthd Log FilesAs of Torque 413 trqauthd logs its events in the TORQUE_HOMEclient_logsdirectory It names the log files in the formatltYYYYMMDDgt creating a newlog daily as events occur
You might see some peculiar behavior if you mount the client_logsdirectory for shared access via network-attached storageWhen trqauthd first gets access on a particular day it writes an openmessage to the days log file It also writes a close message to the lastlog file it accessed prior to that which is usually the previous days log filebut not always For example if it is Monday and no client commands wereexecuted over the weekend trqauthd writes the close message toFridays fileSince the various trqauthd binaries on the submit hosts (and potentiallythe compute nodes) each write an open and close message on the firstaccess of a new day youll see multiple (seemingly random) accesseswhen you have a shared log
The trqauthd records the following events along with the date and time of theoccurrence
l When trqauthd successfully starts It logs the event with the IP addressand port
l When a user successfully authenticates with trqauthdl When a user fails to authenticate with trqauthdl When trqauthd encounters any unexpected errors
Example 13-1 trqauthd logging sample
2012-10-05 1505518404 Log opened2012-10-05 1505518405 Torque authd daemon started and listening on IPport101010123452012-10-10 1448055688 User hfrye at IPport abc12345 logged in
Related TopicsTroubleshooting
Chapter 13 Troubleshooting
Using tracejob to Locate Job Failures
OverviewThe tracejob utility extracts job status and job events from accounting recordsMOM log files server log files and scheduler log files Using it can help identifywhere how a why a job failed This tool takes a job id as a parameter as wellas arguments to specify which logs to search how far into the past to searchand other conditions
Syntaxtracejob [-a|s|l|m|q|v|z] [-c count] [-w size] [-p path] [ -n ltDAYSgt] [-f filter_type]ltJOBIDgt
-p path to PBS_SERVER_HOME-w number of columns of your terminal-n number of days in the past to look for job(s) [default 1]-f filter out types of log entries multiple -fs can be specified error system admin job job_usage security sched debug debug2 or absolute numeric hex equivalent-z toggle filtering excessive messages-c what message count is considered excessive-a dont use accounting log files-s dont use server log files-l dont use scheduler log files-m dont use MOM log files-q quiet mode - hide all error messages-v verbose mode - show more error messages
Chapter 13 Troubleshooting
206 Using tracejob to Locate Job Failures
Using tracejob to Locate Job Failures 207
Examplegt tracejob -n 10 1131
Job 1131iclusterorg
03022005 175828 S enqueuing into batch state 1 hop 103022005 175828 S Job Queued at request of deviclusterorg owner = deviclusterorg job name = STDIN queue = batch03022005 175828 A queue=batch03022005 175841 S Job Run at request of deviclusterorg03022005 175841 M evaluating limits for job03022005 175841 M phase 2 of job launch successfully completed03022005 175841 M saving task (TMomFinalizeJob3)03022005 175841 M job successfully started03022005 175841 M job 1131koaiclusterorg reported successful start on 1 node(s)03022005 175841 A user=dev group=dev jobname=STDIN queue=batch ctime=1109811508
qtime=1109811508 etime=1109811508 start=1109811521 exec_host=iclusterorg0 Resource_Listneednodes=1 Resource_Listnodect=1 Resource_Listnodes=1 Resource_Listwalltime=00014003022005 180211 M walltime 210 exceeded limit 10003022005 180211 M kill_job03022005 180211 M kill_job found a task to kill03022005 180211 M sending signal 15 to task03022005 180211 M kill_task killing pid 14060 task 1 with sig 1503022005 180211 M kill_task killing pid 14061 task 1 with sig 1503022005 180211 M kill_task killing pid 14063 task 1 with sig 1503022005 180211 M kill_job done03022005 180411 M kill_job03022005 180411 M kill_job found a task to kill03022005 180411 M sending signal 15 to task03022005 180627 M kill_job03022005 180627 M kill_job done03022005 180627 M performing job clean-up03022005 180627 A user=dev group=dev jobname=STDIN queue=batch ctime=1109811508
qtime=1109811508 etime=1109811508 start=1109811521 exec_host=iclusterorg0 Resource_Listneednodes=1 Resource_Listnodect=1
Resource_Listnodes=1 Resource_Listwalltime=000140session=14060 end=1109811987 Exit_status=265 resources_usedcput=000000 resources_usedmem=3544kb resources_usedvmem=10632kb
resources_usedwalltime=000746
Chapter 13 Troubleshooting
The tracejob command operates by searching the pbs_serveraccounting records and the pbs_server MOM and scheduler logs Tofunction properly it must be run on a node and as a user which can accessthese files By default these files are all accessible by the user root andonly available on the cluster management node In particular the filesrequired by tracejob are located in the following directoriesTORQUE_HOMEserver_privaccounting
TORQUE_HOMEserver_logs
TORQUE_HOMEmom_logs
TORQUE_HOMEsched_logs
tracejobmay only be used on systems where these files are madeavailable Non-root users may be able to use this command if thepermissions on these directories or files are changed appropriately
The value of Resource_List is the amount of resources requestedand the value of resources_used is the amount of resources actuallyused
Related TopicsTroubleshooting
Using GDB to Locate Job FailuresIf either the pbs_mom or pbs_server fail unexpectedly (and the log filescontain no information on the failure) gdb can be used to determine whether ornot the program is crashing To start pbs_mom or pbs_server under GDBexport the environment variable PBSDEBUG=yes and start the program (iegdb pbs_mom and then issue the run subcommand at the gdb prompt)GDB may run for some time until a failure occurs and at which point a messagewill be printed to the screen and a gdb prompt again made available If thisoccurs use the gdb where subcommand to determine the exact location in thecode The information provided may be adequate to allow local diagnosis andcorrection If not this output may be sent to the mailing list or to help forfurther assistance
See the PBSCOREDUMP parameter for enabling creation of core files (seeDebugging)
Chapter 13 Troubleshooting
208 Using GDB to Locate Job Failures
Other Diagnostic Options 209
Related TopicsTroubleshooting
Other Diagnostic OptionsWhen PBSDEBUG is set some client commands will print additional diagnosticinformation
$ export PBSDEBUG=yes$ cmd
To debug different kinds of problems it can be useful to see where in the codetime is being spent This is called profiling and there is a Linux utility gprof thatwill output a listing of routines and the amount of time spent in these routinesThis does require that the code be compiled with special options to instrumentthe code and to produce a file gmonout that will be written at the end ofprogram executionThe following listing shows how to build Torque with profiling enabled Noticethat the output file for pbs_mom will end up in the mom_priv directory becauseits startup code changes the default directory to this location
configure CFLAGS=-pg -lgcov -fPIC make -j5 make install pbs_mom do some stuff for a while momctl -s cd varspooltorquemom_priv gprof -b `which pbs_mom` gmonout |less
Another way to see areas where a program is spending most of its time is withthe valgrind program The advantage of using valgrind is that the programs donot have to be specially compiled
valgrind --tool=callgrind pbs_mom
Related TopicsTroubleshooting
Stuck JobsIf a job gets stuck in Torque try these suggestions to resolve the issue
l Use the qdel command to cancel the jobl Force the MOM to send an obituary of the job ID to the server
gt qsig -s 0 ltJOBIDgt
Chapter 13 Troubleshooting
l You can try clearing the stale jobs by using themomctl command on thecompute nodes where the jobs are still listed
gt momctl -c 58925 -h compute-5-20
l Setting the qmgr server setting mom_job_sync to Truemight helpprevent jobs from hanging
gt qmgr -c set server mom_job_sync = True
To check and see if this is already set use
gt qmgr -c p s
l If the suggestions above cannot remove the stuck job you can try qdel -p However since the -p option purges all information generated by thejob this is not a recommended option unless the above suggestions fail toremove the stuck job
gt qdel -p ltJOBIDgt
l The last suggestion for removing stuck jobs from compute nodes is torestart the pbs_mom
For additional troubleshooting run a tracejob on one of the stuck jobs You canthen create an online support ticket with the full server log for the time perioddisplayed in the trace job
Related TopicsTroubleshooting
Frequently Asked Questions (FAQ)l Cannot connect to server error=15034l Deleting stuck jobsl Which user must run Torquel Scheduler cannot run jobs - rc 15003l PBS_Server pbsd_init Unable to read server databasel qsub will not allow the submission of jobs requesting many processorsl qsub reports Bad UID for job executionl Why doesmy job keep bouncing from running to queuedl How do I use PVMwith Torquel My build fails attempting to use the TCL library
Chapter 13 Troubleshooting
210 Frequently Asked Questions (FAQ)
Frequently Asked Questions (FAQ) 211
l My job will not start failing with the message cannot send job to momstate=PRERUN
l How do I determine what version of Torque I am usingl How do I resolve autogensh errors that contain error possiblyundefined macro AC_MSG_ERROR
l How do I resolve compile errors with libssl or libcrypto for Torque 40 onUbuntu 1004
l Why are there so many error messages in the client logs (trqauthd logs)when I dont notice client commands failing
Cannot connect to server error=15034This error occurs in Torque clients (or their APIs) because Torque cannot findthe server_name file andor the PBS_DEFAULT environment variable is notset The server_name file or PBS_DEFAULT variable indicate the pbs_servershostname that the client tools should communicate with The server_name fileis usually located in Torques local state directory Make sure the file exists hasproper permissions and that the version of Torque you are running was builtwith the proper directory settings Alternatively you can set the PBS_DEFAULTenvironment variable Restart Torque daemons if you make changes to thesesettings
Deleting stuck jobsTo manually delete a stale job which has no process and for which themother superior is still alive sending a sig 0 with qsig will often cause MOM torealize the job is stale and issue the proper JobObit notice Failing that usemomctl -c to forcefully cause MOM to purge the job The following processshould never be necessary
l Shut down the MOM on the mother superior nodel Delete all files and directories related to the job from TORQUE_HOMEmom_privjobs
l Restart the MOM on the mother superior nodeIf the mother superior MOM has been lost and cannot be recovered (iehardware or disk failure) a job running on that node can be purged from theoutput of qstat using the qdel -p command or can be removed manually usingthe following steps
To remove job X
1 Shut down pbs_server
gt qterm
2 Remove job spool files
Chapter 13 Troubleshooting
gt rm TORQUE_HOMEserver_privjobsXSC TORQUE_HOMEserver_privjobsXJB
3 Restart pbs_server
gt pbs_server
Which user must run TorqueTorque (pbs_server amp pbs_mom)must be started by a user with rootprivileges
Scheduler cannot run jobs - rc 15003For a scheduler such as Moab or Maui to control jobs with Torque thescheduler needs to be run be a user in the server operators managers list(see qmgr) The default for the server operators managers list isrootlocalhost For Torque to be used in a grid setting with Silver thescheduler needs to be run as root
PBS_Server pbsd_init Unable to read server databaseIf this message is displayed upon starting pbs_server it means that the localdatabase cannot be read This can be for several reasons The most likely is aversion mismatch Most versions of Torque can read each others databasesHowever there are a few incompatibilities between OpenPBS and TorqueBecause of enhancements to Torque it cannot read the job database of anOpenPBS server (job structure sizes have been altered to increasefunctionality) Also a compiled in 32-bit mode cannot read a databasegenerated by a 64-bit pbs_server and vice versa
Chapter 13 Troubleshooting
212 Frequently Asked Questions (FAQ)
Frequently Asked Questions (FAQ) 213
To reconstruct a database (excluding the job database)
1 First print out the old data with this command
gt qmgr -c p s Create queues and set their attributes Create and define queue batch create queue batchset queue batch queue_type = Executionset queue batch acl_host_enable = Falseset queue batch resources_maxnodect = 6set queue batch resources_defaultnodes = 1set queue batch resources_defaultwalltime = 010000set queue batch resources_availablenodect = 18set queue batch enabled = Trueset queue batch started = True Set server attributesset server scheduling = Trueset server managers = griduseroahuiclusterorgset server managers += scotticlusterorgset server managers += wightmaniclusterorgset server operators = griduseroahuiclusterorgset server operators += scotticlusterorgset server operators += wightmaniclusterorgset server default_queue = batchset server log_events = 511set server mail_from = admset server resources_availablenodect = 80set server node_ping_rate = 300set server node_check_rate = 600set server tcp_timeout = 6
2 Copy this information somewhere3 Restart pbs_server with the following command
gt pbs_server -t create
4 When you are prompted to overwrite the previous database enter y thenenter the data exported by the qmgr command as in this example
gt cat data | qmgr
5 Restart pbs_server without the flags
gt qtermgt pbs_server
This will reinitialize the database to the current version
Reinitializing the server database will reset the next jobid to 1
Chapter 13 Troubleshooting
qsub will not allow the submission of jobs requesting manyprocessorsTorques definition of a node is context sensitive and can appear inconsistentThe qsub -l nodes=ltXgt expression can at times indicate a request for Xprocessors and other time be interpreted as a request for X nodes While qsuballowsmultiple interpretations of the keyword nodes aspects of the Torqueservers logic are not so flexible Consequently if a job is using -l nodes tospecify processor count and the requested number of processors exceeds theavailable number of physical nodes the server daemon will reject the jobTo get around this issue the server can be told it has an inflated number ofnodes using the resources_available attribute To take effect this attributeshould be set on both the server and the associated queue as in the examplebelow See resources_available for more information
gt qmgrQmgr set server resources_availablenodect=2048Qmgr set queue batch resources_availablenodect=2048
The pbs_server daemon will need to be restarted before these changeswill take effect
qsub reports Bad UID for job execution[guestlogin2]$ qsub testjobqsub Bad UID for job execution
Job submission hosts must be explicitly specified within Torque or enabled viaRCmd security mechanisms in order to be trusted In the example above thehost login2 is not configured to be trusted This process is documented inConfiguring Job Submission Hosts
Why does my job keep bouncing from running to queuedThere are several reasons why a job will fail to start Do you see any errors inthe MOM logs Be sure to increase the loglevel on MOM if you dont seeanything Also be sure Torque is configured with --enable-syslog and look invarlogmessages (or wherever your syslog writes)Also verify the following on all machines
l DNS resolution works correctly with matching forward and reversel Time is synchronized across the head and compute nodesl User accounts exist on all compute nodesl User home directories can be mounted on all compute nodesl Prologue scripts (if specified) exit with 0
Chapter 13 Troubleshooting
214 Frequently Asked Questions (FAQ)
Frequently Asked Questions (FAQ) 215
If using a scheduler such as Moab or Maui use a scheduler tool such as checkjobto identify job start issues
How do I use PVM with Torquel Start the master pvmd on a compute node and then add the slavesl mpiexec can be used to launch slaves using rsh or ssh (use export PVM_RSH=usrbinssh to use ssh)
Access can be managed by rshssh without passwords between the batchnodes but denying it from anywhere else including the interactive nodesThis can be done with xinetd and sshd configuration (root is allowed to ssheverywhere) This way the pvm daemons can be started and killed fromthe job script
The problem is that this setup allows the users to bypass the batch system bywriting a job script that uses rshssh to launch processes on the batch nodes Ifthere are relatively few users and they can more or less be trusted this setupcan work
My build fails attempting to use the TCL libraryTorque builds can fail on TCL dependencies even if a version of TCL is availableon the system TCL is only utilized to support the xpbsmon client If your sitedoes not use this tool (most sites do not use xpbsmon) you can work aroundthis failure by rerunning configure with the --disable-gui argument
My job will not start failing with the message cannot sendjob to mom state=PRERUNIf a node crashes or other major system failures occur it is possible that a jobmay be stuck in a corrupt state on a compute node Torque 220 and higherautomatically handle this when the mom_job_sync parameter is set via qmgr(the default) For earlier versions of Torque set this parameter and restart thepbs_mom daemonThis error can also occur if not enough free space is available on the partitionthat holds Torque
How do I determine what version of Torque I am usingThere are times when you want to find out what version of Torque you areusing An easy way to do this is to run the following command
qmgr
gt qmgr -c p s | grep pbs_ver
Chapter 13 Troubleshooting
How do I resolve autogensh errors that contain errorpossibly undefined macro AC_MSG_ERRORVerify the pkg-config package is installed
How do I resolve compile errors with libssl or libcrypto forTorque 40 on Ubuntu 1004When compiling Torque 40 on Ubuntu 1004 the following errors might occur
libtool link gcc -Wall -pthread -g -D_LARGEFILE64_SOURCE -o libstrqauthd trq_auth_daemono trq_maino -ldl -lssl -lcrypto -Lhomeadaptivetorquestorque-400srclibLibpbslibs homeadaptivetorquestorque-400srclibLibpbslibslibtorqueso -lpthread -lrt -pthreadusrbinld cannot find -lsslcollect2 ld returned 1 exit statusmake[3] [trqauthd] Error 1
libtool link gcc -Wall -pthread -g -D_LARGEFILE64_SOURCE -o libstrqauthd trq_auth_daemono trq_maino -ldl -lssl -lcrypto -Lhomeadaptivetorquestorque-400srclibLibpbslibs homeadaptivetorquestorque-400srclibLibpbslibslibtorqueso -lpthread -lrt -pthreadusrbinld cannot find -lcryptocollect2 ld returned 1 exit statusmake[3] [trqauthd] Error 1
To resolve the compile issue use these commands
gt cd usrlibgt ln -s liblibcryptoso09 libcryptosogt ln -s liblibsslso098 libsslso
Why are there so many error messages in the client logs(trqauthd logs) when I dont notice client commands failingIf a client makes a connection to the server and the trqauthd connection forthat client command is authorized before the clients connection the trqauthdconnection is rejected The connection is retried but if all retry attempts arerejected trqauthd logs a message indicating a failure Some client commandsthen open a new connection to the server and try again The client commandfails only if all its retries fail
Related TopicsTroubleshooting
Compute Node Health CheckTorque provides the ability to perform health checks on each compute node Ifthese checks fail a failure message can be associated with the node and routedto the scheduler Schedulers (such as Moab) can forward this information to
Chapter 13 Troubleshooting
216 Compute Node Health Check
Compute Node Health Check 217
administrators by way of scheduler triggers make it available throughscheduler diagnostic commands and automatically mark the node down untilthe issue is resolved See the RMMSGIGNORE parameter in Moab Parametersin the Moab Workload Manager Administrator Guide for more informationAdditionally Michael Jennings at LBNL has authored an open-source bash nodehealth check script project It offers an easy way to perform some of the mostcommon node health checking tasks such as verifying network and filesystemfunctionality More information is available on the projects pageFor more information about node health checks see these topics
l Configuring MOMs to Launch a Health Checkl Creating the Health Check Scriptl Adjusting Node State Based on the Health Check Outputl Example Health Check Script
Related TopicsTroubleshooting
Configuring MOMs to Launch a Health CheckThe health check feature is configured via the mom_privconfig file using theparameters described below
Parameter Format Default Description
$node_check_script
ltSTRINGgt NA (Required) Specifies the fully qualified pathname of the healthcheck script to run
$node_check_inter-val
ltINTEGERgt 1 (Optional) Specifies the number of MOM intervals between healthchecks (by default each MOM interval is 45 seconds long - this iscontrolled via the $status_update_time node parameter The integermay be followed by a list of event names ( jobstart and jobendare currently supported) See pbs_mom for more information xrefgt
The node health check may be configured to run before theprologue script by including the jobstart option Howeverthe job environment variables are not in the health check atthat point
Related TopicsCompute Node Health Check
Chapter 13 Troubleshooting
Creating the Health Check ScriptThe health check script is executed directly by the pbs_mom daemon under theroot user id It must be accessible from the compute node and may be a scriptor compile executable program It maymake any needed system calls andexecute any combination of system utilities but should not execute resourcemanager client commands Also as of Torque 101 the pbs_mom daemonblocks until the health check is completed and does not possess a built-intimeout Consequently it is advisable to keep the launch script execution timeshort and verify that the script will not block even under failure conditionsBy default the script looks for the EVENT keyword to indicate successes Ifthe script detects a failure it should return the keyword ERROR to stdoutfollowed by an error message When a failure is detected the ERROR keywordshould be printed to stdout before any other data The message immediatelyfollowing the ERROR keyword must all be contained on the same line Themessage is assigned to the node attribute message of the associated node
In order for the node health check script to log a positive run it isnecessary to include the keyword EVENT at the beginning of themessage your script returns Failure to do so may result in unexpectedoutcomes
Both the ERROR and EVENT keywords are case insensitive
Related TopicsCompute Node Health Check
Adjusting Node State Based on the Health Check OutputIf the health check reports an error the node attribute message is set to theerror string returned Cluster schedulers can be configured to adjust a givennodes state based on this information For example by default Moab sets anodes state to down if a node error message is detected The node healthscript continues to run at the configured interval (see Configuring MOMs toLaunch a Health Check for more information) and if it does not generate theerror message again during one of its later executions Moab picks that up atthe beginning of its next iteration and restores the node to an online state
Related TopicsCompute Node Health Check
Chapter 13 Troubleshooting
218 Compute Node Health Check
Debugging 219
Example Health Check ScriptAsmentioned the health check can be a shell script PERL Python C-executable or anything which can be executed from the command line capableof setting STDOUT The example below demonstrates a very simple healthcheck
binshbinmount | grep globalif [ $ = 0 ] then echo ERROR cannot locate filesystem globalfi
Related TopicsCompute Node Health Check
DebuggingTorque supports a number of diagnostic and debug options including thefollowingPBSDEBUG environment variable - If set to yes this variable will prevent pbs_server pbs_mom andor pbs_sched from backgrounding themselves allowingdirect launch under a debugger Also some client commands will provideadditional diagnostic information when this value is setPBSLOGLEVEL environment variable - Can be set to any value between 0 and 7and specifies the logging verbosity level (default = 0)PBSCOREDUMP environment variable - If set it will cause the offendingresource manager daemon to create a core file if a SIGSEGV SIGILL SIGFPESIGSYS or SIGTRAP signal is received The core dump will be placed in thedaemons home directory ($PBSHOMEmom_priv for pbs_mom and$PBSHOMEserver_priv for pbs_server)
To enable core dumping in a Red Hat-based system you must add thefollowing line to the etcinitdpbs_mom and etcinitdpbs_server scriptsexport DAEMON_COREFILE_LIMIT=unlimited
NDEBUGdefine - if set at build time will cause additional low-level logginginformation to be output to stdout for pbs_server and pbs_mom daemonstracejob reporting tool - can be used to collect and report logging andaccounting information for specific jobs (See Using tracejob to Locate JobFailures) for more information
Chapter 13 Troubleshooting
PBSLOGLEVEL and PBSCOREDUMPmust be added to the $PBSHOMEpbs_environment file not just the current environment To set thesevariables add a line to the pbs_environment file as eithervariable=value or just variable In the case of variable=value theenvironment variable is set up as the value specified In the case ofvariable the environment variable is set based upon its value in thecurrent environment
Torque Error Codes
Error code name Number Description
PBSE_FLOOR 15000 No error
PBSE_UNKJOBID 15001 Unknown job identifier
PBSE_NOATTR 15002 Undefined attribute
PBSE_ATTRRO 15003 Attempt to set READ ONLY attribute
PBSE_IVALREQ 15004 Invalid request
PBSE_UNKREQ 15005 Unknown batch request
PBSE_TOOMANY 15006 Too many submit retries
PBSE_PERM 15007 No permission
PBSE_MUNGE_NOT_FOUND 15009 munge executable not found unable to authenticate
PBSE_BADHOST 15010 Access from host not allowed
PBSE_JOBEXIST 15011 Job already exists
PBSE_SYSTEM 15012 System error occurred
PBSE_INTERNAL 15013 Internal server error occurred
PBSE_REGROUTE 15014 Parent job of dependent in rte queue
PBSE_UNKSIG 15015 Unknown signal name
Chapter 13 Troubleshooting
220 Debugging
Debugging 221
Error code name Number Description
PBSE_BADATVAL 15016 Bad attribute value
PBSE_MODATRRUN 15017 Cannot modify attribute in run state
PBSE_BADSTATE 15018 Request invalid for job state
PBSE_UNKQUE 15020 Unknown queue name
PBSE_BADCRED 15021 Invalid credential in request
PBSE_EXPIRED 15022 Expired credential in request
PBSE_QUNOENB 15023 Queue not enabled
PBSE_QACESS 15024 No access permission for queue
PBSE_BADUSER 15025 Bad user - no password entry
PBSE_HOPCOUNT 15026 Max hop count exceeded
PBSE_QUEEXIST 15027 Queue already exists
PBSE_ATTRTYPE 15028 Incompatible queue attribute type
PBSE_QUEBUSY 15029 Queue busy (not empty)
PBSE_QUENBIG 15030 Queue name too long
PBSE_NOSUP 15031 Featurefunction not supported
PBSE_QUENOEN 15032 Cannot enable queueneeds add def
PBSE_PROTOCOL 15033 Protocol (ASN1) error
PBSE_BADATLST 15034 Bad attribute list structure
PBSE_NOCONNECTS 15035 No free connections
PBSE_NOSERVER 15036 No server to connect to
Chapter 13 Troubleshooting
Error code name Number Description
PBSE_UNKRESC 15037 Unknown resource
PBSE_EXCQRESC 15038 Job exceeds queue resource limits
PBSE_QUENODFLT 15039 No default queue defined
PBSE_NORERUN 15040 Job not rerunnable
PBSE_ROUTEREJ 15041 Route rejected by all destinations
PBSE_ROUTEEXPD 15042 Time in route queue expired
PBSE_MOMREJECT 15043 Request to MOM failed
PBSE_BADSCRIPT 15044 (qsub) Cannot access script file
PBSE_STAGEIN 15045 Stage-In of files failed
PBSE_RESCUNAV 15046 Resources temporarily unavailable
PBSE_BADGRP 15047 Bad group specified
PBSE_MAXQUED 15048 Max number of jobs in queue
PBSE_CKPBSY 15049 Checkpoint busy may be retries
PBSE_EXLIMIT 15050 Limit exceeds allowable
PBSE_BADACCT 15051 Bad account attribute value
PBSE_ALRDYEXIT 15052 Job already in exit state
PBSE_NOCOPYFILE 15053 Job files not copied
PBSE_CLEANEDOUT 15054 Unknown job id after clean init
PBSE_NOSYNCMSTR 15055 No master in sync set
PBSE_BADDEPEND 15056 Invalid dependency
Chapter 13 Troubleshooting
222 Debugging
Debugging 223
Error code name Number Description
PBSE_DUPLIST 15057 Duplicate entry in list
PBSE_DISPROTO 15058 Bad DIS based request protocol
PBSE_EXECTHERE 15059 Cannot execute there
PBSE_SISREJECT 15060 Sister rejected
PBSE_SISCOMM 15061 Sister could not communicate
PBSE_SVRDOWN 15062 Requirement rejected -server shutting down
PBSE_CKPSHORT 15063 Not all tasks could checkpoint
PBSE_UNKNODE 15064 Named node is not in the list
PBSE_UNKNODEATR 15065 Node-attribute not recognized
PBSE_NONODES 15066 Server has no node list
PBSE_NODENBIG 15067 Node name is too big
PBSE_NODEEXIST 15068 Node name already exists
PBSE_BADNDATVAL 15069 Bad node-attribute value
PBSE_MUTUALEX 15070 State values are mutually exclusive
PBSE_GMODERR 15071 Error(s) during global modification of nodes
PBSE_NORELYMOM 15072 Could not contact MOM
PBSE_NOTSNODE 15073 No time-shared nodes
PBSE_JOBTYPE 15074 Wrong job type
PBSE_BADACLHOST 15075 Bad ACL entry in host list
PBSE_MAXUSERQUED 15076 Maximum number of jobs already in queue for user
Chapter 13 Troubleshooting
Error code name Number Description
PBSE_BADDISALLOWTYPE 15077 Bad type in disallowed_types list
PBSE_NOINTERACTIVE 15078 Interactive jobs not allowed in queue
PBSE_NOBATCH 15079 Batch jobs not allowed in queue
PBSE_NORERUNABLE 15080 Rerunable jobs not allowed in queue
PBSE_NONONRERUNABLE 15081 Non-rerunable jobs not allowed in queue
PBSE_UNKARRAYID 15082 Unknown array ID
PBSE_BAD_ARRAY_REQ 15083 Bad job array request
PBSE_TIMEOUT 15084 Time out
PBSE_JOBNOTFOUND 15085 Job not found
PBSE_NOFAULTTOLERANT 15086 Fault tolerant jobs not allowed in queue
PBSE_NOFAULTINTOLERANT 15087 Only fault tolerant jobs allowed in queue
PBSE_NOJOBARRAYS 15088 Job arrays not allowed in queue
PBSE_RELAYED_TO_MOM 15089 Request was relayed to a MOM
PBSE_MEM_MALLOC 15090 Failed to allocate memory for memmgr
PBSE_MUTEX 15091 Failed to allocate controlling mutex (lockunlock)
PBSE_TRHEADATTR 15092 Failed to set thread attributes
PBSE_THREAD 15093 Failed to create thread
PBSE_SELECT 15094 Failed to select socket
PBSE_SOCKET_FAULT 15095 Failed to get connection to socket
PBSE_SOCKET_WRITE 15096 Failed to write data to socket
Chapter 13 Troubleshooting
224 Debugging
Debugging 225
Error code name Number Description
PBSE_SOCKET_READ 15097 Failed to read data from socket
PBSE_SOCKET_CLOSE 15098 Socket closed
PBSE_SOCKET_LISTEN 15099 Failed to listen in on socket
PBSE_AUTH_INVALID 15100 Invalid auth type in request
PBSE_NOT_IMPLEMENTED 15101 Functionality not yet implemented
PBSE_QUENOTAVAILABLE 15102 Queue is not available
Related TopicsTroubleshooting
Chapter 13 Troubleshooting
Appendices
The appendices provide tables of commands parameters configurationoptions error codes the Quick Start Guide and so forth
l Commands Overview on page 227l Server Parameters on page 315l Node Manager (MOM) Configuration on page 343l Diagnostics and Error Codes on page 367l Considerations Before Upgrading on page 375l Large Cluster Considerations on page 377l Prologue and Epilogue Scripts on page 385l Running Multiple Torque Servers and MOMs on the Same Node on page397
l Security Overview on page 399l Job Submission Filter (qsub Wrapper) on page 401l torquecfg Configuration File on page 403l Torque Quick Start Guide on page 409l BLCR Acceptance Tests on page 413l Queue Attributes on page 421
Appendices
226 Debugging
Commands Overview 227
Commands Overview
Client Commands
Command Description
momctl Managediagnose MOM (node execution) daemon
pbsdsh Launch tasks within a parallel job
pbsnodes Viewmodify batch status of compute nodes
qalter Modify queued batch jobs
qchkpt Checkpoint batch jobs
qdel Deletecancel batch jobs
qgpumode Specifies new mode for GPU
qgpureset Reset the GPU
qhold Hold batch jobs
qmgr Manage policies and other batch configuration
qmove Move batch jobs
qorder Exchange order of two batch jobs in any queue
qrerun Rerun a batch job
qrls Release batch job holds
qrun Start a batch job
qsig Send a signal to a batch job
Command Description
qstat View queues and jobs
qsub Submit jobs
qterm Shutdown pbs server daemon
tracejob Trace job actions and states recorded in Torque logs (see Using tracejob to Locate Job Failures)
Binary Executables
Command Description
pbs_mom Start MOM (node execution) daemon
pbs_server Start server daemon
pbs_track Tell pbs_mom to track a new process
Related TopicsNode Manager (MOM) ConfigurationServer Parameters
momctl(PBS MOMControl)
Synopsismomctl -c ltJOBIDgt | all momctl -Cmomctl -d ltINTEGERgt | ltJOBIDgt momctl -f ltFILEgtmomctl -h ltHOSTgt[ltHOSTgt]momctl -lmomctl -p ltPORT_NUMBERgtmomctl -q ltATTRIBUTEgtmomctl -r ltFILEgt | LOCALltFILEgt momctl -smomctl -u
228 Commands Overview
Commands Overview 229
OverviewThe momctl command allows remote shutdown reconfiguration diagnosticsand querying of the pbs_mom daemon
Format
-c mdash Clear
Format ltJOBIDgt | all
Default ---
Description Makes the MOM unaware of the jobsexistence It does not clean up anyprocesses associated with the job
Example momctl -c 2 -h node1
-C mdash Cycle
Format ---
Default ---
Description Cycle pbs_mom (force the MOM to send a status update to pbs_server)
Example momctl -C -h node1
Cycle pbs_mom on node1
-d mdash Diagnose
Format ltINTEGERgt | ltJOBIDgt
Default 0
Description Diagnose MOM(s)(For more details see Diagnose detail below)
-d mdash Diagnose
Example momctl -d 2 -h node1
Print level 2 and lower diagnostic information for theMOM on node1
-f mdash Host File
Format ltFILEgt
Default ---
Description A file containing only comma or whitespace (space tab or new line) delimited hostnames
Example momctl -f hoststxt -d 0
Print diagnose information for the MOMs running on the hosts specified inhoststxt
-h mdash Host List
Format ltHOSTgt[ltHOSTgt]
Default localhost
Description A comma separated list of hosts
Example momctl -h node1node2node3 -d 0
Print diagnose information for the MOMs running on node1node2 and node3
-l mdash Layout
Format ---
Default ---
230 Commands Overview
Commands Overview 231
-l mdash Layout
Description Display the layout of the machine as it is understood by Torque
Example [rootc04a numa] momctl -lMachine (50329748KB)Socket 0 (33552532KB)Chip 0 (16775316KB)Core 0 (1 threads)Core 1 (1 threads)Core 2 (1 threads)Core 3 (1 threads)Core 4 (1 threads)Core 5 (1 threads)Core 6 (1 threads)Core 7 (1 threads)Chip 1 (16777216KB)Core 8 (1 threads)Core 9 (1 threads)Core 10 (1 threads)Core 11 (1 threads)Core 12 (1 threads)Core 13 (1 threads)Core 14 (1 threads)Core 15 (1 threads)
Socket 1 (16777216KB)Chip 2 (8388608KB)Core 16 (1 threads)Core 17 (1 threads)Core 18 (1 threads)Core 19 (1 threads)Core 20 (1 threads)Core 21 (1 threads)Core 22 (1 threads)Core 23 (1 threads)Chip 3 (8388608KB)Core 24 (1 threads)Core 25 (1 threads)Core 26 (1 threads)Core 27 (1 threads)Core 28 (1 threads)Core 29 (1 threads)Core 30 (1 threads)Core 31 (1 threads)
-p mdash Port
Format ltPORT_NUMBERgt
Default Torques default port number
Description The port number for the specified MOM(s)
-p mdash Port
Example momctl -p 5455 -h node1 -d 0
Request diagnose information over port5455 on node1
-q mdash Query
Format ltATTRIBUTEgt
Default ---
Description Query or set ltATTRIBUTEgt where ltATTRIBUTEgt is a property listed by pbsnodes -a (see Queryattributes for a list of attributes)
Example momctl -q physmem
Print the amount of physmem on localhost
momctl -h node2 -q loglevel=7
Change the current MOM logging on node2 to level 7
-r mdash Reconfigure
Format ltFILEgt | LOCALltFILEgt
Default ---
Description Reconfigure MOM(s) with remote or local config file ltFILEgt This does not work if $remote_recon-fig is not set to true when the MOM is started
Example momctl -r homeuser1newconfig -h node1
Reconfigure MOM on node1 with homeuser1newcofig on node1
232 Commands Overview
Commands Overview 233
-s mdash Shutdown
Format ---
Default ---
Description Have the MOM shut itself down gracefully (this includes reporting to server so that pbsnodesmarks the node down)
Example momctl -s
Shut down the pbs_mom process on localhost
-u mdash Update
Format ---
Default ---
Description Update the hardware configuration on pbs_server with a layout from the MOM
Example momctl -u
Update pbs_server hardware configuration
Query attributes
Attribute Description
arch node hardware architecture
availmem available RAM
loadave 1 minute load average
ncpus number of CPUs available on the system
netload total number of bytes transferred over all network interfaces
Attribute Description
nsessions number of sessions active
nusers number of users active
physmem configured RAM
sessions list of active sessions
totmem configured RAM plus configured swap
Diagnose detail
Level Description
0 Display the following informationl Local hostnamel Expected server hostnamel Execution versionl MOM home directoryl MOM config file version (if specified)l Duration MOM has been executingl Duration since last request from pbs_server daemonl Duration since last request to pbs_server daemonl RM failure messages (if any)l Log verbosity levell Local job list
1 All information for level 0 plus the followingl Interval between updates sent to serverl Number of initialization messages sent to pbs_serverdaemon
l Number of initialization messages received from pbs_serverdaemon
l Prologepilog alarm timel List of trusted clients
234 Commands Overview
Commands Overview 235
Level Description
2 All information from level 1 plus the followingl PIDl Event alarm status
3 All information from level 2 plus the followingl syslog enabled
Example A-1 MOM diagnostics
momctl -d 1
Host nsrcnsrcfllclcom Server 101010113 Version torque_110p4HomeDirectory usrspoolPBSmom_privConfigVersion 147MOM active 7390 secondsLast Msg From Server 7389 seconds (CLUSTER_ADDRS)Server Update Interval 20 secondsServer Update Interval 20 secondsInit Msgs Received 0 hellos1 cluster-addrsInit Msgs Sent 1 hellosLOGLEVEL 0 (use SIGUSR1SIGUSR2 to adjust)Prolog Alarm Time 300 secondsTrusted Client List 1214213113127001JobList NONE
diagnostics complete
Example A-2 System shutdown
gt momctl -s -f optclusterhostfile
shutdown request successful on node001shutdown request successful on node002shutdown request successful on node003shutdown request successful on node004shutdown request successful on node005shutdown request successful on node006
pbs_momStart a pbs batch execution mini-server
Synopsispbs_mom [-a alarm] [-A alias] [-C chkdirectory] [-c config] [-d directory] [-f] [-F] [-h help] [-H hostname] [-L logfile] [-M MOMport] [-R RMPport] [-p|-r] [-P purge] [-w] [-x]
DescriptionThe pbs_mom command is located within the TORQUE_HOME directory and startsthe operation of a batch Machine Oriented Mini-server (MOM) on the executionhost To ensure that the pbs_mom command is not runnable by the general usercommunity the server will only execute if its real and effective uid is zeroThe first function of pbs_mom is to place jobs into execution as directed by theserver establish resource usage limits monitor the jobs usage and notify theserver when the job completes If they exist pbs_momwill execute a prologuescript before executing a job and an epilogue script after executing the jobThe second function of pbs_mom is to respond to resource monitor requestsThis was done by a separate process in previous versions of PBS but has nowbeen combined into one process It provides information about the status ofrunning jobs memory available etcThe last function of pbs_mom is to respond to taskmanager requests Thisinvolves communicating with running tasks over a TCP socket as well ascommunicating with other MOMs within a job (aka a sisterhood)pbs_momwill record a diagnostic message in a log file for any error occurrenceThe log files are maintained in the mom_logs directory below the homedirectory of the server If the log file cannot be opened the diagnosticmessage is written to the system console
Options
Flag Name Description
-a alarm Specifies the alarm timeout in seconds for computing a resource Every time a resourcerequest is processed an alarm is set for the given amount of time If the request has notcompleted before the given time an alarm signal is generated The default is 5 seconds
-A alias Specifies this multimoms alias name The alias name needs to be the same name used inthe momhierarchy file It is only needed when running multiple MOMs on the samemachine For more information see Torque Multi-MOM
-c config Specifies an alternative configuration file see description below If this is a relative filename it will be relative to TORQUE_HOMEmom_priv (see the -d option) If the specifiedfile cannot be opened pbs_mom will abort If the -c option is not supplied pbs_mom willattempt to open the default configuration file config in TORQUE_HOMEmom_priv Ifthis file is not present pbs_mom will log the fact and continue
-C chkdirectory Specifies the path of the directory used to hold checkpoint files (Currently this is onlyvalid on Cray systems) The default directory is TORQUE_HOMEspoolcheckpoint(see the -d option) The directory specified with the -C option must be owned by rootand accessible (rwx) only by root to protect the security of the checkpoint files
236 Commands Overview
Commands Overview 237
Flag Name Description
-d directory Specifies the path of the directory which is the home of the servers working filesTORQUE_HOME This option is typically used along with -M when debugging MOM Thedefault directory is given by $PBS_SERVER_HOME which is typically usrspoolPBS
-f force_update
Forces the server to accept an update of the hardware on the node Should be used thefirst time pbs_mom is run after a hardware update on a node
-F fork Do not fork
This option is useful when running under systemd (Red Hat 7-based or SUSE 12-based systems)
-h help Displays the helpusage message
-H hostname Sets the MOMs hostname This can be useful on multi-homed networks
-L logfile Specifies an absolute path name for use as the log file If not specified MOM will open afile named for the current date in the TORQUE_HOMEmom_logs directory (see the -doption)
-M port Specifies the port number on which the mini-server (MOM) will listen for batch requests
-p na Specifies the impact on jobs which were in execution when the mini-server shut downOn any restart of MOM the new mini-server will not be the parent of any running jobsMOM has lost control of her offspring (not a new situation for a mother) With the -poption MOM will allow the jobs to continue to run and monitor them indirectly viapolling This flag is redundant in that this is the default behavior when starting theserver The -p option is mutually exclusive with the -r and -q options
-P purge Specifies the impact on jobs which were in execution when the mini-server shut downWith the -P option it is assumed that either the entire system has been restarted or theMOM has been down so long that it can no longer guarantee that the pid of any runningprocess is the same as the recorded job process pid of a recovering job Unlike the -poption no attempt is made to try and preserve or recover running jobs All jobs are ter-minated and removed from the queue
-q na Specifies the impact on jobs which were in execution when the mini-server shut downWith the -q option MOM will allow the processes belonging to jobs to continue to runbut will not attempt to monitor them The -q option is mutually exclusive with the -p and-r options
Flag Name Description
-r na Specifies the impact on jobs which were in execution when the mini-server shut downWith the -r option MOM will kill any processes belonging to jobs mark the jobs asterminated and notify the batch server which owns the job The -r option is mutuallyexclusive with the -p and -q optionsNormally the mini-server is started from the system boot file without the -p or the -roption The mini-server will make no attempt to signal the former session of any jobwhich may have been running when the mini-server terminated It is assumed that onreboot all processes have been killed If the -r option is used following a reboot processIDs (pids) may be reused and MOM may kill a process that is not a batch session
-R port Specifies the port number on which the mini-server (MOM) will listen for resource mon-itor requests task manager requests and inter-MOM messages Both a UDP and a TCPport of this number will be used
-w wait_for_server
When started with -w pbs_moms wait until they get their MOM hierarchy file from pbs_server to send their first update or until 10 minutes pass This reduces network trafficon startup and can bring up clusters faster
-x na Disables the check for privileged port resource monitor connections This is used mainlyfor testing since the privileged port is the only mechanism used to prevent any ordinaryuser from connecting
Configuration fileThe configuration file located at mom_privconfig by default can bespecified on the command line at program start with the -c flag The use of thisfile is to provide several types of run time information to pbs_mom staticresource names and values external resources provided by a program to berun on request via a shell escape and values to pass to internal set up functionsat initialization (and re-initialization)See the Parameters page for a full list of pbs_mom parametersEach item type is on a single line with the component parts separated by whitespace If the line starts with a hash mark (pound sign ) the line is consideredto be a comment and is skippedStatic ResourcesFor static resource names and values the configuration file contains a list ofresource namesvalues pairs one pair per line and separated by white spaceAn example of static resource names and values could be the number of tapedrives of different types and could be specified by
l tape3480 4l tape3420 2
238 Commands Overview
Commands Overview 239
l tapedat 1l tape8mm 1
Shell CommandsIf the first character of the value is an exclamation mark () the entire rest ofthe line is saved to be executed through the services of the system(3) standardlibrary routineThe shell escape provides a means for the resource monitor to yield arbitraryinformation to the scheduler Parameter substitution is done such that thevalue of any qualifier sent with the query as explained below replaces a tokenwith a percent sign () followed by the name of the qualifier For examplehere is a configuration file line which gives a resource name of escape
escape echo xxx yyy
If a query for escape is sent with no qualifiers the command executed wouldbe echo xxx yyyIf one qualifier is sent escape[xxx=hi there] the command executedwould be echo hi there yyyIf two qualifiers are sent escape[xxx=hi][yyy=there] the commandexecuted would be echo hi thereIf a qualifier is sent with no matching token in the command line escape[zzz=snafu] an error is reported
ResourcesResource Manager queries can be made withmomctl -q options to retrieveand set pbs_mom options Any configured static resource may be retrieved witha request of the same name These are resource requests not otherwisedocumented in the PBS ERS
Request Description
cycle Forces an immediate MOM cycle
status_update_time Retrieve or set the $status_update_time parameter
check_poll_time Retrieve or set the $check_poll_time parameter
configversion Retrieve the config version
jobstartblocktime Retrieve or set the $jobstartblocktime parameter
Request Description
enablemomrestart Retrieve or set the $enablemomrestart parameter
loglevel Retrieve or set the $loglevel parameter
down_on_error Retrieve or set the $down_on_error parameter
diag0 - diag4 Retrieves varied diagnostic information
rcpcmd Retrieve or set the $rcpcmd parameter
version Retrieves the pbs_mom version
Health checkThe health check script is executed directly by the pbs_mom daemon under theroot user id It must be accessible from the compute node and may be a scriptor compiled executable program It maymake any needed system calls andexecute any combination of system utilities but should not execute resourcemanager client commands Also the pbs_mom daemon blocks until the healthcheck is completed and does not possess a built-in timeout Consequently it isadvisable to keep the launch script execution time short and verify that thescript will not block even under failure conditionsIf the script detects a failure it should return the ERROR keyword to stdoutfollowed by an error message The message (up to 1024 characters)immediately following the ERROR string will be assigned to the node attributemessage of the associated nodeIf the script detects a failure when run from jobstart then the job will berejected You can use this behavior with an advanced scheduler such as MoabWorkload Manager to cause the job to be routed to another node Torquecurrently ignores Error messages by default but you can configure anadvanced scheduler to react appropriatelyIf the $down_on_error MOM setting is enabled the MOMwill set itself to statedown and report to pbs_server Additionally the $down_on_error serverattribute can be enabled which has the same effect but moves the decision topbs_server It is redundant to have MOMs $down_on_error and pbs_serversdown_on_error features enabled Also see down_on_error (in ServerParameters)See Creating the Health Check Script on page 218 for more information
240 Commands Overview