Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rivanna ucc ucx redis integration #680

Closed
wants to merge 158 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
5578219
New branch for merge to cylondata cylon
mstaylor Mar 16, 2023
8872f81
removes db flush and add python script
mstaylor Mar 23, 2023
8203316
adds support for conda environments with a local ucx (supports custom…
mstaylor Sep 8, 2023
3404452
removes cereal library
mstaylor Sep 9, 2023
5dabd61
updates aws dockerfile to include local ucx build
mstaylor Sep 10, 2023
a1ab85b
aws docker support - adds ucx local support (fixes issue with wrong b…
mstaylor Sep 10, 2023
0521735
aws docker support - adds ucx local support - partial - changes to ms…
mstaylor Sep 12, 2023
3bea691
aws docker support - adds ucx local support - partial - changes to ms…
mstaylor Sep 12, 2023
861c5a9
aws docker support - adds ucx local support - partial - boto3 test co…
mstaylor Sep 12, 2023
a1faa98
aws fargate support - IP address passed to UCX via boto3
mstaylor Sep 13, 2023
367cb6a
Removes cylon scaling results and reformat scaling scripts
mstaylor Sep 23, 2023
e451a9e
Merge remote-tracking branch 'origin/main' into cylon-aws-fargate-sup…
mstaylor Sep 23, 2023
c087968
Removes cylon scaling results and reformat scaling scripts
mstaylor Sep 23, 2023
49dc22e
reverts removal of aws directory and includes updates from experiment…
mstaylor Oct 1, 2023
ac789ee
partial - rivanna ucc/ucx/redis
mstaylor Oct 1, 2023
63c2bac
partial - rivanna ucc/ucx/redis
mstaylor Oct 2, 2023
b8d87a0
partial - rivanna ucc/ucx/redis
mstaylor Oct 3, 2023
1658e30
partial - rivanna ucc/ucx/redis - enables cmake build for ucx local
mstaylor Oct 3, 2023
382f231
partial - rivanna ucc/ucx/redis - enables cmake build for ucx local
mstaylor Oct 3, 2023
d4c27d3
partial - rivanna ucc/ucx/redis - adds ucc ucx redis derivative scripts
mstaylor Oct 4, 2023
19309da
partial - rivanna ucc/ucx/redis - adds ucc ucx redis derivative scripts
mstaylor Oct 5, 2023
fc7ddcd
partial - rivanna ucc/ucx/redis - switches from build.sh to build.py
mstaylor Oct 6, 2023
829a707
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 6, 2023
821e4aa
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 7, 2023
25cea32
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
2b376fb
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
fc94120
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
9ae62ae
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
52a7650
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
69713c4
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
39c391e
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
0bbc81f
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
e27fdb9
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 8, 2023
cd95d77
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 9, 2023
057456b
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 9, 2023
a3644ce
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 9, 2023
0abf5c7
partial - rivanna ucc/ucx/redis - adds env variables necessary for cy…
mstaylor Oct 9, 2023
05cf7f6
partial - rivanna ucc/ucx/redis - updates build.sh to support ucx/ucc…
mstaylor Oct 9, 2023
c371e5b
partial - rivanna ucc/ucx/redis - adds lib64 to redis library search …
mstaylor Oct 10, 2023
02feff3
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 10, 2023
b44ddca
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 10, 2023
d34e602
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 10, 2023
458bb5f
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 10, 2023
9413bef
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
c7ba611
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
5a74273
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
ce16d7a
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
e02dacc
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
eb34809
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
d8e6c58
removes cereal library
mstaylor Oct 11, 2023
0a49c2a
removes cereal library
mstaylor Oct 11, 2023
450e289
removes cereal library
mstaylor Oct 11, 2023
180bc29
removes cereal library
mstaylor Oct 11, 2023
4fefd94
removes cereal library
mstaylor Oct 11, 2023
01aad95
removes cereal library
mstaylor Oct 11, 2023
06c18da
removes cereal library
mstaylor Oct 11, 2023
5a7751f
removes cereal library
mstaylor Oct 11, 2023
5d2a0ee
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
6ac1098
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
874bd12
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
1b42ca7
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
effb394
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 11, 2023
23db660
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
35177fd
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
b90fae6
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
3d06536
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
80b7f61
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
d02d755
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
1c69b23
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
21c6008
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
236a052
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
6bc7b41
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
160d2b1
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
47f7bd1
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
0ecf914
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
ee997cc
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
2218b02
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
b488fa2
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
8682a5c
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
c517583
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
a8fdfcf
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
3cb6819
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
68f0c65
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
83e0b5a
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
fab34e6
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
e845463
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
de563b0
partial - rivanna ucc/ucx/redis - fixes include library path for non-…
mstaylor Oct 12, 2023
872ff95
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
d35f6fd
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
2c26f5b
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
4f5df69
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
4e78038
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
5183e3f
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
20d3eac
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
1f59154
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
18b51e8
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 13, 2023
7c4c7b4
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 14, 2023
9da8989
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 14, 2023
6025450
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 14, 2023
2eb6dfb
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 14, 2023
68a652a
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 14, 2023
7baab5f
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 14, 2023
1933649
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 14, 2023
cf82127
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 15, 2023
d5d28c4
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 15, 2023
8afbc59
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 15, 2023
c74abe5
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 15, 2023
843a7d8
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 15, 2023
cd9ba79
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 15, 2023
8b62d34
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
123c9bc
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
eb9107a
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
17c91a5
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
0997e61
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
8debbbc
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
2ea49f7
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
f87b3f1
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 16, 2023
bc5cb2f
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
cc95223
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
5906045
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
5ffb720
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
999796b
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
bf0f77b
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
d1d4d49
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
00ca62e
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
f67625d
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
76bc14e
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
d2be9fd
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
38cdb20
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
4b6c122
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
5cec1e8
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
4199648
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
f3cd9ae
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
f1adba4
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
f2ec217
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
98fa985
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 17, 2023
f170218
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 18, 2023
90d2081
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 18, 2023
5a988f5
partial - rivanna ucc/ucx/redis - minor changes to support multiple j…
mstaylor Oct 18, 2023
c9a50d0
partial - rivanna ucc/ucx/redis - adds rivanna results to jupyter not…
mstaylor Oct 18, 2023
28e716a
partial - rivanna ucc/ucx/redis - adds rivanna results to jupyter not…
mstaylor Oct 19, 2023
53f7132
partial - rivanna ucc/ucx/redis - adds rivanna results to jupyter not…
mstaylor Oct 19, 2023
4b57430
partial - rivanna ucc/ucx/redis - minor update to cylon_scaling to ou…
mstaylor Oct 19, 2023
2be11c4
partial - rivanna ucc/ucx/redis - minor update to cylon_scaling to ou…
mstaylor Oct 25, 2023
17c4308
partial - rivanna ucc/ucx/redis - minor update to cylon_scaling to ou…
mstaylor Oct 26, 2023
393afa3
partial - rivanna ucc/ucx/redis - minor update to cylon_scaling to ou…
mstaylor Oct 26, 2023
33f523b
partial - moves rivanna ucc ucx redis scripts
mstaylor Oct 31, 2023
460b69f
partial - moves rivanna ucc ucx redis scripts
mstaylor Nov 4, 2023
8088b47
partial - moves rivanna ucc ucx redis scripts
mstaylor Nov 4, 2023
23ad245
partial - experiments (rivanna)
mstaylor Nov 6, 2023
220c028
partial - experiments (rivanna)
mstaylor Nov 6, 2023
1f5f530
partial - experiments (rivanna)
mstaylor Nov 6, 2023
80b6a6e
adds support for local UCX with install prefix
mstaylor Nov 8, 2023
0f86f81
partial - updates cylon conda env to update openmpi and ucx libraries
mstaylor Nov 8, 2023
899c8ed
Merge remote-tracking branch 'fork/rivanna-ucc-ucx-redis' into rivann…
mstaylor Nov 8, 2023
3bddaa1
partial - updates github action for Conda C++/Puthon - gcc, OpenMPI, …
mstaylor Nov 8, 2023
e474d8f
partial - updates github action for Conda C++/Puthon - gcc, OpenMPI, …
mstaylor Nov 8, 2023
985a465
partial - aws experiment updates
mstaylor Nov 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/conda-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- os: ubuntu-20.04
gcc: 9
ucc: "master"
ucx: "override-remote-address3"

steps:
- uses: actions/checkout@v2
Expand All @@ -39,7 +40,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: cylon_dev
environment-file: conda/environments/cylon.yml
environment-file: conda/environments/cylon_NoUCX.yml

- name: Activate conda
run: conda activate cylon_dev
Expand All @@ -51,17 +52,24 @@ jobs:
cmake .. -DBUILD_SHARED_LIBS=1 -DUSE_MPI=1 -DCMAKE_INSTALL_PREFIX=$HOME/gloo/install
make install

- name: Install UCX
run: |
git clone --single-branch -b ${{ matrix.ucx }} https://github.com/mstaylor/ucx.git $HOME/ucx
cd $HOME/ucx
./autogen.sh
./configure --prefix=$HOME/ucx/install --without-go
make install

- name: Install UCC
run: |
git clone --single-branch -b ${{ matrix.ucc }} https://github.com/openucx/ucc.git $HOME/ucc
cd $HOME/ucc
echo "conda ucx: $(conda list | grep ucx)"
./autogen.sh
./configure --prefix=$HOME/ucc/install --with-ucx=$CONDA/envs/cylon_dev
./configure --prefix=$HOME/ucc/install --with-ucx=$HOME/ucx/install
make install

- name: Build cylon, pycylon and run cpp test
run: python build.py -cmake-flags="-DCYLON_UCX=1 -DCYLON_GLOO=1 -DGLOO_INSTALL_PREFIX=$HOME/gloo/install -DCYLON_UCC=1 -DUCC_INSTALL_PREFIX=$HOME/ucc/install" -ipath="$HOME/cylon/install" --cpp --python --test
run: python build.py -cmake-flags="-DCYLON_UCX=1 -DCYLON_GLOO=1 -DGLOO_INSTALL_PREFIX=$HOME/gloo/install -DCYLON_UCC=1 -DUCC_INSTALL_PREFIX=$HOME/ucc/install -DUCX_INSTALL_PREFIX=$HOME/ucx/install" -ipath="$HOME/cylon/install" --cpp --python --test

- name: Run pytest
run: python build.py -ipath="$HOME/cylon/install" --pytest
Expand Down
Binary file added aws/scripts/EC2RivannaParallelismAdjusted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion aws/scripts/Join_Weak_Scaling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 8,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down
473 changes: 473 additions & 0 deletions aws/scripts/Join_Weak_Scaling_round2.ipynb

Large diffs are not rendered by default.

71 changes: 65 additions & 6 deletions aws/scripts/cylon_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def cylon_join(data=None):
df1 = DataFrame(pd.DataFrame(data1).add_prefix("col"))
df2 = DataFrame(pd.DataFrame(data2).add_prefix("col"))

timing = {'scaling': [], 'world': [], 'rows': [], 'max_value': [], 'rank': [], 'avg_t':[], 'tot_l':[]}

for i in range(data['it']):
env.barrier()
StopWatch.start(f"join_{i}_{data['host']}_{data['rows']}_{data['it']}")
Expand All @@ -100,14 +102,28 @@ def cylon_join(data=None):
if env.rank == 0:
avg_t = sum_t / env.world_size
print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l)
print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l, file=open(data['output_summary_filename'], 'a'))
timing['scaling'].append(data['scaling'])
timing['world'].append(env.world_size)
timing['rows'].append(num_rows)
timing['max_value'].append(max_val)
timing['rank'].append(i)
timing['avg_t'].append(avg_t)
timing['tot_l'].append(tot_l)
StopWatch.stop(f"join_{i}_{data['host']}_{data['rows']}_{data['it']}")

StopWatch.stop(f"join_total_{data['host']}_{data['rows']}_{data['it']}")

if env.rank == 0:
StopWatch.benchmark(tag=str(data), filename=data['output_scaling_filename'])
upload_file(file_name=data['output_scaling_filename'], bucket=data['s3_bucket'], object_name=data['s3_stopwatch_object_name'])


if os.path.exists(data['output_summary_filename']):
pd.DataFrame(timing).to_csv(data['output_summary_filename'], mode='a', index=False, header=False)
else:
pd.DataFrame(timing).to_csv(data['output_summary_filename'], mode='w', index=False, header=True)


upload_file(file_name=data['output_summary_filename'], bucket=data['s3_bucket'],
object_name=data['s3_summary_object_name'])

Expand Down Expand Up @@ -151,6 +167,8 @@ def cylon_sort(data=None):
if env.rank == 0:
print("Task# ", data['task'])

timing = {'scaling': [], 'world': [], 'rows': [], 'max_value': [], 'rank': [], 'avg_t': [], 'tot_l': []}

for i in range(data['it']):
env.barrier()
StopWatch.start(f"sort_{i}_{data['host']}_{data['rows']}_{data['it']}")
Expand All @@ -166,8 +184,15 @@ def cylon_sort(data=None):
if env.rank == 0:
avg_t = sum_t / env.world_size
print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l)
print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l,
file=open(data['output_summary_filename'], 'a'))
timing['scaling'].append(data['scaling'])
timing['world'].append(env.world_size)
timing['rows'].append(num_rows)
timing['max_value'].append(max_val)
timing['rank'].append(i)
timing['avg_t'].append(avg_t)
timing['tot_l'].append(tot_l)
#print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l,
# file=open(data['output_summary_filename'], 'a'))


