CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installing OF 1.6 on Mac OS X (https://www.cfd-online.com/Forums/openfoam-installation/66969-installing-1-6-mac-os-x.html)

elvisjohndowson October 24, 2009 00:38

Hi,
I'm trying to build paraview-3.6.1 from the ThirdParty-1.6 folder, but I get the following errors. I have installed gsed and gawk. I also installed doxygen from cvs and built it, after making a small modification to qtools/qglobal.h, to change the max allowed OS X version to 10.6 as follows
# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6)

[ 21%] Building C object VTK/Utilities/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.o
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:20,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.6.1/VTK/Utilities/vtkfreetype/src/base/ftmac.c:85,
from /Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.6.1/VTK/Utilities/vtkfreetype/src/base/ftbase.c:35:
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBundle.h:147: error: format string argument not a string type
make[3]: *** [VTK/Utilities/vtkfreetype/CMakeFiles/vtkfreetype.dir/src/base/ftbase.o] Error 1
make[2]: *** [VTK/Utilities/vtkfreetype/CMakeFiles/vtkfreetype.dir/all] Error 2
make[1]: *** [Servers/ServerManager/CMakeFiles/HTMLDocumentation.dir/rule] Error 2
make: *** [HTMLDocumentation] Error 2


Best regards,

Elvis

elvisjohndowson October 24, 2009 22:12

Hi,
Going through some of the other threads hinted that the compilation for ParaView might have been failing due to the gcc-mp-4.3 compiler. So, what I did is replace the compiler settings in etc/bashrc with the apple supplied gcc and g++ compiler, source etc/bashrc, and then went into the ThirdParty-1.6 folder and built the ParaView sources using the makeParaView command.

I managed to build ParaView-3.7.0. I simply replace the sources in the ThirdParty-1.6 folder with the new source and called the folder paraview-3.7.0, and then modified the paraview version entries in etc/bashrc.

Best regards,

Elvis

elvisjohndowson October 24, 2009 22:34

Hi,
I'm getting a paraview crash after typing the following commands

blockMesh -case cavity
paraFoam -case cavity

It displays the following message in the console window
created temporary 'cavity.OpenFOAM'
Read float past end of buffer
Read float past end of buffer
Read float past end of buffer
Read float past end of buffer

The paraview gui opens up with the following message:

A reader for "/Users/elvis/Tool/OpenFOAM/run/tutorials/incompressible/icoFoam/cavity/cavity.OpenFOAM" cannot be found, please choose one:

I can see OpenFOAM files in the list of readers. When I select it, it crashes paraview.

I think the reason for the crash is because cavity.OpenFOAM is zero kb. :-)

What should I do to generate a proper cavity.OpenFOAM file?

Best regards,

Elvis

gschaider October 27, 2009 12:47

Quote:

Originally Posted by elvisjohndowson (Post 233827)
Is there a git repository for ThirdParty-1.6, just like OpenFOAM-1.6.x ?

No there isn't. It was discussed (I think in the Bugs-Forum)
Quote:

Originally Posted by elvisjohndowson (Post 233827)
How about creating a new branch called macosx-10.6.1 to do the development for Mac OS X 10.6.1 support?

Branch in what? The 1.6.x-git? OR a new thread here on the message board?

Bernhard

gschaider October 27, 2009 12:57

Quote:

Originally Posted by elvisjohndowson (Post 233914)
Hi,
I'm getting a paraview crash after typing the following commands

blockMesh -case cavity
paraFoam -case cavity

It displays the following message in the console window
created temporary 'cavity.OpenFOAM'
Read float past end of buffer
Read float past end of buffer
Read float past end of buffer
Read float past end of buffer

The paraview gui opens up with the following message:

A reader for "/Users/elvis/Tool/OpenFOAM/run/tutorials/incompressible/icoFoam/cavity/cavity.OpenFOAM" cannot be found, please choose one:

I can see OpenFOAM files in the list of readers. When I select it, it crashes paraview.

