-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve model initalization variables
- Loading branch information
1 parent
f73fb26
commit a8b63db
Showing
2 changed files
with
27 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
"""GEB simulates the environment, the individual behaviour of people, households and organizations - including their interactions - at small and large scale.""" | ||
|
||
__version__ = "1.0.0b2" | ||
|
||
import os | ||
import platform | ||
import sys | ||
from pathlib import Path | ||
from numba import config | ||
import importlib | ||
import faulthandler | ||
|
||
|
||
if platform.system() != "Windows": | ||
# Modify LD_LIBRARY_PATH on Unix-like systems (Linux, macOS) | ||
import tbb # noqa: F401 | ||
|
||
tbb_path = Path(sys.prefix) / "lib" / "libtbb.so" | ||
assert tbb_path.exists(), f"tbb shared library not found at {tbb_path}" | ||
os.environ["LD_LIBRARY_PATH"] = str(tbb_path) | ||
|
||
# set threading layer to tbb, this is much faster than other threading layers | ||
config.THREADING_LAYER = "tbb" | ||
|
||
# set environment variable for GEB package directory | ||
os.environ["GEB_PACKAGE_DIR"] = str( | ||
Path(importlib.util.find_spec("geb").origin).parent.parent | ||
) | ||
|
||
faulthandler.enable() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters