Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion benchmark_v2/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def manage_connection():
try:
ak.connect(server=pytest.host, port=pytest.port, timeout=pytest.client_timeout)
pytest.cfg = ak.get_config()
pytest.N = pytest.prob_size * pytest.cfg["numLocales"]
pytest.N = pytest.prob_size * pytest.cfg["numNodes"]
except Exception as e:
raise ConnectionError(e)

Expand Down
4 changes: 2 additions & 2 deletions benchmark_v2/gather_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def bench_gather(benchmark, dtype):
N = pytest.prob_size
isize = N if pytest.idx_size is None else pytest.idx_size
vsize = N if pytest.val_size is None else pytest.val_size
Ni = isize * pytest.cfg["numLocales"]
Nv = vsize * pytest.cfg["numLocales"]
Ni = isize * pytest.cfg["numNodes"]
Nv = vsize * pytest.cfg["numNodes"]

i_ak = ak.randint(0, Nv, Ni, seed=pytest.seed)
if pytest.seed is not None:
Expand Down
2 changes: 1 addition & 1 deletion benchmark_v2/io_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def bench_delete(benchmark):
benchmark.pedantic(_remove_files, rounds=1)

benchmark.extra_info["description"] = "Measures the performance of IO delete files from system"
benchmark.extra_info["problem_size"] = pytest.io_files * pytest.cfg["numLocales"]
benchmark.extra_info["problem_size"] = pytest.io_files * pytest.cfg["numNodes"]
benchmark.extra_info["transfer_rate"] = "N/A"