StopWatch.stop(f"sort_{i}_{data['host']}_{data['rows']}_{data['it']}")
Expand All @@ -178,9 +203,14 @@ def cylon_sort(data=None):
StopWatch.benchmark(tag=str(data), filename=data['output_scaling_filename'])
upload_file(file_name=data['output_scaling_filename'], bucket=data['s3_bucket'],
object_name=data['s3_stopwatch_object_name'])

if os.path.exists(data['output_summary_filename']):
pd.DataFrame(timing).to_csv(data['output_summary_filename'], mode='a', index=False, header=False)
else:
pd.DataFrame(timing).to_csv(data['output_summary_filename'], mode='w', index=False, header=True)

upload_file(file_name=data['output_summary_filename'], bucket=data['s3_bucket'],
object_name=data['s3_summary_object_name'])
redis_context.clearDB()


def cylon_slice(data=None):
Expand Down Expand Up @@ -222,6 +252,7 @@ def cylon_slice(data=None):
if env.rank == 0:
print("Task# ", data['task'])

timing = {'scaling': [], 'world': [], 'rows': [], 'max_value': [], 'rank': [], 'avg_t': [], 'tot_l': []}
for i in range(data['it']):
env.barrier()
StopWatch.start(f"slice_{i}_{data['host']}_{data['rows']}_{data['it']}")
Expand All @@ -239,8 +270,15 @@ def cylon_slice(data=None):
if env.rank == 0:
avg_t = sum_t / env.world_size
print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l)
print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l,
file=open(data['output_summary_filename'], 'a'))
#print("### ", data['scaling'], env.world_size, num_rows, max_val, i, avg_t, tot_l,
# file=open(data['output_summary_filename'], 'a'))
timing['scaling'].append(data['scaling'])
timing['world'].append(env.world_size)
timing['rows'].append(num_rows)
timing['max_value'].append(max_val)
timing['rank'].append(i)
timing['avg_t'].append(avg_t)
timing['tot_l'].append(tot_l)
StopWatch.stop(f"slice_{i}_{data['host']}_{data['rows']}_{data['it']}")

