This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Conversation
Collaborator
Author
|
I was able to verify this fixes the issue by using an anaconda docker container (thanks @kuzminrobin for the pointers on that). When loading the With the fix, I get successful execution: |
Collaborator
Author
|
Unfortunately this causes a stand-alone build failure despite the e2e builds passing. I'm able to repro it locally and will get a fix soon. |
cgranade
approved these changes
Jan 11, 2022
Contributor
cgranade
left a comment
There was a problem hiding this comment.
Looks great to me! We'll likely want to revert the change to IQ# that copies libomp.* from the NuGet packages into the conda packages as a part of applying this fix.
kuzminrobin
approved these changes
Jan 11, 2022
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a workaround for loading of the libomp library in Linux and Mac. Since we now bundle the libomp.[so|dylib] with our simulator in the dotnet package runtimes folder, we shouldn't need the host to install that library manually. However, Linux and Mac do not automatically use the folder of the active binary as an additional dynamic library search path, meaning load of libomp was still failing on those platforms if it was not already installed. By using an explicit invocation of an operation that comes from that library, we trigger logic in dotnet that will perform the library load while including the platform specific runtimes folder. As a result, when the simulator is loaded, it will find libomp already in memory and not need to perform any additional loads.
Note that this does not work on Windows because there the library has a different name (libomp140.x86_64.dll), but the Windows load library logic already finds this library so no workaround is needed there.