none
Programs which require GUI RRS feed

  • Question

  • We have a piece of software (CST) which requires a GUI to open on a compute node in order to work.  Using the standard command line call for the program it loads the program, but not the GUI.  Is there a way to get the GUI to open?
    Thanks,
    Eli.
    Monday, March 1, 2010 7:44 PM

Answers

  • Hi Eli,

    BY default tasks run in Session 0, which is noninteractive and thus you don't see any GUI.

    To see the GUI for a task (e.g. notepad) you can specify either the HPC_ATTACHTOCONSOLE or HPC_ATTACHTOSESSION environment variables as part of your task to allow the task to start in a logged-in session for the user other than session 0.

    You can read more about these variables and their values here: http://technet.microsoft.com/en-us/library/dd420457(WS.10).aspx

    Regards,

    Patrick
    • Marked as answer by elansey Wednesday, March 10, 2010 2:37 PM
    Monday, March 1, 2010 11:51 PM
  • Oh, wow.  OK, I tried doing it as a non "administrator" user and it worked!  Both qwinsta and CST.  Very strange.  Perhaps there's a bug with the default domain administrator account it still loads in session 0?

    So, as a follow-up, is there a way to
    1) Specify the runas user+password in the job configuration GUI?
    2) Have the compute nodes open a "remote admin" session as that user automatically upon startup?
    And/Or
    3) Have the task start the remote desktop session automatically?  [edit]

    Thanks so much for your help,
    Eli.
    • Edited by elansey Thursday, March 4, 2010 8:41 PM additional option
    • Marked as answer by elansey Wednesday, March 10, 2010 2:37 PM
    Thursday, March 4, 2010 8:00 PM

