The Microsoft HPC & Azure Batch Team Blog

The blog for the Big Compute team in Microsoft Azure, working on HPC & Azure Batch services and technologies

How to set environment variables on computes nodes

How to set environment variables on computes nodes

  • Comments 2
  • Likes

For ISV application you have to set some environments variables on the compute node.
You can set this variable by hand, but if you have many nodes it can be long.
So, the idea of this post is how can set them attaumaticaly ?

 Use the HPCS tools :

You can set cluster wilde variable by using cluscgf in a Administrator cmd line windows :
   "cluscfg setenvs name=value"

ex. : cluscfg setenvs LM_LICENSE_FILE=license_server@74000

So each time you will submit a job this variable will be set for the job

 Use command line :

Select the nodes into the node management view and run the following command
 "setx  name value /M"
This command will add this environement variable in the system of all the selected nodes

NOTE : /M set the variable for the system

ex. : setx PATH "%PATH%;\\headnode\Apps\bin" /M

  • Does cluscfg require Administrator priveledges?  I have a application which works fine when run as Administrator on CCS 2003 but doesn't work when run as non-Administrator. The error complains about insufficient permissions.

  • Cluscfg does require administrator access, since it allows you to configure settings that affect all users.

    If you just want to set environment variables for your application, each task has an EnvironmentVariables property in which you can provide a list of variables which will be set for the life of your task.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment