Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] PBS UI

Hello all,

I have made my first check-in to CVS HEAD.  The UI code is (I hope) basically in place now, though I'm sure there will be bugs in need of squashing.  

I have included a "script" for testing the UI logic in the ui plugin; I'm attaching here.

Thank you all again; happy to be part of the group!

Al
################################## PBS DYNAMIC LAUNCH TAB TEST SCRIPT ####################################
## This sequence of actions should be used to check the consistency of the UI logic                     ##
##                                                                                                      ##
## Albert L. Rossi (NCSA)   05/13/2010                                                                  ##
##########################################################################################################

NOTE:   I have not been successful in getting the scroll bars to behave correctly on the Resource Tab's
ScrollingComposite.  When the Launch Tab is first produced, they do not appear.  However, if you move
off the Resource Tab (say, to Application), and then back, they appear.  I have fiddled with layout,
redraw, and a few other things like turning the ScrollingComposite's expandable settings on and off,
or adjusting the min size, all to no avail.  The problem seems to lie in something that I am doing to
generate the widgets dynamically, but I have yet to discover what.  Any suggestions appreciated here.

----------------------------------------------------------------------------------------------------------

1.  CREATE THREE PBS Resource Managers (Parallel Runtime Perspective, Resource Managers View)
    For the purposes of this test, none actually need to be remote; just point them to the executable
    in the PBS Jproxy plugin.

2.  Using the second tab (PBS Batch Script Configuration) in the Resource Manager Edit wizard:

    a.  Create a new template (from either of the two provided), and label it 'partial' (or whatever you 
        wish); modify it so you can distinguish it from the other two.

    b.  Map each of the three RMs to one of the three templates; e.g.,

    	  RM1: default_template;
        RM2: full_template;
        RM3: partial_template.

3.  Create two separate Run Configurations.  For our purposes, I will label these CONFIG_A and CONFIG_B.
   	
    For CONFIG_A, choose RM1.
    For CONFIG_B, choose RM2.

    You should see appear in A the default_template, and in B the full_template, as yet unpopulated by 
    anything except predefined default values (MPI = mpiexec, walltime = 00:30:00).

4.  Open CONFIG_A.
    Use a small set of values by which you can identify this configuration:  say, MPI = mpiexec and Job = A
    Set these, and close the configuration.
    Reopen.  You should see the same values in the default_template.

    Open CONFIG_B
    Use a small set of values by which you can identify this configuration:  say, MPI = mpirun and Job = B
    Set these, and close the configuration.
    Reopen.  Again, you should see the same values in the full_template.

    Reopen CONFIG_A.  Nothing should have changed.  Close.
    Reopen CONFIG_B.  Nothing should have changed.  Close.

5.  Now let's try changing templates within the Run Configuration.

    Open CONFIG_A.
    Choose full_template.
    This template should appear, but the values you set in the default_template should not have changed.
    
    Close and reopen.
    You will notice that the values have stayed the same, but the template reverts to the default.  This
    is because of the nature of the configuration mappings underlying the Resource Tab.  I decided it
    easiest to maintain a static template mapping to a given RM.  Since the values do not need to be filled
    in again when you switch templates, all the user needs to do is revert to that template.  One can always
    change the default in the RM Edit Tab (as above).   

    To demonstrate that the values are not attached to the RM, but to the Run Configuration:

    Open CONFIG_B.
    This should have the full_template, but with the B values.  
    Select the default_template.  Again, the B values remain.  Close this configuration and reopen A.
    The default_template will appear with A's values; etc.    
   
6.  Now we will reset the Resource Manager associated with each of these Run Configurations.
    
    Open CONFIG_A.
    Choose RM3.  The partial_template should appear with the A values.
    Close and reopen.  You should see RM3, the partial_template and A values.
     
    Open CONFIG_B.
    Choose RM3.  The partial_template should appear with the B values.
    Close and reopen.  You should see RM3, the partial_template and B values.
     
    Open CONFIG_A.
    Reopening A should show partial_template, RM1 and A values again, etc.

    NOTE: A change in mapping of template to RM within a given Run Configuration is only valid for the duration
    of a session, which corresponds to a single Resource Tab object.  When you close that session (by switching
    to another Run Configuration), the default mapping is restored, as mentioned above.  Try this:

    Open CONFIG_A.
    This should be RM1 at this point.  Switch template to partial_template.  
    Now choose RM2, whose template is full_template.  
    Switching back to RM1 will restore partial_template, not default_template.
    Close and reopen CONFIG_A.  You will now see RM1 with default_template.

7.  Change values.

    Open CONFIG_A.
    Change the MPI command to blank, and the Job to "A1".
    Close.  Reopen.  You should now see the new values.  
    Switch template.  Again, the new values should be there.
    Switch to MP3, and back to RM1.
    You should get the default_template, but with the new values.

8.  Inspecting the batch script.  

    Open one of the Run Configurations.
    First, be sure that you have chosen an Application using the Application Tab.
     
    Using the Arguments Tab, create one or two fake command-line arguments for the executable (f0 -b foo).
    Using the Environment tab, add some fake environment variables (A=a, B=b), etc.
    
    Now click the "View Script" button.  You should see all unused attributes eliminated and everything 
    replaced correctly.  
     
    The environment variables should appear just after the PBS directives as bash 'export' statements.

    If you use the full_template, you will see the "EDIT PREPENDED COMMANDS" and "EDIT POSTPENDED COMMANDS" 
    buttons.  You may add arbitrary shell-script commands before or after the executable line with these.

9.  MPI -n computation.

    If your attributes include either Resource_List.ncpus or Resource_List.nodes, an attempt is made to compute 
    the value of the mpirun/mpiexec -n argument.
     
    Try setting nodes=3:ppn=4 and see what happens (View Script).

EXAMPLE COMMAND SENT TO THE PROXY (I've split this onto several lines for readability; it is all one line when issued):

cmd: ProxyRuntimeSubmitJobCommand tid=1 launchedByPTP=true
script=#!/bin/bash\n\n##########################################################
###########\n##\sTemplate\sfor\sPBS\sBatch\sScript\sGenerated\sby\sPBS\sResource
\sManager\n##\sLaunch\sTab\n##\n##\sThis\stemplate\shas\sonly\sa\sminimal\sset\s
of\sattributes.\s\sSee\n##\sthe\sfull_template\sfor\sthe\scomplete\splaceholder
\sset.\n#####################################################################\n
\n#PBS\s-A\sA1\n#PBS\s-l\snodes=3:ppn=4\n#PBS\s-l\swalltime=00:30:00\n#PBS\s-N
\sA1\nexport\sb=B\nexport\sa=A\n\ncd\s/u/ncsa/arossi\nmpiexec\s-n\s12\s/u/ncsa/
arossi/TestProject\s-a\sfoo\sbar\n env=b=B env=a=A progArgs=-a progArgs=foo 
progArgs=bar debugStopInMain=true jobSubId=JOB_12738065773731 workingDir=
/u/ncsa/arossi execName=TestProject execPath=/u/ncsa/arossi queueId=33555837

Back to the top