CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[] Running source before compiling?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2018, 16:31
Default Running source before compiling?
New Member
Join Date: Jul 2018
Posts: 20
Rep Power: 7
TU_Hiwi is on a distinguished road
Hey guy,

i am quite new to openfoam. I am currently trying to build OpenFOAM-v1806 from source on xubuntu 18.04, using this guide. Why am i building from source? my Boss wants me to.
The third command is
source ~/OpenFOAM/OpenFOAM-v1806/etc/bashrc
which returns the error:
hgl@hgl-ThinkPad-T530:~$source $HOME/OpenFOAM/OpenFOAM-v1806/etc/bashrc
No completion added for /home/hgl/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/bin
... incorrect platform, or not yet compiled?
it should be the correct Platform (Bash) but it is not yet compiled, since the guide states the link to the build guide just after this command.

So I assume the guide is in this case not that clear an i have to build openfoam before running source? And do i have to rerun source every time i rebooted the system? As I said, i am totally knew to this whole thing.

Thanks for your help and sorry if this isn't the smartest question.

TU_Hiwi is offline   Reply With Quote

Old   July 1, 2018, 20:48
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Lukas,

everything is alright, just follow the guide and continue building. The script is only stating that there are no executable files in that folder, because it has just been created and they will only appear as you compile the code.

Yes, you need to source every time you open a new terminal, unless you include the sourcing line in your .bashrc file.


Check out my new project: olaFlow --> The olaFlow Support Thread
Phicau is offline   Reply With Quote

Old   July 3, 2018, 11:34
Senior Member
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,683
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I just want to add for clarification that source is name of a shell command that runs/executes the file, which in this case is the file: ~/OpenFOAM/OpenFOAM-v1806/etc/bashrc

You can open this file to see for yourself what exactly is being done. Essentially the bashrc script creates a bunch of environmental variables that will be used at some point and it also sources some more files.

When you open a fresh shell/terminal (not even a reboot), these environmental variables do not exist. So yes you will need to "source" this bashrc many times in your lifetime unless, as already mentioned, you add it this line into your .bashrc or .localsh file.

This sourcing you don't have to deal with in windows because these environmental variables are created usually by the installer that comes with the software and the environmental variables are automatically re-created at system boot-up. Well, here you are the installer.
LuckyTran is offline   Reply With Quote


installation by sources, openfoam1806, source

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[swak4Foam] difficulties installing swak4foam newbie29 OpenFOAM Community Contributions 120 October 21, 2022 04:01
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 17:25
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51

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