|
[Sponsors] |
August 13, 2013, 10:09 |
Check license before running on the cluster
|
#1 |
New Member
Join Date: Aug 2013
Posts: 2
Rep Power: 0 |
Here is my problem:
I'm running CFX on the Microsoft HPC cluster 2008 R2 without any problems. The problem I'm having is that the job will fail if there are no licenses available. I have a general idea how I could create a submission filter for the HPC cluster. What I would like to do is to be able to check the number of nodes/elements the job is using before job is submitted. Is there an API or a command line tool I could use to check this? I want to do this because for example, if a job has more than 500000 elements it would require a Research license, <500000 means the jobs would use a student license (if also number of required nodes is <=4). Can anyone help? |
|
August 13, 2013, 20:19 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
We implemented a license queuing system using PBS here at work. It was not straight forward and needed support from PBS to get it going, but it did work well once set up. I do not know of any easy way of doing it elsewhere - you will probably have to write your own script to call lmstat.exe and parse the returned file and decide whether enough licenses are available.
|
|
August 14, 2013, 03:04 |
|
#3 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
There is a -preferred-license flag you can use in cfx5solve, but Im not sure how to get the number of nodes/cells in the .def file before running it. You might be able to get it if you run cfx5solve with -check-only and parse the output, if it prints the mesh info.
|
|
August 14, 2013, 03:33 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
If you use lmstat.exe it will return the status of the licenses. You can parse that file to extract the currently available number of licenses. Then feed that into PBS or your own gizmo which controls simulation execution and I think you have the question answered. And rather than extract the number of partitions in the def file it will probably be easier to set that when you run it so it is known.
|
|
August 14, 2013, 03:38 |
|
#5 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
But the question was how to (automagically?) use student licenses when the number of nodes in the mesh was <500 000, and use research licenses for larger jobs. Then s/he need to know the number of nodes in the .def file before submitting the job to the scheduler.
|
|
August 14, 2013, 03:44 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Good point Maybe I should read questions a little more closely in future.
You could probably run a CFD-Post session file which loads a def file and returns count()@domain. That might do it. |
|
August 14, 2013, 03:57 |
|
#7 |
New Member
Join Date: Aug 2013
Posts: 2
Rep Power: 0 |
||
August 14, 2013, 04:33 |
|
#8 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
How about I tell you how to do it:
Load up CFD-Post, turn on recording a session file. Load up a def file and do a CEL function count()@domain (replace with the domain name). Not sure of the best way to return this value, you will have to try some options. Also - what about a simple approach. How about you have a script which runs it using the node limited license and if bombs out it runs it again with the full license? This sounds simpler to implement, even if it is less elegant. |
|
August 14, 2013, 04:34 |
|
#9 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
here's a session file with some PERL that outputs the number of nodes in Default Domain to tmp.txt
Code:
COMMAND FILE: CFX Post Version = 14.5 END DATA READER: Clear All Objects = false Append Results = false Edit Case Names = false Open to Compare = false Multi Configuration File Load Option = Last Case Open in New View = true Keep Camera Position = true Load Particle Tracks = true Files to Compare = END DATA READER: Domains to Load= END > load filename=##YOUR.DEFFILE##, force_reload=\ true !$outfile = "tmp.txt"; !open(OUT, ">$outfile"); !$nodes = count("Default Domain"); !print OUT $nodes; !close(OUT); cfdpost -batch sessionfile.cse |
|
Tags |
cfx hpc cluster license |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
License Error | lffabiani | CFX | 2 | June 30, 2011 21:51 |
Fluent Error while running on cluster | amoolraina | FLUENT | 5 | March 4, 2011 05:55 |
Running in Parallel on cluster | NewFoamer | OpenFOAM Running, Solving & CFD | 3 | November 3, 2010 17:20 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 10:38 |
Kubuntu uses dash breaks All scripts in tutorials | platopus | OpenFOAM Bugs | 8 | April 15, 2008 08:52 |