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

[OpenFOAM.org] OpenFOAM 2.3.x on Mac OS X Yosemite 10.10.5 Installation Errors

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

Like Tree1Likes
  • 1 Post By shipman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2015, 23:06
Default OpenFOAM 2.3.x on Mac OS X Yosemite 10.10.5 Installation Errors
  #1
Senior Member
 
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 8
shipman is on a distinguished road
Dear All,

First time I try to install OpenFOAM 2.3.x on MAC OS X Yosemite 10.10.5 using the instructionhttp://openfoamwiki.net/index.php/Installation/Mac_OS/OpenFOAM_2.3.x.

Although I am struggling since several days to set the port selection similar to tutorial, I have following errors during setting db:

First one:
Code:
sudo port select --set db db48
Selecting 'db48' for 'db' failed: The configuration file '/opt/local/etc/select/db/base' could not be opened
Second one:
Code:
sudo port select --set llvm mp-llvm-3.5
Selecting 'mp-llvm-3.5' for 'llvm' failed: The specified version 'mp-llvm-3.5' is not valid.

How can I fix these problems. Your help will be appreciated.

By the way my selection looks $port sure select --summary

Code:
Name     Selected               Options
====     ========               =======
db       none                   db46 db48 none
gcc      mp-gcc48               mp-gcc46 mp-gcc47 mp-gcc48 mp-gcc49 none
llvm     mp-llvm-3.4            mp-llvm-3.4 none
mpi      openmpi-gcc48-fortran  mpich-mp-fortran openmpi-gcc48-fortran openmpi-mp-fortran none
python   python27               python26-apple python27 python27-apple none
python2  none                   python26-apple python27 python27-apple none

Thank you.

Baris
AliVali likes this.
shipman is offline   Reply With Quote

Old   October 10, 2015, 10:17
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,943
Blog Entries: 42
Rep Power: 121
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: http://www.cfd-online.com/Forums/ope...lems-db48.html
wyldckat is offline   Reply With Quote

Old   October 12, 2015, 01:18
Default
  #3
Senior Member
 
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 8
shipman is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Dear Bruno,

Thank you very much for your kind reply. I have installed finally openfoam into this version of mac. It can be run both manual and parallel as well. However, I have 2 other problems, If you can help be I will be really appraciated.

First one is when I open new terminal and write icoFoam -help it shows following error:
Code:
-bash: icoFoam: command not found
to get rid of this error I should always go into OpenFOAM-2.3.x/ and then should run source etc/bashrc then it works: you can find my .bashrc as follows. How can I set it to work at every opening of terminal?

Code:
export WM_PROJECT=OpenFOAM
export WM_PROJECT_VERSION=2.3.x

################################################################################
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
#
# either set $FOAM_INST_DIR before sourcing this file or set
# 'foamInstall' below to where OpenFOAM is installed
#
# Location of the OpenFOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=$HOME/$WM_PROJECT
# foamInstall=~$WM_PROJECT
# foamInstall=/opt/$WM_PROJECT
# foamInstall=/usr/local/$WM_PROJECT
#
# END OF (NORMAL) USER EDITABLE PART
################################################################################

#
# These are the defaults for this version which should generally be
# overridden from the prefs.sh file or from command-line specification
#
#- note the location for later use (eg, in job scripts)
: ${FOAM_INST_DIR:=$foamInstall}; export FOAM_INST_DIR

#- Compiler location:
#    foamCompiler= system | ThirdParty (OpenFOAM)
foamCompiler=system

#- Compiler:
#    WM_COMPILER = Gcc | Gcc45 | Gcc46 | Gcc47 | Clang | Icc (Intel icc)
export WM_COMPILER=Gcc
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH

#- Architecture:
#    WM_ARCH_OPTION = 32 | 64
export WM_ARCH_OPTION=64

#- Precision:
#    WM_PRECISION_OPTION = DP | SP
export WM_PRECISION_OPTION=DP

#- Optimised, debug, profiling:
#    WM_COMPILE_OPTION = Opt | Debug | Prof
export WM_COMPILE_OPTION=Opt

