3 #Typical load balancers
4 COMMON_LDBS
="DummyLB GreedyLB GreedyRefineLB CommLB RandCentLB RefineLB RefineCommLB RotateLB DistributedLB HierarchicalLB HybridLB ComboCentLB RefineSwapLB NeighborLB OrbLB BlockLB GreedyCommLB NodeLevelLB"
5 #Load balancers for more specialized circumstances
6 SPECIALIZED_LDBS
="GraphPartLB GraphBFTLB GridCommLB GridCommRefineLB HbmLB RefineKLB TempAwareCommLB TreeMatchLB GreedyAgentLB NeighborCommLB PhasebyArrayLB RecBipartLB CommAwareRefineLB AdaptiveLB MetisLB GridMetisLB"
7 #Load balanders which have an external dependency, or require some other kind of intervention
8 UNCOMMON_LDBS
="ScotchLB TeamLB WSLB TempAwareGreedyLB GridHybridSeedLB TopoCentLB GridHybridLB TopoLB RefineTopoLB TempAwareRefineLB"
10 ALL_LDBS
="$COMMON_LDBS $SPECIALIZED_LDBS"
14 echo "# Automatically generated by script Makefile_lb.sh" > $out
15 echo "COMMON_LDBS=\\" >> $out
16 for bal
in $COMMON_LDBS
18 echo " $bal \\" >> $out
20 echo " manager.o" >> $out
23 echo "ALL_LDBS=\\" >> $out
26 echo " $bal \\" >> $out
28 echo " manager.o" >> $out
31 for bal
in $ALL_LDBS $UNCOMMON_LDBS
34 [ $bal = 'GreedyCommLB' ] && manager
="manager.o"
35 [ $bal = 'GridCommLB' ] && manager
="manager.o"
36 [ $bal = 'GridCommRefineLB' ] && manager
="manager.o"
37 [ $bal = 'GridHybridLB' ] && manager
="manager.o"
38 [ $bal = 'GridHybridSeedLB' ] && manager
="manager.o"
39 [ $bal = 'TreeMatchLB' ] && manager
="tm_tree.o tm_bucket.o tm_timings.o tm_mapping.o"
41 #implicit make rules exist for xxxxLB, we override them so users can choose
42 #make xxxxLB if they only want to build one without the kitchen sink of EveryLB
45 \$(L)/libmodule$bal.a: $manager
46 LBHEADERS += $bal.h $bal.decl.h
51 echo "// AUTOMATICALLY GENERATED FILE" > EveryLB.ci
53 echo "module EveryLB {" >> EveryLB.ci
56 echo " extern module $bal;" >> EveryLB.ci
59 echo " initnode void initEveryLB(void);" >> EveryLB.ci
60 echo "};" >> EveryLB.ci
62 echo "// AUTOMATICALLY GENERATED FILE" > CommonLBs.ci
63 echo "" >> CommonLBs.ci
64 echo "module CommonLBs {" >> CommonLBs.ci
65 for bal
in $COMMON_LDBS
67 echo " extern module $bal;" >> CommonLBs.ci
69 echo "" >> CommonLBs.ci
70 echo " initnode void initCommonLBs(void);" >> CommonLBs.ci
71 echo "};" >> CommonLBs.ci
73 echo "# used for make depends" >> $out
74 echo "ALL_LB_OBJS=EveryLB.o \\" >> $out
75 echo " CommonLBs.o \\" >> $out
76 for bal
in $ALL_LDBS $UNCOMMON_LDBS
78 echo " $bal.o \\" >> $out
80 echo " manager.o \\" >> $out
81 echo " tm_tree.o \\" >> $out
82 echo " tm_timings.o \\" >> $out
83 echo " tm_bucket.o \\" >> $out
84 echo " tm_mapping.o" >> $out
86 echo "# EveryLB dependecies" >> $out
87 echo "EVERYLB_DEPS=EveryLB.o \\" >> $out
90 echo " $bal.o \\" >> $out
92 echo " manager.o \\" >> $out
93 echo " tm_tree.o \\" >> $out
94 echo " tm_timings.o \\" >> $out
95 echo " tm_bucket.o \\" >> $out
96 echo " tm_mapping.o" >> $out
98 echo "# CommonLBs dependencies" >> $out
99 echo "COMMONLBS_DEPS=CommonLBs.o \\" >> $out
100 for bal
in $COMMON_LDBS
102 echo " $bal.o \\" >> $out
104 echo " manager.o" \\>> $out
106 # The badly formed implicit make rules for EveryLB and CommonLB are
107 # explicitly redefined so that they do right thing (make a proper
108 # libmodule). This also allows us to use them in the primary Makefile
109 # in an intuitive manner.
113 \$(L)/libmoduleEveryLB.a: \$(EVERYLB_DEPS)
114 \$(L)/libmoduleCommonLBs.a: \$(COMMONLBS_DEPS)
115 CommonLBs: \$(L)/libmoduleCommonLBs.a