Installation problems

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Installation problems

Postby oliveroxtoby » Tue Apr 24, 2018 7:24 am

emills2 wrote:
Tue Apr 24, 2018 6:23 am

blueCFD doesn't seem to have issues, but i have no idea how to run a test in the console. when i install cfmesh, i see a lot of error messages that look like

Code: Select all

Making dependency list for source file writeMeshFPMA.C
could not open file foamTime.H for source file utilities/dataConversion/foamToFPMA/fpmaMesh.C
These errors are actually normal byproducts of the build process and can be ignored. I think your build worked.
The installation finishes after about 30 minutes (not sure). when i run dependency check, it hangs forever. the console makes it this far:

Code: Select all

Checking CFD workbench dependencies...
Checking FreeCAD version
Checking for OpenFOAM:
Running  echo $WM_PROJECT_VERSION
Raw command:  [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Edward Mills\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo $WM_PROJECT_VERSION']
Setting environment for OpenFOAM 5.x mingw-w64 Double Precision (of5-64), using MSMPI71 - please wait...
Environment is now ready. Notes:
   - You can change between installed versions by running: ofmenu
   - You can change to other predefined versions by running: ofmenuNew
5.x
Traceback (most recent call last):
  File "C:\Users\Edward Mills\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdPreferencePage.py", line 126, in runDependencyChecker
    msg = CfdTools.checkCfdDependencies()
  File "C:\Users\Edward Mills\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdTools.py", line 802, in checkCfdDependencies
    if foam_ver != 'dev' and foam_ver != 'plus' and int(foam_ver.split('.')[0]) < 4:
ValueError: invalid literal for int() with base 10: '- You can change to other predefined versions by running: ofmenuNew'
the above was copied out of the console after closing the preferences screen in the middle of a hung dependency check.
Looks like the last line of output ('5.x') is being missed. For whatever reason I don't get the same issue on my machine. However I've made a couple of changes to try to make it robust. Could you update your workbench with Addon manager, restart FreeCAD and see if it has made any difference?

Many thanks for a helpful bug report with all the output! :-)
emills2
Posts: 563
Joined: Tue Apr 28, 2015 11:23 pm

Re: Installation problems

Postby emills2 » Wed Apr 25, 2018 9:21 am

woot!

Code: Select all