#- MPI implementation:
#    WM_MPLIB = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPICH | MPICH-GM | HPMPI
#               | MPI | QSMPI | SGIMPI
export WM_MPLIB=SYSTEMOPENMPI

#- Operating System:
#    WM_OSTYPE = POSIX | ???
export WM_OSTYPE=POSIX

#- Floating-point signal handling:
#    set or unset
export FOAM_SIGFPE=

#- memory initialisation:
#    set or unset
#export FOAM_SETNAN=


################################################################################

# 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 $WM_PROJECT_SITE $HOME/$WM_PROJECT/$USER"
if [ "$WM_PROJECT_INST_DIR" != "$FOAM_INST_DIR" ]
then
    foamOldDirs="$WM_PROJECT_INST_DIR $foamOldDirs"
fi


# Location of installation
# ~~~~~~~~~~~~~~~~~~~~~~~~
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION

# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION

# Location of site-specific templates etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# unset is equivalent to $WM_PROJECT_INST_DIR/site
if [ -d "$WM_PROJECT_SITE" ]
then
    export WM_PROJECT_SITE
else
    unset WM_PROJECT_SITE
fi

# Location of user files
# ~~~~~~~~~~~~~~~~~~~~~~
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION


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

# Evaluate command-line parameters
_foamEval()
{
    while [ $# -gt 0 ]
    do
        case "$1" in
        -*)
            # stray option (not meant for us here) -> get out
            break
            ;;
        *=)
            # name=       -> unset name
            [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}" 1>&2
            eval "unset ${1%=}"
            ;;
        *=*)
            # name=value  -> export name=value
            [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "export $1" 1>&2
            eval "export $1"
            ;;
        *)
            # filename: source it
            if [ -f "$1" ]
            then
                _foamSource "$1"
            else
                _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"`
            fi
            ;;
        esac
        shift
    done
}


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

# Evaluate command-line parameters and record settings for later
# these can be used to set/unset values, or specify alternative pref files
export FOAM_SETTINGS="$@"
_foamEval $@

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

#- Clean PATH
cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"

#- Clean LD_LIBRARY_PATH
cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` \
    && LD_LIBRARY_PATH="$cleaned"

#- Clean MANPATH
cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned"
if [[ `uname -s` == "Darwin" ]]
then
    cleaned=`$foamClean "$DYLD_LIBRARY_PATH" "$foamOldDirs"` && DYLD_LIBRARY_PATH="$cleaned"
fi

export PATH LD_LIBRARY_PATH MANPATH


# Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource $WM_PROJECT_DIR/etc/config/settings.sh
_foamSource $WM_PROJECT_DIR/etc/config/aliases.sh


# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.sh`


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

#- Clean LD_LIBRARY_PATH
cleaned=`$foamClean "$LD_LIBRARY_PATH"` && LD_LIBRARY_PATH="$cleaned"

#- Clean MANPATH (trailing ':' to find system pages)
cleaned=`$foamClean "$MANPATH"`: && MANPATH="$cleaned"

export PATH LD_LIBRARY_PATH MANPATH

#- Clean LD_PRELOAD
if [ -n "$LD_PRELOAD" ]
then
    cleaned=`$foamClean "$LD_PRELOAD"` && LD_PRELOAD="$cleaned"
    export LD_PRELOAD
fi

if [[ `uname -s` == "Darwin" ]]
then
    if [[ `ulimit -n` == "unlimited" || `ulimit -n` < 8192 ]]
    then
	# higher limit needed for wmkdeps
	ulimit -n 8192
    fi
fi

if [ -f $/Users/wuguanghao/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc ]; then
  . $/Users/wuguanghao/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc
fi

# cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset cleaned foamClean foamInstall foamOldDirs
unset _foamSource _foamEval




# ----------------------------------------------------------------- end-of-file

