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

[OpenFOAM.com] Running source before compiling?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2018, 16:31
Default Running source before compiling?
  #1
New Member
 
Lukas
Join Date: Jul 2018
Posts: 20
Rep Power: 4
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
Code:
source ~/OpenFOAM/OpenFOAM-v1806/etc/bashrc
which returns the error:
Code:
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.

Greetings
TU_Hiwi is offline   Reply With Quote

Old   July 1, 2018, 20:48
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 575
Rep Power: 15
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.

Best,

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

Old   July 3, 2018, 11:34
Default
  #3
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 4,097
Rep Power: 49
LuckyTran 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

Reply

Tags
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] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[swak4Foam] difficulties installing swak4foam newbie29 OpenFOAM Community Contributions 111 November 19, 2020 11:14
[OpenFOAM.org] 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 18:08.