File tree Expand file tree Collapse file tree 3 files changed +66
-4
lines changed Expand file tree Collapse file tree 3 files changed +66
-4
lines changed Original file line number Diff line number Diff line change 1+ name : build and test collectiveSim
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ run :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v3
15+
16+ - name : build charmc
17+ run : |
18+ sudo apt install gcc g++
19+ wget https://charm.cs.illinois.edu/distrib/charm-latest.tar.gz
20+ tar xzf charm-latest.tar.gz
21+ cd charm-v7.0.0
22+ ./build charm++ netlrts-linux-x86_64 --with-production -j4
23+
24+ - name : build collectiveSim
25+ run : |
26+ make CHARMC=./charm-v7.0.0/bin/charmc collectiveSim
27+
28+ - name : build simulation
29+ run : |
30+ make CHARMC=./charm-v7.0.0/bin/charmc build-simulation
31+
32+ - name : Test allGather DEFAULT
33+ run : |
34+ make CHARMC=./charm-v7.0.0/bin/charmc TYPE=DEFAULT test-simulation
35+
36+ - name : Test allGather HYPERCUBE
37+ run : |
38+ make CHARMC=./charm-v7.0.0/bin/charmc TYPE=HYPERCUBE test-simulation
39+
40+ - name : Test allGather FLOODING
41+ run : |
42+ make CHARMC=./charm-v7.0.0/bin/charmc TYPE=FLOODING test-simulation
Original file line number Diff line number Diff line change 11CHARMC ?= charmc
2-
2+ FLAGS = -g -Wall -O2
3+ TYPE ?= DEFAULT
34ALLGATHER_DIR =./src/allGather
45EXAMPLE_DIR =./example
56
7+
68allGather :
79 $(CHARMC ) $(ALLGATHER_DIR ) /allGather.ci
810 @mv allGather.decl.h $(ALLGATHER_DIR ) /allGather.decl.h
911 @mv allGather.def.h $(ALLGATHER_DIR ) /allGather.def.h
1012 $(CHARMC ) -c $(ALLGATHER_DIR ) /allGather.cc
1113 @echo " Built allGather Library"
1214
15+
16+ collectiveSim : allGather
17+
18+
1319build-simulation : allGather
1420 $(CHARMC ) $(EXAMPLE_DIR ) /user.ci
1521 @mv user.decl.h $(EXAMPLE_DIR ) /user.decl.h
1622 @mv user.def.h $(EXAMPLE_DIR ) /user.def.h
17- $(CHARMC ) -I$(ALLGATHER_DIR ) $(EXAMPLE_DIR ) /user.cc
23+ $(CHARMC ) -D $( TYPE ) - I$(ALLGATHER_DIR ) $(EXAMPLE_DIR ) /user.cc
1824 $(CHARMC ) -o sim user.o allGather.o
1925 @rm -f user.o allGather.o
2026 @echo " Built simulation"
2127
22- run-simulation : build-simulation
28+
29+ test-simulation : build-simulation
2330 ./charmrun +p19 ./sim 64 29 10 10
2431
32+
2533clean :
2634 rm -f * .decl.h * .def.h * .o charmrun sim
2735
28- .phony : run clean sim allGather
36+
37+ .phony : allGather build-simulation run-simulation clean
Original file line number Diff line number Diff line change @@ -19,7 +19,18 @@ start::start(CkArgMsg *msg) {
1919
2020 CkArrayOptions opts (n);
2121 opts.bindTo (sim);
22+
23+ #ifdef FLOODING
2224 AllGather_array = CProxy_AllGather::ckNew (k, n, (int )allGatherType::ALL_GATHER_FLOODING, opts);
25+ #endif
26+
27+ #ifdef HYPERCUBE
28+ AllGather_array = CProxy_AllGather::ckNew (k, n, (int )allGatherType::ALL_GATHER_HYPERCUBE, opts);
29+ #endif
30+
31+ #ifdef DEFAULT
32+ AllGather_array = CProxy_AllGather::ckNew (k, n, (int )allGatherType::ALL_GATHER_DEFAULT, opts);
33+ #endif
2334
2435 sim.begin (AllGather_array);
2536}
You can’t perform that action at this time.
0 commit comments