I think the reason for the crash is because cavity.OpenFOAM is zero kb. :-)

What should I do to generate a proper cavity.OpenFOAM file?

Best regards,

Elvis

That is the proper file. It is just created as a dummy. Paraview only allows the selection of files whereas the OF-cases are organized as directories. The reader doesn't actually read the file but is only interested in the folder the file resides in

Just two questions about the crash:
- OpenFOAM and Paraview were definitly compiled with the same compiler. I've had crashes with different compilers
- You're using the $FOAM_LIBBIN/paraview as the PV_PLUGIN_PATH (NOT the $FOAM_LIBBIN!!!)
- foamToVTK and reading that in paraview works

OK. That's 3 questions. But I didn't expect the spanish inquisition

Bernhard

elvisjohndowson October 27, 2009 17:49

Quote:

Originally Posted by gschaider (Post 234213)
Branch in what? The 1.6.x-git? OR a new thread here on the message board?

A new branch in OpenFOAM-1.6.x-git repository. I've got a local one that works which I can push for your review.

Elvis

elvisjohndowson October 27, 2009 17:54

Quote:

Originally Posted by gschaider (Post 234215)
Just two questions about the crash:
- OpenFOAM and Paraview were definitly compiled with the same compiler.

Hi Berhnard,
No, OpenFOAM-1.6 was built using gcc-mp-4.3, and ParaView-3.7.0 was built using the current apple supplied gcc, gcc -version gives me i686-apple-darwin10-gcc-4.2.1

ParaView-3.7.0 sources and the ParaView 3.6.1 sources that came with ThirdParty-1.6 package did not compile on OS X 10.6.1 with gcc-mp-4.3.

I've only been able to compile ParaView-3.7.0 using i686-apple-darwin10-gcc-4.2.1

Elvis Dowson

elvisjohndowson October 28, 2009 03:33

Quote:

Originally Posted by gschaider (Post 234215)
- You're using the $FOAM_LIBBIN/paraview as the PV_PLUGIN_PATH (NOT the $FOAM_LIBBIN!!!)

I just modified it to $FOAM_LIBBIN/paraview. However, the folder is empty. I found a libPstream.dylib some where, not the one in the dummy folder, did a search and found one that was 45kb, and copied that to the $FOAM_LIBBIN/paraview folder, and tried paraFoam, but it still crashed.

What should I do ?

Best regards,

Elvis

elvisjohndowson October 28, 2009 10:52

Quote:

Originally Posted by gschaider (Post 234215)
- foamToVTK and reading that in paraview works

Hi Bernhard,
foamToVTK works, and I was able to get the results for the icoFoam cavity case. Having worked with the VTK libraries in the past helped me play around with ParaView.

So, what next? I guess I have a working version of OpenFOAM-1.6 for Mac OS X 10.6.1. If I can just get the plugin to load correctly, it would be great!

Best regards,

Elvis Dowson

gschaider October 28, 2009 15:21

Quote:

Originally Posted by elvisjohndowson (Post 234256)
A new branch in OpenFOAM-1.6.x-git repository. I've got a local one that works which I can push for your review.

Like you I only have read access to that one

gschaider October 28, 2009 15:26

Quote:

Originally Posted by elvisjohndowson (Post 234294)
I just modified it to $FOAM_LIBBIN/paraview. However, the folder is empty. I found a libPstream.dylib some where, not the one in the dummy folder, did a search and found one that was 45kb, and copied that to the $FOAM_LIBBIN/paraview folder, and tried paraFoam, but it still crashed.

No. The $FOAM_LIBBIN/paraviewshould only have symbolic-links to the libPV*-files in $FOAM_LIBBIN (I think my patch takes care of this - must check)

gschaider October 28, 2009 15:31

Quote:

Originally Posted by elvisjohndowson (Post 234367)
Hi Bernhard,
foamToVTK works, and I was able to get the results for the icoFoam cavity case. Having worked with the VTK libraries in the past helped me play around with ParaView.

So, what next? I guess I have a working version of OpenFOAM-1.6 for Mac OS X 10.6.1. If I can just get the plugin to load correctly, it would be great!

Best regards,

Elvis Dowson

See the other posting about the symbolic links (could you please answer all questions in one posting - it would make answering easier). Try to load the libPV* plugins by hand

elvisjohndowson October 28, 2009 17:17

Quote:

Originally Posted by gschaider (Post 234407)
See the other posting about the symbolic links (could you please answer all questions in one posting - it would make answering easier). Try to load the libPV* plugins by hand

Hi Bernhard, thanks for your reply. I did a check and the libPV* files did not get built.

find $FOAM_LIBBIN -depth 1 -name "libPV*"

I got that from your patch. How can I track down the reason for the plugin not getting built?

Best regards,

Elvis

gschaider October 29, 2009 04:38

Quote:

Originally Posted by elvisjohndowson (Post 234418)
Hi Bernhard, thanks for your reply. I did a check and the libPV* files did not get built.

find $FOAM_LIBBIN -depth 1 -name "libPV*"

I got that from your patch. How can I track down the reason for the plugin not getting built?

Have a look at section 7 of http://www.opencfd.co.uk/openfoam/doc/README.html

My guess is that cmake will complain that you're using a different compiler than the one used for paraview (you mentioned something like that). Don't know how to cleanly resolve this. In another post I mentioned: compile Paraview with the same compiler as OF AND verbose makefiles. For those files on which the compiler fails (some ObjectiveC-files) copy/paste the compile call to the command line and replace the compiler with the system compiler. That will generate a .o. Then continue the regular make.

Bernhard

elvisjohndowson October 30, 2009 05:59

Quote:

Originally Posted by gschaider (Post 234460)
compile Paraview with the same compiler as OF AND verbose makefiles.

Hi Bernhard,
Looking at the makeParaView script, I guess the command is

./makeParaFoam -verbose

Suppose it fails mid-way during compilation, do I have to change to the paraview-3.6.1/platforms/darwinIntel64 folder and then issue the make command?

Elvis

elvisjohndowson October 30, 2009 09:41

It's not working, going into the darwinIntel64 and trying to compile individually with gcc doesn't work.

Just a quick question, is the ParaView-3.7.0 version from cvs different from the paraview-3.6.1 sources supplied in the ThirdParty-1.6 folder?

Can't believe I can't figure out how to compile this thing. I guess its because the whole paraview build process is not correctly documented for qt-4.5.4, paraview-3.7.0 and mac os x 10.6.1.

elvisjohndowson October 31, 2009 09:43

Hi,
Here are the modifications that I made in order to make the compilation go further. Now the funny thing is it gets built using gcc-mp-4.3 and apple gcc for the objective-c files (*.mm), but it still crashes.

01. Modify the ThirdParty-1.6.x/makeParaView script as follows:

diff --git a/makeParaView b/makeParaView
index 37bc32b..549afe8 100755
--- a/makeParaView
+++ b/makeParaView
@@ -36,6 +36,13 @@

addCMakeVariable "CMAKE_C_COMPILER=$WM_CC"
addCMakeVariable "CMAKE_CXX_COMPILER=$WM_CXX"
+addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=ON"
+addCMakeVariable "BUILD_TESTING=OFF"
+addCMakeVariable "CMAKE_OSX_DEPLOYMENT_TARGET=10.5"
+addCMakeVariable "CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk"
+addCMakeVariable "VTK_USE_CARBON=OFF"
+addCMakeVariable "VTK_USE_COCOA=ON"
+addCMakeVariable "VTK_USE_RPATH=ON"

@@ -78,7 +85,7 @@ withQTSUPPORT=true

# Set the path to the Qt-4.3.? qmake if the system Qt is other than this version
# QMAKE_PATH=""
-QMAKE_PATH="/usr/bin/qmake-4.3"
+QMAKE_PATH="/Developer/Applications/Qt-4.5/bin/qmake"

#
# No further editing below this line


The first time you run the makeParaView script, don’t comment out the following line, so that configParaView runs and configures ParaView the first time using CMake.

[ $runCONFIG = true ] && configParaView

After compilation fails, modify the makeParaView script, and remove the && configParaView entry as follows:

[ $runCONFIG = true ]

Here is a patch for the modification:

diff --git a/makeParaView b/makeParaView
index 37bc32b..549afe8 100755
--- a/makeParaView
+++ b/makeParaView
@@ -236,7 +243,8 @@ getPaths # discover where things are or should be put

# Build and install
# ~~~~~~~~~~~~~~~~~
-[ $runCONFIG = true ] && configParaView
+#[ $runCONFIG = true ] && configParaView
+[ $runCONFIG = true ]
for f in $(grep -rl fpascal-strings $ParaView_DIR)
do
# the 4.3 compiler seems not to know these option anymore


Sometimes, you will have a failure because the above script could not remove the “-fpascal-string” entries from the CMakeList.txt files.

To search for the string “-fpascal-strings” directive that is no-longer supported by the gcc compiler, type the following command:

grep -r “-fpascal-strings”

You observe that this is the case for the following files:

VTK/Utilities/fgtl/CMakeList.txt

2. Build ParaView

./makeParaView -verbose -qmake /Developer/Applications/Qt-4.5/bin/qmake -version 3.7.0

If compilation fails at some point, then copy paste the compile command, replacing it with the standard apple gcc command, in a separate window:

cd /Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Rendering

gcc -DvtkRendering_EXPORTS -DVTK_PYTHON_BUILD -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -DVTK_IN_VTK -DQT_DLL -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -m64 -Wno-deprecated -Wno-deprecated -O3 -DNDEBUG -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -fPIC -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64 -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Common -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/VolumeRendering -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Rendering -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/vtkalglib -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Infovis -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Geovis -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Views -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Parallel -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/VolumeRendering -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Hybrid -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Widgets -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Rendering -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Rendering/Testing/Cxx -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/IO -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Imaging -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Graphics -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/GenericFiltering -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Filtering -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Common -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Common/Testing/Cxx -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/vtklibproj4 -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/vtklibproj4 -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/DICOMParser -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/DICOMParser -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/vtkfreetype/include -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/vtkfreetype/include -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/vtknetcdf -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/vtknetcdf -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/vtkexodus2/include -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/vtkexodus2/include -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/MaterialLibrary -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/MaterialLibrary -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/verdict -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/verdict -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/utf8/source -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/GUISupport/Qt -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/GUISupport/Qt -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/GUISupport/Qt/Chart -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/GUISupport/Qt/Chart -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/vtkalglib -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Utilities/ftgl/src -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/platforms/darwinIntel64/VTK/Utilities/ftgl -I/System/Library/Frameworks/Python.framework/Headers -I/Developer/Applications/Qt-4.5/include -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Rendering/optimized -F/Developer/Applications/Qt-4.5/lib -I/Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Rendering/debug -I/Developer/Applications/Qt-4.5/lib/QtGui.framework/Headers -I/Developer/Applications/Qt-4.5/lib/QtSql.framework/Headers -I/Developer/Applications/Qt-4.5/lib/QtCore.framework/Headers -o CMakeFiles/vtkRendering.dir/vtkCocoaRenderWindowInteractor.mm.o -c /Users/elvis/Tool/OpenFOAM/ThirdParty-1.6.x-patches/paraview-3.7.0/VTK/Rendering/vtkCocoaRenderWindowInteractor.mm

Repeat the above process for the remaining *.mm files that fail compilation.

Best regards,

Elvis Dowson

elvisjohndowson October 31, 2009 13:16

So, the crash I get with gcc-mp-4.5.3 is identical to that with standard apple gcc.

I tried rebuilding the PV3FoamReader module using the instructions outlined here: http://www.opencfd.co.uk/openfoam/doc/README.html, then copied it to the platforms/darwinIntel64/bin folder , and then manually loaded the libPV3FoamReader.dylib plugin after launching paraview.

Upon attempting to open cavity.OpenFOAM file, paraview crashes immediately.

If I try to use the prebuild paraview-3.3.1 from the ETH website, it is able to open the cavity.OpenFOAM module.

So, guys, I've got past this huge step of compiling paraview from the sources, but I'm currently stuck as to why it keeps crashing. Any help would be greatly appreciated, since I think at this stage, only someone who's done this before will be able to help me resolve this crash. :-)

Elvis Dowson

elvisjohndowson November 2, 2009 05:41

Hi guys,
I finally found a way to compile ParaView-3.7.0 from sources, and get to read in the OpenFOAM files.

Basically you just download paraview from the cvs repository and then build an install the ParaView3POpenFOAMReader plugin, which is a parallel version of the OpenFOAM reader.

Here are the instructions : http://openfoamwiki.net/index.php/Ti..._Native_Reader

The git repository is located at : http://github.com/themiwi/ParaView3POpenFOAMReader

Best regards,

Elvis

elvisjohndowson November 3, 2009 13:14

Here is a patch for fixing the issue at startup, when you try to run ParaView-3.7.0 from the /Applications folder. The application crashes because cmake did not copy the qt resources to the application bundle. Also, please make sure that you only use cmake-2.8.0-rc4. I think there is a problem with cmake-2.9.x since that doesnt even copy the required framework libraries over to the app bundle.

This patch was developed by Michael Wild.

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}

eternityboy November 5, 2009 11:57

muah!!!! awesome!
i'll try to install OF according to your manual..

could it be any problem if im compiling gcc44 right now?

elvisjohndowson November 5, 2009 18:10

OpenFOAM-1.6.x installation process for Mac OS X 10.6.1
 
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 November 5, 2009 18:12

How to build ParaView-3.7.0 using qt-4.5.x for OpenFOAM-1.6 on Mac OS X 10.6.1
 
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 :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 login
(respond with empty password)

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

For checking out the data, use the following:
cvs -d :pserver: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 November 5, 2009 18:16

Automator service scripts for launching an OpenFOAM session and Paraview
 
2 Attachment(s)
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

eternityboy November 12, 2009 11:31

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 November 12, 2009 12:15

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'.

elvisjohndowson November 12, 2009 14:16

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

eternityboy November 12, 2009 14:18

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

elvisjohndowson November 12, 2009 22:09

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

los November 25, 2009 14:29

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?

johnb February 3, 2010 16:09

patch for the git repository OpenFOAM-1.6.x
 
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

elvisjohndowson February 3, 2010 20:25

Quote:

Originally Posted by johnb (Post 244839)
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

xponticq February 5, 2010 01:49

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

eiffleduarte February 18, 2010 08:04

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::DimensionedField<Foam::Tensor<double>, Foam::volMesh>::~DimensionedField() in dnsFoam.o
Foam::fvPatchField<Foam::Tensor<double> >::~fvPatchField() in dnsFoam.o
Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh>::~DimensionedField() in dnsFoam.o
Foam::fvPatchField<Foam::Vector<double> >::~fvPatchField() in dnsFoam.o
Foam::DimensionedField<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::DimensionedField<double, Foam::surfaceMesh>::~DimensionedField() in dnsFoam.o
Foam::DimensionedField<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,

gschaider February 18, 2010 15:24

Quote:

Originally Posted by eiffleduarte (Post 246459)
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 (Post 246459)

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

eiffleduarte February 19, 2010 07:45

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 (Post 246509)
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::operator<< <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 (Post 246509)
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 (Post 246509)
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 February 19, 2010 10:42

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 February 19, 2010 12:42

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

gschaider February 25, 2010 09:29

Quote:

Originally Posted by eiffleduarte (Post 246632)
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 (Post 246632)
Can this be an indication that there is something wrong with my applications and utilities?

No.
Bernhard

Daniele Trimarchi March 21, 2010 14:14

Paraview Help..!
 
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


All times are GMT -4. The time now is 14:32.