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
6 changes: 4 additions & 2 deletions imas/backends/imas_core/mdsplus_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def create_mdsplus_model(cache_dir_path: Path) -> None:
"-Xms1g", # what do these do?
"-Xmx8g", # what do these do?
"-XX:+UseG1GC", # what do these do?
"--enable-native-access=ALL-UNNAMED", # Java-25
"-cp",
jarfile,
compiletree,
Expand All @@ -339,13 +340,14 @@ def create_mdsplus_model(cache_dir_path: Path) -> None:
env={
"PATH": os.environ.get("PATH", ""),
"LD_LIBRARY_PATH": os.environ.get("LD_LIBRARY_PATH", ""),
get_mdsplus_model_var(): str(cache_dir_path),
# MDSplus locates models through '<tree>_path' (tree='ids')
"ids_path": str(cache_dir_path),
},
)
# Touch a file to show that we have finished the model
(cache_dir_path / "done.txt").touch()
except CalledProcessError as e:
logger.error("Error making MDSPlus model in {path}", cache_dir_path)
logger.error("Error making MDSPlus model in %s", cache_dir_path)
raise e


Expand Down
2 changes: 1 addition & 1 deletion imas/test/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_hash_str1d(minimal):
"multiple entries to test!",
]
minimal.str_1d = string_list
hashes = list(map(xxh3_64_digest, string_list))
hashes = [xxh3_64_digest(s.encode("utf-8")) for s in string_list]
expected = xxh3_64_digest(struct.pack("<Q", len(string_list)) + b"".join(hashes))
assert expected == b"\x98\x011\x9dx+\x0e\xc0"
assert imas.util.calc_hash(minimal.str_1d) == expected
Expand Down
Loading