CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Unable to install OpenFOAM 1.6-ext (https://www.cfd-online.com/Forums/openfoam-installation/126470-unable-install-openfoam-1-6-ext.html)

Maimouna November 18, 2013 12:47

Unable to install OpenFOAM 1.6-ext
 
Hi all,

currently, I'm working in OpenFOAM 2.2.1. Now,I'm trying to install OpenFOAM 1.6-ext to work with icoFsiFoam tutorials. Now, I got problem with terminal window, when I open it, it gives me directly the following error
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++
bash: /opt/OpenFOAM-1.6-ext/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/settings.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/aliases.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
maimouna@maimouna-desktop:~$
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++
What's the problem?
How can I solve that? and if I would like to re-install OpenFOAM 1.6-ext, how can I do it?

I tried to remove it and install it again, but isn't coming.

I really appreciate your help.

Regards
Maimouna

Linse November 18, 2013 14:43

OpenFoam 1.6-ext installation problem
 
Dear Maimouna,

1.) Please try to change the title of your post/thread to something more narrative, such as OpenFoam 1.6-ext installation bash error

2.) My first guess concerning your problem would be that something with the .bashrc is wrong. Either the files are not existent on your system because you removed them, or one of the paths, maybe the one in OpenFOAM-1.6-ext/etc/bashrc is pointing the wrong way.

A long shot from my side: Did you really install into /opt instead of $HOME?


At the moment all is speculative, I would suggest attaching your .bashrc (without any passwords and such, of course) to your next post, then one could see if there already is a fundamental problem in there. Ideally attach the OpenFOAM-1.6-ext/etc/bashrc as well...

Maimouna November 19, 2013 10:29

installation problem OpenFOAM-1.6-ext
 
Hi foamers,

I already worked in OpenFOAM 2.2.1 on Ubuntu 12.04 for different cases. Now, I'm trying to install OpenFOAM 1.6-ext to work with icoFsiFoam and different cases in FSI.

I did the following steps to show you if I'm doing well or not:
1. I had OpenFOAM folder inside $HOME directory
2. I already installed OpenFOAM-2.2.1 in this directory and it is working properly.
3. Inside OpenFOAM directory, I installed OpenFOAM 1.6-ext by following instructions given in
http://openfoamwiki.net/index.php/In...1.6-ext/Ubuntu
4. When I was in step number 10 to check if everything going well by typing
gedit log.AllMake
it gives me the following error
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++
Error: Directory does not exist /opt/ThirdParty-2.2.1
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.

++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++
I don't know what are the problems and how to solve it?:confused:
Moreover, when I go back to the OpenFOAM directory where I install OpenFOAM 1.6-ext, I found two locked folders
/home/maimouna/OpenFOAM/OpenFOAM-1.6-ext
and
/home/maimouna/OpenFOAM/OpenFOAM-1.6-ext.git
Why they are locked?

I tried many times to delete them to re-install OpenFOAM 1.6-ext again , but gives me messages can't move them to recycle bin?:(

Can you help me please to get answers for all my questions.

wyldckat November 19, 2013 17:05

Quick answer @Maimouna: Please read and study this blog post: Advanced tips for working with the OpenFOAM shell environment

Maimouna November 20, 2013 06:18

Dear Bruno,
many thanks for your reply. I have problem in terminal window, directly it gives me these errors when starts
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++
bash: /opt/OpenFOAM-1.6-ext/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/settings.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/aliases.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/settings.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/aliases.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++
How can I solve it?
OpenFOAM-1.6-ext installation doesn't complete. I tried to remove it and install it again, but it isn't coming I really confused and I don't know the problem?

I really appreciate your help.

Maimouna November 20, 2013 06:28

Also, after I installed OpenFOAM-1.6-ext, even it is not completed, tutorials in previous OpenFOAM 2.2.1 not working now. When I type blockMesh in some cases such as icoFoam/cavity it gives me this error --> FOAM FATAL ERROR in Foam::findEtcFiles() : could not find mandatory file
'controlDict'
but it was worked properly.
How can I solve this error?

wyldckat November 20, 2013 06:44

Like I wrote above:
Quote:

Originally Posted by wyldckat (Post 462607)

If you read that blog post and study it, you'll understand how to fix this problem you're having!

Linse November 20, 2013 07:31

To me it seems to be a problem with your OpenFOAM-1.6-ext/etc/bashrc
Try to find the line where you can set the installation location ($FOAM_INSTALL_DIR ?) . The setting at the moment seems to be /opt.
Usually you will find a commented line shortly below where it says $HOME/OpenFOAM.
Just comment the /opt-line and uncomment the $HOME/OpenFOAM-line and you should be much further in your compilation.

Maimouna November 20, 2013 08:33

I read the tips in Advanced tips for working with the OpenFOAM shell environment, but the problem is I have read only bashrc file, so I couldn't save any changes on it.
What to do?
I got locked folder of OpenFOAM1.6-ext and OpenFOAM-1.6-ext.git.

I tried to remove the previous installation to install OpenFOAM-1.6-ext again, but could't. How can I solve this problem?

Maimouna November 20, 2013 08:35

My planning no to re-install OpenFOAM-1.6-ext.
How can I, the problem is with that locked folders?

wyldckat November 20, 2013 16:31

Greetings to all!

I was in a hurry and couldn't go into details in the previous posts.

@Maimouna:
Quote:

Originally Posted by Maimouna (Post 462721)

I wrote "read and study", not simply "read" ;)
What I mean by this, is that this blog post is not something that can be read in 5 minutes or less. In order to understand it, you need to read and try it out on the command line and read again and try again, until you can understand what it all means. This will take somewhere between 10 and 20 minutes, not just 5 minutes.

As for the problem at hand, the first issue is this:
Quote:

Traditionally, you are simply instructed to add something like the following line to the file "~/.bashrc":
Code:

. $HOME/OpenFOAM/OpenFOAM-X.Y.Z/etc/bashrc
Or:
Code:

source $HOME/OpenFOAM/OpenFOAM-X.Y.Z/etc/bashrc
The dot at the beginning of the line does the same as source, namely it will run the file as if it where a local script, therefore setting all of the necessary environment variables.

Note: The file "~/.bashrc" is the same as "$HOME/.bashrc", which you can see the location for it by running:
Code:

echo $HOME/.bashrc

In other words, you should first edit the file "$HOME/.bashrc".
Once it's open for editing, find these lines or similar ones:
Code:

. /opt/openfoam221/etc/bashrc
. $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

Replace these 2 lines with these two:
Code:

alias of221='. /opt/openfoam221/etc/bashrc'
alias of16ext='. $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc'

Quote:

now whenever you start a new terminal/console window or tab, the OpenFOAM environment is not available by default. You have to run one of the alias commands to activate the desired environment. So, start a new terminal and run one of the alias commands...
For example, to use OpenFOAM 2.2.1:
  1. Start a new terminal.
  2. Run this command (the alias command):
    Code:

    of221
  3. And the environment for OpenFOAM 2.2.1 is now ready to use in this terminal window.


As for using OpenFOAM 1.6-ext:

  1. Start a new terminal (DO NOT USE the same terminal as the one from OpenFOAM 2.2.1!).
  2. Run this command (the alias command):
    Code:

    of16ext
  3. And the environment for OpenFOAM 1.6-ext is now ready to use in this terminal window.


If my guess is correct, this should solve the problem.



Best regards,
Bruno

Maimouna November 22, 2013 05:49

Error with gedit log.AllMake during OpenFOAM-1.6-ext installation
 
Dear OpenFOAM users

I'm working in OpenFOAM-2.2.1 on Ubuntu 12.04. My planning is to use icoFsiFoam solver which is located in OpenFOAM-1.6-ext. That's why I'm installing OpenFOAM-1.6-ext in my machine.

I got the followig error in log.AllMake file
Code:

Error: Directory does not exist /opt/ThirdParty-2.2.1
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.

I couldn't understand the problem.
For more details, can you please check OpenFOAM-1.6-ext/etc/.bashrc file below (sorry I couldn't attach it, it gives me attached error:o)
Code:

#----------------------------------*-sh-*--------------------------------------
# =========                |
# \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
#  \\    /  O peration    |
#  \\  /    A nd          | Copyright held by original author
#    \\/    M anipulation  |
#------------------------------------------------------------------------------
# License
#    This file is part of OpenFOAM.
#
#    OpenFOAM is free software; you can redistribute it and/or modify it
#    under the terms of the GNU General Public License as published by the
#    Free Software Foundation; either version 2 of the License, or (at your
#    option) any later version.
#
#    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
#    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
#    for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with OpenFOAM; if not, write to the Free Software Foundation,
#    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Script
#    etc/bashrc
#
# Description
#    Startup file for OpenFOAM
#    Sourced from ~/.profile or ~/.bashrc
#    Should be usable by any POSIX-compliant shell (eg, ksh)
#
#------------------------------------------------------------------------------

export WM_PROJECT=OpenFOAM
export WM_PROJECT_VERSION=1.6-ext

# helps to easily write #ifdefs to detect a dev-version
export FOAM_DEV=1

###############################################################################
# USER EDITABLE PART
#
# either set $FOAM_INST_DIR before sourcing this file or set
#    $foamInstall below to where OpenFOAM is installed
#
# Location of FOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=$HOME/$WM_PROJECT
# foamInstall=~$WM_PROJECT
# foamInstall=/usr/local/$WM_PROJECT
# foamInstall=/opt/$WM_PROJECT
# foamInstall=/usr/lib
#
# END OF (NORMAL) USER EDITABLE PART
################################################################################

# note the location for later use (eg, in job scripts)
: ${FOAM_INST_DIR:=$foamInstall}; export FOAM_INST_DIR

# The old dirs to be cleaned from the various environment variables
# - remove anything under top-level directory.
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
foamOldDirs="$FOAM_INST_DIR $HOME/$WM_PROJECT/$USER"
if [ "$WM_PROJECT_INST_DIR" != "$FOAM_INST_DIR" ]
then
    foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
fi


# Location of site/user files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
: ${WM_PROJECT_USER_DIR:=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION}; export WM_PROJECT_USER_DIR


# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR
: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_DIR/ThirdParty}; export WM_THIRD_PARTY_DIR

# Source files, possibly with some verbosity
_foamSource()
{
  while [ $# -ge 1 ]
  do
      [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
      . $1
      shift
  done
}

# Add in preset user or site preferences:
foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh` && _foamSource $foamPrefs
unset foamPrefs

# Evaluate command-line parameters
while [ $# -gt 0 ]
do
    case "$1" in
    *=)
        # name=      -> unset name
        eval "unset ${1%=}"
        ;;
    *=*)
        # name=value  -> export name=value
        eval "export $1"
        ;;
    esac
    shift
done


# Operating System/Platform
# ~~~~~~~~~~~~~~~~~~~~~~~~~
# WM_OSTYPE = POSIX | ????
: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE


# Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ${WM_COMPILER:=Gcc}; export WM_COMPILER

export WM_COMPILER_ARCH=
export WM_COMPILER_LIB_ARCH=


# Compilation options (architecture, precision, optimised, debug or profiling)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ${WM_NCOMPPROCS:=2}; export WM_NCOMPPROCS

# WM_ARCH_OPTION = 32 | 64
: ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION

# WM_PRECISION_OPTION = DP | SP
: ${WM_PRECISION_OPTION:=DP}; export WM_PRECISION_OPTION

# WM_COMPILE_OPTION = Opt | Debug | Prof
: ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION

# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB


# Run options (floating-point signal handling and memory initialisation)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export FOAM_SIGFPE=
# export FOAM_SETNAN=


# Detect system type and set environment variables appropriately
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export WM_ARCH=`uname -s`

case $WM_ARCH in
Linux)
    WM_ARCH=linux

    # compiler specifics
    case `uname -m` in
    i686)
        ;;

    x86_64)
        case $WM_ARCH_OPTION in
        32)
            export WM_COMPILER_ARCH='-64'
            export WM_CFLAGS='-m32 -fPIC'
            export WM_CXXFLAGS='-m32 -fPIC'
            export WM_LDFLAGS='-m32'
            ;;
        64)
            WM_ARCH=linux64
            export WM_COMPILER_LIB_ARCH=64
            export WM_CFLAGS='-m64 -fPIC'
            export WM_CXXFLAGS='-m64 -fPIC'
            export WM_LDFLAGS='-m64'
            ;;
        *)
            echo Unknown WM_ARCH_OPTION $WM_ARCH_OPTION, should be 32 or 64
            ;;
        esac
        ;;

    ia64)
        WM_ARCH=linuxIA64
        export WM_COMPILER=I64
        ;;

    mips64)
        WM_ARCH=SiCortex64
        export WM_COMPILER_LIB_ARCH=64
        export WM_CFLAGS='-mabi=64 -fPIC'
        export WM_CXXFLAGS='-mabi=64 -fPIC'
        export WM_LDFLAGS='-mabi=64 -G0'
        export WM_MPLIB=MPI
        ;;

    ppc64)
        WM_ARCH=linuxPPC64
        export WM_COMPILER_LIB_ARCH=64
        export WM_CFLAGS='-m64 -fPIC'
        export WM_CXXFLAGS='-m64 -fPIC'
        export WM_LDFLAGS='-m64'
        ;;

    *)
        echo Unknown processor type `uname -m` for Linux
        ;;
    esac
    ;;

Darwin)
    # this makes certain things easier
    export WM_ARCH_BASE=darwin

    case `uname -p` in
    powerpc)
    export WM_ARCH=darwinPpc
    ;;
    i386)
    export WM_ARCH=darwinIntel
    ;;
    *)
        echo "This seems to be neither an Intel-Mac nor a PPC-Mac please tell me the output of 'uname -p'. Bernhard."
    export WM_ARCH=darwinUnknown
    ;;
    esac
    case $WM_ARCH_OPTION in
    32)
    export WM_CFLAGS='-m32 -fPIC'
    export WM_CXXFLAGS='-m32 -fPIC'
    export WM_LDFLAGS='-m32'
    ;;
    64)
        export WM_ARCH=${WM_ARCH}64
    export WM_CFLAGS='-m64 -fPIC'
    export WM_CXXFLAGS='-m64 -fPIC'
    export WM_LDFLAGS='-m64'
    ;;
    *)
    echo Unknown WM_ARCH_OPTION $WM_ARCH_OPTION, should be 32 or 64
    ;;
    esac

    # Make sure that binaries use the best features of the used OS-Version
    export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion`

    if [ "$compilerInstall" == "System" ]
    then
        # Use Mac-Ports-Compiler instead of Apple-gcc-4.2
    case $WM_COMPILER in
    Gcc43)
            export WM_CC='gcc-mp-4.3'
        export WM_CXX='g++-mp-4.3'
        ;;
        Gcc44)
            export WM_CC='gcc-mp-4.4'
        export WM_CXX='g++-mp-4.4'
        ;;
        Gcc45)
            export WM_CC='gcc-mp-4.5'
        export WM_CXX='g++-mp-4.5'
            ;;
        *)
            export WM_COMPILER=
            ;;
        esac
    fi

    ;;

SunOS)
    WM_ARCH=SunOS64
    export WM_COMPILER_LIB_ARCH=64
    export WM_CFLAGS='-mabi=64 -fPIC'
    export WM_CXXFLAGS='-mabi=64 -fPIC'
    export WM_LDFLAGS='-mabi=64 -G0'
    export WM_MPLIB=FJMPI
    ;;

*)        # an unsupported operating system
    cat <<USAGE

    Your "$WM_ARCH" operating system is not supported by this release
    of OpenFOAM. For further assistance, please contact www.extend-project.de

USAGE
    ;;
esac


# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cleanProg=$WM_PROJECT_DIR/bin/foamCleanPath

#- Clean PATH
cleanEnv=`$cleanProg "$PATH" "$foamOldDirs"` && PATH="$cleanEnv"

#- Clean LD_LIBRARY_PATH
cleanEnv=`$cleanProg "$LD_LIBRARY_PATH" "$foamOldDirs"` && LD_LIBRARY_PATH="$cleanEnv"

#- Clean DYLD_LIBRARY_PATH
if [[ "$WM_ARCH_BASE" == "darwin" ]]
then
    cleanEnv=`$cleanProg "$DYLD_LIBRARY_PATH" "$foamOldDirs"` && DYLD_LIBRARY_PATH="$cleanEnv"
fi

#- Clean MANPATH
cleanEnv=`$cleanProg "$MANPATH" "$foamCleanDirs"` && MANPATH="$cleanEnv"

export PATH LD_LIBRARY_PATH MANPATH

# Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~

_foamSource $WM_PROJECT_DIR/etc/settings.sh
_foamSource $WM_PROJECT_DIR/etc/aliases.sh


# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc


# Clean environment paths again. Only remove duplicates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#- Clean PATH
cleanEnv=`$cleanProg "$PATH"` && PATH="$cleanEnv"

#- Clean LD_LIBRARY_PATH
cleanEnv=`$cleanProg "$LD_LIBRARY_PATH"` && LD_LIBRARY_PATH="$cleanEnv"

#- Clean MANPATH
cleanEnv=`$cleanProg "$MANPATH"` && MANPATH="$cleanEnv:"

export PATH LD_LIBRARY_PATH MANPATH

#- Clean LD_PRELOAD
if [ "$LD_PRELOAD" != "" ]
then
    cleanEnv=`$cleanProg "$LD_PRELOAD"` && LD_PRELOAD="$cleanEnv"
    export LD_PRELOAD
fi


# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset cleanEnv cleanProg foamInstall foamOldDirs
unset _foamSource

# ~~~~~~~~~~~~~~~~~~~~~~~~~~
alias of221='. $HOME/OpenFOAM/OpenFOAM-2.2.1/etc/bashrc'
alias of16ext='. $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc'

# -----------------------------------------------------------------------------

What can I do to avoid the error?
If I remove OpenFOAM-2.2.1 can install OpenFOAM-1.6-ext, is it solution?

Any solution, would be welcomed.

Regards

wyldckat November 22, 2013 17:07

Greetings Maimouna,

I did give you the solution in the previous post, but apparently I wasn't clear enough on the instructions... :rolleyes:

OK, let me try to explain it like this:
  1. Run this command:
    Code:

    ls -l $HOME/.bashrc $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
  2. You should now see something like this:
    Code:

    -rw-r--r--. 1 ofuser ofuser  124 Mar 11  2013 /home/ofuser/.bashrc
    -rw-rw-r--. 1 ofuser ofuser 9869 Nov 22 16:54 /home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

    "ofuser" is the user name on the machine I'm using. In your case, it might be "maimouna".
  3. Notice that there are two very different files:
    • "/home/ofuser/.bashrc" - this is the file that is located at "$HOME/.bashrc"
    • "/home/ofuser/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc" - this is the file that OpenFOAM 1.6-ext has got for setting up 1.6-ext's shell environment.
  4. As you can see, you should have edited the file "$HOME/.bashrc", and not the file "$HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc".
  5. Therefore:
    1. Edit the file "$HOME/.bashrc".
    2. Once it's open for editing, find these lines or similar ones:
      Code:

      . /opt/openfoam221/etc/bashrc
      . $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

    3. Replace these 2 lines with these two:
      Code:

      alias of221='. /opt/openfoam221/etc/bashrc'
      alias of16ext='. $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc'

    4. Now, once the file "$HOME/.bashrc" is saved and closed:
      • To use OpenFOAM 2.2.1:
        1. Start a new terminal.
        2. Run this command (the alias command):
          Code:

          of221
        3. And the environment for OpenFOAM 2.2.1 is now ready to use in this terminal window.
      • As for using OpenFOAM 1.6-ext:
        1. Start a new terminal (DO NOT USE the same terminal as the one from OpenFOAM 2.2.1!).
        2. Run this command (the alias command):
          Code:

          of16ext
        3. And the environment for OpenFOAM 1.6-ext is now ready to use in this terminal window.
Best regards,
Bruno

Maimouna November 26, 2013 09:59

Dear Bruno,
many thanks for your reply and so sorry for my late reply.
when I started of221, it works fine. But when I opened a new terminal for of16ext, it gives me the following comments
Code:

maimouna@maimouna-desktop:~$ of16ext
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/etc/settings.sh
  Environment variables defined for OpenMPI:
    OPENMPI_BIN_DIR      : /usr/bin
    OPENMPI_LIB_DIR      : /usr/lib/openmpi/lib
    OPENMPI_INCLUDE_DIR  : /usr/lib/openmpi/include /usr/lib/openmpi/include/openmpi
    OPENMPI_COMPILE_FLAGS : -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread
    OPENMPI_LINK_FLAGS    : -pthread -L/usr/lib/openmpi/lib -lmpi -lopen-rte -lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl

    MPI_HOME              : /usr
    MPI_ARCH_PATH        : /usr
    OPAL_PREFIX          : /usr
    PINC                  : -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread
    PLIBS                : -pthread -L/usr/lib/openmpi/lib -lmpi -lopen-rte -lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/mesquite-2.1.2/platforms/linux64Gcc46DPOpt/etc/mesquite-2.1.2.sh
    MESQUITE_DIR is initialized to: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/mesquite-2.1.2/platforms/linux64Gcc46DPOpt
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/metis-5.0pre2/platforms/linux64Gcc46DPOpt/etc/metis-5.0pre2.sh
    METIS_DIR is initialized to: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/metis-5.0pre2/platforms/linux64Gcc46DPOpt
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParMetis-3.1.1/platforms/linux64Gcc46DPOpt/etc/ParMetis-3.1.1.sh
    PARMETIS_DIR is initialized to: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParMetis-3.1.1/platforms/linux64Gcc46DPOpt
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParMGridGen-1.0/platforms/linux64Gcc46DPOpt/etc/ParMGridGen-1.0.sh
    PARMGRIDGEN_DIR is initialized to: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParMGridGen-1.0/platforms/linux64Gcc46DPOpt
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/libccmio-2.6.1/platforms/linux64Gcc46DPOpt/etc/libccmio-2.6.1.sh
    LIBCCMIO_DIR is initialized to: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/libccmio-2.6.1/platforms/linux64Gcc46DPOpt
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/scotch-5.1.10b/platforms/linux64Gcc46DPOpt/etc/scotch-5.1.10b.sh
    SCOTCH_DIR is initialized to: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/scotch-5.1.10b/platforms/linux64Gcc46DPOpt
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/cmake-2.8.11/platforms/linux64Gcc46DPOpt/etc/cmake-2.8.11.sh
    CMAKE_DIR is initialized to: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/cmake-2.8.11/platforms/linux64Gcc46DPOpt
    M4_DIR is initialized to:
    BISON_DIR is initialized to:
    FLEX_DIR is initialized to:
    ZOLTAN_DIR is initialized to:
    PYTHON_DIR is initialized to:
    QT_DIR is initialized to:
    PARAVIEW_DIR is initialized to: /usr
Sourcing: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/etc/aliases.sh
maimouna@maimouna-desktop:~$ cd OpenFOAM/OpenFOAM-1.6-ext
maimouna@maimouna-desktop:~/OpenFOAM/OpenFOAM-1.6-ext$ cd tutorials/incompressible/icoFoam/
maimouna@maimouna-desktop:~/OpenFOAM/OpenFOAM-1.6-ext/tutorials/incompressible/icoFoam$ cd cavity
maimouna@maimouna-desktop:~/OpenFOAM/OpenFOAM-1.6-ext/tutorials/incompressible/icoFoam/cavity$ blockMesh
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM Extend Project: Open source CFD        |
|  \\    /  O peration    | Version:  1.6-ext                              |
|  \\  /    A nd          | Web:      www.extend-project.de                |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 1.6-ext-064a6e9f332e
Exec  : blockMesh
Date  : Nov 26 2013
Time  : 14:47:23
Host  : maimouna-desktop
PID    : 9482
Case  : /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/tutorials/incompressible/icoFoam/cavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time


Creating block mesh from
    "/home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict"


Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty

Check block mesh topology

    Basic statistics
        Number of internal faces : 0
        Number of boundary faces : 6
        Number of defined boundary faces : 6
        Number of undefined boundary faces : 0

    Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points with scale 0.1

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty

Writing polyMesh


--> FOAM FATAL ERROR:
Failed writing polyMesh.

    From function blockMesh
    in file blockMeshApp.C at line 475.

FOAM exiting

maimouna@maimouna-desktop:~/OpenFOAM/OpenFOAM-1.6-ext/tutorials/incompressible/icoFoam/cavity$ ^Cmaimouna@maimouna-desktop:~/OpenFOAM/OpenFOAM-1.6-ext/tutorials/incompressible/icoFoam/cavity$

I couldn't understand that comments.

At the end, I tried blockMesh for cavity case but also the error shown there.

Please, help me to avoid that.

Many thanks for advanced.

wyldckat November 26, 2013 15:36

Hi Maimouna,

It's looking good now! So the explanation is as follows:
  1. The long output given when you ran of16ext is normal!
    It shows all of the custom settings that were defined for OpenFOAM 1.6-ext shell environment.
  2. The reason why blockMesh is complaining is probably because the installation was made with the "root" account, also known as the super-user account.
    There are 2 ways to fix this:
    1. You can follow the standard tutorial instructions: http://www.openfoam.org/docs/user/tu...s.php#x4-30002
      Code:

      mkdir -p $FOAM_RUN
      cp -r $FOAM_TUTORIALS $FOAM_RUN

      This way you work with a copy of the original tutorials, without damaging the original tutorials.
    2. Or you can re-assign the OpenFOAM folder to your own user name, by running the following commands:
      Code:

      ls -l $HOME/OpenFOAM
      sudo chown -R $USER:$USER $HOME/OpenFOAM
      ls -l $HOME/OpenFOAM

      This should:
      1. The first one shows you the contents of the folder "~/OpenFOAM" and tell you that the owner of some of the folders is "root:root".
      2. The second command line will reassign the ownership of all files and folders within "~/OpenFOAM" to your user name.
      3. The third one shows you the contents of the folder "~/OpenFOAM" and should tell you that the owner of all of the folders is "maimouna:maimouna".
Best regards,
Bruno

Maimouna November 27, 2013 06:39

Dear Bruno,

my plenty of thanks to you. It works fine now.
I still have one problem with ParaView in of16ext.
I followed your post #3 which is given in
http://www.cfd-online.com/Forums/openfoam-installation/120327-can-different-openfoam-versions-share-same-paraview.html
but it gives me the following remark
************************************************** ************************************************** **********
maimouna@maimouna-desktop:~/OpenFOAM/maimouna-1.6-ext/run/tutorials/incompressible/icoFoam/cavity$ paraFoam -builtin
unknown option/argument: '-builtin -builtin'

usage: paraFoam [OPTION]
options:
-case dir specify alternative case directory
-region name specify mesh region name
-touch only create the .foam file

* start paraview with the OpenFOAM libraries
************************************************** ************************************************** ***
and I already add
alias paraFoam = 'paraFoam -builtin' in ~/.bashrc

How can I solve that?

wyldckat November 27, 2013 17:45

Hi Maimouna,

Mmm... OK, try these steps:
  1. Start the terminal with the environment for OpenFOAM 1.6-ext:
    Code:

    of16ext
  2. Go into the folder where the script paraFoam is located:
    Code:

    cd $WM_PROJECT_DIR/bin
  3. Download the latest paraFoam script from 2.2.x:
    Code:

    wget "https://raw.github.com/OpenFOAM/OpenFOAM-2.2.x/master/bin/paraFoam" -O paraFoam
    Note: this is assuming you followed the instructions from my previous post, for fixing the permissions in the OpenFOAM folder.
  4. Now you can go into the "cavity" tutorial case folder, run the case and then paraFoam:
    Code:

    cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
    blockMesh
    icoFoam
    paraFoam

Best regards,
Bruno

Maimouna November 28, 2013 05:34

Dear Bruno,
sorry for disturbing you again.

I followed all steps that you give,but unfortunately, it was not working. It gives

/home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/bin/paraFoam: 267: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/bin/paraFoam: paraview: not found.
I already built it.

Whats wrong?

Maimouna November 28, 2013 07:15

Dear Bruno,

I tried it many times by following the previous post and this post. It still gave me the same error after paraFoam and I tried paraFoam -builtin as well, both give me the same
************************************************** ************************************************** ***********
maimouna@maimouna-desktop:~/OpenFOAM/maimouna-1.6-ext/run/tutorials/incompressible/icoFoam/cavity$ paraFoam
FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
./Allwclean
./Allwmake
************************************************** ************************************************** ***********
Are there any special aliasis need in ~/.bashrc file?

Moreover, I didn't have $WM_PROJECT_DIR. Directly, I went to
/home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/bin which has paraFoam script.

Did this affect steps?

Many thanks in advanced.

Maimouna November 29, 2013 11:53

Dear Bruno,

when I tried
paraFoam -builtin
it gives me
/home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/bin/paraFoam: 267: /home/maimouna/OpenFOAM/OpenFOAM-1.6-ext/bin/paraFoam: paraview: not found

Can you help me please on that comment.

Many thanks in advanced


All times are GMT -4. The time now is 09:29.