|
[Sponsors] |
January 19, 2021, 09:02 |
Error compiling in Ubuntu for Windows
|
#1 |
New Member
Tobias
Join Date: Oct 2020
Posts: 4
Rep Power: 5 |
Hi,
I have recently switched from using OpenFoam on my native linux laptop to running on a Windows PC. I have installed OF through Ubuntu for Windows, but upon trying to compile my own fvOptions source (a modified actuation disk source) I get an error: Code:
In file included from /home/pmxtl3/OpenFOAM/ThirdParty-v1812/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/x86_64-pc-linux-gnu/bits/c++config.h:507:0, from /home/pmxtl3/OpenFOAM/ThirdParty-v1812/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/cstdint:38, from /home/pmxtl3/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/int16.H:38, from /home/pmxtl3/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/int.H:38, from /home/pmxtl3/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/label.H:39, from /home/pmxtl3/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/fieldTypes.H:32, from /home/pmxtl3/OpenFOAM/OpenFOAM-v1812/src/finiteVolume/lnInclude/fvMatricesFwd.H:32, from /home/pmxtl3/OpenFOAM/OpenFOAM-v1812/src/finiteVolume/lnInclude/fvOption.H:47, from cellSetOption/cellSetOption.H:54, from cellSetOption/cellSetOption.C:26: /home/pmxtl3/OpenFOAM/ThirdParty-v1812/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/x86_64-pc-linux-gnu/bits/os_defines.h:39:22: fatal error: features.h: No such file or directory #include <features.h> ^ Thanks! |
|
January 19, 2021, 09:50 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
I had this a while back ... have you installed the build-essential package:
Code:
sudo apt-get install build-essential |
|
January 19, 2021, 14:56 |
|
#3 |
New Member
Tobias
Join Date: Oct 2020
Posts: 4
Rep Power: 5 |
||
January 19, 2021, 15:20 |
Could not find mandatory etc entry (mode=ugo) 'controlDict'
|
#4 |
New Member
Join Date: Dec 2020
Posts: 26
Rep Power: 5 |
hello
I have just installed OFv2012 on ubuntu 20.04 LTS WSL2. I went through the install process (https://www.openfoam.com/download/in...ry-windows.php) but it fails at the final validation Here is the error message: # ~/OpenFOAM/OpenFOAM-v2012/tutorials/incompressible/icoFoam/cavity$ blockMesh --> FOAM FATAL ERROR : Could not find mandatory etc entry (mode=ugo) 'controlDict' # would it be anyone who knows what could be wrong ? thank you |
|
January 19, 2021, 16:07 |
|
#5 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
Yes - this is an easy one to answer - the error message says "I can't find controlDict". This lives in folder system ... which doesn't exist at the location you are trying to run blockMesh from. For that tutorial, there are 3 subfolders inside $FOAM_TUTORIALS/incompressible/icoFoam/cavity ... you need to cd into one of them before running blockMesh. Either that, or run the Allrun script from the location that you are at the moment, and it will run the cases for you.
|
|
January 20, 2021, 00:42 |
Could not find mandatory etc entry (mode=ugo)
|
#6 |
New Member
Join Date: Dec 2020
Posts: 26
Rep Power: 5 |
thanks Tobermory,
unfortunately it's still not OK. here is the final check of the installation from the tutorial: # mkdir -p /mnt/c/Users/<USER>/tutorial cd /mnt/c/Users/<USER>/tutorial cp -ar $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity . cd cavity blockMesh icoFoam touch cavity.foam # but the cp command fails: # cp: cannot stat '/incompressible/icoFoam/cavity/cavity': No such file or directory # and therefore the blockMesh command fails as well: # --> FOAM FATAL ERROR : Could not find mandatory etc entry (mode=ugo) 'controlDict' # Very strange as I had not such issue with previous OFv2006 Then if I copy all the cavity tutorails and execute ./Allrun then I get the following error: # -bash: ./Allrun: Permission denied # Moreover I have also made a test installing all OFv2012 under <USER> and the problem remains. I cannot see what's wrong. do you have any idea ? thanks |
|
January 20, 2021, 06:18 |
|
#7 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
Apologies - I was too hasty in my earlier reply. It looks like you may have some file permission errors for the folder you are trying to write into - check the permissions (with ls -l, for example), and update with chmod (you may need to talk with your system supervisor if you don't have the access permissions to change things).
|
|
January 20, 2021, 15:34 |
Could not find mandatory etc entry (mode=ugo)
|
#8 |
New Member
Join Date: Dec 2020
Posts: 26
Rep Power: 5 |
thanks, however the issues remains.
I took a case I was running fine with OFv2006 and copy it similarly in the working directory but I am not anymore able to run it.. Here the return of the simpleFoam command: # $ simpleFoam --> FOAM FATAL ERROR : Could not find mandatory etc entry (mode=ugo) 'controlDict' # that's very disturbing. Has anyone get any suggestion how I can solve this ? Many thanks |
|
January 21, 2021, 06:14 |
|
#9 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10 |
Hi
Go inside the /opt/OpenFOAM/OpenFOAM-v2012 and then source etc/bashrc i.e cd /opt/OpenFOAM/OpenFOAM-v2012 source etc/bashrc run command echo $FOAM_TUTORIALS and post the output here |
|
January 21, 2021, 10:04 |
scripts/pyFoamPlotRunner.py' not found in metadata
|
#10 |
New Member
Join Date: Dec 2020
Posts: 26
Rep Power: 5 |
Hi,
many thanks for helping here the command return: /opt/OpenFOAM/OpenFOAM-v2012/tutorials meanwhile I have discoverED that I cannot make running a case built in v2006 and pasted in the v2012 working directory (whatever it is) but I can run it if I copy its component folders (0/constant/system) in a native v2012 duplicated tutorial case . I should be very happy with that but now pyFoam don't want to work and I get this error with the command 'pyFoamPlotRunner.py simpleFoam': pkg_resources.ResolutionError: Script 'scripts/pyFoamPlotRunner.py' not found in metadata at '/home/<USER>/.local/lib/python3.8/site-packages/PyFoam-2020.5.dist-info' do you have any idea what the problem could be ? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ubuntu instabilities and hardware settings | Andrew2 | Hardware | 5 | May 6, 2020 23:19 |
[OpenFOAM.org] Can't find installation instruction for Openfoam 2.4.x , on Ubuntu 16.04 | titanium | OpenFOAM Installation | 14 | February 20, 2020 11:46 |
openfoam-2.3.0 on ubuntu natty 11.04 | mickjazz | OpenFOAM Installation | 1 | August 5, 2014 13:01 |
Ansys 13 - License problem on Ubuntu | MarTar | ANSYS | 4 | February 3, 2012 02:13 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 14:25 |