Checking CFD workbench dependencies...
Checking FreeCAD version
Checking for OpenFOAM:
Running  echo $WM_PROJECT_VERSION
Raw command:  [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Edward Mills\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo $WM_PROJECT_VERSION']
Setting environment for OpenFOAM 5.x mingw-w64 Double Precision (of5-64), using MSMPI71 - please wait...
Environment is now ready. Notes:
   - You can change between installed versions by running: ofmenu
   - You can change to other predefined versions by running: ofmenuNew
5.x
Running  cartesianMesh -help
Raw command:  [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Edward Mills\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'cartesianMesh -help']
Setting environment for OpenFOAM 5.x mingw-w64 Double Precision (of5-64), using MSMPI71 - please wait...
Environment is now ready. Notes:
   - You can change between installed versions by running: ofmenu
   - You can change to other predefined versions by running: ofmenuNew

Usage: cartesianMesh [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -fileHandler <handler>
                    override the fileHandler
  -listFunctionObjects
                    List functionObjects
  -listRegisteredSwitches
                    List switches registered for run-time modification
  -listSwitches     List switches declared in libraries but not set in
                    etc/controlDict
  -listUnsetSwitches
                    List switches declared in libraries but not set in
                    etc/controlDict
  -noFunctionObjects
                    do not execute functionObjects
  -parallel         run in parallel
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Using: OpenFOAM-5.x (see www.OpenFOAM.org)
Build: 5.x-963176928289

Checking for gmsh:
Completed CFD dependency check
i probably won't get a chance to try to run any cases until the weekend, but this is very exciting. Thank you for making these tools more accessible!
tmolteno
Posts: 5
Joined: Fri Apr 27, 2018 11:40 am

Re: Installation problems

Postby tmolteno » Fri Apr 27, 2018 12:24 pm

Hi There,

I am attempting to install the CfdOF on Debian linux, and have run into the issue where the OpenFOAM installation is integrated right into the system, and so all openfoam executables are in /usr/bin. The directory /usr/share/openfoam does have the correct file (/etc/bashrc), but I get a message

>> Checking dependencies...
>> OpenFOAM installation found, but unable to run command:

Sadly openfoam 5 appears to be moving to using docker for linux installation. (see https://openfoam.org/download/5-0-linux/).

Has anyone managed to get this workbench going on Debian/Mint or similar? I will try
a manual compile and see if this helps. In the meantime, any advice would be appreciated.

Kind Regards,

Tim
emills2
Posts: 563
Joined: Tue Apr 28, 2015 11:23 pm

Re: Installation problems

Postby emills2 » Sat Apr 28, 2018 6:12 pm

tmolteno wrote:
Fri Apr 27, 2018 12:24 pm
Has anyone managed to get this workbench going on Debian/Mint or similar? I will try
a manual compile and see if this helps. In the meantime, any advice would be appreciated.
i can't help out with those issues, but having struggled a bit to get it going, i just want to say: keep trying, it's worth it!
Tutorial 1 Elbow viscosity animation 01.gif
Tutorial 1 Elbow viscosity animation 01.gif (276.06 KiB) Viewed 451 times
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Installation problems

Postby oliveroxtoby » Mon Apr 30, 2018 2:48 pm

tmolteno wrote:
Fri Apr 27, 2018 12:24 pm
Hi There,

I am attempting to install the CfdOF on Debian linux, and have run into the issue where the OpenFOAM installation is integrated right into the system, and so all openfoam executables are in /usr/bin. The directory /usr/share/openfoam does have the correct file (/etc/bashrc)
It should be pretty easy to adapt the workbench to this situation. Can I ask you to help me with some diagnostic info?

First questions:
1. If you open a terminal and type

Code: Select all

echo $WM_PROJECT_DIR
what output to you get?
2. If nothing, do you get any error messages if you type

Code: Select all

source /usr/share/openfoam/etc/bashrc
- and following that, if you repeat step 1, what do you get?

Thanks for helping!
Oliver
tony271
Posts: 6
Joined: Fri Jun 22, 2018 6:32 am

Re: Installation problems

Postby tony271 » Fri Jun 22, 2018 6:51 am

Hi guys,
I have installed FreeCAD 0.17 on Windows 10 Pro 64 bit succesfully.
CFD succesfully installed.
Dependencies installed from the CFD Preferences panel.
BlueCFD-Core package (version 2017-2) succesfully installed.
cfMesh succesfully downloaded https://sourceforge.net/projects/cfmesh ... p/download
but failed on extraxting

Downloading cfMesh, please wait...
Extracting cfMesh...
Command '{ mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }' returned non-zero exit status 1
Download unsuccessful

Any idea how to solve it?
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Installation problems

Postby oliveroxtoby » Fri Jun 22, 2018 9:14 am

tony271 wrote:
Fri Jun 22, 2018 6:51 am
Hi guys,
I have installed FreeCAD 0.17 on Windows 10 Pro 64 bit succesfully.
CFD succesfully installed.
Dependencies installed from the CFD Preferences panel.
BlueCFD-Core package (version 2017-2) succesfully installed.
cfMesh succesfully downloaded https://sourceforge.net/projects/cfmesh ... p/download
but failed on extraxting

Downloading cfMesh, please wait...
Extracting cfMesh...
Command '{ mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }' returned non-zero exit status 1
Download unsuccessful

Any idea how to solve it?
Hi Tony

Please could you report any output that appears on the Report panel - see the following post for guidelines:
https://forum.freecadweb.org/viewtopic.php?f=37&t=27055

If you're not doing so already, it may be worth downloading the file manually, using the "Choose existing file" function and installing from there. Python 2 seems to have some issues with downloading files through https on some unusual network configurations.
tony271
Posts: 6
Joined: Fri Jun 22, 2018 6:32 am

Re: Installation problems

Postby tony271 » Fri Jun 22, 2018 10:27 am

oliveroxtoby wrote:
Fri Jun 22, 2018 9:14 am
it may be worth downloading the file manually, using the "Choose existing file" function and installing from there
I got the same error.

Preferences/CFD/Output
Downloading cfMesh, please wait...
Extracting cfMesh...
Command '{ mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }' returned non-zero exit status 1
Download unsuccessful

Repor View
Run Gui init script
Init: Running FreeCADGuiInit.py start script...
Init: Searching modules...
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Sketcher... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\ReverseEngineering... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Show(InitGui.py not found)... ignore
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Image... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Surface... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\PartDesign... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Measure(InitGui.py not found)... ignore
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Ship... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Plot... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\MeshPart... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\OpenSCAD... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Fem... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Spreadsheet... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Start... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Points... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Draft... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Test... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Import... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\TechDraw... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Tux... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Complete... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Web... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Material... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Raytracing... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Mesh... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Path... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Part... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Arch... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Robot... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\AddonManager... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Idf(InitGui.py not found)... ignore
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Inspection... done
Init: Initializing C:\Program Files\FreeCAD 0.17\Mod\Drawing... done
Module: Part
Loading Part module... done
Loading Fem module... done
Loading GUI of Fem module... done
Init: Initializing C:\Users\Tony\AppData\Roaming\FreeCAD\Mod\CfdOF... done
Init: Loading FreeCAD GUI
Init: Running FreeCADGuiInit.py start script... done
Init: Activating default workbench StartWorkbench
Loading GUI of Web module... done
Loading GUI of Start module... done
Loading Start module... done
not a freecad file: .STP
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Init: Showing main window
Main window restored
Show main window
Toolbars restored
3Dconnexion device not attached.
Init: Entering event loop
Init: Processing command line files
Group icon for preferences-cfd is not of size 96x96
Running echo $WM_PROJECT_USER_DIR
Raw command: [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Tony\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo $WM_PROJECT_USER_DIR']
Setting environment for OpenFOAM 5.x mingw-w64 Double Precision (of5-64), using MSMPI71 - please wait...
Environment is now ready. Notes:
- You can change between installed versions by running: ofmenu
- You can change to other predefined versions by running: ofmenuNew
/home/ofuser/blueCFD/ofuser-of5
Running { mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }
Raw command: [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Tony\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', '{ mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }']
Setting environment for , using MSMPI71 - please wait...
Environment is now ready. Notes:
- You can change between installed versions by running: ofmenu
- You can change to other predefined versions by running: ofmenuNew
WARNING: No environment was activated.
You can start any of the installed environments by running: ofmenu
You can start any of the other predefined environments by running: ofmenuNew
mkdir: impossibile creare la directory "": No such file or directory
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdPreferencePage.py", line 236, in run
self.downloadCfMesh()
File "C:\Users\Tony\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdPreferencePage.py", line 273, in downloadCfMesh
format(CfdTools.translatePath(filename)))
File "C:\Users\Tony\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdTools.py", line 656, in runFoamCommand
raise subprocess.CalledProcessError(exit_code, cmdline)
subprocess.CalledProcessError: Command '{ mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }' returned non-zero exit status 1
User avatar
oliveroxtoby
Posts: 232
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Installation problems

Postby oliveroxtoby » Fri Jun 22, 2018 11:27 am

Thank you for the info. This seems to be the same problem that was encountered by @MrRossi earlier in this thread, who reported that it mysteriously disappeared after he rebooted in safe mode(!):
MrRossi wrote:
Wed Apr 04, 2018 6:42 pm
Hallo Oliver

Thank you so much.
I have further information, installation worked as I booted the computer
In Safe Mode. Installation finished without an error, although I have seen red lines
In the report window during installation.
I haven't yet tried if it's really working.

I also will try your hints. Keep you posted.

Regards
Christian
Christian - I don't know if ever found out any more about his problem?

Your output shows the same behaviour:
tony271 wrote:
Fri Jun 22, 2018 10:27 am
Preferences/CFD/Output
Downloading cfMesh, please wait...
Extracting cfMesh...
Command '{ mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }' returned non-zero exit status 1
Download unsuccessful

Repor View
Running echo $WM_PROJECT_USER_DIR
Raw command: [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Tony\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo $WM_PROJECT_USER_DIR']
Setting environment for OpenFOAM 5.x mingw-w64 Double Precision (of5-64), using MSMPI71 - please wait...
Environment is now ready. Notes:
- You can change between installed versions by running: ofmenu
- You can change to other predefined versions by running: ofmenuNew
/home/ofuser/blueCFD/ofuser-of5
Running { mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }
Raw command: [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Tony\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', '{ mkdir -p "$WM_PROJECT_USER_DIR" && cd "$WM_PROJECT_USER_DIR" && unzip -o "/c/Users/Tony/Downloads/FreeCAD/cfmesh-cfdof.zip"; }']
Setting environment for , using MSMPI71 - please wait...
Environment is now ready. Notes:
- You can change between installed versions by running: ofmenu
- You can change to other predefined versions by running: ofmenuNew
WARNING: No environment was activated.
This is really strange. The fact that safe mode helped for @MrRossi makes me wonder if it is a permissions issue of some sort. Could you try running FreeCAD as Administrator (right click the icon and choose Run as Adminstrator...) and see if this makes any difference? If you could have a look at the discussion referred to earlier thread and try the suggestions there, any feedback would be great so that we can try to get to the bottom of this one.
tony271
Posts: 6
Joined: Fri Jun 22, 2018 6:32 am

Re: Installation problems

Postby tony271 » Fri Jun 22, 2018 1:38 pm

oliveroxtoby wrote:
Fri Jun 22, 2018 11:27 am
This is really strange. The fact that safe mode helped for @MrRossi makes me wonder if it is a permissions issue of some sort. Could you try running FreeCAD as Administrator (right click the icon and choose Run as Adminstrator...) and see if this makes any difference? If you could have a look at the discussion referred to earlier thread and try the suggestions there, any feedback would be great so that we can try to get to the bottom of this one.
1. Tried to run FreeCAD as Administrator, but got same error again.

2. Restarted Windows 10 in safe mode.
Started FreeCAD.
cfmesh succesfully installed.

I am administrator and have User Account Control disabled.
However my PC is a client in a local domain. Could be a problem related with local domain .... :?: