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

[OpenFOAM.org] Setting Environment variavle OF 4.0

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By calim_cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2016, 12:38
Default Setting Environment variavle OF 4.0
  #1
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
Hi.

I've installed OF a few times but this is getting annoying. Can anyone point me my mistake?
Im giving the inputs and outputs. I already sourced the files. I cannot proceed with installation.

Code:
[70|/opt/OpenFOAM/ThirdParty-4.0]:pwd
/opt/OpenFOAM/ThirdParty-4.0
[71|/opt/OpenFOAM/ThirdParty-4.0]:cd $WM_THIRD_PARTY_DIR
[72|/opt/OpenFOAM/ThirdParty-4.0]:pwd
/opt/OpenFOAM/ThirdParty-4.0
[73|/opt/OpenFOAM/ThirdParty-4.0]:grep "bashrc" $HOME/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
source /opt/OpenFOAM/OpenFOAM-4.0/etc/bashrc
[74|/opt/OpenFOAM/ThirdParty-4.0]:sudo ./Allwmake
./Allwmake: 34: ./Allwmake: wmakeCheckPwd: not found
Error: Current directory is not $WM_THIRD_PARTY_DIR
    The environment variables are inconsistent with the installation.
    Check the OpenFOAM entries in your dot-files and source them.
[75|/opt/OpenFOAM/ThirdParty-4.0]:grep "FOAM_INST_DIR" /opt/OpenFOAM/OpenFOAM-4.0/etc/bashrc
# FOAM_INST_DIR is the location of the OpenFOAM installation which defaults to
export FOAM_INST_DIR=${BASH_SOURCE%/*/*/*} || \
#export FOAM_INST_DIR=/opt/$WM_PROJECT
# export FOAM_INST_DIR=~$WM_PROJECT
 export FOAM_INST_DIR=/opt/$WM_PROJECT
# export FOAM_INST_DIR=/usr/local/$WM_PROJECT
# $FOAM_INST_DIR/site/$WM_PROJECT_VERSION or $FOAM_INST_DIR/site
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
[76|/opt/OpenFOAM/ThirdParty-4.0]:


Thanks in advance.
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Old   September 11, 2016, 11:54
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Sorry for the late reply. It very likely has to do with the way you switched to root mode, because apparently the ".bashrc" file was not processed.

Have you tried running:
Code:
source /opt/OpenFOAM/OpenFOAM-4.0/etc/bashrc
directly on the command line, to enforce that the environment is loaded?

Beyond this, I do have to ask: Why are you building OpenFOAM directly as root? Is your machine being shared with others?
I ask this because as a precautionary measure, you should build OpenFOAM as a normal user and then later move/copy the installation to "/opt" and change the permissions for that folder.
Running commands as root can be risky, since one wrong command may destroy the system installation that you currently have on your machine and be forced to reinstall everything.
__________________
wyldckat is offline   Reply With Quote

Old   September 12, 2016, 06:42
Default
  #3
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
Hi Bruno.

It's just that i got used to installing it in /opt then copying cases to the home directory to run or to $FOAM_RUN

Anyways, after trying it a bit more i managed to install everything but still something was messed up. I open new terminals to check the validity of the bashrc file. It used to work fine. Dunno what happened.

Bottom line, after giving up and restarting the pc the other day, it seems that it's normal now.. go figure, lol. i'm using ubuntu 14.04.

I did noticed that they changed the folder/version naming style.... from OpenFOAM-vx.x to OpenFOAM-x.x (if im not mistaken) .. just to make the installation annoying when something goes wrong

Anyways, thank you for the feedback
wyldckat likes this.
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd 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
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 22:38
[OpenFOAM.org] Setting OpenFOAM Environment Variables During Installation on OpenSuse 13.2 m_ridzon OpenFOAM Installation 1 March 30, 2015 17:56
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 09:53
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 21:58
Warning 097- AB Siemens 6 November 15, 2004 04:41


All times are GMT -4. The time now is 07:30.