StopWatch.stop(f"slice_total_{data['host']}_{data['rows']}_{data['it']}")
Expand All @@ -249,6 +287,12 @@ def cylon_slice(data=None):
StopWatch.benchmark(tag=str(data), filename=data['output_scaling_filename'])
upload_file(file_name=data['output_scaling_filename'], bucket=data['s3_bucket'],
object_name=data['s3_stopwatch_object_name'])

if os.path.exists(data['output_summary_filename']):
pd.DataFrame(timing).to_csv(data['output_summary_filename'], mode='a', index=False, header=False)
else:
pd.DataFrame(timing).to_csv(data['output_summary_filename'], mode='w', index=False, header=True)

upload_file(file_name=data['output_summary_filename'], bucket=data['s3_bucket'],
object_name=data['s3_summary_object_name'])

Expand All @@ -257,28 +301,43 @@ def cylon_slice(data=None):

if __name__ == "__main__":
parser = argparse.ArgumentParser(description="cylon scaling")

parser.add_argument('-n', dest='rows', type=int, **environ_or_required('ROWS'))

parser.add_argument('-i', dest='it', type=int, **environ_or_required('PARTITIONS')) #10

parser.add_argument('-u', dest='unique', type=float, **environ_or_required('UNIQUENESS'), help="unique factor") #0.9

parser.add_argument('-s', dest='scaling', type=str, **environ_or_required('SCALING'), choices=['s', 'w'],
help="s=strong w=weak") #w

parser.add_argument('-o', dest='operation', type=str, **environ_or_required('CYLON_OPERATION'), choices=['join', 'sort', 'slice'],
help="s=strong w=weak") # w

parser.add_argument('-w', dest='world_size', type=int, help="world size", **environ_or_required('WORLD_SIZE'))

parser.add_argument("-r", dest='redis_host', type=str, help="redis address, default to 127.0.0.1",
**environ_or_required('REDIS_HOST')) #127.0.0.1

parser.add_argument("-p1", dest='redis_port', type=int, help="name of redis port", **environ_or_required('REDIS_PORT')) #6379

parser.add_argument('-f1', dest='output_scaling_filename', type=str, help="Output filename for scaling results",
**environ_or_required('OUTPUT_SCALING_FILENAME'))

parser.add_argument('-f2', dest='output_summary_filename', type=str, help="Output filename for scaling summary results",
**environ_or_required('OUTPUT_SUMMARY_FILENAME'))

parser.add_argument('-b', dest='s3_bucket', type=str, help="S3 Bucket Name", **environ_or_required('S3_BUCKET'))

parser.add_argument('-o1', dest='s3_stopwatch_object_name', type=str, help="S3 Object Name", **environ_or_required('S3_STOPWATCH_OBJECT_NAME'))

parser.add_argument('-o2', dest='s3_summary_object_name', type=str, help="S3 Object Name",
**environ_or_required('S3_SUMMARY_OBJECT_NAME'))

args = vars(parser.parse_args())

args['host'] = "aws"

if args['operation'] == 'join':
print("executing cylon join operation")
cylon_join(args)
Expand Down
Loading
Loading