Commit e0b89170 authored by Michael Salim's avatar Michael Salim
Browse files

resolvepath expands user path

parent 7807b9ef
......@@ -20,10 +20,11 @@ from balsam.user_settings import *
# ---------------
def resolve_db_path(path=None):
if path:
path = os.path.expanduser(path)
assert os.path.exists(path)
elif os.environ.get('BALSAM_DB_PATH'):
path = os.environ['BALSAM_DB_PATH']
assert os.path.exists(path)
assert os.path.exists(path), f"balsamDB path {path} not found"
else:
path = default_db_path
return path
......
......@@ -25,7 +25,12 @@ class TestInsertion(BalsamTestCase):
def test_concurrent_mpi_insert(self):
'''Timing: many MPI ranks simultaneously call dag.add_job'''
resultpath = os.path.join(util.DATA_DIR, 'concurrent_insert.dat')
base = os.path.join(util.DATA_DIR, 'concurrent_insert.dat')
resultpath = base
i = 1
while os.path.exists(resultpath):
resultpath = f"{base}.{i}"
i += 1
title = 'test_concurrent_mpi_insert'
comment = 'Each rank simultaneously calls dag.add_job (num_ranks simultaneous insertions)'
......
# BENCHMARK: test_concurrent_mpi_insert
# Host: alcfwl130.alcf.anl.gov
# Host: alcfwl138.alcf.anl.gov
# Each rank simultaneously calls dag.add_job (num_ranks simultaneous insertions)
# num_nodes ranks_per_node num_ranks total_time_sec
# --------------------------------------------------------------
1 4 4 1.700
1 8 8 2.000
1 16 16 2.800
1 32 32 4.470
1 8 8 2.010
1 16 16 2.780
1 32 32 4.400
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