How to Programmatically find name of Head Node?
-
Wednesday, July 06, 2011 2:46 AM
Is there any programmatic way to determine the name of the head node? I'll take answers in C# or F#, or if you could point me to the correct api I could probably work it out on my own.
Thanks in advance,
Bob
All Replies
-
Wednesday, July 06, 2011 10:04 AMWhat do you mean by name of headnode? Also, where is your code running? There could be multiple head node in a network, so to know the name of the headnode, you must specifiy a headnode...
-
Thursday, July 07, 2011 2:27 AM
In case your code is running on the compute nodes which belong to the cluster, you can get head node by environment variable %ccp_scheduler%
-
Thursday, July 07, 2011 2:45 AM
Would this work on a Workstation node as well?
Bob
-
Thursday, July 07, 2011 2:47 AM
I'm assuming a cluster with only a single head node, and the code might be running on a workstation node, a compute node, or even the head node itself. Thank you for asking good questions which allow me to explain my scenario more clearly.
Bob
-
Monday, July 11, 2011 3:04 AM
The environment variable %ccp_scheduler% is available on all the nodes in the cluster, including headnode, broker node, compute node and workstation node.- Proposed As Answer by Lukasz TomczykMicrosoft Employee Monday, July 25, 2011 4:23 PM
- Marked As Answer by MadScientistBob Monday, July 25, 2011 5:09 PM