I'm trying to use PyPDQ to create a simple multi-processor node, but I get a mysterious error message if I set the processor count higher than 20.
Here is my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/pythonimportpdqpdq.SetDebug(1)processors=72arrivalRate=10.5# jobs per secserviceTime=2.0# secpdq.Init("Test Code")s=pdq.CreateOpen("Txns",arrivalRate)n=pdq.CreateMultiNode(processors,"Node",pdq.CEN,pdq.FCFS)pdq.SetDemand("Node","Txns",serviceTime)pdq.SetWUnit("Txns")pdq.SetTUnit("Sec")pdq.Solve(pdq.CANON)pdq.Report()
And this is the resulting error:
debug on
DEBUG: PDQ_Init()
Entering
Exiting
Stream[0]: TRANS "Txns"; Lambda: 10.5
DEBUG: PDQ_CreateMultiNode
Entering
ERROR in procedure 'typetostr()': Unknown type id for ""
If I set
processors = 20
or lower, the error message goes away and changes to one of the following:
ERROR in procedure 'canonical()':
Arrival rate 10.500 for stream 'Txns' exceeds saturation thruput 10.000 of node 'Node' with demand 0.100
or
ERROR in procedure 'ErlangR()': Erlang R: 2.0000
Can anyone tell me what I'm doing wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-10-18
The 2nd error msg refers to the fact that you can't have fewer servers (20) than the total traffic intensity: arrivalRate* serviceTime = 21 because each server would be oversaturated at 100%. Since that would could numerical bogosity, PDQ bails.
The 1st error looks like a string handling bug in the C code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
=======================================
****** PDQ Model INPUTS *******
=======================================
Node Sched Resource Workload Class Demand
--- --- ----- ----- --- ----
72 MSQ Node Txns TRANS 2.0000
Queueing Circuit Totals:
Streams: 1
Nodes: 1
WORKLOAD Parameters:
Txns 10.5000 2.0000
=======================================
****** PDQ Model OUTPUTS *******
=======================================
Solution Method: CANON
****** SYSTEM Performance *******
Metric Value Unit
---- --- ---
Workload: "Txns"
Number in system 21.0000 Txn
Mean throughput 10.5000 Txn/Sec
Response time 2.0000 Sec
Stretch factor 1.0000
Bounds Analysis:
Max throughput 36.0000 Txn/Sec
Min response 2.0000 Sec
****** RESOURCE Performance *******
Metric Resource Work Value Unit
---- ----- --- --- ---
Throughput Node Txns 10.5000 Txn/Sec
Utilization Node Txns 29.1667 Percent
Queue length Node Txns 0.2917 Txn
Waiting line Node Txns 0.0000 Txn
Waiting time Node Txns 0.0000 Sec
Residence time Node Txns 2.0000 Sec
This suggests that there might be a problem with the SWIG conversion of pdq.CreateMultiNode.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-10-19
So it turns out that if I turn debugging off, the first error message goes away. Which is … fantastic.
I guess it is a problem with the SWIG conversion in general, but for now, I've just turned debugging off and put in my own code to trace through execution. Thanks guys. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to use PyPDQ to create a simple multi-processor node, but I get a mysterious error message if I set the processor count higher than 20.
Here is my code:
And this is the resulting error:
If I set
or lower, the error message goes away and changes to one of the following:
or
Can anyone tell me what I'm doing wrong?
The 2nd error msg refers to the fact that you can't have fewer servers (20) than the total traffic intensity: arrivalRate* serviceTime = 21 because each server would be oversaturated at 100%. Since that would could numerical bogosity, PDQ bails.
The 1st error looks like a string handling bug in the C code.
The original parameters work in PDQ-R:
Produces:
=======================================
****** PDQ Model INPUTS *******
=======================================
Node Sched Resource Workload Class Demand
--- --- ----- ----- --- ----
72 MSQ Node Txns TRANS 2.0000
Queueing Circuit Totals:
Streams: 1
Nodes: 1
WORKLOAD Parameters:
Txns 10.5000 2.0000
=======================================
****** PDQ Model OUTPUTS *******
=======================================
Solution Method: CANON
****** SYSTEM Performance *******
Metric Value Unit
---- --- ---
Workload: "Txns"
Number in system 21.0000 Txn
Mean throughput 10.5000 Txn/Sec
Response time 2.0000 Sec
Stretch factor 1.0000
Bounds Analysis:
Max throughput 36.0000 Txn/Sec
Min response 2.0000 Sec
****** RESOURCE Performance *******
Metric Resource Work Value Unit
---- ----- --- --- ---
Throughput Node Txns 10.5000 Txn/Sec
Utilization Node Txns 29.1667 Percent
Queue length Node Txns 0.2917 Txn
Waiting line Node Txns 0.0000 Txn
Waiting time Node Txns 0.0000 Sec
Residence time Node Txns 2.0000 Sec
This suggests that there might be a problem with the SWIG conversion of pdq.CreateMultiNode.
So it turns out that if I turn debugging off, the first error message goes away. Which is … fantastic.
I guess it is a problem with the SWIG conversion in general, but for now, I've just turned debugging off and put in my own code to trace through execution. Thanks guys. :)