Skip to content

Commit

Permalink
Set LMTOPTIONS on nahuku32 to avoid hanging
Browse files Browse the repository at this point in the history
A current problem with the nahuku32 boards requires the
`--skip-power=1` option for them to boot successfully.
  • Loading branch information
hunse committed Apr 20, 2020
1 parent b69c540 commit e046da9
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions nengo_loihi/tests/test_conv.py
Expand Up @@ -576,11 +576,18 @@ def test_conv_deepnet(
on the emulator.
"""

def set_partition(partition=os.environ.get("PARTITION", None)):
if partition is None:
del os.environ["PARTITION"]
def set_os_environ(key, value):
if value is None:
del os.environ[key]
else:
os.environ["PARTITION"] = partition
os.environ[key] = value

def set_env(
partition=os.environ.get("PARTITION", None),
lmt_options=os.environ.get("LMTOPTIONS", None),
):
set_os_environ("PARTITION", partition)
set_os_environ("LMTOPTIONS", lmt_options)

if request.config.getoption("--target") == "loihi":
if (
Expand All @@ -590,9 +597,9 @@ def set_partition(partition=os.environ.get("PARTITION", None)):
):
pytest.skip("Pop32 multichip test requires NxSDK >= 0.9.5")
elif pop_type == 16:
request.addfinalizer(set_partition)
request.addfinalizer(set_env)
# multichip pop_type = 16 works only on nahuku32 board currently
set_partition("nahuku32")
set_env(partition="nahuku32", lmt_options="--skip-power=1")

has_nahuku32 = (
os.popen("sinfo -h --partition=nahuku32").read().find("idle") > 0
Expand Down

0 comments on commit e046da9

Please sign in to comment.