echo "WM_CC=mpicc" >> /Users/wuguanghao/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc
echo "WM_CXX=mpicxx" >> /Users/wuguanghao/OpenFOAM/OpenFOAM-2.3.x/etc/bashrcWM_CC=mpicc
WM_CXX=mpicxx
WM_CC=mpicc
WM_CC=mpicc
WM_CC=mpicc
WM_CC=mpicc
Another problem is that after running simply a case I can't open paraview. It gives following error:

Code:
ERROR: ParaView not found in /Users/wuguanghao/OpenFOAM/ThirdParty-2.3.x/platforms/darwinIntel64Gcc/ParaView-4.1.0/

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV4Readers
./Allwclean
./Allwmake
To install the preview into mac i followed following link: https://openfoamwiki.net/index.php/I...OpenFOAM_2.2.2

Thank you in advance.

Baris

Last edited by wyldckat; October 12, 2015 at 17:06. Reason: Repaired [CODE][/CODE] markers
shipman is offline   Reply With Quote

Old   October 12, 2015, 18:24
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,943
Blog Entries: 42
Rep Power: 121
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
Hi Baris,

In the file "~/.bashrc" you should not have all of that content. The idea is to only have the content that you originally had and then to add the line related to sourcing the OpenFOAM environment, for example:
Code:
source /Users/wuguanghao/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc
I don't have access to a Mac, so I don't know what is the default content of the file "~/.bashrc".

As for using paraFoam, the instructions are given here: https://openfoamwiki.net/index.php/I...w_Installation

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 29, 2015, 11:18
Default
  #5
Senior Member
 
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 8
shipman is on a distinguished road
Hi Bruno,

Thank you very much for your help. You are great man Finally successfully I have installed OF into my mac. After that a friend asked me to install OF into same version of his MAC. I have tried several times same way, however I am getting following error when I am installing mpirun-gcc48 or mpirun-gcc49. By the way I can't not install gcc48 but I was able to install gcc49. I don't know the reason. Could you tell me that How can I fix following problem and install mpirun:

Quote:
Error: org.macports.build for port openmpi-gcc49 returned: command execution failed

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org _release_tarballs_ports_sc ience_openmpi/openmpi-gcc49/work/openmpi-1.10.0/opal/mca/hwloc/base/hwloc_base_util.c:1482:13: error: 'HWLOC_OBJ_OSDEV_COPROC' undeclared (first use in this function)
Your help will make me so appreacited.

Thanks in advance.

Baris
shipman is offline   Reply With Quote

Old   October 31, 2015, 09:14
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,943
Blog Entries: 42
Rep Power: 121
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: I have no specific idea about this, because I don't have access to a Mac.
Nonetheless, I suspect that it has something to do with using OpenMPI 1.10, which is very recent and is possibly the reason for the problems you're having.

I'm currently advising people to follow the instructions given by Alexei, which relies in Homebrew instead of Macports: https://github.com/mrklein/openfoam-...ion-&-Homebrew
wyldckat is offline   Reply With Quote

Old   May 16, 2016, 02:50
Default
  #7
New Member
 
Ali
Join Date: May 2016
Posts: 8
Rep Power: 5
AliVali is on a distinguished road
Hi,

I have the same problem when I want to install Openfoam on my macbook OS X 10.9.4

sudo port select --set llvm mp-llvm-3.5
Selecting 'mp-llvm-3.5' for 'llvm' failed: The specified version 'mp-llvm-3.5' is not valid.

Any help is highly appreciated
AliVali is offline   Reply With Quote

Old   May 16, 2016, 14:24
Default
  #8
New Member
 
Thomas Evans
Join Date: Dec 2015
Posts: 21
Rep Power: 5
windscion is on a distinguished road
Quote:
Originally Posted by AliVali View Post
Hi,

I have the same problem when I want to install Openfoam on my macbook OS X 10.9.4

sudo port select --set llvm mp-llvm-3.5
Selecting 'mp-llvm-3.5' for 'llvm' failed: The specified version 'mp-llvm-3.5' is not valid.

Any help is highly appreciated
What is output of port select --summary? Presumably a version after 3.5 should work. (Myself, I have only 3.7 since installing 10.11)
windscion is offline   Reply With Quote

