Skip to content

Commit

Permalink
refactor: use embedding clr host in version 251 (#926)
Browse files Browse the repository at this point in the history
Co-authored-by: Mohamed Koubaa <[email protected]>
Co-authored-by: pyansys-ci-bot <[email protected]>
Co-authored-by: Dipin <[email protected]>
  • Loading branch information
4 people authored Oct 11, 2024
1 parent f4ee162 commit 675971e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/changelog.d/926.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use embedding clr host in version 251
10 changes: 6 additions & 4 deletions src/ansys/mechanical/core/embedding/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ def __set_environment(version: int) -> None:
if version < 251:
os.environ["MECHANICAL_STARTUP_UNOPTIMIZED"] = "1"

# TODO - use this on linux as well
if version >= 251:
if "PYMECHANICAL_NO_CLR_HOST_LITE" not in os.environ:
os.environ["ANSYS_MECHANICAL_EMBEDDING_CLR_HOST"] = "1"
# Set an environment variable to use the custom CLR host
# for embedding.
# In the future (>251), it would always be used.
if version == 251:
if "PYMECHANICAL_NO_CLR_HOST_LITE" not in os.environ:
os.environ["ANSYS_MECHANICAL_EMBEDDING_CLR_HOST"] = "1"


def __check_for_mechanical_env():
Expand Down

0 comments on commit 675971e

Please sign in to comment.