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

[OpenFOAM.org] Problem of alias in OpenFOAM-2.3.1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2015, 16:30
Default Problem of alias in OpenFOAM-2.3.1
  #1
New Member
 
Join Date: Apr 2015
Posts: 5
Rep Power: 11
jzheng is on a distinguished road
Hi All

I installed OpenFOAM-2.3.1 by following steps on https://openfoamwiki.net/index.php/I...HEL#CentOS_6.5.

I run the cavity sample at the moment when installation was finished, both OpenFoam and ParaView are work good.

But when I turn off the terminal window and start a new terminal window, do the following again:

Code:
[pxe819@takara ~]$ of231
[pxe819@takara ~]$ cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
Here is the response:

Code:
bash: cd: /home/pxe819/OpenFOAM/pxe819-2.3.1/run/tutorials/incompressible/icoFoam/cavity: No such file or directory
My $HOME/.Bashrc is as follow:
Code:
echo "alias of231='module load openmpi-x86_64; source \$HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc

alias of231='module load openmpi-x86_64; source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=16 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI'

alias of231='module load openmpi-x86_64; source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc '
Is there anyone know what the problem is?

Thanks

Last edited by wyldckat; April 12, 2015 at 17:02. Reason: Added [CODE][/CODE]
jzheng is offline   Reply With Quote

Old   April 12, 2015, 17:03
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
Greetings jzheng,

OK, I see the problem. Sorry about the confusing instructions on the wiki, because I should have emphasized what I meant... where this is written:
Quote:
Also, save an alias in the personal .bashrc file:
it actually means:
Also, save an alias in the personal .bashrc file, simply by running:
-------------

In order to fix this problem, please edit the file "~/.bashrc" and change this block of code you have at the end of the file:
Code:
echo "alias of231='module load openmpi-x86_64; source \$HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc

alias of231='module load openmpi-x86_64; source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=16 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI'

alias of231='module load openmpi-x86_64; source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc '
and replace it with just this line:
Code:
alias of231='module load openmpi-x86_64; source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=16 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI'
Best regards,
Bruno
__________________

Last edited by wyldckat; April 12, 2015 at 17:04. Reason: fixed a few details
wyldckat is offline   Reply With Quote

Old   April 12, 2015, 20:59
Default
  #3
New Member
 
Join Date: Apr 2015
Posts: 5
Rep Power: 11
jzheng is on a distinguished road
Hi Bruno

It works perfect after I changed personal .bashrc.

This OpenFOAM was installed on my own virtual machine. I just have another question that can I copy this OpenFOAM and run it on another machine which is using the same CentOS but no root access?

Thanks
jzheng is offline   Reply With Quote

Old   April 19, 2015, 14:07
Default
  #4
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
Quote:
Originally Posted by jzheng View Post
I just have another question that can I copy this OpenFOAM and run it on another machine which is using the same CentOS but no root access?
In theory: Yes, if it's the same CentOS version.
In practice: depends on whether the other machine has all of the same library versions as yours. If not, you might risk some failures while running, due to incompatible library versions.
wyldckat 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
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
[Other] Openfoam for windows 16.02 [CFD support] -problem with paraview ditmeyer OpenFOAM Installation 3 May 15, 2017 12:04
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 14:24
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 03:19
[OpenFOAM.org] OpenFOAM 2.3.1: installation problem with ParaView 4.1.0 hjw OpenFOAM Installation 5 November 17, 2015 21:14


All times are GMT -4. The time now is 17:52.