Using PBS Professional Plug-in Hooks to Handle Dynamic Software Licensing

If you ever used a workload manager to schedule commercial software runs on a computing environment, you almost certainly faced the problem of software license competition: you really need to only let a job run when there are available licenses.

Many commercial job schedulers offer a “dynamic resource” mechanism to handle such cases and PBS Professional does as well.  But, in addition, PBS Professional offers the ability to use a plug-in to handle corner cases and complex license requirements, not easily expressed in terms of resources.

A PBS Professional plug-in is a script associated to an event, and in the case of license scheduling we can leverage the “runjob” event: this happens when a job is found able to run on the available resources, just before it is effectively dispatched. “Runjob” is a good time to check for certain health status information on the nodes selected for running the job, to check for accounting information (has the user enough allocation units left?), and in our case, to check for license availability.

The flow would be:

1. Job is submitted asking for a certain amount of “scheduling resources” (ie. ncpus, memory) and holds also the necessary information to express the license needs (ie. license server pointer, needed amount of features) but license related resources are not used by the scheduler.

2. When scheduler finds there are enough scheduling resources available, job is dispatched.

3. Just before dispatch, the “runjob” event is evaluated: as the plug-in is able to look into job data, it reads the licensing information, connects to the license server and lets the job be dispatched only if enough licenses are available (taking care to also minimize race conditions, for instance throttling the amount of jobs dispatched per minute).

Of course this is not perfect (as the dynamic resource mechanism, anyway), but I found I could handle tricky commercial software license requests without placing load in the scheduling mechanism (for instance license related information is processed just when needed and not at each cycle) or using complex resource configurations.

A real world example of the above comes with the document describing how to integrate Schlumberger Simulators in a PBS Professional Computing Environment (Altair-PBS-Eclipse-Integraton-2012.pdf), which is available from (Support -> Resource Library -> Technical Papers).

Dario Dorella
Latest posts by Dario Dorella (see all)
Dario Dorella

About Dario Dorella

Dario Dorella joined Altair PBS Works product management team moving from his previous responsibilities as product specialist and second level support resource. Over its 10+ years in the field he worked with customers operating in different domains and ranging from small shops to large enterprises to deploy, customize and deliver to end users computing solutions based on the Altair software offering.