|
[Sponsors] |
[OpenFOAM.com] FOAM FATAL ERROR when starting after clean install |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 18, 2024, 14:04 |
FOAM FATAL ERROR when starting after clean install
|
#1 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
Hi,
I am new to openFOAM and intermediate (still learning) in Ubuntu. I just installed openFOAM on Ubuntu 22.04LTS. Because of compatibility issues with RheoTool that I also installed, I chose to install version 9 of openFOAM as advised by other users. So I installed openFoam9 and then rheoTool. How I did: In the Terminal window: HTML Code:
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get -y install openfoam9 sudo apt-get upgrade gedit ~/.bashrc HTML Code:
source /opt/openfoam9/etc/bashrc HTML Code:
simpleFoam -help And finally: HTML Code:
./downloadEigen ./installPetsc ./Allwmake Then unzip into Documents/rheoTool. Removed useless folders fe40 and of70, to keep only of90 and doc folders, along with files: ChangeLog, LICENSE, and README.md Then in the Terminal: HTML Code:
cd of90 ./downloadEigen Then install Petsc library: [HTML]source .bashrc ./installPetsc[\HTML] Then compile rheoTool: [HTML]cd src ./Allwmake[\HTML] Now, when I run in the Terminal: [HTML]simpleFoam[\HTML] I have the following error: [HTML]~$ simpleFoam /*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 9 \\/ M anipulation | \*---------------------------------------------------------------------------*/ Build : 9-c96968adf6d8 Exec : simpleFoam Date : Apr 18 2024 Time : 18:56:01 Host : "ramsden" PID : 10833 I/O : uncollated Case : /home/adrien nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM FATAL ERROR: cannot find file "/home/adrien/system/controlDict" From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::rea dStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 539. FOAM exiting[\HTML] I had a similar issue with a not recognised space character in MATLABADDONS which I by-passed by renaming "MATLAB Add-ons" as "MATLAB_Add-ons" but now I am stuck with this new error. Thank you very much for your help. Cheers! |
|
April 19, 2024, 04:14 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
Is this an actual OpenFOAM case? => "/home/adrien" Looks like you are running simpleFoam from your home directory rather than from a case directory, so simpleFoam complains it cannot find a system/controlDict file. Code:
--> FOAM FATAL ERROR: cannot find file "/home/adrien/system/controlDict" |
|
April 19, 2024, 04:35 |
|
#3 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
Thank you for your answer.
Indeed I saw that too, but I don't know what I did wrong Would you happen to know how I can change this? I am fairly new to Linux… Thank you for your help and advice. PS: also, would you know how I can make the openFoam and rheoTool installs so that all users on the computer can use the code? |
|
April 19, 2024, 04:59 |
|
#4 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
You need to create an OpenFOAM directory either from scratch or using a tutorial case.
For instance copying a simpleFoam tutorial into your home directory: Code:
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/motorBike/ /home/adrien Code:
cd /home/adrien/motorbike Quote:
Any user can open a terminal and type: Code:
source /opt/openfoam9/etc/bashrc Or as your did, edit their .bashrc file using gedit ~/.bashrc to add the previous line in it. (side note: ~/ is a shortcut pointing to your home directory, it's equivalent to /home/adrien) The .bashrc file is used to load stuff each time you start a new session, so adding the source /opt/openfoam9/etc/bashrc line in it allows to automatically load the OpenFOAM environment instead of typing the command each time you open a new terminal. Please note you can install as many OpenFOAM versions as you wish on your system and you just have to use the proper source [...] command to load the version you want to use. |
||
April 19, 2024, 06:25 |
|
#5 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
Thank you so much for your reply and the detailed explanations.
I actually have a rheoTool folder in my home/Documents folder, and I cp -r the tutorials folder to make a Backup and then be free to edit the examples provided with the installation. So I managed to ./Allrun once in the following folder: [HTML]~/Documents/rheoTool/of90/tutorials/rheoFoam/Channel/Oldroyd-BLog[\HTML] and it seems to run with no issue. I was however surprised not to be able to launch openFoam in the Terminal while I think I remember it used to work right after I installed it. Is it normal? |
|
April 19, 2024, 06:31 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
||
April 19, 2024, 07:43 |
|
#7 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
I meant by launching
[HTML]simpleFoam[\HTML] but in fact if I write [HTML]simpleFoam -help[\HTML] in the Terminal, it seems to work. Also, ./Allrun seems to properly launch the computation. Thank you so much for your help! Have a great day. |
|
April 24, 2024, 11:55 |
|
#8 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
Hi,
I just came back to the install of openFOAM and it seems that I still have an issue on this computer. Here is the message I get in the Terminal (Ubuntu 22.04LTS): HTML Code:
~$ rheoFoam
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 9-c96968adf6d8
Exec : rheoFoam
Date : Apr 24 2024
Time : 16:46:06
Host : "ramsden"
PID : 1719993
I/O : uncollated
Case : /home/adrien
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
--> FOAM FATAL ERROR:
cannot find file "/home/adrien/system/controlDict"
From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 539.
FOAM exiting
HTML Code:
./Allrun: 93: rheoFoam: not found |
|
April 24, 2024, 12:15 |
|
#9 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
Same as your previous error: Code:
Case : /home/adrien" For the other user, what is the output when he opens a new terminal and run the following commands: Code:
source /opt/openfoam9/etc/bashrc rheoFoam -help |
|
April 24, 2024, 12:29 |
|
#10 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
Hi,
thank you for your quick response. I understand about my mistake regarding the fact that I was not in the case directory, thank you for the reminder, I need to get used to this. Regarding the computation for the other user, here is the Terminal commands and prompt I just got: HTML Code:
~$ source /opt/openfoam9/etc/bashrc ~$ rheoFoam -help rheoFoam: command not found |
|
April 24, 2024, 12:49 |
|
#11 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Alright, and what about this, in a new terminal again:
Code:
source /opt/openfoam9/etc/bashrc simpleFoam -help |
|
April 24, 2024, 12:57 |
|
#12 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
HTML Code:
~$ source /opt/openfoam9/etc/bashrc ~$ simpleFoam -help Usage: simpleFoam [OPTIONS] options: -case <dir> specify alternate case directory, default is the cwd -fileHandler <handler> override the fileHandler -hostRoots <(((host1 dir1) .. (hostN dirN))> slave root directories (per host) for distributed running -libs <(lib1 .. libN)> pre-load libraries -listFunctionObjects List functionObjects -listFvConstraints List fvConstraints -listFvModels List fvModels -listMomentumTransportModels List momentumTransportModels -listScalarBCs List scalar field boundary conditions (fvPatchField<scalar>) -listSwitches List all available debug, info and optimisation switches -listVectorBCs List vector field boundary conditions (fvPatchField<vector>) -noFunctionObjects do not execute functionObjects -parallel run in parallel -postProcess Execute functionObjects only -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-9 (see https://openfoam.org) Build: 9-c96968adf6d8 |
|
April 24, 2024, 13:10 |
|
#13 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Alright, there is no problem with the OpenFOAM environment which is properly loaded so it's a matter of rheoTools installation.
EDIT: I'm not familiar with rheoTools, but the installation instructions seem to indicate user-related directories. For instance, quoting the user guide: Quote:
You can see what path is defined in it by typing this command in a terminal after sourcing the OpenFOAM environment: Code:
echo $WM_PROJECT_USER_DIR You should install it in a directory accessible by all users. Last edited by Yann; April 25, 2024 at 06:32. |
||
April 25, 2024, 07:13 |
|
#14 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
Thanks a lot for your answer.
So I just echoed the $WM_PROJECT_USER_DIR and it seems that openFOAM/username-9 is installed in the home of this user account (I installed both openFoam and rheoTools from the admin session originally. HTML Code:
~$ echo $WM_PROJECT_USER_DIR /home/username/OpenFOAM/username-9 |
|
April 25, 2024, 07:31 |
|
#15 |
New Member
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2 |
While comparing what my (admin) session has and what the user session has in ~/OpenFOAM/***-9, I noticed that the admin session has two folders, ThirdParty and platforms, whereas the user session only has ThirdParty.
So I sudo cp -r platforms from the Admin session to the user session and when I launched the computation it got me a log.rheoFoam with an error: HTML Code:
$ cat log.rheoFoam rheoFoam: error while loading shared libraries: libHYPRE-2.23.0.so: cannot open shared object file: No such file or directory HTML Code:
$ sudo rm -r //home/username/OpenFOAM/username-9/platforms Shall I install rheoTool from scratch on the user session? Thanks again for your help |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
type limitTemperature problem | AdamRM | OpenFOAM Running, Solving & CFD | 6 | November 16, 2023 06:55 |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 11:56 |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 05:38 |