Пример #1
0
import openss

try :

    openss.expCreate()
    my_file = openss.FileList("../../usability/phaseII/fred")
    my_viewtype = openss.ViewTypeList("pcsamp")
    openss.expAttach(my_file,my_viewtype)
    openss.expGo()
    openss.waitForGo()
    #openss.dumpView()
    output = openss.expView()
    print output
    openss.exit()



except openss.error,message:
    print "ERROR: ", message
    openss.exit()

#my_host = openss.HostList()
#my_host += ["bosco","111.222.333.444"]
#my_host += ["bimbo","bozo"]

#my_rank = openss.RankList()
#my_rank += [1,3,(22,33),564]

#my_file_bosco = openss.FileList("bosco")

#my_exptype = openss.ExpTypeList()
Пример #2
0
import openss

data_file = "file_1.dat"
my_data_file = openss.FileList(data_file)

# Run and save and experiment to read in.
my_file = openss.FileList("../../usability/phaseII/fred 900")
my_viewtype = openss.ViewTypeList("pcsamp")
my_expid = openss.expCreate(my_file, my_viewtype)
openss.expGo()
openss.wait()
openss.expSave(my_data_file)

try:
    my_file = openss.FileList("bad_name")
    exp1 = openss.expRestore(my_file)
    print exp1
except openss.error, message:
    print "Expected error: ", message

try:
    exp1 = openss.expRestore(my_data_file)
    print exp1
    info = openss.expView(exp1)
    print info
except openss.error, message:
    print "Unexpected error: ", message

openss.exit()
Пример #3
0
    # print out the type
    exp_mod = openss.ModifierList("types")
    print "This should say [pcsamp]: ", openss.list(exp_mod)
    
    openss.expDetach(exp_id,my_exptype)
    print "This should say []: ", openss.list(exp_mod)
    
    my_exptype = openss.ExpTypeList("usertime")
    openss.expAttach(exp_id,my_exptype)
    print "This should say [usertime]: ", openss.list(exp_mod)
    
    openss.expGo(exp_id)
    openss.wait()

    print openss.expView()
    openss.wait() # kluge for delayed exception
    
except openss.error,message:
    print "ERROR: ", message

openss.exit()

#my_id = openss.ExpId(openss.expCreate())
#
#my_host = openss.HostList()
#my_host += ["bimbo","bozo"]
#
#my_rank = openss.RankList()
#my_rank += [1,3,(22,33),564]
Пример #4
0
my_rank2 = openss.RankList()
my_rank2.add(1234)
my_rank2.add(34)
my_rank2 += 888

# The number here is hard coded in a lowlevel routine
my_id = openss.expCreate(my_host,my_rank2,my_rank)
print "my_id: ", my_id

# I need to identify the argument as an experiment
# id so you need to get it into an ExpId object.
exp1 = openss.ExpId(my_id)
openss.expGo(exp1)

openss.expView(exp1,"vtop88")

my_cluster = openss.ClusterList("cluster_1")
my_cluster.add(["cluster_2"])
my_cluster += ["cluster_3","cluster_4"]

my_id = openss.expCreate(my_cluster)

my_thread = openss.ThreadList(987)
my_thread += 765
my_thread.add((22,33))

my_id = openss.expCreate(my_thread)

my_file = openss.FileList("file_1")
my_file.add(["file_2"])
Пример #5
0
    my_exptype = openss.ExpTypeList("pcsamp")
    exp_id = openss.expCreate(my_file, my_exptype)

    # print out the status
    exp_mod = openss.ModifierList("status")
    print "This should say []: ", openss.list(exp_mod)

    openss.expDisable(exp_id)
    openss.expGo(exp_id)
    print "This should say []: ", openss.list(exp_mod)

    openss.waitForGo()
    print "This should say []: ", openss.list(exp_mod)

    try:
        data = openss.expView()
        if (data == None):
            print "PASSED"
            openss.wait()  # kluge for late exception return
        else:
            print "FAILED"
    except openss.error, message:
        print "Expected: ", message

except message:
    print "ERROR: ", message

openss.exit()

#exp1 = openss.ExpId(7)
#
Пример #6
0
# Register the experiment to be run.
my_id = openss.expCreate(my_file, my_exptype)

# Run the instrumented application
openss.expGo()

# expGo is the only asynchronous command. We may need
# to wait until our app is done before harvesting
# the data.
openss.wait()

# Describe the type of view we want and get the
# results of the experiment.
my_viewtype = openss.ViewTypeList()
my_viewtype += "pcsamp"
result = openss.expView(my_id, my_viewtype)

# Print out the results. In this case the results are
# in a double array. Normally either the structure of
# the return value will be known or one will have to
# query each of the object elements.
r_count = len(result)
for row_ndx in range(r_count):
    print " "
    row = result[row_ndx]
    c_count = len(row)
    for rel_ndx in range(c_count):
        print row[rel_ndx]

# Cleanup any intermediate openss files.
openss.exit()
Пример #7
0
import openss

try:

    openss.expCreate()
    my_file = openss.FileList("../../usability/phaseII/fred")
    my_viewtype = openss.ViewTypeList("pcsamp")
    openss.expAttach(my_file, my_viewtype)
    openss.expGo()
    openss.waitForGo()
    #openss.dumpView()
    output = openss.expView()
    print output
    openss.exit()

except openss.error, message:
    print "ERROR: ", message
    openss.exit()

#my_host = openss.HostList()
#my_host += ["bosco","111.222.333.444"]
#my_host += ["bimbo","bozo"]

#my_rank = openss.RankList()
#my_rank += [1,3,(22,33),564]

#my_file_bosco = openss.FileList("bosco")

#my_exptype = openss.ExpTypeList()
#my_exptype += "pcsamp"
#my_exptype.add("usertime")
Пример #8
0
# Register the experiment to be run.
my_id = openss.expCreate(my_file,my_exptype)

# Run the instrumented application
openss.expGo()

# expGo is the only asynchronous command. We may need
# to wait until our app is done before harvesting
# the data.
openss.wait()

# Describe the type of view we want and get the 
# results of the experiment.
my_viewtype = openss.ViewTypeList()
my_viewtype += "pcsamp"
result = openss.expView(my_id,my_viewtype)

# Print out the results. In this case the results are
# in a double array. Normally either the structure of
# the return value will be known or one will have to 
# query each of the object elements.
r_count = len(result)
for row_ndx in range(r_count):
    print " "
    row =result[row_ndx]
    c_count = len(row)
    for rel_ndx in range(c_count):
        print row[rel_ndx]

# Cleanup any intermediate openss files.
openss.exit()
Пример #9
0
    openss.expDisable(exp_id)
    openss.expGo(exp_id)
    print "This should say ['Running']: ", openss.list(exp_mod)
    
    openss.wait()
    print "This should say ['Terminated']: ", openss.list(exp_mod)

#    openss.expEnable(exp_id)
#    openss.expGo(exp_id)
#    print "This should say ['Running']: ", openss.list(exp_mod)
#    
#    openss.wait()
#    print "This should say ['Terminated']: ", openss.list(exp_mod)

    try:
    	data = openss.expView()
    	if (data  == None):
    	    print "PASSED"
	    openss.wait() # kluge for late exception return
    	else:
    	    print "FAILED"
    except openss.error,message:
    	print  message

except openss.error,message:
    print "ERROR: ", message

# Second time reenable the data collection.
try :
    # Create an experiment with pcsamp being the experiment type
    my_file = openss.FileList("../../usability/phaseIII/fred")