All replies

  • Hi Eli,

    BY default tasks run in Session 0, which is noninteractive and thus you don't see any GUI.

    To see the GUI for a task (e.g. notepad) you can specify either the HPC_ATTACHTOCONSOLE or HPC_ATTACHTOSESSION environment variables as part of your task to allow the task to start in a logged-in session for the user other than session 0.

    You can read more about these variables and their values here: http://technet.microsoft.com/en-us/library/dd420457(WS.10).aspx

    Regards,

    Patrick
    • Marked as answer by elansey Wednesday, March 10, 2010 2:37 PM
    Monday, March 1, 2010 11:51 PM
  • I tried HPC_ATTACHTOSESSION = True and got the following error:
    Error from node: NODE1:Unable to connect to remote desktop session.Exception of type 'Microsoft.Hpc.Activation.NodeManagerException' was thrown.

    I also tried HPC_ATTACHTOCONSOLE=True and got the following error:
    Error from node: NODE1:Unable to connect to interactive console. Exception of type 'Microsoft.Hpc.Activation.NodeManagerException' was thrown.

    I can remote desktop into that node using the remote desktop tool, but I guess not with the console/session thing? Is the a setting I need to enable?
    Thanks,
    Eli.
    Tuesday, March 2, 2010 2:57 PM
  • For  HPC_ATTACHTOSESSION = True to work you need to already have a remote desktop session started on NODE1. The runas credentials of the job need to match the credentials you used to create the remote session. As well as your program, you can use standard GUI programs such as notepad.

    Regards, Colin
    -Colin, Microsoft HPC
    Wednesday, March 3, 2010 11:32 PM
  • OK.  When I open a remote desktop session it still does not start the GUI.  When I check in Process Explorer I see the program there, but it stalls before it opens the GUI.  If I run the task's command line instruction directly from the node itself it runs fine, however.  It just does not get the GUI loaded.

    Additionally, is there a way to have these remote desktop sessions start automatically when the nodes boot up or when the job/task starts?

    Thanks,
    Eli
    Thursday, March 4, 2010 12:04 AM
  • Also, in Process Explorer I noticed that even though I used "HPC_ATTACHTOSESSION = True" it still runs in session 0.
    Thursday, March 4, 2010 12:13 AM
  • Hi Eli,

    I'm sorry you're still having trouble. I think the first thing is to ensure that you can get your tasks running in a session that is not session 0, and then we'll work on getting the GUI showing up as well. A common tool we use for checking the session in which a task ran is "qwinsta.exe". This tool displays information about remote desktop sessions, and indicates which is the current session. By running this command as your task commandline, and then checking the task output, you have a record of the session in which the task ran.

    e.g. The following sequence of CLI commands should run qwinsta.exe in a logged-in session other than session 0 on the logged-in node:

      job new /requestednodes:<nodename>
      job add <jobid> /env:HPC_ATTACHTOSESSION=TRUE qwinsta.exe
      job submit /id:<jobid> /user:mydomain\username1

    The task output should look something like the following, assuming that the runuser (username1) is currently logged into the requested node via a remote desktop session. The '>' symbol indicates that the task ran in RDP session 2.

     SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
     services                                    0  Disc
     console                                     1  Conn
    >rdp-tcp#0         username1                 2  Active  rdpwd
     rdp-tcp                                 65536  Listen


    Regards,

    Patrick

    Thursday, March 4, 2010 4:42 AM
  • I get the following output:  
    SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE 
    >services                                    0  Disc                        
     console                                     1  Conn                        
     rdp-tcp#1         administrator             2  Active  rdpwd               
     rdp-tcp                                 65536  Listen                      


    So why is qwinsta running in session 2 but CST still runs in session 0? See (the rightmost number is the session number):


    Thanks,
    Eli.
    Thursday, March 4, 2010 2:02 PM
  • Hi Eli,

    Thanks for trying that. The output of qwinsta says that it was running in Session 0 (note the '>' character which indicates the current session).

    [1] Can you please share the job xml for this job?
    [2] I see that the username of the rdp session is "administrator". Is this a local admin or the domain admin? If it is the domain admin, was the runas user for the job also the domain admin?

    Regards,

    Patrick
    Thursday, March 4, 2010 6:57 PM
  • Ah.  LIFO:
    [2] domain admin.  The runas user was also the domain admin.
    [1] OK, here's the XML:
      <?xml version="1.0" encoding="utf-8" ?>
    - <Job Version="2.000" Id="432" SubmitTime="3/4/2010 1:52:26 PM" CreateTime="3/4/2010 1:51:39 PM" StartTime="3/4/2010 1:52:26 PM" EndTime="3/4/2010 1:52:26 PM" ChangeTime="3/4/2010 1:51:39 PM" UnitType="Core" MinCores="1" MaxCores="1" MinSockets="1" MaxSockets="1" MinNodes="1" MaxNodes="1" RunUntilCanceled="false" IsExclusive="false" ErrorCode="0" ErrorParams="" State="Finished" PreviousState="Running" UserName="cunycat\administrator" JobType="Batch" Priority="Normal" RequestedNodes="node1" RequiredNodes="" IsBackfill="false" NextTaskNiceID="2" HasGrown="false" HasShrunk="false" OrderBy="" TaskLevelUpdateTime="3/4/2010 1:52:26 PM" MinMaxUpdateTime="3/4/2010 1:52:26 PM" ComputedMinCores="1" ComputedMaxCores="1" RequestCancel="None" RequeueCount="0" AutoRequeueCount="0" FailureReason="None" PendingReason="None" ComputedNodeList="NODE1" AutoCalculateMax="false" AutoCalculateMin="true" ParentJobId="0" ChildJobId="0" NumberOfCalls="0" NumberOfOutstandingCalls="0" CallDuration="0" CallsPerSecond="0" FailOnTaskFailure="false" Preemptable="true" ProjectId="1" JobTemplateId="1" OwnerId="2" ClientSourceId="7" Project="" JobTemplate="Default" DefaultTaskGroupId="433" Owner="CUNYCAT\elansey" ClientSource="job" xmlns="http://schemas.microsoft.com/HPCS2008/scheduler/">
      <Dependencies />
    - <Tasks>
    - <Task Version="2.000" Id="6550" SubmitTime="3/4/2010 1:52:26 PM" CreateTime="3/4/2010 1:52:03 PM" StartTime="3/4/2010 1:52:26 PM" EndTime="3/4/2010 1:52:26 PM" ChangeTime="3/4/2010 1:52:26 PM" ErrorCode="0" ErrorParams="" State="Finished" PreviousState="Running" ParentJobId="432" ExitCode="0" RequestCancel="None" Closed="false" RequeueCount="0" AutoRequeueCount="0" FailureReason="None" PendingReason="None" InstanceId="0" Output="SESSIONNAME USERNAME ID STATE TYPE DEVICE >services 0 Disc console 1 Conn rdp-tcp#1 administrator 2 Active rdpwd rdp-tcp 65536 Listen" RecordId="6540" MinCores="1" MaxCores="1" NiceId="1" CommandLine="qwinsta.exe" HasCustomProps="false" IsParametric="false" GroupId="433" ParentJobState="Finished" UnitType="Core" ParametricRunningCount="0" ParametricCanceledCount="0" ParametricFailedCount="0" ParametricQueuedCount="0">
    - <EnvironmentVariables>
    - <Variable>
      <Name>HPC_ATTACHTOSESSION</Name>
      <Value>TRUE</Value>
      </Variable>
      </EnvironmentVariables>
      </Task>
      </Tasks>
      </Job>
    Thursday, March 4, 2010 7:57 PM
  • Oh, wow.  OK, I tried doing it as a non "administrator" user and it worked!  Both qwinsta and CST.  Very strange.  Perhaps there's a bug with the default domain administrator account it still loads in session 0?

    So, as a follow-up, is there a way to
    1) Specify the runas user+password in the job configuration GUI?
    2) Have the compute nodes open a "remote admin" session as that user automatically upon startup?
    And/Or
    3) Have the task start the remote desktop session automatically?  [edit]

    Thanks so much for your help,
    Eli.
    • Edited by elansey Thursday, March 4, 2010 8:41 PM additional option
    • Marked as answer by elansey Wednesday, March 10, 2010 2:37 PM
    Thursday, March 4, 2010 8:00 PM
  • Hi Eli,

    Thanks for letting us know you got it working. But, yes, it's odd that you're having trouble when using the domain administrator account to do this. We have not seen that behavior.

    Regarding your other questions:

    [1] There is no means for providing the runas user/password in the HpcClustermanager GUI. The user in this case is always the user under whose authority HpcClusterManager is running. If you run HpcClusterManager under the authority of a different user, then the jobs will be submitted for that user. If the password is not cached for that user, then a password dialog will appear when the job is bring submitted.

    [2] The HPC Server 2008 product does not provide a means for compute nodes to open a remote admin session upon startup. However, it is possible to configure Windows to automatically logon a user to the interactive console when the system boots.

    [3] We hope to provide a means in our next release (Windows HPC Server 2008 R2) for automatically logging on a user to the interactive console on a compute node on a job-by-job basis.

    Regards,

    Patrick
    Monday, March 8, 2010 6:34 PM
  • Patrick,
    [1] OK
    [2] Is there a way to make it a task in the task list which must run first?  How can I configure Windows to have it automatically log in on system boot?
    [3] Woo hoo! Can't wait.  This is unrelated to this general discussion, but will we be able to upgrade to R2 HPC Pack without upgrading Windows Server 2008?

    Thanks so much,
    Eli.

    Wednesday, March 10, 2010 2:40 PM
  • Hi Eli
    In answer to [3]: In this discussion 
    http://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/cbc2cd9b-0ad4-40b1-bf18-edc8f731898e
    Don Pattee states that "... HPC Pack 2008 R2 requires your head node to be running a Windows Server 2008 R2-based operating system, though compute nodes can be either 2008 or 2008 R2", so it looks like an upgrade to the headnode at the very least is required.
    Cheers
    Dan

    Wednesday, March 10, 2010 2:53 PM
  • [3] We hope to provide a means in our next release (Windows HPC Server 2008 R2) for automatically logging on a user to the interactive console on a compute node on a job-by-job basis.

    We've upgraded our cluster to R2 - how do we do this?

    Thanks!

    Eli

    Wednesday, October 13, 2010 3:58 PM
  • Hi Eli,

    Did you figure this out?

    You can do this by configuring a couple of registry values *and* setting the job environment variable HPC_CREATECONSOLE=TRUE.

    You can find more info here: http://technet.microsoft.com/en-us/library/gg247477(WS.10).aspx

    Regards,

    Patrick

    Friday, December 17, 2010 7:15 AM
  • Not sure if Eli did, but I'm trying to do the same thing, have enabled the HPC_CREATECONSOLE in the registry on a compute node, but the job fails stating that the console is already in use.

    Error from node: LIGHTNING04SIM:HPC_CREATECONSOLE set to true but console is in use

    Specifying HPC_ATTACHTOSESSION does work for existing RDP sessions, ATTACHTOCONSOLE doesn't, but similar to Eli's issue, I'd like to have the job itself create the session as needed.

    Friday, February 4, 2011 9:32 PM