-
Notifications
You must be signed in to change notification settings - Fork 72
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
What help do you need in adopting blueCFD-Core on Windows? #375
Comments
Hi @wyldckat and thank you for posting here.
We only need to re-write runmaneger or write a new module to run the studies using blueCFD.
If blueCFD can handle standard OpenFOAM cases then I don't think there is anything missing. I remember I checked blueCFD once a couple of years ago and it was only supporting a single core on the freely available version. Is that still the case?
See the answer to 2. I don't know about the features that are only available in ESI-OpenCFD but to my knowledge we don't rely on any bleeding edge feature. Butterfly at this point generates a standard folder structure and we have a number of built-in workflows for outdoor airflow, etc. Nothing fancy but anyone can take the folder and run the commands from command line. |
Oh, OK, blueCFD-SingleCore was the project where we only provided single-core support, but as of August 2016 that we provide blueCFD-Core for free to the general public, i.e. with multi-core support. At the moment the most recent version we provide is OpenFOAM 5.x with blueCFD-Core 2017-2, which should be similar in core features to ESI-OpenCFD's OpenFOAM v1712, namely that v1712 should have integrated the majority of the features from 5.x. I expect that people that are relying on Butterfly aren't going to want to run the commands manually themselves, hence this report/feature request... I've looked at the |
@wyldckat, nice! I gave it a quick try and the installation process was easy. This can be very helpful as we don't have to deal with installation issues anymore and I can focus on Butterfly development. What is the recommended solution to run the commands from command line? Can I pass the case folder to DOS_Mode.bat or setvars.bat? I can see your note that setvars.bat is intended to be used by GUIs. I could open a new CMD with DOS_Mode.bat and go to case folder and run blockMesh. I also tried
I have to take a closer look. It has been a while. I assume that I need to add a config in runmanager to pass the preferred runner/executor. Getting it to run seems to be easy. I have to check and see how did I implemented logging and how to re-implement that in Windows. Since everything will be running in Windows redirecting stdout and stderr should just work fine. 🤞 |
@mostaphaRoudsari I know I wrote the instructions somewhere... OK, found it: blueCFD/Core#94 - it's the report where I have the base instructions that I still have to write on an actual FAQ page... And given that you are already using a batch file as a basis for running the commands, it should be straight forward to integrate this into your workflow. |
PS: I think the answer is yes but does blueCFD supports older versions of Windows (e.g. Windows XP, Windows 7, ...)? |
I haven't tested in Windows XP, but it works on Windows 7 and possibly in Vista as well.
|
Beautiful! Works like a charm! 🎉 Since mysys is already packaging bash commands we should most likely be able to just run the same commands as we currently do for running the commands inside docker which is +💯! Thanks for the quick reply. |
This should do it: 9ea4b3c I added a separate runmanager for blueCFD. By default Butterfly will switch to blueCFD if installed. I tested a number of sample files and everything works as expected but I keep this issue open until I can do more testing or several users confirm that it works fine on their machine. Thanks again @wyldckat! If it works out fine we can have an official release with support for blueCFD. |
Thank you mostaphaRoudsari and wyldckat both for working on this! I will look, and report back, soon. Thanks again, |
@mostaphaRoudsari @wyldckat ps: Windows 10. |
I am likely too new at only 30-hours of Grasshopper tutorials ( lots of Rhino ) and minimal but some exposure to OpenFoam, but, it's not working for me. On either of two fully patched Windows 10 Systems, with Updated Rhino, I tried:
I am seeing red for the components, with (closely):
The problem exists with or without first starting blueCFD-Core 2017. I would be quick to discount my test, but I tried. |
Hi @BrendaEM, Thank you for testing. Based on the error report there is an inconsistency between the version of butterfly Python library installed on your machine and the UserObjects/Components in Grasshopper. Can you try running this file right after opening Rhino and Grasshopper? 06_update_installer.zip PS: You will also need updated sample files which you can download from here: https://github.com/ladybug-tools/butterfly-plus/tree/master/plugin/grasshopper/examplefiles |
Before we go further, and this might be a plot-point. I had:
Though the example test file you wanted to update are reworked for Butterfly Plus. At this point, I had not updated, Butterfly to Butterfly-Plus for fear of changing horses midstream. Also, your installer appears to download them. The thing that's confusing: Butterfly master, would seem to be the whole thing, though it appears not to be the case. This is what I get thrown from Grasshopper if I try to load one of the Butterfly-Plus examples: The clean(er) installer Grasshopper Panel readout text reads:
Also noteworthy is, as loaded the new Grasshopper installer loads with the switch on. I tried to cycle off and then return it to on. I could have forgotten to uninstall with the binary switch before updating. I tried uninstalling and cleaning out everything, and merging and reinstalling, but I get the same IO error. Thank you for the reply, and working on Butterfly and BlueCFD. |
Yes. The installer works like
It is not. Butterfly is the core library and there is a small [+] library which stands between Grasshopper and the core library: https://github.com/ladybug-tools/butterfly-plus/tree/master/butterfly_grasshopper
Can you send a screenshot of the error? I guess this is the error because you are opening the files in an older version of Grasshopper than the one that I use and the error can most likely be ignored. |
AFAIK, I must have the current version of Grasshopper, because it is part of Rhino version 6.x . https://www.dropbox.com/s/0y3y2qbxos3jhmj/Grasshopper-Example%20Load%20Error.jpg?dl=0 |
Hi @BrendaEM, Let's try this. Can you open this file after unzipping it? |
Hi MostaphaRoudsari, It now loads but fails, apparently as the others, with red components.
Perhaps I keep making the same stupid installation mistake. Or could it be a Windows 10 thing? I appreciate all the effort and help. I just feel bad--especially that I am the problem user. I considered asking on the Rhino forum for testers, but I thought that I give you the respect of letting you determine the scope of your testers. |
I tested the updated outdoor case! It is working perfectly fine! thanks @mostaphaRoudsari and @wyldckat for finding a workround to avoid a huge headache over docker/virsualbox. I'll probably test other cases and report back. Cheers. |
Amazing work @mostaphaRoudsari and @wyldckat. Bruno I want to thank you for your support in this, it is really game changing for Butterfly's development going forward. Kind regards, |
Hi @BrendaEM, You are doing everything right on your side. If someone is to blame that would be me and the installer which should get everything fixed in one go. It's probably one old component in the definition that should be replaced. Does everything else work fine? Can you create the case? Can you share a screen capture from the error? |
@mostaphaRoudsari I tested updated outdoor case and it is working. |
@andydogbo @SinaHassanli |
Please, if you are testing, please mention your Rhino and Windows version with the test results. Thank you
Some of the Butterfly-unique components are working fine. From the Exterior test, the non-working components are: Ironically, the outdoor test scenario using thing Windtunnel is what I am interested in. Although it may be an off-lable use, I was hoping to put CFD in the design loop for designing a car body for 3-wheeled car. [... Though the Wind-tunnel component might not have a moving ground-plane parameter nor rotating walls, because buildings are stationary by tradition : ) Perhaps I can add that to the case, or perhaps figure out what you are doing by then.] |
@DambronOlivier, I saw that error but it looked like it is an issue with SnappyHexMesh and parallel processing and it is right after it talks about the use of parallel processing with meshing is experimental and use it at your risk. Did you try to run it against OpenFOAM on linux and see if it works fine there? @BrendaEM, Feel free to send me an email to set up a quick call and I can help you with the installation. It will be easier to debug it via screen share and then report back to everyone. It's really hard to say what is going on from this screen capture. |
@wyldckat |
I have the same issue , using MS-MPI 7.1. And multicore SHM crash direct with MS-MPI 8 |
@andydogbo In your logs, there is no clear reason as to why it failed to work as intended. @DambronOlivier I'll leave this one for you to diagnose this issue in Butterfly. @tlpwka Using any other version of MS-MPI than the one provided with blueCFD-Core 2017, will not work as intended. Please follow the instructions give in this FAQ entry: Solution 1 - Simply copy the DLL file - this will enforce the correct MS-MPI 7.1 library version to be picked up by blueCFD-Core 2017-2, instead of MS-MPI 8. |
@wyldckat |
Hi @chriswmackey, @wyldckat and @mostaphaRoudsari, and All, BTW, I tried @chriswmackey's updated archive. The installer outputs that it installs correctly, the Butterfly command bar shows in grasshopper, but any component placed on the editing areas shows red, as does the examples. Windows 10, fresh install and updated, no spaces in user name, [BTW, I am sorry that I have been away from the keyboard. I'm in the process of...moving.] |
@wyldckat Thank you. I just tested MS-MPI 8 as blueCFD installer ask which version i want to use. Still, with MS-MPI 7.1 I have the same issue as @andydogbo . P.S.: During calculations |
@wyldckat @tstargazer @tlpwka @andydogbo @chriswmackey The error comes from the fact that BlueCFD accepts a max MergeTolerance of 1e-7 and reconstructParMesh uses by default 1e-7. I've tested manually to run: In the code we should add it here butterfly/butterfly/runmanager_bluecfd.py Line 162 in 9ea4b3c
|
@tlpwka My apologies, I completely forgot that blueCFD-Core 2017 does provide support for MS-MPI 8, namely the version that is provided with its installer. Nonetheless, There is something that I'm finding very strange in all of this, because it should not be necessary to use blueCFD-Core in administrator mode. At most, the terminal may be opened - only once - after installation as administrator, to set-up a few final details, but even that should not be necessary. Please run the following commands within blueCFD-Core's terminal:
It will show on screen what it ran, as well as send the output into the file named If it's similar, then |
The other possibility is to increase the |
@wyldckat Just tried it and it works. in system/controlDict |
@DambronOlivier and @wyldckat , Thanks for doing the support here and glad that it is running on your machines. @tstargazer , your installation process looks correct except I don't see a step where you run the terminal as @DambronOlivier points out. Can you confirm that you ran that step correctly as described in the wiki documentation. @andydogbo , I had also noticed some issues with certain multi-threading processes, though I was able to get most of them to work after completely deleting the case folder and starting over. If deleting and starting over does not work, it would be useful to see the log files as @wyldckat notes. |
Thanks @DambronOlivier and every one. |
Hi, @DambronOlivier and @chriswmackey --> FOAM FATAL IO ERROR: file: Sout at line 16.
FOAM exiting Traceback: P.S.: “¾ä±úÎÞЧ¡£” means invalid handle. My machine: Windows 7 Ultimate as admin; Rhino 6 sr11; blueCFD-Core-2017-2-win64 |
In your next pass would it be possible to update the default value of writePrecision to 8: butterfly/butterfly/controlDict.py Line 25 in 848b836
Thanks in advance, |
@DambronOlivier, Done! It's updated to 8: 8d57b75 |
Hi, Is there an up-to-date complete Butterfly for download? Thank you, and thank you all for working to make this happen. BTW, if you do not like the old Docker OpenFoam Solution, this might be a nice place to type a few words, as the powers that be at OpenFoam might still think that Docker was a great solution. |
Hi @mostaphaRoudsari |
Hi @BrendaEM, see Chris's comment: #375 (comment) Hi @alicialeeinchina, we haven't updated the Dynamo nodes yet. Will do before the public release. |
Hi mostaphaRoudsari, Although the installer/uninstaller appears to run with one issue, it appears successful...
....I still get errors on one computer, and completely red on another.
I suspect that I have Docker droppings all over this machine, and it's begging for a clean install, perhaps that's the problem. |
Hi @BrendaEM, Did you restart both Rhino and Grasshopper after the installation? Rhino caches the imported libraries in memory and unless you restart both Rhino and Grasshopper it will use the older one which is already loaded to library. Once you restart Rhino can you bring down a GHPython component and test the code below. This should tell you if Butterfly has successfully found the blueCFD installation: import butterfly
print(butterfly.config['runner']) |
mostaphaRoudsari, Thank you for the suggestions. Yes, I have rebooted the machine I just searched my whole drive looking for stray folders, which there was at least one. I will try my other machine when I return home. |
Hey! It's do'in stuff!!! : ) It's currently running the solution. I will let it continue onward. I have abandoned the scientific method, because I felt like I was the only person in the free world--not having this working even a little bit. So, I decided to employ an all-inclusive sledgehammer diagnostic approach, where, in an act of desperation, you try several things at one go. The problem with making more than one change is the root cause may include from any of the following:
Unlikely causes are:
Thank you for your patience and help. |
Hi mostaphaRoudsari, I install the new Butterfly and blueCFD successfully but I found an issue is that if I connect the decompose_par_dict, it will be ended before starting time loop . Hope u can understand what I mean. Cheers Best regards James |
By the way, I use win10. |
Thanks for reply. May I ask when will you update the Dynamo codes? Really expecting that cause I met so many problem when using Openfoam. |
@BrendaEM see my reply here: https://discourse.ladybug.tools/t/butterfly-installation-problem/5323/3?u=mostapha @jh620026, please re-post this question on the forum. @alicialeeinchina, We will do the update for Dynamo after we ensure we have all the major issues fixed with the new updates in Grasshopper. |
I'm going to lock this issue. For upcoming questions and issue please refer to discourse. Thanks. |
Given that this issue is somewhat identifiable as a "feature request", I'm posting it here instead of on the forum.
As pointed out in Issue #271, Docker is less than ideal on Windows and WSL also has its hang ups. And I've been pointed towards Butterfly not yet supporting blueCFD-Core, namely a project that provides native ports of OpenFOAM for/on Windows directly, without relying on virtualization'ish techniques... and given that I'm the one responsible for said project, I'm here to ask the following questions:
What help do you need in adopting blueCFD-Core on Windows?
What is missing in blueCFD-Core in order for Butterfly to support it on Windows?
Do you strictly rely on features that are only available in the releases of OpenFOAM from ESI-OpenCFD at openfoam.com? Or would they also work on OpenFOAM from the OpenFOAM Foundation?
The text was updated successfully, but these errors were encountered: