| Home | Trees | Index | Help |
|
|---|
| Package openss :: Module openss_commands |
|
| Function Summary | |
|---|---|
!! NOT SUPPORTED YET !! | |
Helper routine used to dump 2 dimensional views. | |
Terminate all experiments and the session. | |
Attach applications or collectors to an experiment. | |
Close/Terminate the experiment specified by ExpId. | |
Start the process of defining an experiment: | |
Detach applications from collectors for an experiment. | |
Turn off data collection. | |
Turn on any instrumentation that was turned off with an expDisable command. | |
Make the given experiment id the current, focused experiment. | |
Run the experiment and collect performance data. | |
Temporarily halt the experiment identified by the input experiment id. | |
Restore an experiment's definition and previously saved data from a database that was saved with an expSave command. | |
Save the experiment information for further analysis. | |
Change the value an experiment's argument. | |
Display the performance data that has been collected for an experiment. | |
List command for experiment status inquiries. | |
!! NOT SUPPORTED YET !! | |
Wait for an event before processing any more commands. | |
Helper routine to wait until expGo really has finished. | |
| Function Details |
|---|
clearBreak(*arglist)!! NOT SUPPORTED YET !!
|
dumpView()Helper routine used to dump 2 dimensional views. This will go away once we pump up our usage documentation. Until then this will remain as an example of how to harvest an experiments data. Example:
try :
print "In try part"
ret = openss.expView()
except openss.error:
print "In except part"
ret = None
if ret is None:
my_listtype = openss.ModifierList("status")
print "expView returned None"
try:
print "status = ", openss.list(my_listtype)
except openss.error:
print "listStatus failed"
else:
r_count = len(ret)
for row_ndx in range(r_count):
print " "
row =ret[row_ndx]
c_count = len(row)
for rel_ndx in range(c_count):
print row[rel_ndx]
|
exit(*arglist)
|
expAttach(*arglist)Attach applications or collectors to an experiment.
If ModifierList object with mpi is selected, all the threads that are part of a running application will be included in the experiment. If ModifierList object with mpi is not present, only those threads that are explicitly listed in Target will be included in the experiment. If there is no ExpId provided, information is attached to the focused experiment. The Target is used to restrict the knowledge of the experiment or data collection to certain portions of an appliaction. It is ambiguous to use both the -f and -p options.
If Target is provided without ExpTypeList, those applications are attached to all the expTypes that are already attached of the experiment. If ExpTypeList is provided without Target, the specified data collectors are used to instrument all the executable routines that are already attached to the indicated experiment. If both Target and ExpTypeList are provided, only those portions of the application in the Target are linked to the specified collectors in ExpTypeList. If neither Target nor ExpTypeList is provided, the command does nothing. Example:
my_file = openss.FileList("file_1")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate()
openss.expAttach(my_expid,my_file,my_exptype)
|
expClose(*arglist)Close/Terminate the experiment specified by ExpId.
If there is no ExpId provided, the focused experiment will be closed. Because important information may accidently be lost, this command should only be issued when the user is certain that more performance measurements are not needed and that the collected data measurements will be saved if there is any chance that the user will want to take another look at the results. Use of ModifierList("all") will cause all defined experiments to be deleted. Examples:
my_expid = openss.expCreate()
all_mod = openss.ModifierList("all")
kill_mod = openss.ModifierList("kill")
openss.expclose(all_mod,my_expid)
-or-
openss.expclose(all_mod,kill_mod)
-or-
openss.expclose(all_mod)
-or-
openss.expclose()
|
expCreate(*arglist)
ExpId = expCreate(arglist) Examples:
my_file = openss.FileList("file_1")
my_exptype = openss.ExpTypeList("usertime")
my_expid = openss.expCreate(my_file,my_exptype)
|
expDetach(*arglist)
my_file = openss.FileList("file_1")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate()
openss.expAttach(my_expid,my_file,my_exptype)
openss.expDetach(my_expid,my_exptype)
|
expDisable(*arglist)
# Disable the currently focused experiment openss.expDisable()Example2:
# Disable all active experiments
my_modifier = openss.ModifierList("all")
openss.expDisable(my_modifier)
Example3:
# Disable a specified experiment (7) my_exp = openss.ExpId(7) openss.expDisable(my_exp)
|
expEnable(*arglist)
# Enable the currently focused experiment openss.expEnable()Example2:
# Enable all experiments
my_modifier = openss.ModifierList("all")
openss.expEnable(my_modifier)
Example3:
# Enable a specified experiment (7) my_exp = openss.ExpId(7) openss.expEnable(my_exp)
|
expFocus(*arglist)
ExpId = expCreate(arglist) Example1:# Get the Id of the currently focused experiment cur_id = openss.expEnable()Example2: # Change the focus to experiment #7 my_exp = openss.ExpId(7) cur_id = openss.expEnable(my_exp)
|
expGo(*arglist)
# Run the currently focused experiment openss.expGo()Example2:
# Run all experiments
my_modifier = openss.ModifierList("all")
openss.expGo(my_modifier)
Example3:
# Run a specified experiment (7) my_exp = openss.ExpId(7) openss.expGo(my_exp)
|
expPause(*arglist)
# Halt the currently focused experiment openss.expPause()Example2:
# Halt all experiments
my_modifier = openss.ModifierList("all")
openss.expPause(my_modifier)
Example3:
# Halt a specified experiment (7) my_exp = openss.ExpId(7) openss.expPause(my_exp)
|
expRestore(*arglist)
ExpId = expRestore(arglist) Example:
# Restore an experiment previously save as "stored_data.db".
my_file = openss.FileList("stored_data.db")
my_exp = openss.expRestore(my_file)
|
expSave(*arglist)
# Store the currently focused experiment
my_file = openss.FileList("stored_data.db")
openss.expSave(my_file)
Example2:
# Copy the currently focused experiment
my_file = openss.FileList("stored_data.db")
my_modifier = openss.ModifierList("copy")
openss.expSave(my_modifier,my_file)
Example3:
# Store a specified experiment (7) to file
my_file = openss.FileList("stored_data.db")
my_exp = openss.ExpId(7)
openss.expSave(my_exp,my_file)
|
expSetParam(*arglist)
# Create a hardware counting experiment
my_expid = openss.expCreate("hwc")
my_param_list = openss.ParamList()
# Set which counter event we want
my_param_list += ("event","PAPI_HW_INT")
# Set the sampling rate
my_param_list += ("sampling_rate",2000)
# Set the paramerter list to the experiment
openss.expSetParam(my_expid,my_param_list)
# Attach the test program to the experiment
my_prog = openss.FileList("bosco.exe")
openss.expAttach(my_expid,my_prog)
# Run the experiment
openss.expGo()
|
expView(*arglist)
my_file = openss.FileList("bosco")
my_viewtype = openss.ViewTypeList("pcsamp")
my_metric_list = openss.MetricList()
my_metric_list += ("pcsamp","inclusive")
ret = openss.expView(my_expid,my_viewtype,my_metric_list)
|
list(*arglist)
|
setBreak(*arglist)!! NOT SUPPORTED YET !!
|
wait(*arglist)
# Use the following for all the wait() examples:
my_file = openss.FileList("foo")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate(my_file,my_exptype)
my_mod = openss.ModifierList("terminate")
Example1:
# openss.expGo() openss.wait()Example2: # openss.expGo() openss.wait(my_mod)Example1: # openss.expGo() openss.wait(my_mod,my_expid)Example1: # openss.expGo() openss.wait(my_expid)
|
waitForGo()Helper routine to wait until expGo really has finished. Since expGo is asynctric in nature, we need to run this routine to see when it is done if we want to make sure it is really done before continuing on. This was created before the wait() command was implemented and is retained as an example of how to poll for experiment status using the list() command. Example:
modifier = openss.ModifierList("status")
while 1:
# Pause for 10 seconds
os.system("sleep 10")
status = openss.list(modifier)
stat_count = len(status)
for ndx in range(stat_count):
if status[ndx] == 'Terminated':
return
if status[ndx] == 'Error':
raise error,"expGo failed for some reason"
return
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Fri Nov 11 11:55:14 2005 | http://epydoc.sf.net |