Expand Down
2 changes: 1 addition & 1 deletion benchmark_v2/optional/shuffle_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def bench_shuffle(benchmark, dtype, method):
using arkouda's default RNG and the given shuffle method(s).
"""
cfg = ak.get_config()
N = pytest.prob_size * cfg["numLocales"]
N = pytest.prob_size * cfg["numNodes"]
seed = pytest.seed or 0

# Build 1..N in the desired dtype
Expand Down
4 changes: 2 additions & 2 deletions benchmark_v2/scatter_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def bench_scatter(benchmark, dtype):
N = pytest.prob_size
isize = N if pytest.idx_size is None else pytest.idx_size
vsize = N if pytest.val_size is None else pytest.val_size
Ni = isize * pytest.cfg["numLocales"]
Nv = vsize * pytest.cfg["numLocales"]
Ni = isize * pytest.cfg["numNodes"]
Nv = vsize * pytest.cfg["numNodes"]

# Generate Arkouda arrays
i_ak = ak.randint(0, Nv, Ni, seed=pytest.seed)
Expand Down
16 changes: 12 additions & 4 deletions benchmarks/IO.py
Comment thread
e-kayrakli marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ def time_ak_write(
print(file_format_actions.get(fileFormat, "Invalid file format"))

cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}, filesPerLoc = {}".format(cfg["numLocales"], N, numfiles))
N = N_per_locale * cfg["numNodes"]
print(
"numLocales = {}, numNodes {}, N = {:,}, filesPerLoc = {}".format(
cfg["numLocales"], cfg["numNodes"], N, numfiles
)
)
if dtype == "int64":
a = ak.randint(0, 2**32, N, seed=seed)
elif dtype == "float64":
Expand Down Expand Up @@ -114,8 +118,12 @@ def time_ak_read(N_per_locale, numfiles, trials, dtype, path, fileFormat, comps=
print(file_format_actions.get(fileFormat, "Invalid file format"))

cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}, filesPerLoc = {}".format(cfg["numLocales"], N, numfiles))
N = N_per_locale * cfg["numNodes"]
print(
"numLocales = {}, numNodes {}, N = {:,}, filesPerLoc = {}".format(
cfg["numLocales"], cfg["numNodes"], N, numfiles
)
)
a = ak.array([])

times = {}
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def generate_arrays(N, seed):
def time_ak_aggregate(N_per_locale, trials, seed):
print(">>> arkouda aggregate")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
keys, intvals, boolvals = generate_arrays(N, seed)
g = ak.GroupBy(keys, assume_sorted=True)
for op in ak.GroupBy.Reductions:
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/argsort.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
def time_ak_argsort(N_per_locale, trials, dtype, seed):
print(">>> arkouda {} argsort".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
if dtype == "int64":
a = ak.randint(0, 2**32, N, seed=seed)
nbytes = a.size * a.itemsize
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/array_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def create_np_array(N, op, dtype, seed):
def time_ak_array_create(N_per_locale, trials, dtype, random, seed):
print(">>> arkouda {} array creation".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))

timings = {op: [] for op in OPS}
for i in range(trials):
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/array_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
def time_ak_array_transfer(N, trials, dtype, seed, max_bits=-1):
print(">>> arkouda {} array transfer".format(dtype))
cfg = ak.get_config()
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))

if dtype == ak.bigint.name:
u1 = ak.randint(0, 2**32, N, dtype=ak.uint64, seed=seed)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bigint_bitwise_binops.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
def time_ak_bitwise_binops(N_per_locale, trials, max_bits, seed):
print(">>> arkouda bigint bitwise binops")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
a1 = ak.randint(0, 2**32, N, dtype=ak.uint64, seed=seed)
a2 = ak.randint(0, 2**32, N, dtype=ak.uint64, seed=seed)
a = ak.bigint_from_uint_arrays([a1, a2], max_bits=max_bits)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bigint_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
def time_bigint_conversion(N_per_locale, trials, seed, max_bits):
print(">>> arkouda uint arrays from bigint array")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))

a = ak.randint(0, 2**32, N, dtype=ak.uint64, seed=seed)
b = ak.randint(0, 2**32, N, dtype=ak.uint64, seed=seed)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bigint_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
def time_ak_stream(N_per_locale, trials, alpha, max_bits, random, seed):
print(">>> arkouda bigint stream")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
# default tot_bytes to ones case
tot_bytes = N * 8 * 3
if random or seed is not None:
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/coargsort.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
def time_ak_coargsort(N_per_locale, trials, dtype, seed):
print(">>> arkouda {} coargsort".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
for numArrays in (1, 2, 8, 16):
if seed is None:
seeds = [None for _ in range(numArrays)]
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def generate_dataframe(N, seed):
def time_ak_df_display(N_per_locale, trials, seed):
print(">>> arkouda dataframe display")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))

pd.set_option("display.max_rows", 100)
pd.set_option("display.min_rows", 10)
Expand Down Expand Up @@ -85,7 +85,7 @@ def time_ak_df_display(N_per_locale, trials, seed):

def check_correctness(N_per_locale, seed):
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
N = N_per_locale * cfg["numNodes"]
df = generate_dataframe(N, seed)

pd.set_option("display.max_rows", 100)
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
def time_ak_encode(N_per_locale, trials, seed):
print(">>> arkouda string encode")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
a = ak.random_strings_uniform(1, 16, N, seed=seed)
nbytes = a.nbytes * a.entry.itemsize

Expand All @@ -35,8 +35,8 @@ def time_ak_encode(N_per_locale, trials, seed):
def time_ak_decode(N_per_locale, trials, seed):
print(">>> arkouda string encode")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
a = ak.random_strings_uniform(1, 16, N, seed=seed)
nbytes = a.nbytes * a.entry.itemsize

Expand Down
10 changes: 7 additions & 3 deletions benchmarks/gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
def time_ak_gather(isize, vsize, trials, dtype, random, seed):
print(">>> arkouda {} gather".format(dtype))
cfg = ak.get_config()
Ni = isize * cfg["numLocales"]
Nv = vsize * cfg["numLocales"]
print("numLocales = {}, num_indices = {:,} ; num_values = {:,}".format(cfg["numLocales"], Ni, Nv))
Ni = isize * cfg["numNodes"]
Nv = vsize * cfg["numNodes"]
print(
"numLocales = {}, numNodes {}, num_indices = {:,} ; num_values = {:,}".format(
cfg["numLocales"], cfg["numNodes"], Ni, Nv
)
)
# Index vector is always random
i = ak.randint(0, Nv, Ni, seed=seed)
if seed is not None:
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def generate_arrays(N, numArrays, dtype, seed, max_bits=-1):
def time_ak_groupby(N_per_locale, trials, dtype, seed, max_bits=-1):
print(">>> arkouda {} groupby".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
for numArrays in (1, 2, 8, 16):
if dtype == "mixed" and numArrays == 1:
continue
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/in1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
def time_ak_in1d(N_per_locale, trials, dtype):
print(f">>> arkouda {dtype} in1d")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
N = N_per_locale * cfg["numNodes"]
a = ak.arange(N) % LARGE
if dtype == "uint64":
a = ak.cast(a, ak.uint64)

for regime, bsize in zip(("Medium", "Large"), (MEDIUM, LARGE)):
print(
"{} regime: numLocales = {} a.size = {:,} b.size = {:,}".format(
regime, cfg["numLocales"], N, bsize
"{} regime: numNodes = {} a.size = {:,} b.size = {:,}".format(
regime, cfg["numNodes"], N, bsize
)
)
b = ak.arange(bsize)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
def time_ak_reduce(N_per_locale, trials, dtype, random, seed):
print(">>> arkouda {} reduce".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
if random or seed is not None:
if dtype == "int64":
a = ak.randint(1, N, N, seed=seed)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def create_parser():
parser.add_argument(
"-nl",
"--num-locales",
"--numLocales",
"--numNodes",
default=get_arkouda_numlocales(),
help="Number of locales to use for the server",
)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
def time_ak_scan(N_per_locale, trials, dtype, random, seed):
print(">>> arkouda {} scan".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
if random or args.seed is not None:
if dtype == "int64":
a = ak.randint(1, N, N, seed=seed)
Expand Down
10 changes: 7 additions & 3 deletions benchmarks/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
def time_ak_scatter(isize, vsize, trials, dtype, random, seed):
print(">>> arkouda {} scatter".format(dtype))
cfg = ak.get_config()
Ni = isize * cfg["numLocales"]
Nv = vsize * cfg["numLocales"]
print("numLocales = {}, num_indices = {:,} ; num_values = {:,}".format(cfg["numLocales"], Ni, Nv))
Ni = isize * cfg["numNodes"]
Nv = vsize * cfg["numNodes"]
print(
"numLocales = {}, numNodes {}, num_indices = {:,} ; num_values = {:,}".format(
cfg["numLocales"], cfg["numNodes"], Ni, Nv
)
)
# Index vector is always random
i = ak.randint(0, Nv, Ni, seed=seed)
c = ak.zeros(Nv, dtype=dtype)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/segarray_setops.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
def time_ak_setops(N_per_locale, trials, dtype, seed):
print(">>> arkouda segarray {} setops".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
if dtype == "int64":
a = ak.randint(0, 2**32, N, seed=seed)
b = ak.randint(0, 2**32, N, seed=seed)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/setops.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
def time_ak_setops(N_per_locale, trials, dtype, seed):
print(">>> arkouda {} setops".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
if dtype == "int64":
a = ak.randint(0, 2**32, N, seed=seed)
b = ak.randint(0, 2**32, N, seed=seed)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/setops_multiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
def time_ak_setops(N_per_locale, trials, dtype, seed):
print(">>> arkouda {} setops".format(dtype))
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
if dtype == "int64":
a = ak.randint(0, 2**32, N, seed=seed)
b = ak.randint(0, 2**32, N, seed=seed)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/small-str-groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

def time_ak_groupby(N_per_locale, trials, seed):
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))
for k, v in SIZES.items():
a = ak.random_strings_uniform(1, v, N, seed=seed)
totalbytes = a.nbytes * a.entry.itemsize
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
def time_split(N_per_locale, trials):
print(">>> arkouda split")
cfg = ak.get_config()
N = N_per_locale * cfg["numLocales"]
print("numLocales = {}, N = {:,}".format(cfg["numLocales"], N))
N = N_per_locale * cfg["numNodes"]
print("numLocales = {}, numNodes {}, N = {:,}".format(cfg["numLocales"], cfg["numNodes"], N))

thirds = [ak.cast(ak.arange(i, N * 3, 3), "str") for i in range(3)]
thickrange = thirds[0].stick(thirds[1], delimiter="_").stick(thirds[2], delimiter="_")
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/str-in1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
def time_ak_in1d(size, trials):
print(">>> arkouda string in1d")
cfg = ak.get_config()
N = size * cfg["numLocales"]
N = size * cfg["numNodes"]
a = ak.random_strings_uniform(1, MAXSTRLEN, N)

for regime, bsize in zip(("Medium", "Large"), (MEDIUM, LARGE)):
print(
"{} regime: numLocales = {} a.size = {:,} b.size = {:,}".format(
regime, cfg["numLocales"], N, bsize
"{} regime: numNodes = {} a.size = {:,} b.size = {:,}".format(
regime, cfg["numNodes"], N, bsize
)
)
b = ak.random_strings_uniform(1, MAXSTRLEN, bsize)
Expand Down
5 changes: 3 additions & 2 deletions benchmarks/str-locality.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ def time_all_ops(N_per_locale, trials, seed, correctnessOnly):
else:
print(">>> arkouda string locality tests")
nl = ak.get_config()["numLocales"]
nn = ak.get_config()["numNodes"]
N = nl * N_per_locale
print("numLocales = {}, N = {:,}".format(nl, N))
print("numLocales = {}, numNodes {}, N = {:,}".format(nl, nn, N))
random_strings, sorted_strings, perm = generate_data(N, seed)
nbytes = random_strings.nbytes

Expand Down Expand Up @@ -68,7 +69,7 @@ def time_op(op, name):
assert (ans1[perm] == ans2).all()

# Scalar compare
op = lambda x: (x == "5.5")
op = lambda x: x == "5.5"
ans1, ans2 = time_op(op, "Comparing to scalar")
assert (ans1[perm] == ans2).all()

Expand Down
Loading