-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running OWENS in a python wrapper #16
Comments
Desire is to run Julia functions directly in Python WEIS, see https://discourse.julialang.org/t/calling-julia-functions-from-python/6885/2 Would possibly still start with file dump, system run, and then read file Need others to be able to run this easily. |
This works, assuming you have julia and OWENS running. It took just a few minutes to implement. # juliaup update
# pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install juliacall
from juliacall import Main as jl
from juliacall import Pkg as jlPkg
jlPkg.activate("../../../") # relative path to the folder where `MyPack/Project.toml` should be used here
jl.seval("using OWENS")
testdata = jl.OWENS.runOWENS(jl.OWENS.MasterInput("./sampleOWENS.yml"),"./").to_numpy() |
So, the next step is aligning the inputs and outputs with potential design optimization needs, which is being defined in #18 Need to review with NREL folks and then this should be completed. |
Hi Kevin, I may need some on-line support with running this tomorrow. Here are a few things I've tried: Running as-is give me:
So, I added a Then, I get a
I tried several other things we can go over, but never get further than the PreComp registration notice. Any ideas? |
Hi Daniel,
The dependency tree needs to be satisfied. Until the repos can be open sourced and registered with the package manager, they need to be installed manually, in the order specified.
If you have already done that, and are using visual studio, sometimes visual studio activates the current directory’s project.toml environment, instead of the overall julia 1.10 etc environment. If this is the case, you can simply click on the current environment in the bottom ribbon and select the desired environment. Running directly from the terminal would also remove any issues caused by the ide.
Kevin R. Moore – R&D S&E, Mechanical Engineering
ORG 8921 – Wind Energy Computational Sciences
***@***.******@***.***> | CELL: 208-749-0340
[SNL_Horizontal_Black]
From: dzalkind ***@***.***>
Reply-To: "SNL-WaterPower/OWENS.jl" ***@***.***>
Date: Thursday, March 14, 2024 at 5:37 PM
To: "SNL-WaterPower/OWENS.jl" ***@***.***>
Cc: "Moore, Kevin Ray" ***@***.***>, Assign ***@***.***>
Subject: [EXTERNAL] Re: [SNL-WaterPower/OWENS.jl] Running OWENS in a python wrapper (Issue #16)
Hi Kevin,
I may need some on-line support with running this tomorrow. Here are a few things I've tried:
Running as-is give me:
`ERROR: LoadError: ArgumentError: Package GyricFEA [3cd7cb04-a333-4aed-a1f1-c87982f3ae73] is required but does not seem to be installed:
* Run Pkg.instantiate() to install all recorded dependencies.`
So, I added a jlPkg.instantiate() to the script.
Then, I get a
juliacall.JuliaError: expected package PreComp [19f83dec] to be registered Stacktrace:
I tried several other things we can go over, but never get further than the PreComp registration notice.
Any ideas?
—
Reply to this email directly, view it on GitHub<#16 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APO3LIDYGM4SDSVJLKORARLYYIYDTAVCNFSM6AAAAABDXEDOGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGY2TANJRGI>.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
Okay, I made some progress on this: Within the python script, I had to In chatting with @yqliaohk, I learned that she had installed several dependencies in developer mode. Perhaps that's also another source of our differences in set up? |
Great! Maybe, mine are in developer mode as well, so that could be it. Also, I just pushed a patch to the dev branch of OWENS.jl that fixes the post processing errors. If you have a developer install of owens (cloned locally, cd path2directory/OWENS.jl, julia, ] dev .) then you can just pull and check out the branch and then it will use the branch. |
No description provided.
The text was updated successfully, but these errors were encountered: