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

Installing OF 1.6 on Mac OS X

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 2009, 12:57
Default
  #101
New Member
 
nikita tryaskin
Join Date: Oct 2009
Location: Helsinki/St. Petersburg
Posts: 27
Rep Power: 17
eternityboy is on a distinguished road
muah!!!! awesome!
i'll try to install OF according to your manual..

could it be any problem if im compiling gcc44 right now?
eternityboy is offline   Reply With Quote

Old   November 5, 2009, 19:10
Default OpenFOAM-1.6.x installation process for Mac OS X 10.6.1
  #102
Member
 
Elvis Dowson
Join Date: Oct 2009
Posts: 36
Rep Power: 17
elvisjohndowson is on a distinguished road
Hi,
Let me know if you run into any problems. The whole process is fresh in my mind, so if you can try it out now, I'll be able to help you quickly proceed.

I'm reproducing my full instructions once again, for OpenFOAM-1.6. Please note that I am installing everything into ~/Tool/OpenFOAM, and not ~/OpenFOAM. So, read the original paraview readme files, and then use the following instructions as a high level guideline, adapting it to your specific context. Also, after installation, OpenFOAM automatically creates a ~/OpenFOAM/elvis-1.6.x-patches/run folder.

Note that when I clone the git repository, I first download all the OpenFOAM-1.6.x files, and then I clone that locally, to another folder called OpenFOAM-1.6.x-patches. This is just so that I have an area to work on and apply patches separately. You should then apply Bernhard's patches to the OpenFOAM-1.6.x-patches and ThirdParty-1.6.x-patches folders (I simply created a new git repository out of the ThirdParty-1.6 archive, by using the git init, git add . and git commit commands.

Overview

This document describes how to install OpenFOAM-1.6 on Mac OS X 10.6.1 (Snow Leopard).

Procedure


Step 00.00: Mount a case-sensitive partition

diskutil list
diskutil umount disk0s3
diskutil mount -mountPoint /Users/elvis/Tool disk0s3


Step 01.00: Download MacPorts-1.8.0

Download MacPorts from the MacPorts download directory: http://distfiles.macports.org/MacPorts/

Run the package installer, to install the MacPorts infrastructure software to /opt/local/bin

Update the MacPorts installation by running the following command

sudo port selfupdate


Step 01.01: Install MacPorts gcc43

sudo port install gcc43
sudo port install gsed

Step 02.00: Install dbus from MacPorts

sudo port install dbus

# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
#
# To unload, type the following:
# sudo launchctl unload -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl unload -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist



Step 03.00: Clone the official qt git source code repository

git clone git://gitorious.org/qt/qt.git

Step 03.01: Checkout the qt-4.5 branch

cd qt
git checkout 4.5

Step 03.02: Clone the git branch

git clone . ../qt-4.5

Step 03.03: Configure qt-4.5

./configure -platform macx-g++ -cocoa -arch x86_64 -nomake examples -nomake demos -dbus -framework -sdk /Developer/SDKs/MacOSX10.6.sdk/ -prefix /Developer/Applications/Qt-4.5

Step 03.04: Build qt-4.5

make -j 4

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /Developer/Applications/Qt-4.5

To reconfigure, run 'make confclean' and 'configure'.

Step 03.05: Build qt-4.5 documentation

make docs

Step 03.06: Install qt-4.5

sudo make install

Step 03.07: Update the PATH environment variable to the qt installation’s binary folder

vi ~/.profile

# Qt-4.5
export PATH=/Developer/Applications/Qt-4.5/bin:$PATH


Step 04.00: Install cmake-2.8.0-rc4

Download cmake-2.8.0-rc4 from www.kitware.org

Bootstrap, build and install CMake

./bootstrap
make
sudo make install



Step 05.00: Install Doxygen from the cvs repository.


svn co https://doxygen.svn.sourceforge.net/.../doxygen/trunk doxygen
cd doxygen
./configure
make
sudo make install

To force a fresh release after an earlier check-out do:

make distclean
svn update
./configure
make
make install

If compilation fails on Mac OS X 10.6.1, modify qtools/qglobal.h as follows
# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6)


Step 06.00: Install OpenFOAM from tar sources

tar xzf OpenFOAM-1.6.General.gtgz
tar xzf ThirdParty-1.6.General.gtgz
cd OpenFOAM-1.6
patch -p1 < ../OpenFOAM-1.6-Mac.patch
cd ..
cd ThirdParty-1.6
patch -p1 < ../ThirdParty-1.6.-Mac.patch
cd ..
. /Users/elvis/OpenFOAM/OpenFOAM-1.6/etc/bashrc
cd $WM_PROJECT_DIR
export WM_NCOMPPROCS=4
./Allwmake

OR

Step 06.01: Install OpenFOAM from the git repository.

cd ~/OpenFOAM
git clone git://repo.or.cz/OpenFOAM-1.6.x.git
tar -zxf ThirdParty-1.6.General.gtgz
ln -s ThirdParty-1.6 ThirdParty-1.6.x
cd ThirdParty-1.6.x

Step 06.02: Test the OpenFOAM installation.

To test whether your installation is ready, run one of the several tutorial-cases, i.e. the "lid driven cavity" case as follows (see also "Getting Started" of the README included in the OpenFOAM distribution):

mkdir -p /Users/elvis/Tool/OpenFOAM/run
cp -r $WM_PROJECT_DIR/tutorials run
cd run/tutorials/incompressible/icoFoam/
blockMesh -case cavity
icoFoam -case cavity


If these commands fail, you either put the files in the wrong place or didn't source the rc-file. Re-check that everything is where it should be and that you sourced the rc-file as documented in the installation instructions.


Best regards,

Elvis
elvisjohndowson is offline   Reply With Quote

Old   November 5, 2009, 19:12
Default How to build ParaView-3.7.0 using qt-4.5.x for OpenFOAM-1.6 on Mac OS X 10.6.1
  #103
Member
 
Elvis Dowson
Join Date: Oct 2009
Posts: 36
Rep Power: 17
elvisjohndowson is on a distinguished road
Procedure


Step 01.00: Install dbus

sudo port install dbus

# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
#
# To unload, type the following:
# sudo launchctl unload -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl unload -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist


Step 02.00: Clone the official qt git source code repository

git clone git://gitorious.org/qt/qt.git

Step 02.01: Checkout the qt-4.5 branch

cd qt
git checkout --track -b 4.5 origin/4.5

Step 02.02: Clone the git branch

git clone . ../qt-4.5

Step 02.03: Configure qt-4.5

./configure -opensource -release -platform macx-g++ -cocoa -arch x86_64 -nomake examples -nomake demos -qt-sql-sqlite -dbus-linked -framework -xmlpatterns -phonon -phonon-backend -svg -no-qt3support -sdk /Developer/SDKs/MacOSX10.5.sdk/ -prefix /Developer/Applications/Qt-4.5

Step 02.04: Build qt-4.5

make -j 4

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /Developer/Applications/Qt-4.5

To reconfigure, run 'make confclean' and 'configure'.

Step 02.05: Build qt documentation

make docs

Step 02.06: Install qt

sudo make install

Step 02.07: Update the PATH environment variable to the qt installation’s binary folder

vi ~/.profile

# Qt-4.5
export QTROOT=/Developer/Applications/Qt-4.5
export QT_PLUGIN_PATH=/Developer/Applications/Qt-4.5/plugins/designer
export QT_LIBRARY_PATH=/Developer/Applications/Qt-4.5/lib
export PATH=$QTROOT/bin:$PATH
export DYLD_LIBRARY_PATH=$QT_LIBRARY_PATH:$DYLD_LIBRARY_P ATH


Step 03.00: Install CMake from the cvs repository

Download cmake-2.8.0-rc4 from www.kitware.org

Bootstrap, build and install CMake

./bootstrap
make
sudo make install


Step 04.00: Obtain the latest Paraview sources from the cvs repository.

mkdir $HOME/Tool/ParaView
cd $HOME/Tool/ParaView

cvs -d server:anoncvs@www.paraview.org:/cvsroot/ParaView3 login
(respond with empty password)

Follow this command by checking out the source code:
cvs -d server:anoncvs@www.paraview.org:/cvsroot/ParaView3 co ParaView3

For checking out the data, use the following:
cvs -d server:anoncvs@www.paraview.org:/cvsroot/ParaView3 co ParaViewData

Patch the paraview sources so that the qt-4.5 resources get copied over to the app.bundle:

diff --git a/Applications/Client/CreateBundle.sh.in b/Applications/Client/CreateBundle.sh.in
index 539e817..617eaba 100755
--- a/Applications/Client/CreateBundle.sh.in
+++ b/Applications/Client/CreateBundle.sh.in
@@ -36,6 +36,7 @@ LibrariesDir="$ParaView_App/Contents/Libraries"
PluginsDir="$ParaView_App/Contents/Plugins"
PythonDir="$ParaView_App/Contents/Python"
SupportDir="$ParaView_App/Contents/Support"
+ResourcesDir="$ParaView_App/Contents/Resources"


# Create directories in the install tree bundle
@@ -45,6 +46,7 @@ mkdir -p "$LibrariesDir"
mkdir -p "$PluginsDir"
mkdir -p "$PythonDir"
mkdir -p "$SupportDir"
+mkdir -p "$ResourcesDir"


# Copy the documentation into the Support directory
@@ -61,3 +63,7 @@ cp -Rp "${ParaViewBinaryDir}/Utilities/VTKPythonWrapping/paraview" "$PythonDir/"
# above recursive directory copies:
#
rm -rf "$PythonDir/paraview/pv_compile_complete"
+
+# Add an empty qt.conf to prevent the loading of imageformats plugins
+#
+touch "$ResourcesDir/qt.conf"


diff --git a/Applications/Client/CMakeLists.txt b/Applications/Client/CMakeLists.txt
index fba5b6a..5604ade 100644
--- a/Applications/Client/CMakeLists.txt
+++ b/Applications/Client/CMakeLists.txt
@@ -58,6 +58,23 @@ IF(Q_WS_MAC)
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
+ IF(QT_MAC_USE_COCOA)
+ GET_FILENAME_COMPONENT(qt_menu_nib
+ "@QT_QTGUI_LIBRARY_RELEASE@/Resources/qt_menu.nib"
+ REALPATH)
+ set(qt_menu_nib_sources
+ "${qt_menu_nib}/classes.nib"
+ "${qt_menu_nib}/info.nib"
+ "${qt_menu_nib}/keyedobjects.nib"
+ )
+ SET_SOURCE_FILES_PROPERTIES(
+ ${qt_menu_nib_sources}
+ PROPERTIES
+ MACOSX_PACKAGE_LOCATION Resources/qt_menu.nib
+ )
+ ELSE(QT_MAC_USE_COCOA)
+ set(qt_menu_nib_sources)
+ ENDIF(QT_MAC_USE_COCOA)
SET(MACOSX_BUNDLE_ICON_FILE MacIcon.icns)
SET(MAKE_BUNDLE MACOSX_BUNDLE)
ENDIF(Q_WS_MAC)
@@ -80,6 +97,7 @@ ADD_EXECUTABLE(${PV_EXE_NAME} WIN32 ${MAKE_BUNDLE}
ProcessModuleGUIHelper.h
${EXE_ICON}
${apple_bundle_sources}
+ ${qt_menu_nib_sources}
)

TARGET_LINK_LIBRARIES(${PV_EXE_NAME}

Step 04.01: Create a ParaView3 build folder.

mkdir ParaView3-bin
cd ParaView3-bin

Step 04.02: Configure ParaView3.

ccmake ../ParaView3

Set the following CMake options:

CMAKE_SHARED_LIBS=ON
CMAKE_BUILD_TYPE=Release
BUILD_TESTING=OFF
CMAKE_OSX_DEPLOYMENT_TARGET=10.5
CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
PARAVIEW_USE_MPI=ON
MPI_COMPILER=/usr/bin/mpic++
MPI_COMPILE_FLAGS=-D_REENTRANT
MPI_EXTRA_LIBRARY=/usr/lib/libmpi.dylib;/usr/lib/libopen-rte.dylib;/usr/lib/libopen-pal.dylib
MPI_INCLUDE_PATH=/usr/include
MPI_LIBRARY=/usr/lib/libmpi_cxx.dylib
MPI_LINK_FLAGS=-Wl,-u,_munmap -Wl,-multiply_defined,suppress
VTK_USE_CARBON=OFF
VTK_USE_COCOA=ON
VTK_USE_MPI=ON
VTK_USE_RPATH=ON

Step 04.03: Build ParaView

make -j 4

Step 04.04: Install ParaView

make install


Step 05.00: Install ParaView3POpenFOAMReader

git clone git://github.com/themiwi/ParaView3POpenFOAMReader.git
cd ParaView3POpenFOAMReader
mkdir platforms
cd platforms
mkdir darwinIntel64
cd darwinIntel64

Step 05.01: Configure the ParaView3POpenFOAMReader plugin

ccmake ../../

CMAKE_INSTALL_PREFIX=/Users/elvis/Tool/ParaView/ParaView3-bin/bin/Plugins
ParaView_DIR=/Users/elvis/Tool/ParaView/ParaView3-bin

Step 05.02: Build the ParaView3POpenFOAMReader plugin.

make -j 4

Step 05.03: Install the ParaView3POpenFOAMReader plugin.

make install


Step 06.00: Update environment variables.

vi ~/.profile

Add the following entries to the .profile file:

# Qt-4.5
export PATH=/Developer/Applications/Qt-4.5/bin:$PATH

# ParaView-3.7.0
export ParaView_INST_DIR=/Users/elvis/Tool/ParaView/ParaView3
export ParaView_DIR=/Users/elvis/Tool/ParaView/ParaView3-bin
export PV_PLUGIN_PATH=/Users/elvis/Tool/ParaView/ParaView3-bin/bin/Plugins
export PATH=$ParaView_DIR/bin:$PATH

Modify the pvFoam script as follows:

paraviewPath="/Applications/ParaView 3.7.0.app/Contents/MacOS/paraview”


Step 07.00: Test the OpenFOAM-1.6 and ParaView-3.7.0 installation.

cd ~/OpenFOAM/elvis-1.6.x-patches/run/tutorials/incompressible/icoFoam
blockMesh -case cavity
icoFoam -case cavity
pvFoam -case cavity
elvisjohndowson is offline   Reply With Quote

Old   November 5, 2009, 19:16
Default Automator service scripts for launching an OpenFOAM session and Paraview
  #104
Member
 
Elvis Dowson
Join Date: Oct 2009
Posts: 36
Rep Power: 17
elvisjohndowson is on a distinguished road
So, I took things one step further, and figured out how to create Automator scripts for Mac OS X, so that you just have to right click on a case, and it will automatically launch ParaView, or an OpenFOAM session.

I'm attaching two images, it should be self explanatory. I quite enjoyed doing all this, and I'm glad everything worked out finally. That ParaView issue was really trickly, and I realized in the end that it had nothing to do with the compiler. In fact just use the apple default compiler and use the parallel OpenFOAM reader plugin. Saves you a whole lot of hassle and it works straight out of the box. I think that plugin should be included in future distributions.

Best regards,

Elvis
Attached Images
File Type: jpg Start a ParaView session.jpg (62.5 KB, 47 views)
File Type: jpg Start an OpenFOAM session.jpg (58.3 KB, 35 views)
elvisjohndowson is offline   Reply With Quote

Old   November 12, 2009, 12:31
Default
  #105
New Member
 
nikita tryaskin
Join Date: Oct 2009
Location: Helsinki/St. Petersburg
Posts: 27
Rep Power: 17
eternityboy is on a distinguished road
ok, first of all

should i have this Paraview version from thirdparty?
cause i have downloaded the latest version from paraview and it works fine for me

second problem:
$ git checkout 4.5
error: pathspec '4.5' did not match any file(s) known to git.

but, u've just changed that string:
git checkout --track -b 4.5 origin/4.5
so, probably i can try it a bit later


and, what are 'gsed' and 'dbus' for?

i'll try to keep you in touch according to my installation process
eternityboy is offline   Reply With Quote

Old   November 12, 2009, 13:15
Default
  #106
New Member
 
nikita tryaskin
Join Date: Oct 2009
Location: Helsinki/St. Petersburg
Posts: 27
Rep Power: 17
eternityboy is on a distinguished road
ok, this part goes before: Step 02.04: Build qt-4.5

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /Developer/Applications/Qt-4.5

To reconfigure, run 'make confclean' and 'configure'.
eternityboy is offline   Reply With Quote

Old   November 12, 2009, 15:16
Default
  #107
Member
 
Elvis Dowson
Join Date: Oct 2009
Posts: 36
Rep Power: 17
elvisjohndowson is on a distinguished road
I had difficult building and running paraview, because the qt resources were not copied over to the app bundle. It runs fine from the build/bin folder, but not when you build and install the paraview app bundle.

You should learn to use git a bit. First of all, you cannot do a git checkout 4.5 unless you first create a git branch using the git branch 4.5 command. That is why you got the path spec error, because a local branch called 4.5 does not exist.

the --track option tells it to track a remote branch origin/4.5

If the instructions are clearly posted, why try something else, and then post what you did, without atleast trying out what was posted to begin with?

gsed is used by the buildparaview script, to pre-process and remove some incompatible commands to the gcc compiler in the makefiles.

dbus is for qt. Not sure if it is needed though, but someother people who use and compile qt use it. It is used for communications between application components. Try to run the remotecontrolledcar example in the qt examples/dbus folder
elvisjohndowson is offline   Reply With Quote

Old   November 12, 2009, 15:18
Default
  #108
New Member
 
nikita tryaskin
Join Date: Oct 2009
Location: Helsinki/St. Petersburg
Posts: 27
Rep Power: 17
eternityboy is on a distinguished road
Step 02.05: Build qt documentation
gives:

qt eternityboy$ make docs
cd tools/qdoc3/ && make -f Makefile
make[1]: Nothing to be done for `first'.
(cd /Users/eternityboy/qt/tools/qdoc3/test && QT_BUILD_TREE=/Users/eternityboy/qt QT_SOURCE_TREE=/Users/eternityboy/qt /Users/eternityboy/qt/tools/qdoc3/qdoc3 -Dopensourceedition qt-build-docs-with-xcode.qdocconf)
dyld: Library not loaded: /Developer/Applications/Qt-4.5/lib/QtXml.framework/Versions/4/QtXml
Referenced from: /Users/eternityboy/qt/tools/qdoc3/qdoc3
Reason: image not found
/bin/sh: line 1: 1826 Trace/BPT trap QT_BUILD_TREE=/Users/eternityboy/qt QT_SOURCE_TREE=/Users/eternityboy/qt /Users/eternityboy/qt/tools/qdoc3/qdoc3 -Dopensourceedition qt-build-docs-with-xcode.qdocconf
make: *** [adp_docs] Error 133


i figured out that there is no Qt-4.5 in Developer/Applications/
so, --prefix for config to /Developer/Applications/Qt-4.5 doesn't work
strange for me..
so it was configured and build to my home folder.. same place where qt is
eternityboy is offline   Reply With Quote

Old   November 12, 2009, 23:09
Default
  #109
Member
 
Elvis Dowson
Join Date: Oct 2009
Posts: 36
Rep Power: 17
elvisjohndowson is on a distinguished road
Maybe you have an older version of qt, v3.0 perhaps, and qmake from version 3 is in your path? Have you modified your .profile with the path to the correct version of qmake? For example, here is what my .profile looks like:

# MacPorts
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

# Qt-4.5
export QTROOT=/Developer/Applications/Qt-4.5
export QT_PLUGIN_PATH=/Developer/Applications/Qt-4.5/plugins/designer
export QT_LIBRARY_PATH=/Developer/Applications/Qt-4.5/lib
export PATH=$QTROOT/bin:$PATH
export DYLD_LIBRARY_PATH=$QT_LIBRARY_PATH:$DYLD_LIBRARY_P ATH

# ParaView-3.7.0

export ParaView_INST_DIR=/Users/elvis/Tool/ParaView/ParaView3
export ParaView_DIR=/Users/elvis/Tool/ParaView/ParaView3-bin
export PV_PLUGIN_PATH=/Users/elvis/Tool/ParaView/ParaView3-bin/bin/Plugins
export PATH=$ParaView_DIR/bin:$PATH
elvisjohndowson is offline   Reply With Quote

Old   November 25, 2009, 15:29
Default
  #110
los
Member
 
Tiago Macarios
Join Date: Mar 2009
Posts: 35
Rep Power: 17
los is on a distinguished road
after step 4 and after this line:
Patch the paraview sources so that the qt-4.5 resources get copied over to the app.bundle:

there is a script or something, where should i use it?
los is offline   Reply With Quote

Old   February 3, 2010, 17:09
Default patch for the git repository OpenFOAM-1.6.x
  #111
New Member
 
John.B
Join Date: Mar 2009
Posts: 14
Rep Power: 17
johnb is on a distinguished road
Hi Elvis,

Thanks for the howto regarding installing OpenFOAM 1.6, it works fine.
But I still have a question:
I will now try to install OF from the git repository (instead as earlier from the OpenFOAM-1.6.General.gtgz). I have followed the steps in 06.01, but what about the patch (OpenFOAM-1.6-Mac.patch) how shall I apply that? Is it a problem that I already installed OpenFOAM-1.6 and will now install OpenFOAM-1.6.x?

This is the result when I apply the patch:
"johnb:OpenFOAM-1.6.x johnb$ patch -p1 < ../download/OpenFOAM-1.6-Mac.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/.build b/.build
|index 1ce203a..a1fc397 100644
|--- a/.build
|+++ b/.build
--------------------------
File to patch:"

Thanks in advance!
John
johnb is offline   Reply With Quote

Old   February 3, 2010, 21:25
Default
  #112
Member
 
Elvis Dowson
Join Date: Oct 2009
Posts: 36
Rep Power: 17
elvisjohndowson is on a distinguished road
Quote:
Originally Posted by johnb View Post
Hi Elvis,

This is the result when I apply the patch:
"johnb:OpenFOAM-1.6.x johnb$ patch -p1 < ../download/OpenFOAM-1.6-Mac.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/.build b/.build
|index 1ce203a..a1fc397 100644
|--- a/.build
|+++ b/.build
--------------------------
File to patch:"

Thanks in advance!
John
To understand what's happening, the first line diff shows that it was a patch created using the git diff command. The a/.build and b/.build refers to the files source and modified file versions from which the patch was generated.

Now the /.build hidden file might not exist in the current path, so you can either

a. remove this specific patch entry from the patch file
b. copy the .build spec from another location, e.g. if was there in the tar archive, into the current directory, and apply the patch

I'm just quoting this from memory.

Best regards,

Elvis Dowson
elvisjohndowson is offline   Reply With Quote

Old   February 5, 2010, 02:49
Default
  #113
New Member
 
Xavier Ponticq
Join Date: Mar 2009
Posts: 4
Rep Power: 17
xponticq is on a distinguished road
Hi Elvis
I tried to install OF 1.6 according your process and I ran through errors when I launched blockMesh for the cavity tutorial case.
I think the compilation worked fine but when I launch foamInstallationTest I got an error about gcc version installed (xcode gcc) and the one required (> 4.3) even if I installed gcc from macport.
Also, when I sourced the etc/bashrc I got an error _foamAddLib:5 not found
Any ideas ?
Thanks

Edit : This is the kind of message I got from blockMesh

Build : 1.6-fd413460e215
Exec : blockMesh -case cavity
Date : Feb 05 2010
Time : 08:02:20
Host : MacBook.local
PID : 65108
fileName::stripInvalid() called for invalid fileName /Volumes/Imagedisque/xponticq-1.6/run/tutorials/incompressible/icoFoam
For debug level (= 2) > 1 this is considered fatal

Last edited by xponticq; February 5, 2010 at 03:06.
xponticq is offline   Reply With Quote

Old   February 18, 2010, 09:04
Default
  #114
New Member
 
Marcus Vinicius Eiffle Duarte
Join Date: Feb 2010
Posts: 5
Rep Power: 16
eiffleduarte is on a distinguished road
Hey, folks!

I am trying to compile OpenFOAM-1.6 on a MacPro running OSX 10.5.8. I read the wiki (http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac) and this forum thread before trying the compilation. However, I tried to compile OF16 with prebuilt versions of Qt-4.5.2 (downloaded from Nokia) and CMake 2.8 (downloaded from kitware). I am doing this because my employer's proxy does not allow me to use git (or cvs,svn, etc). I tried to configure git to use http, but it did not work so far.

Anyway, I tried the compilation using the following approach

1) I created three different case-sensitive disk images (OpenFOAM-1.6.sparseimage, ThirdParty-1.6.sparseimage and $USER-1.6.sparseimage) linked under $HOME/OpenFOAM. I am doing this as I have and older OpenFOAM-1.5 working with this scheme (prebuilt binaries downloaded from http://www.ifdmavt.ethz.ch/education...foam/of-macosx)

2) I installed MacPorts 1.8.2, and installed ports gcc43, gsed and gawk.

3) I downloaded OpenFOAM-1.6.General.gtgz and ThirdParty-1.6.General.gtgz from openfoam.com.

4) I downloaded the patches from http://openfoamwiki.net/index.php/Fi...ac.patch.v1.gz and http://openfoamwiki.net/index.php/Fi...ac.patch.v1.gz.

5) After untarring the archives and patching both, I sourced $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc, and ran Allwmake from $HOME/OpenFOAM/OpenFOAM-1.6/

I am getting several errors during compilation:

First: at the beginning of the process, configuration of OpenMPI complains that my C++ compiler (/opt/local/bin/g++-mp-4.3) does not work. Reading the config.log for OpenMPI, it seems that a simple "Hello, World" failed to compile:

(....)
configure:24484: checking if C++ compiler works
configure:24565: g++-mp-4.3 -o conftest -DNDEBUG -m64 -fPIC -m64 conftest.cpp >&5
Undefined symbols:
"___gxx_personality_v0", referenced from:
EH_frame1 in ccycCHgw.o
"std::allocator<char>::allocator()", referenced from:
_main in ccycCHgw.o
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()", referenced from:
_main in ccycCHgw.o
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:
_main in ccycCHgw.o
"std::allocator<char>::~allocator()", referenced from:
_main in ccycCHgw.o
_main in ccycCHgw.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
configure:24569: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Open MPI"
| #define PACKAGE_TARNAME "openmpi"
| #define PACKAGE_VERSION "1.3.3"
| #define PACKAGE_STRING "Open MPI 1.3.3"
| #define PACKAGE_BUGREPORT "http://www.open-mpi.org/community/help/"
| #define OMPI_MAJOR_VERSION 1
| #define OMPI_MINOR_VERSION 3
| #define OMPI_RELEASE_VERSION 3
| #define OMPI_GREEK_VERSION ""
| #define OMPI_VERSION "3"
| #define OMPI_RELEASE_DATE "Jul 14, 2009"
| #define ORTE_MAJOR_VERSION 1
| #define ORTE_MINOR_VERSION 3
| #define ORTE_RELEASE_VERSION 3
| #define ORTE_GREEK_VERSION ""
| #define ORTE_VERSION "3"
| #define ORTE_RELEASE_DATE "Jul 14, 2009"
| #define OPAL_MAJOR_VERSION 1
| #define OPAL_MINOR_VERSION 3
| #define OPAL_RELEASE_VERSION 3
| #define OPAL_GREEK_VERSION ""
| #define OPAL_VERSION "3"
| #define OPAL_RELEASE_DATE "Jul 14, 2009"
| #define OMPI_ARCH "i386-apple-darwin9.8.0"
| #define OMPI_ENABLE_MEM_DEBUG 0
| #define OMPI_ENABLE_MEM_PROFILE 0
| #define OMPI_ENABLE_DEBUG 0
| #define OMPI_GROUP_SPARSE 0
| #define OMPI_WANT_MPI_CXX_SEEK 1
| #define MPI_PARAM_CHECK ompi_mpi_param_check
| #define OMPI_WANT_PRETTY_PRINT_STACKTRACE 1
| #define OMPI_WANT_PERUSE 0
| #define OMPI_ENABLE_PTY_SUPPORT 1
| #define OMPI_ENABLE_HETEROGENEOUS_SUPPORT 0
| #define OPAL_ENABLE_TRACE 0
| #define ORTE_DISABLE_FULL_SUPPORT 0
| #define OPAL_ENABLE_FT 0
| #define OPAL_ENABLE_FT_CR 0
| #define OMPI_WANT_HOME_CONFIG_FILES 1
| #define OPAL_ENABLE_IPV6 1
| #define ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT 0
| #define OPAL_PACKAGE_STRING "Open MPI ctp8@no025512.petrobras.biz Distribution"
| #define OPAL_IDENT_STRING "1.3.3"
| #define OMPI_OPENIB_PAD_HDR 0
| #define OMPI_CC "gcc-mp-4.3"
| #define STDC_HEADERS 1
| #define _GNU_SOURCE 1
| #define OMPI_C_HAVE_BUILTIN_EXPECT 1
| #define OMPI_C_HAVE_BUILTIN_PREFETCH 1
| #define OMPI_CC_USE_PRAGMA_IDENT 0
| #define OMPI_CC_USE_IDENT 0
| #define OMPI_CC_USE_PRAGMA_COMMENT
| #define OMPI_CC_USE_CONST_CHAR_IDENT 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_LONG_LONG 1
| #define HAVE_LONG_DOUBLE 1
| #define HAVE_INT8_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_INT16_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_INT32_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_INT64_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_INTPTR_T 1
| #define HAVE_UINTPTR_T 1
| #define HAVE_MODE_T 1
| #define HAVE_SSIZE_T 1
| #define HAVE_PTRDIFF_T 1
| #define SIZEOF_CHAR 1
| #define SIZEOF_SHORT 2
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 8
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_LONG_DOUBLE 16
| #define SIZEOF_FLOAT 4
| #define SIZEOF_DOUBLE 8
| #define SIZEOF_VOID_P 8
| #define SIZEOF_SIZE_T 8
| #define SIZEOF_SSIZE_T 8
| #define SIZEOF_PTRDIFF_T 8
| #define OMPI_ALIGNMENT_CHAR 1
| #define OMPI_ALIGNMENT_SHORT 2
| #define OMPI_ALIGNMENT_WCHAR 4
| #define OMPI_ALIGNMENT_INT 4
| #define OMPI_ALIGNMENT_LONG 8
| #define OMPI_ALIGNMENT_LONG_LONG 8
| #define OMPI_ALIGNMENT_FLOAT 4
| #define OMPI_ALIGNMENT_DOUBLE 8
| #define OMPI_ALIGNMENT_LONG_DOUBLE 16
| #define OMPI_ALIGNMENT_VOID_P 8
| #define OMPI_NEED_C_BOOL 1
| #ifndef __cplusplus
| #define inline __inline__
| #endif
| #define restrict __restrict
| #define OMPI_ENABLE_MPI_PROFILING 0
| #define OMPI_HAVE_WEAK_SYMBOLS 0
| #define OMPI_CXX "g++-mp-4.3"
| /* end confdefs.h. */
| #include <string>
| int
| main ()
| {
| std::string foo = "Hello, world"
| ;
| return 0;
| }
configure:24602: result: no
configure:24616: error: Could not run a simple C++ program. Aborting.


(....)



Second: after this, several .C files are compiled successfully using g++-mp-4.3, until some files start failing to link, accusing undefined symbols, with almost identical error messages. For example, this short snippet (I'm not copying the entire rror message as it is way too long):

(......)
g++-mp-4.3 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/randomProcesses/lnInclude -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/sampling/lnInclude -IlnInclude -I. -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64DPOpt/dnsFoam.o
/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H: In function 'int main(int, char**)':
/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:3: warning: unused variable 'nCorr'
/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:5: warning: unused variable 'nNonOrthCorr'
/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:8: warning: unused variable 'momentumPredictor'
/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable 'transonic'
/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable 'nOuterCorr'
g++-mp-4.3 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/randomProcesses/lnInclude -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/sampling/lnInclude -IlnInclude -I. -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/Users/ctp8/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/ctp8/OpenFOAM/OpenFOAM-1.6/lib/darwinIntel64DPOpt/openmpi-1.3.3 -lPstream Make/darwinIntel64DPOpt/dnsFoam.o -L/Users/ctp8/OpenFOAM/OpenFOAM-1.6/lib/darwinIntel64DPOpt \
-lfiniteVolume -lrandomProcesses -lsampling -lmeshTools -lOpenFOAM -lpthread -lm -o /Users/ctp8/OpenFOAM/OpenFOAM-1.6/applications/bin/darwinIntel64DPOpt/dnsFoam
Undefined symbols:
"operator delete(void*)", referenced from:
_main in dnsFoam.o
_main in dnsFoam.o
_main in dnsFoam.o
_main in dnsFoam.o
_main in dnsFoam.o
_main in dnsFoam.o
_main in dnsFoam.o
Foam::token::~token() in dnsFoam.o
Foam::tmp<Foam::Field<Foam::Vector<Foam::complex> > >::~tmp() in dnsFoam.o
Foam::tmp<Foam::Field<Foam::Tensor<double> > >::~tmp() in dnsFoam.o
Foam::LList<Foam::SLListBase, double>::clear() in dnsFoam.o
Foam::LList<Foam::SLListBase, Foam::Vector<double> >::clear() in dnsFoam.o
Foam::LList<Foam::SLListBase, Foam::Tensor<double> >::clear() in dnsFoam.o
Foam:imensionedField<Foam::Tensor<double>, Foam::volMesh>::~DimensionedField() in dnsFoam.o
Foam::fvPatchField<Foam::Tensor<double> >::~fvPatchField() in dnsFoam.o
Foam:imensionedField<Foam::Vector<double>, Foam::volMesh>::~DimensionedField() in dnsFoam.o
Foam::fvPatchField<Foam::Vector<double> >::~fvPatchField() in dnsFoam.o
Foam:imensionedField<Foam::Vector<double>, Foam::surfaceMesh>::~DimensionedField() in dnsFoam.o
Foam::fvsPatchField<Foam::Vector<double> >::~fvsPatchField() in dnsFoam.o
Foam::fvPatchField<double>::~fvPatchField() in dnsFoam.o
Foam:imensionedField<double, Foam::surfaceMesh>::~DimensionedField() in dnsFoam.o
Foam:imensionedField<double, Foam::volMesh>::~DimensionedField() in dnsFoam.o
Foam::fvsPatchField<double>::~fvsPatchField() in dnsFoam.o
(......)


I don't understand why some .C files got compiled and others do not. From the second snippet I copied above, it seems to me that some library (or include file) is missing. At the moment the compilation stops, the following files have been created under $HOME/OpenFOAM/OpenFOAM-1.6/lib/darwinIntel64DPOpt:

dummy/libPstream.dylib
libEulerianInterfacialModels.dylib
libGKlib.dylib
libIMlib.dylib
libIOFunctionObjects.dylib
libLESdeltas.dylib
libLESfilters.dylib
libMGridGen.dylib
libMGridGenGAMGAgglomeration.dylib
libODE.dylib
libOSspecific.o
libOpenFOAM.dylib
libautoMesh.dylib
libbarotropicCompressibilityModel.dylib
libbasicThermophysicalModels.dylib
libchemistryModel.dylib
libcoalCombustion.dylib
libcompressibleLESModels.dylib
libcompressibleRASModels.dylib
libcompressibleTurbulenceModel.dylib
libconversion.dylib
libdecompositionMethods.dylib
libdieselSpray.dylib
libdsmc.dylib
libdynamicFvMesh.dylib
libdynamicMesh.dylib
libedgeMesh.dylib
libengine.dylib
liberrorEstimation.dylib
libextrudeModel.dylib
libfbsdmalloc.o
libfieldFunctionObjects.dylib
libfiniteVolume.dylib
libfoamCalcFunctions.dylib
libforces.dylib
libfvMotionSolvers.dylib
libincompressibleLESModels.dylib
libincompressibleRASModels.dylib
libincompressibleTransportModels.dylib
libincompressibleTurbulenceModel.dylib
libinterfaceProperties.dylib
libkineticTheoryModel.dylib
liblagrangian.dylib
liblagrangianIntermediate.dylib
liblaminarFlameSpeedModels.dylib
libliquidMixture.dylib
libliquids.dylib
libmeshTools.dylib
libmetis.dylib
libmolecularMeasurements.dylib
libmolecule.dylib
libpdf.dylib
libphaseModel.dylib
libpotential.dylib
libradiation.dylib
librandomProcesses.dylib
libreactionThermophysicalModels.dylib
librhoCentralFoam.dylib
librhopSonicFoam.dylib
libsampling.dylib
libscotch.dylib
libsolidMixture.dylib
libsolidParticle.dylib
libsolids.dylib
libspecie.dylib
libsurfMesh.dylib
libsystemCall.dylib
libthermophysicalFunctions.dylib
libtopoChangerFvMesh.dylib
libtriSurface.dylib
libuserd-foam.dylib
libutilityFunctionObjects.dylib
openmpi-1.3.3/libPstream.dylib
postCalc.o

Can anyone give some pointers to successfully compile OpenFOAM-1.6? Did I miss some fundamental step on the procedure I detailed above?

Beyond my trouble with the core OF16 compilation, is it possible to compile Paraview with the binary Qt-4.5.2 I have in my system?

Thanks in advance,
eiffleduarte is offline   Reply With Quote

Old   February 18, 2010, 16:24
Default
  #115
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by eiffleduarte View Post
5) After untarring the archives and patching both, I sourced $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc, and ran Allwmake from $HOME/OpenFOAM/OpenFOAM-1.6/

I am getting several errors during compilation:

First: at the beginning of the process, configuration of OpenMPI complains that my C++ compiler (/opt/local/bin/g++-mp-4.3) does not work. Reading the config.log for OpenMPI, it seems that a simple "Hello, World" failed to compile:
Have you tried to compile a self-written hello-world with that compiler? First without switches then with the ones OpenMPI tries? If that doesn't work your compiler installation has a problem.

Another problem could be that you seem to be compiling for 64 bit and some of the libraries/object-files that the compiler tries to link against are 32-bit. To check whether an object file is 64 or 32 (or both) use "file test.o"

Quote:
Originally Posted by eiffleduarte View Post

Can anyone give some pointers to successfully compile OpenFOAM-1.6? Did I miss some fundamental step on the procedure I detailed above?

Beyond my trouble with the core OF16 compilation, is it possible to compile Paraview with the binary Qt-4.5.2 I have in my system?

Thanks in advance,
Should be possible, the question is whether the Qt is X11 or Cocoa (X11 is easier, Cocoa faster if you get it to work)

Bernhard
gschaider is offline   Reply With Quote

Old   February 19, 2010, 08:45
Default
  #116
New Member
 
Marcus Vinicius Eiffle Duarte
Join Date: Feb 2010
Posts: 5
Rep Power: 16
eiffleduarte is on a distinguished road
Bernhard,

thanks for your reply.
I guess I am a little lost, I am not a C++ programmer, and never before dealt with 64-bit compilation.

Quote:
Originally Posted by gschaider View Post
Have you tried to compile a self-written hello-world with that compiler? First without switches then with the ones OpenMPI tries? If that doesn't work your compiler installation has a problem.
I tried a simple HelloWorld program, hello.cpp:

// hello.cpp

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}

then I compiled it:

mi089092:tmp ctp8$ g++-mp-4.3 hello.cpp
mi089092:tmp ctp8$ file a.out
a.out: Mach-O executable i386
mi089092:tmp ctp8$ ./a.out
Hello World!mi089092:tmp ctp8$

Then I tried to compile a 64-bit version of it:

mi089092:tmp ctp8$ g++-mp-4.3 -m64 -DdarwinIntel64 hello.cpp
Undefined symbols:
"___gxx_personality_v0", referenced from:
EH_frame1 in ccFS1dNE.o
"std::ios_base::Init::~Init()", referenced from:
__static_initialization_and_destruction_0(int, int) in ccFS1dNE.o
"std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:
_main in ccFS1dNE.o
"std::ios_base::Init::Init()", referenced from:
__static_initialization_and_destruction_0(int, int) in ccFS1dNE.o
"std::cout", referenced from:
_main in ccFS1dNE.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

The same happens when I compile the exact "Hello,World!" code found in OpenMPI's configure: the default compilation successfully yields a 32-bit executable, while trying a 64-bit compilation fails with the same errors listed above.

However, I don't even know how to repair the compiler installation, assuming something went wrong when I installed the gcc43 port.

Quote:
Originally Posted by gschaider View Post
Another problem could be that you seem to be compiling for 64 bit and some of the libraries/object-files that the compiler tries to link against are 32-bit. To check whether an object file is 64 or 32 (or both) use "file test.o"
I ran file <libname> for the libraries generated by the botched compilation, and the dylib's are 64-bit. For example:

mi089092:darwinIntel64DPOpt ctp8$ file libEulerianInterfacialModels.dylib
libEulerianInterfacialModels.dylib: Mach-O 64-bit dynamically linked shared library x86_64

Reading the Allwmake log, it seems to me that the flags passed to gcc-mp-4.3 and g++-mp-4.3 during compilation of the shared libraries that actually got built are the same ones passed when the compilation failed (basically, -m64 -DdarwinIntel64 -fPIC -Wall). How come some files get compiled and others do not? Maybe there is something missing in the MacPort's gcc43 installation?



Quote:
Originally Posted by gschaider View Post
Should be possible, the question is whether the Qt is X11 or Cocoa (X11 is easier, Cocoa faster if you get it to work)

Bernhard
The Qt-4.5.2 I have in my system is built against Cocoa, and was downloaded from qt.nokia.com bundled with the Qt-4.5.2 SDK. I hope to get to the point where I find out if it is possible.

I guess I will clean all the files and try to compile OF16 in 32-bit mode. Is there any reported significant disadvantage in a 32-bit OF16, compared to a 64-bit OF16?

Thanks a lot,

Marcus Vinicius
eiffleduarte is offline   Reply With Quote

Old   February 19, 2010, 11:42
Default
  #117
New Member
 
Marcus Vinicius Eiffle Duarte
Join Date: Feb 2010
Posts: 5
Rep Power: 16
eiffleduarte is on a distinguished road
I just completed compilation of OpenFOAM-1.6 on my MacPro. Changing ~/OpenFOAM/OpenFOAM-1.6/etc/bashrc to force WM_ARCH_OPTION = 32 made the compilation of OF16 go smooth.

For now, I just tested it running the "cavity" tutorial.

I didin't try to compile the paraview that comes with the ThirdParty-1.6.General.gtgz yet. I have instaled an old Paraview-3.3.0.app downloaded from http://www.ifdmavt.ethz.ch/education...foam/of-macosx (with the old OF-1.5 binaries). After running the cavity case, I post-processed results by

1) manually running "touch cavity.OpenFOAM" inside the case directory
2) starting my Paraview.app
3) in Paraview opening the cavity.OpenFOAM and choosing "OpenFOAM files" from the list of supported filetypes in the "open file" dialog.

The thing is: I would like to run a newer version of Paraview. In the download section of Paraview's site (http://www.paraview.org/paraview/res.../software.html) there is a link to a binary download od Paraview 3.6.2 for OSX. Is it possible to compile the PV3FoamReader plugin and make it work with this Paraview binary download, saving me the trouble of compiling it?

For now, I will stick testing this 32-bit OF16 + Paraview3.3 combo I have running, but will keep trying to understand why the 64-bit compilation does not work. If anyone can read my posts and offer some insight I on this problems, I will appreciate it.

On an off-topic note, now I just need to get Salome compiled and I will have a full-featured (for my needs) CAE/CFD workstation on my Mac.
eiffleduarte is offline   Reply With Quote

Old   February 19, 2010, 13:42
Default
  #118
New Member
 
Marcus Vinicius Eiffle Duarte
Join Date: Feb 2010
Posts: 5
Rep Power: 16
eiffleduarte is on a distinguished road
Maybe this one is a little off-topic, but I am not sure if it is an error related to the compilation of OF16 on OSX or something else.

After the successfull compilation (as I described in my former posts), I tested the cavity case and some other cases I had run before on a Linux machine. Then, I decided to test running bubbleFoam in parallel. So, I entered the case directory and created the necessary decomposeParDict in the system subdirectory. After this, I ran the decomposePar utility successfully, I tried running bubbleFoam in parallel and got an error:

mi089092:bcr1_fine_turb ctp8$ mpirun -np 4 bubbleFoam -parallel > log &
[1] 14166
mi089092:bcr1_fine_turb ctp8$

Trying to use the dummy Pstream library.
This dummy library cannot be used in parallel mode

From function Pstream::init(int& argc, char**& argv)
in file Pstream.C at line 40.

FOAM exiting



Trying to use the dummy Pstream library.
This dummy library cannot be used in parallel mode

From function Pstream::init(int& argc, char**& argv)
in file Pstream.C at line 40.

FOAM exiting



Trying to use the dummy Pstream library.
This dummy library cannot be used in parallel mode

Trying to use the dummy Pstream library.
This dummy library cannot be used in parallel mode


From function Pstream::init(int& argc, char**& argv)
in file Pstream.C at line 40.

FOAM exiting


From function Pstream::init(int& argc, char**& argv)
in file Pstream.C at line 40.

FOAM exiting


[1]+ Exit 1 mpirun -np 4 bubbleFoam -parallel > log


After fiddling aroung the OpenFOAM-1.6/lib/darwinIntelOpt folder, I noticed I got two libPstream.dylib files:

1) dummy/libPstream.dylib (24 Kb)
2) openmpi-1.3.3/libPstream.dylib (44 Kb)

then I backed up dummy/libPstream.dylib, copied openmpi-1.3.3/liPstream.dylib into the dummy folder, tried again runnig bubbleFoam in parallel and it worked. Results seem fine.

My question is: this substitution of the dummy/libPstream.dylib is something normal or is there some post-compilation step I missed? Can this be an indication that there is something wrong with my applications and utilities?

Thanks,

Marcus Vinicius
eiffleduarte is offline   Reply With Quote

Old   February 25, 2010, 10:29
Default
  #119
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by eiffleduarte View Post
My question is: this substitution of the dummy/libPstream.dylib is something normal or is there some post-compilation step I missed?
I'm afraid it's an ugly secret no one from the Macis likes to talk about: MacOSX usually hardcodes the full path to dylibs into executable, so the trick that works on Linux (use dummy for phase1 then "shadow" it with the openmpi-variant, doesn't work
Quote:
Originally Posted by eiffleduarte View Post
Can this be an indication that there is something wrong with my applications and utilities?
No.
Bernhard
gschaider is offline   Reply With Quote

Old   March 21, 2010, 15:14
Default Paraview Help..!
  #120
New Member
 
Daniele Trimarchi
Join Date: Mar 2010
Location: Southampton, Uk
Posts: 11
Rep Power: 16
Daniele Trimarchi is on a distinguished road
Hello foamers, I'm really struggling with compiling Paraview.
I'm following the useful installation guide provided by Elvis, and (it seems that OF works now).
Then I try to follow the Paraview installation guide, but I'm quite lost when applying the patches. I try to copy the whole content:

[
diff --git a/Applications/Client/CreateBundle.sh
....
VTK_USE_RPATH=ON
]

in a text file, that I called Paraview.patch.v1, in ~/Tool/Paraview
Then I patch it, with:
cd Paraview3
patch -p1 < ../Paraview.patch.v1

So, I get the message:
patching file Applications/Client/CreateBundle.sh.in
patch: **** malformed patch at line 7: PluginsDir="/$ParaView_App/Contents/Plugins"

so I try to modify my .bash_profile, typing:
export ParaView_App=/Applications/ParaView.app/

and, since it was not working, I also try to modify the path in the patch file:
PluginsDir="/Applications/ParaView.app/Contents/Plugins"

Best regards and thank you,

Daniele
Daniele Trimarchi 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
OpenFOAM13 for Mac OSX Darwin 104 hjasak OpenFOAM Installation 70 September 24, 2010 06:06
problems with installing OpenFOAM 1.6 su_junwei OpenFOAM Installation 8 September 10, 2009 13:54
Problems Installing OF 1.6 32 bit bucksfan OpenFOAM Installation 19 August 4, 2009 02:36
Mac Simple Install Request or Processing Assistance Help sjohnson OpenFOAM Installation 4 December 12, 2008 08:46
MAC + SOLA for free surface T Main CFD Forum 1 April 11, 2001 14:43


All times are GMT -4. The time now is 03:56.