Commit 1003657e authored by Robert Ricci's avatar Robert Ricci

Several changes to assign:

Add features and desires to the PER_VNODE_TT restrictions. For
desires, we can tell the user which ones can't be satisfied, but for
features, we don't even try to figure out which one(s) keep us from
mapping. From the assign_todo file, this is:
9.   add features/desires to PER_VNODE_TT restrictions

Add a new -P switch, when PER_VNODE_TT is in use. This casues it to
prune out pclasses that no vnode can map to - this can lead to _huge_
time savings, particularly since we put things like wide-area nodes
into the ptop file. I've seen a 98% reduction in time when using both
-p and -P! But, it's not the default yet, because I need to do more
testing to make sure that this isn't hurting solution quality
significantly.  todo item:
8.   prune pclasses when using PER_VNODE_TT

Standardize the exit values from assign:
On success, returns 0
On failures that are not retryable (ie. this top can never be mapped
    to this ptop), returns 2
If SA fails to find a solution (ie., we might consider retrying),
    returns 1

Fix a bug that has annoyed me for a very, very long time - if the
input files don't exist, exit instead of hanging forever!

Make the weight at which a feature/desire is considered 'hard' (ie. it
generates a violation if unsatisifed or undesired) a variable, so that
we'll be able to change it from 1.0 if we want.

Put some more messages that should appear inline in the mail to stderr
instead of stdout.
parent 4f4bd9d4
This diff is collapsed.
......@@ -58,18 +58,6 @@ This is the current TODO list for assign (not in order by priority):
Merge back in Chris's delay node support.
8. prune pclasses when using PER_VNODE_TT
Right now, we use all pclasses, even those which we cannot possibly use, in
our estimation of how hard the problem is (vnodes*pclasses). With
PER_VNODE_TT, we can do mark-and-sweep 'garbage collection' of pnodes that
it's not possible to map to. Should improve performace.
9. add features/desires to PER_VNODE_TT restrictions
PER_VNODE_TT currently only looks at the node type and number of links - it
could also easily look at features/desires with a weight of 1.0, too
10. add some sort of global allocation strategy
The idea here is to include other, already mapped, experiments in the top and
......
......@@ -44,6 +44,9 @@ static float delta = 2;
//static float min_temp_end = 0.01;
//static float min_temp_end = 10000000.0;
// The weight at which a feature or desire triggers a violations if
// unstatisfied or unused
static float FD_VIOLATION_WEIGHT = 1.0;
// Number of runs to spend melting
static int melt_trans = 500;
......
......@@ -4,7 +4,6 @@
* All rights reserved.
*/
#include "port.h"
#include <hash_map>
......
......@@ -62,7 +62,7 @@ public:
class tb_pclass {
public:
tb_pclass() : size(0), used(0) {;}
tb_pclass() : size(0), used(0), refcount(0) {;}
typedef hash_map<crope,tb_pnodelist*> pclass_members_map;
typedef hash_set<tb_pnode*,hashptr<tb_pnode*> > tb_pnodeset;
......@@ -78,6 +78,10 @@ public:
pclass_members_set used_members;
#endif
// A count of how many nodes can use this pclass
// For use with PRUNE_PCLASSES
int refcount;
friend ostream &operator<<(ostream &o, const tb_pclass& p)
{
o << p.name << "(" << &p << ") size=" << p.size <<
......
......@@ -1229,7 +1229,7 @@ double fd_score(tb_vnode *vnode,tb_pnode *pnode,int &fd_violated)
SDEBUG(cerr << " unmatched" << endl);
value = (*desire_it).second;
fd_score += SCORE_DESIRE*value;
if (value >= 1) {
if (value >= FD_VIOLATION_WEIGHT) {
fd_violated++;
}
}
......@@ -1245,6 +1245,9 @@ double fd_score(tb_vnode *vnode,tb_pnode *pnode,int &fd_violated)
SDEBUG(cerr << " unused" << endl);
value = (*feature_it).second;
fd_score+=SCORE_FEATURE*value;
if (value >= FD_VIOLATION_WEIGHT) {
fd_violated++;
}
}
}
......
......@@ -82,6 +82,7 @@ public:
}
typedef hash_map<crope,double> desires_map;
typedef hash_map<crope,int> desires_count_map;
// contains weight of each desire
desires_map desires;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment