CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] FOAM FATAL ERROR when starting after clean install

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By LeChat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2024, 14:04
Default FOAM FATAL ERROR when starting after clean install
  #1
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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
Then I updated the .bashrc file with:
HTML Code:
source /opt/openfoam9/etc/bashrc
Then back to the Terminal:
HTML Code:
simpleFoam -help
I think it was working at the time.
And finally:
HTML Code:
./downloadEigen

./installPetsc

./Allwmake
Then I downloaded a zip version of RheoTool from: https://github.com/fppimenta/rheoTool

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
copy-paste and enter the output line (echo "export EIGEN…") from the Terminal, in the Terminal.

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!
LeChat is offline   Reply With Quote

Old   April 19, 2024, 04:14
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
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"
Yann
Yann is offline   Reply With Quote

Old   April 19, 2024, 04:35
Default
  #3
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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?
LeChat is offline   Reply With Quote

Old   April 19, 2024, 04:59
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
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
Then access the case directory using the cd command:

Code:
cd /home/adrien/motorbike
You can then run the Allrun script, or open it to see what are the commands used to run the case.

Quote:
Originally Posted by LeChat View Post
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?
Your OpenFOAM install is already usable by all the users.
Any user can open a terminal and type:
Code:
source /opt/openfoam9/etc/bashrc
To load the OpenFOAM environment.
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.
Yann is offline   Reply With Quote

Old   April 19, 2024, 06:25
Default
  #5
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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?
LeChat is offline   Reply With Quote

Old   April 19, 2024, 06:31
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Quote:
Originally Posted by LeChat View Post
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?
What do you mean by not being able to launch OpenFOAM?
Yann is offline   Reply With Quote

Old   April 19, 2024, 07:43
Default
  #7
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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.
Yann likes this.
LeChat is offline   Reply With Quote

Old   April 24, 2024, 11:55
Default
  #8
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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
Also, another user (not admin) on this machine has "openFOAM not found" in the log.rheoFoam:
HTML Code:
./Allrun: 93: rheoFoam: not found
Would anyone have an idea of what is happening and a way to solve ou issues? Any help would be very appreciated
LeChat is offline   Reply With Quote

Old   April 24, 2024, 12:15
Default
  #9
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello,

Same as your previous error:

Code:
Case   : /home/adrien"
You're trying to run rheoFoam from your home directory instead of your case directory. Most of OpenFOAM commands have to be run from a case directory so you need to go to your case directory using the cd command before running rheoFoam.

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
Yann is offline   Reply With Quote

Old   April 24, 2024, 12:29
Default
  #10
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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
LeChat is offline   Reply With Quote

Old   April 24, 2024, 12:49
Default
  #11
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Alright, and what about this, in a new terminal again:

Code:
source /opt/openfoam9/etc/bashrc
simpleFoam -help
Yann is offline   Reply With Quote

Old   April 24, 2024, 12:57
Default
  #12
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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
thank you for your help
LeChat is offline   Reply With Quote

Old   April 24, 2024, 13:10
Default
  #13
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
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:
2.4.4 Compile rheoTool
It is recommended to save rheoTool in a location with write permission, otherwise you will need to use sudo mode to run all the commands. A good location for rheoTool is, for example, directory $WM_PROJECT_USER_DIR, which is defined by default when OpenFOAM or foam-extend is installed.
$WM_PROJECT_USER_DIR is an OpenFOAM environment variable, and it is related to the user.
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
If you installed rheoTools at this location, it is installed in your home directory and other users won't have access to it.
You should install it in a directory accessible by all users.

Last edited by Yann; April 25, 2024 at 06:32.
Yann is offline   Reply With Quote

Old   April 25, 2024, 07:13
Default
  #14
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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
How shall I proceed to get rheoTool to be added to this directory?
LeChat is offline   Reply With Quote

Old   April 25, 2024, 07:31
Default
  #15
New Member
 
Join Date: Apr 2024
Location: France
Posts: 10
Rep Power: 2
LeChat is on a distinguished road
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
So I reversed this cp -r with a sudo rm -r :
HTML Code:
$ sudo rm -r //home/username/OpenFOAM/username-9/platforms
And am waiting for expert advice

Shall I install rheoTool from scratch on the user session?
Thanks again for your help
LeChat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 10:19.