Old   May 16, 2016, 21:18
Default
  #9
Senior Member
 
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 8
shipman is on a distinguished road
Hi to all,

This is the tutorial which I have prepared how to install openfoam into MAC.

Hope it helps you.

https://www.researchgate.net/publica...nFOAM_into_MAC
shipman is offline   Reply With Quote

Old   May 18, 2016, 01:00
Default
  #10
New Member
 
Ali
Join Date: May 2016
Posts: 8
Rep Power: 5
AliVali is on a distinguished road
Hi Windscin,
port select --summary
Name Selected Options
==== ======== =======
db none db48 none
gcc mp-gcc48 mp-gcc48 mp-gcc5 none
llvm none mp-llvm-3.7 none
mpi openmpi-gcc48-fortran openmpi-gcc48-fortran openmpi-mp-fortran none
python python27 python25-apple python26-apple python27 python27-apple none
python2 none python25-apple python26-apple python27 python27-apple none

I'll try to install a newer version next week.
AliVali is offline   Reply With Quote

Old   May 18, 2016, 01:04
Default
  #11
New Member
 
Ali
Join Date: May 2016
Posts: 8
Rep Power: 5
AliVali is on a distinguished road
Quote:
Originally Posted by shipman View Post
Hi to all,

This is the tutorial which I have prepared how to install openfoam into MAC.

Hope it helps you.

https://www.researchgate.net/publica...nFOAM_into_MAC
Thanks Shipman,
your tutorial looks very useful, I'll try it soon.

Regards
AliVali is offline   Reply With Quote

Old   May 18, 2016, 10:54
Default
  #12
New Member
 
Thomas Evans
Join Date: Dec 2015
Posts: 21
Rep Power: 5
windscion is on a distinguished road
Ali: Looks okay so far, except that you don't have mp-llvm-3.7 selected, which I am guessing is irrelevant since the only alternative is none.

I used this setup:
Name Selected Options
==== ======== =======
cython none cython26 none
gcc mp-gcc49 mp-gcc49 mp-gcc5 none
llvm mp-llvm-3.7 mp-llvm-3.7 none
mpi openmpi-gcc49-fortran mpich-gcc49-fortran openmpi-gcc49-fortran openmpi-mp-fortran none
nosetests none nosetests26 none
python python27 python26 python26-apple python27 python27-apple none
python2 none python26 python27 none
wxWidgets none wxWidgets-3.0 none

I managed to get 2.3.x working with gcc49 and mp-llvm-3.7, but I also added WM_CC=/opt/local/bin/mpicc and WM_CXX=/opt/local/bin/mpicxx at the end of $HOME/OpenFoam/OpenFoam-2.3.x/etc/bashrc. (After verifying that the chain of symbolic links ended successfully. No kidding, at one point the chain broke and `which mpicc` said one thing, but mpicc -v said another.)

Then I used this hack to allow macport's flex (2.6.0) to work with the package:

% find . -name '*.L' -print

then for each file found above, change
#if YY_FLEX_SUBMINOR_VERSION < 34
to
#if YY_FLEX_SUBMINOR_VERSION < 34 && YY_FLEX_MINOR_VERSION < 6
and then the code will work properly with flex 2.6

I used gcc49 mostly because it saved me adding another compiler version, but also because it has memory safeguards not found in gcc48.

I trust you are installing on a case-sensitive filesystem? I.e., not the root filesystem -- which must be case insensitive or OS X breaks.
windscion is offline   Reply With Quote

Reply

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
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
[OpenFOAM.org] OpenFOAM 2.3.x on Mac OS X 10.10.1 Installation Errors Petru OpenFOAM Installation 15 December 29, 2015 13:51
[OpenFOAM.org] Installation notes: OpenFOAM 2.3.x (git repo) on OSX 10.9 opedrofunk OpenFOAM Installation 7 July 1, 2015 14:51
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
Critical errors gcc and icoFoam during installation of 15 quartzian OpenFOAM Installation 3 December 12, 2008 13:42


All times are GMT -4. The time now is 18:37.