Hang when license in use

Hello all,
I’m not sure if this should go here or in licensing/installation.

I have an issue where every night, we run an automated compiller test of our code (runs through multiple compilers). It’s run serially from a simple shell script.
The problem is that, when it reaches the PGI compiller, if we forgot to close pgdbg, the pgfortran line simply hangs with the ‘license in use’ error message instead of exiting with an error code, and waits for user interaction. This freezes the entire nightly build script.
Ifort, however, uses the same license manager and does not freeze when its license is in use.

I’m curious if there is some sort of a compiler flag to allow pgfortran to exit with an error code (where we can use some exception handling to email us that there was an issue) if the license is in use rather than simply hanging and leaving the script partially finished (for several days if this happens over the weekend).

Thank you all for your help.

Hi vlarson,

That’s not the expected behavior. The compilers should retry 3 times to check out the license with ~1 second between tries and then abort.

Could something else in your script be causing it to hang? Do you see the hang when pgfortran is executed outside the script?

  • Mat

Hi Mat,

Well, I tested it just by starting ‘pgdebug’ (which is what tends to cause the issue, if someone leaves that running) first, then running a pgf95 command.
It will hang with the following message

pgi-f95-lin64: LICENSE MANAGER PROBLEM: Licensed number of users already reached.
Feature:       pgi-f95-lin64
License path:  /opt/pgi/license.dat:
FLEXnet Licensing error:-4,132
For further information, refer to the FLEXnet Licensing documentation,
available at "www.acresso.com".

Unless I physically end the process (control-c, kill command, etc), it just sits there forever.

For now I have, in the script, a few ‘sudo killall’ commands for each pgi compiler task name, but even that will fail now and then if a user launches the debugger after the kill command goes through, which then causes the script to hang once more.

-Jon (Sysadmin for vlarson)

I don’t see the problem. These are single seat licenses - if you are running pgdbg, there are no more seats, and flexlm queues up the requests.
If we were to timeout compiles, the users with long compilations would timeout as well.

The person using pgdbg CAN run the compilers, btw, since he has the seat. When you are using pgdbg, you will want to also run the compilers,

So either open pgdbg
before you run your jobs (inwhich case you will always have the compilers),
or set the permissions on pgdbg (and pgprof) to not allow people to use it while running your jobs so that other users can share the seat.

Or get a multi-seat floating license.

Oh, I understand the reasons for the way it’s works like this. I was curious as to whether there is a way to set a timeout for waiting for a license rather than simply stalling, perhaps with a compiler flag (set within our nightly script).

We have several single seat licenses. Due to the hassle we’ve experienced with flexLM in the past, we’re trying to avoid switching to a floating license.