-
Notifications
You must be signed in to change notification settings - Fork 40
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
CCBlade Installation #31
Comments
Apologies for the delay in reply. Also apologies that you are correct that the documentation is out of sync with the state of the code. I will update the README. First, the easiest way to install CCBlade is to If you want to continue building from source, can you let me know how you have installed the meson, ninja, gfortran, and gcc packages? Via conda or other means? |
No worries. I wasn't aware that you could simply use pip to install wisdem, as the documentation suggests using conda instead. For installing meson and ninja i used pip. For downloading gcc and gfortran I used mingw64 to download gcc and gfortran, after which I moved it to my virtual environment root folder. Originally I had tried to add my mingw64 folder to path, but I couldn't seem to get my powershell terminal to recognise gcc or gfortran. I'm not that experienced in using mingw64 or downloading and installing programs in this way. So there is likely a better way to run ccblade without having to move the compilers to that folder. |
I am familiar with the struggle to get all of the PATH and ENVIRONMENT variables sorted out when using virtual environments and mingw64 on Windows. I have had success using Chocolatey as a Windows package manager instead. It sounds like you found some workarounds to use CCBlade, but let me know if that isn't true. Yes, having WISDEM up on PyPi for pip-installs is a recent update and does simplify things. |
I have tried installing WISDEM using pip and when running a script where ccblade is called I keep getting the following error: Exception has occurred: ModuleNotFoundError (note: full exception trace is shown but execution is paused at: ) I've had this before and I can't seem to get past it. I've tried changing "wisdem.ccblade._bem" to the relative path to the script however I still can't seem to get it to work. |
I finally got onto a Windows machine and recreated the error using |
After banging my head against the wall a number of times, I cannot get past this error on a pure pip-workflow in Windows. Everything works when using conda/mamba though and for Windows that might just have to be the recommended course of action. Apologies that I couldn't find the solution you were hoping for. |
Hi Garrett. Thank you for trying. I really appreciate it. Is there a way to compile the libraries elsewhere and then simply move them to the pip module folder or when they are compiled, does is use environmental variables specified during the conda build? I'm really keen to use WISDEM inside my own virtual environment without needing conda, so I'm just wondering if there is another way. |
A compiled library will usually depend on some core system libraries, so it is a little tricky to compile in one environment on a specific platform and hope they will work elsewhere. On PyPI, we were uploaded a dozen or so different python-compiler-platform combinations. The benefit of Anaconda is that they tightly manage and control all of that for you. |
I encountered a similar issue, which I recognized after installation and running the "unit tests" on the installation page (link) and couldn't solve it until a colleague reiterated that the fortran compiler should be installed without problems (from above link):
with this and going forward with the test, the error was solved and the test was run successfully, I hope. :) (test_all.py output)
Hope it is helpful. |
Hi everyone, I'm working with CCBlade and i have similar installation problems on my linux machine. Step to reproduce
And below was the output :
I feel like a part of the code that might be in fortran is being left out. @gbarter, I hope you'll find a solution and stop banging your head against the wall as it must hurt 😜 . |
You are also sure that you have fortran compiler installed on your linux machine (usually gfortran)? Could you try the install in verbose mode: |
Hey, i was in a meeting but here are the logs i obtained : log.txt
Actually, i commented prints lines an it fix the issue |
If you are running off of the old release source code, that might be the issue. Would you be able to grab the current |
I've checked and i was on the master branch :
The changes to docs/example/gradients are used to fix the error from before. |
I think i progressed a bit. here are the command i used :
Then i do :
From this point i'm able to use ccblade as i was before. PS : thanks @gbarter, i did not know about pip install -vv option which is super useful 💟 ! |
Oh, interesting. Yes, that is definitely a shortcoming in the meson script. It probably hasn't been as well tested for virtual environments that are not conda environments. I'm glad you were able to resolve it on your end. Definitely an area for improvement on my side too. |
I'm trying to download CCBlade as a stand alone module. In the description it says that the only prerequisite is gfortran, however I also had to install GCC, meson and ninja too.
I wanted to install CCBlade inside a virtual environment, so I created one and began installation. When doing so it asked me to install meson, which I did. I then installed the GCC compiler and put it inside the virtual environment folder (I had some trouble with installing it and just adding it to the system path) Similarly with GFortran. It then asked me to install ninja, which I did. Following this I received the following error:
above
['C:\Users\user1\virtualenvironments\VENV1\Scripts\meson.EXE', 'setup', 'meson_build', '--prefix=C:\Users\user1\Downloads\CCBlade-master\CCBlade-master\meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.']
below
['C:\Users\user1\virtualenvironments\VENV1\Scripts\meson.EXE', 'compile', '-vC', 'meson_build']
ninja: Entering directory `C:/Users/user1/Downloads/CCBlade-master/CCBlade-master/meson_build'
[1/6] "C:\Users\user1\virtualenvironments\VENV1\Scripts\python.EXE" "-m" "numpy.f2py" "../ccblade/src/bem.f90" "-m" "_bem" "--lower" "--build-dir" "ccblade"
Reading fortran codes...
Reading file '../ccblade/src/bem.f90' (format:free)
Post-processing...
Block: _bem
Block: inductionfactors
In: :_bem:../ccblade/src/bem.f90:inductionfactors
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: relativewind
In: :_bem:../ccblade/src/bem.f90:relativewind
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature
In: :_bem:../ccblade/src/bem.f90:definecurvature
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: windcomponents
In: :_bem:../ccblade/src/bem.f90:windcomponents
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: thrusttorque
In: :_bem:../ccblade/src/bem.f90:thrusttorque
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: inductionfactors_dv
In: :_bem:../ccblade/src/bem.f90:inductionfactors_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: relativewind_dv
In: :_bem:../ccblade/src/bem.f90:relativewind_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: windcomponents_dv
In: :_bem:../ccblade/src/bem.f90:windcomponents_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature_dv
In: :_bem:../ccblade/src/bem.f90:definecurvature_dv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: thrusttorque_bv
In: :_bem:../ccblade/src/bem.f90:thrusttorque_bv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature_bv
In: :_bem:../ccblade/src/bem.f90:definecurvature_bv
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Block: definecurvature_dv2
In: :_bem:../ccblade/src/bem.f90:definecurvature_dv2
get_parameters: got "eval() arg 1 must be a string, bytes or code object" on 8
Applying post-processing hooks...
character_backward_compatibility_hook
Post-processing (stage 2)...
Building modules...
Building module "_bem"...
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "inductionfactors"...
fzero,a,ap = inductionfactors(r,chord,rhub,rtip,phi,cl,cd,b,vx,vy,[usecd,hubloss,tiploss,wakerotation])
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "relativewind"...
alpha,w,re = relativewind(phi,a,ap,vx,vy,pitch,chord,theta,rho,mu)
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "definecurvature"...
x_az,y_az,z_az,cone,s = definecurvature(r,precurve,presweep,precone,[n])
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
Constructing wrapper function "windcomponents"...
vx,vy = windcomponents(r,precurve,presweep,precone,yaw,tilt,azimuth,uinf,omegarpm,hubht,shearexp,[n])
Generating possibly empty wrappers"
Maybe empty "_bem-f2pywrappers.f"
" I'm not familiar with fortran and so I'm not sure how to progress with the install. If you could provide any insight into what I'm doing wrong, This would be greatly appreciated.
The text was updated successfully, but these errors were encountered: