CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Patches for OpenFOAM 1.7 on MacOS X (https://www.cfd-online.com/Forums/openfoam-installation/77570-patches-openfoam-1-7-macos-x.html)

gschaider June 27, 2010 18:52

Patches for OpenFOAM 1.7 on MacOS X
 
2 Attachment(s)
Hi!

Attached there are two patches that patch the OpenFOAM and the ThirdParty-directory of the new 1.7-release.

For installation and requirements (case sensitive file system) see for instance http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac (if somebody feels like rewriting/adapting that: go ahead)

Some remarks on the patch:
- only the darwinIntel64-architecture has been tested
- the patch assumes that you use gcc 4.5 from MacPorts. If you don't: replace all instances of the form gcc-mp-4.5 with the compiler of your choice
- tecplotWriter does not compile
- as soon as paraview is compiled the PV3FoamReader will compile. It will load as a plugin into paraview. Nevertheless: it will crash paraview as it needs a different version of the libstdc++.6.dylib than the one paraview uses (paraview fails to compile with the same compiler as OF). Only solution: remove the libPV3FoamReader_SM.dylib and use the OF-Reader built into paraview. Alternative would be to compile OF with the v4.2-compiler that comes with MacOS X

Bernhard

podallaire June 27, 2010 22:22

You rock!

Thanks

gschaider June 28, 2010 08:22

Quote:

Originally Posted by podallaire (Post 264742)
You rock!

Thanks

Actually it was quite easy as I had maintained patches of 1.6.x anyway and there were only two changes required

Bernhard

niklas June 28, 2010 08:40

Have you guys tried this?

http://www.parallels.com/uk/products/desktop/

I recently switched to this instead of dealing with the mac-issues.

Since I dont do any serious work on my mac, but only write code and run simple tests I find this
to be an incredible piece of software.

You can download a free trial version for 2 weeks.

podallaire June 28, 2010 09:12

Quote:

Originally Posted by gschaider (Post 264803)
Actually it was quite easy as I had maintained patches of 1.6.x anyway and there were only two changes required

Bernhard

Cool / I'm currently compiling with gcc-4.3, so far so good !


Quote:

Originally Posted by niklas (Post 264805)
Have you guys tried this?

http://www.parallels.com/uk/products/desktop/

I recently switched to this instead of dealing with the mac-issues.

Since I dont do any serious work on my mac, but only write code and run simple tests I find this
to be an incredible piece of software.

You can download a free trial version for 2 weeks.

Yes, I know this software / I use VMware when Windows is needed ... It's good to have a native version of OpenFOAM on the mac, easier to prepare cases before sending to the cluster.

Thanks !

PO

chrisb June 29, 2010 09:19

Working with finkproject compilers
 
Hi,
Just thought I would let everyone know that the patches work as advertised with fink project compilers (gcc45 package).

To do modify the patch file (OpenFOAM-1.7-Mac.patch):
Replace -mp- with -fsf-
Replace 4.3 with 4.5


Chris Butler

leosding July 4, 2010 06:55

Bernhard,
thanks a lot.
Wonderful! The OF1.7 mac port is now ok to run on snow leopard 10.6.3 with gcc4.5 installed by macports.
Because of the error of 'time', the foamToTecplot360 has not been compiled.
The Paraview 3.8 for Mac is now availabe for post-processing. :)

Leo

chrisb July 5, 2010 00:44

Problems OpenFOAM 1.7 mac
 
Hi all,

I have run into some problems with OpenFOAM-1.7 on mac os 10.6.4. The tutorial for nonNewtonianIcoFoam appears to fail (due to a solution singularity).

This at first glance appears to be due to blockMesh failing to produce an adequate mesh (see the attached file). The tutorial correctly executed with the debian 1.7 install (and 1.6 source install on CentOS).

Has anyone else had any problems? I have created meshes which do not contain the arc object without any trouble.

Any feedback would be much appreciated.

Cheers,
Chris Butler

P.S. If this post is in the wrong forum my apologies.

gschaider July 5, 2010 08:47

Quote:

Originally Posted by chrisb (Post 265676)
Hi all,

I have run into some problems with OpenFOAM-1.7 on mac os 10.6.4. The tutorial for nonNewtonianIcoFoam appears to fail (due to a solution singularity).

This at first glance appears to be due to blockMesh failing to produce an adequate mesh (see the attached file). The tutorial correctly executed with the debian 1.7 install (and 1.6 source install on CentOS).

Has anyone else had any problems? I have created meshes which do not contain the arc object without any trouble.

Any feedback would be much appreciated.

Cheers,
Chris Butler

P.S. If this post is in the wrong forum my apologies.

I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard

gschaider July 5, 2010 08:59

Quote:

Originally Posted by gschaider (Post 265750)
I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard

The weirdness continues: if I do the blockMesh with with 1.7/gcc45-debug(!) I have no problem. So it seems that something is going wrong during optimization (in gcc45)

BTW: have a look at the mesh in paraview. No wonder checkMesh doesn't like it.

podallaire July 5, 2010 09:00

I just tested (I have compiled OF-1.7.x with gcc-4.3.4) / no problem here with this tutorial.

gschaider July 5, 2010 13:51

Quote:

Originally Posted by gschaider (Post 265750)
I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard

Update: I repaired my 1.6/gcc-4.5 installation. Now the following happens:

1.6/gcc-4.5-Opt: broken Mesh
1.6/gcc-4.5-Debug: mesh OK
1.6/gcc-4.3-Opt: mesh OK
1.7/gcc-4.5-Opt: mesh broken

So the problem seems to be gcc-4.5 with optimization. The remaining question: does this only happen on a Mac or elsewhere, too?

Bernhard

chrisb July 5, 2010 19:51

gcc 4.4
 
Hi,
I am building OF-1.7 with gcc-4.4 on both OSX and linux, however, I do not have a linux box with gcc above 4.4.4. So if anyone could test this tutorial on linux with gcc-4.5 it would be appreciated.


CB

chrisb July 5, 2010 23:16

Quote:

Originally Posted by chrisb (Post 265836)
Hi,
I am building OF-1.7 with gcc-4.4 on both OSX and linux, however, I do not have a linux box with gcc above 4.4.4. So if anyone could test this tutorial on linux with gcc-4.5 it would be appreciated.


CB

blockMesh (OF-1.7) runs correctly on the (nonNewtonianIcoFoam) tutorial under both OSX and Linux when using gcc-4.4

CB

leosding July 6, 2010 03:29

Quote:

Originally Posted by gschaider (Post 265750)
I can reproduce that. Which compiler are you using (I use gcc-4.5. My 1.6/gcc45-installation is broken, so I can't check. I'm suspecting the compiler because it is my impression that he handles FP-operations somewhat differently). If I do blockMesh with 1.6/gcc45 then checkMesh and the solver have no problem, so the problem seems to be located with blockMesh

Bernhard

Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:
=======================================
Courant Number mean: 0.1533929535 max: 0.6093346791
deltaT = 0.0005
Time = 0.252

Cloud: coalCloud1
Total number of parcels added = 27
Total mass introduced = 0.0001
Current number of parcels = 27
Current mass in system = 7.634816181e-05
Mass transfer phase change = 2.487806921e-06
Mass transfer devolatilisation = 1.096268892e-05
Mass transfer surface reaction = 1.020134234e-05

Cloud: limestoneCloud1
Total number of parcels added = 18
Total mass introduced = 0.0001
Current number of parcels = 18
Current mass in system = 0.0001

Solving chemistry
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 0.06843280288, Final residual = 5.521803873e-06, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 0.08299776218, Final residual = 6.610758425e-07, No Iterations 4
DILUPBiCG: Solving for O2, Initial residual = 0.02991408207, Final residual = 2.316092842e-07, No Iterations 4
DILUPBiCG: Solving for CH4, Initial residual = 0.02443785456, Final residual = 2.649269485e-07, No Iterations 4
DILUPBiCG: Solving for H2, Initial residual = 0.0315238668, Final residual = 3.822091915e-07, No Iterations 4
DILUPBiCG: Solving for CO2, Initial residual = 0.02938438982, Final residual = 4.003208991e-07, No Iterations 4
DILUPBiCG: Solving for H2O, Initial residual = 0.03523143241, Final residual = 1.795963946e-08, No Iterations 5
DILUPBiCG: Solving for hs, Initial residual = 0.04197246509, Final residual = 5.114508673e-07, No Iterations 4


--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 0 -> 5000; T = -461.698

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /Users/dingsudong/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting
===========================================
but on my linux workstation, it's ok.

the configuration as below,
Mac:
Mac OS X 10.6.3, gcc-mp-4.5, OpenFoam 1.7
Linux:
OpenSuse 11.1, gcc-4.3, Openfoam 1.7

would you reproduce it?

Leo

chrisb July 6, 2010 07:48

Quote:

Originally Posted by leosding (Post 265869)
Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:

I get a similar error for gcc 4.4.4 for both linux and mac OS (OF-1.7). Unfortunately I don't know enough about the code (or the chemistry) to help you much further, however, it seems like there may be some stability problems with the equations you are solving. I noticed 2-3 time-steps before the temperature dramatically increased tmax = O(2500K). I am completely unfamiliar with the problem at hand, however, this did not seem consistent with the previous time-steps.

Cb

gschaider July 7, 2010 08:06

Quote:

Originally Posted by leosding (Post 265869)
Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:
=======================================
Courant Number mean: 0.1533929535 max: 0.6093346791
deltaT = 0.0005
Time = 0.252



--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 0 -> 5000; T = -461.698

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /Users/dingsudong/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting
===========================================
but on my linux workstation, it's ok.

On my linux-workstation (gcc 4.4.0) I get the same error (with a slightly different time and a different temperature. Funny thing is that when I run it in Debug-mode (same sources, same machine, same compiler) it is slightly different again

So it is not a Mac-problem but a problem with the case (and possibly the compiler)

Bernhard

leosding July 7, 2010 20:00

Quote:

Originally Posted by leosding (Post 265869)
Bernhard,
I run the case of coalChemistryFoam/simplifiedSiwek, at time=0.252 it broken, the log reads:
=======================================
Courant Number mean: 0.1533929535 max: 0.6093346791
deltaT = 0.0005
Time = 0.252

--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 0 -> 5000; T = -461.698

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /Users/dingsudong/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting
===========================================
but on my linux workstation, it's ok.

the configuration as below,
Mac:
Mac OS X 10.6.3, gcc-mp-4.5, OpenFoam 1.7
Linux:
OpenSuse 11.1, gcc-4.3, Openfoam 1.7

would you reproduce it?

Leo

Bernhard,
I just check the log file for the calculation on Linux port again, you are right. it's same error as you said that with a slightly different time and a different temperature.

It should be reported to developer as a bug.

regards,
Leo

gschaider July 8, 2010 08:22

Quote:

Originally Posted by leosding (Post 266254)
I just check the log file for the calculation on Linux port again, you are right. it's same error as you said that with a slightly different time and a different temperature.

It should be reported to developer as a bug.

You're right. Go ahead: report

gschaider July 8, 2010 08:41

Quote:

Originally Posted by gschaider (Post 266364)
You're right. Go ahead: report

Sorry. Just noticed: you already did

leosding July 20, 2010 02:40

Quote:

Originally Posted by gschaider (Post 266375)
Sorry. Just noticed: you already did

The bug has been removed with changing "maxCo" to 0.8 form 1.0 in controlDict.

for your information.

stonehope July 22, 2010 02:01

Problems with compiling OF 1.7 on mac
 
Dear all,

i decided to try compiling OF 1.7 on a mac with bernards patches.
After setting the gcc-mp-4.5 compiler for compilation and executing the Allwmake there is the following error in the output:

make: Nothing to be done for `all'.
+ wmakePrintBuild -check
no git description found
+ /bin/rm -f 'OpenFOAM/Make/darwinIntel64DPOpt/global.?'
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
'libNULL.dylib' is up to date.
+ case "$WM_MPLIB" in
+ set +x

Note: ignore spurious warnings about missing mpicxx.h headers
+ WM_OPTIONS=darwinIntel64DPOptOPENMPI
+ wmake libso mpi
'libNULL.dylib' is up to date.
+ wmake libo OSspecific/POSIX
ld -r -o libNULL.o
ld: warning: -arch not specified
ld: no object files specified for inferred architecture x86_64
make: *** [libNULL.o] Error 1
+ wmake libso OpenFOAM
'libNULL.dylib' is up to date.
+ wmake libso lagrangian/basic
'libNULL.dylib' is up to date.
+ wmake libso triSurface
'libNULL.dylib' is up to date.
+ wmake libso edgeMesh
'libNULL.dylib' is up to date.
+ wmake libso surfMesh
'libNULL.dylib' is up to date.
+ decompositionMethods/AllwmakeLnInclude
+ wmakeLnInclude decompositionMethods
+ wmakeLnInclude metisDecomp
+ wmakeLnInclude parMetisDecomp
+ wmakeLnInclude scotchDecomp
+ dummyThirdParty/Allwmake
+ wmake libso scotchDecomp
'libNULL.dylib' is up to date.
+ wmake libso metisDecomp
'libNULL.dylib' is up to date.
+ wmake libso parMetisDecomp
'libNULL.dylib' is up to date.
+ wmake libso MGridGen/MGridGen
'libNULL.dylib' is up to date.
+ decompositionMethods/Allwmake
+ wmakeLnInclude decompositionMethods
+ wmake libso scotchDecomp
'libNULL.dylib' is up to date.
+ wmake libso metisDecomp
'libNULL.dylib' is up to date.
+ '[' -d /Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt/openmpi-1.4.1 ']'
+ wmake libso decompositionMethods
'libNULL.dylib' is up to date.
+ wmake libso meshTools
'libNULL.dylib' is up to date.
+ wmake libso finiteVolume
'libNULL.dylib' is up to date.
+ wmake libso genericPatchFields
'libNULL.dylib' is up to date.
+ wmake libso sampling
'libNULL.dylib' is up to date.
+ wmake libso dynamicMesh
'libNULL.dylib' is up to date.
+ wmake libso dynamicFvMesh
'libNULL.dylib' is up to date.
+ wmake libso topoChangerFvMesh
'libNULL.dylib' is up to date.
+ wmake libso ODE
'libNULL.dylib' is up to date.
+ wmake libso randomProcesses
'libNULL.dylib' is up to date.
+ thermophysicalModels/Allwmake
+ wmake libso specie
'libNULL.dylib' is up to date.
+ wmake libso thermophysicalFunctions
'libNULL.dylib' is up to date.
+ wmake libso liquids
'libNULL.dylib' is up to date.
+ wmake libso liquidMixture
'libNULL.dylib' is up to date.
+ wmake libso solids
'libNULL.dylib' is up to date.
+ wmake libso solidMixture
'libNULL.dylib' is up to date.
+ wmake libso basic
'libNULL.dylib' is up to date.
+ wmake libso reactionThermo
'libNULL.dylib' is up to date.
+ wmake libso laminarFlameSpeed
'libNULL.dylib' is up to date.
+ wmake libso chemistryModel
'libNULL.dylib' is up to date.
+ wmake libso pdfs
'libNULL.dylib' is up to date.
+ wmake libso radiation
'libNULL.dylib' is up to date.
+ wmake libso barotropicCompressibilityModel
'libNULL.dylib' is up to date.
+ transportModels/Allwmake
+ wmake libso incompressible
'libNULL.dylib' is up to date.
+ wmake libso interfaceProperties
'libNULL.dylib' is up to date.
+ turbulenceModels/Allwmake
+ LES/Allwmake
+ wmakeLnInclude ../incompressible/LES
+ wmake libso LESfilters
'libNULL.dylib' is up to date.
+ wmake libso LESdeltas
'libNULL.dylib' is up to date.
+ incompressible/Allwmake
+ wmake libso turbulenceModel
'libNULL.dylib' is up to date.
+ wmake libso RAS
'libNULL.dylib' is up to date.
+ wmake libso LES
'libNULL.dylib' is up to date.
+ compressible/Allwmake
+ wmake libso turbulenceModel
'libNULL.dylib' is up to date.
+ wmake libso RAS
'libNULL.dylib' is up to date.
+ wmake libso LES
'libNULL.dylib' is up to date.
+ lagrangian/Allwmake
+ wmake libso basic
'libNULL.dylib' is up to date.
+ wmake libso solidParticle
'libNULL.dylib' is up to date.
+ wmake libso intermediate
'libNULL.dylib' is up to date.
+ wmake libso dieselSpray
'libNULL.dylib' is up to date.
+ wmake libso dsmc
'libNULL.dylib' is up to date.
+ wmake libso coalCombustion
'libNULL.dylib' is up to date.
+ molecularDynamics/Allwmake
+ wmake libso potential
'libNULL.dylib' is up to date.
+ wmake libso molecularMeasurements
'libNULL.dylib' is up to date.
+ wmake libso molecule
'libNULL.dylib' is up to date.
+ postProcessing/Allwmake
+ wmake libo postCalc
ld -r -o libNULL.o
ld: warning: -arch not specified
ld: no object files specified for inferred architecture x86_64
make: *** [libNULL.o] Error 1
+ wmake libso foamCalcFunctions
'libNULL.dylib' is up to date.
+ functionObjects/Allwmake
+ wmake libso field
'libNULL.dylib' is up to date.
+ wmake libso forces
'libNULL.dylib' is up to date.
+ wmake libso IO
'libNULL.dylib' is up to date.
+ wmake libso utilities
'libNULL.dylib' is up to date.
+ wmake libso systemCall
'libNULL.dylib' is up to date.
+ conversion/Allwmake
+ wmake libso
'libNULL.dylib' is up to date.
+ wmake libso autoMesh
'libNULL.dylib' is up to date.
+ wmake libso errorEstimation
'libNULL.dylib' is up to date.
+ fvAgglomerationMethods/Allwmake
+ wmake libso MGridGenGamgAgglomeration
'libNULL.dylib' is up to date.
+ wmake libso fvMotionSolver
'libNULL.dylib' is up to date.
+ wmake libso engine
'libNULL.dylib' is up to date.
+ wmake all solvers
g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OpenFOAM/lnInclude -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt/openmpi-1.4.1 -lPstream -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt \
-lOpenFOAM -lpthread -lm -o OpenFOAM.out
ld: library not found for -lPstream
collect2: ld returned 1 exit status
make[2]: *** [OpenFOAM.out] Error 1
make[1]: *** [dnsFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [DNS] Error 2

g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OpenFOAM/lnInclude -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt/openmpi-1.4.1 -lPstream -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt \
-lOpenFOAM -lpthread -lm -o OpenFOAM.out
ld: library not found for -lPstream
collect2: ld returned 1 exit status
make[2]: *** [OpenFOAM.out] Error 1
make[1]: *** [laplacianFoam] Error 2
g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OpenFOAM/lnInclude -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt/openmpi-1.4.1 -lPstream -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt \
....

The Messages go on in a similar way.

According to the log i guess there is a library missing somewhere, but i don't know where.
Maybe someone of you can help me with this.

Thank You.

Stonehope

gschaider July 22, 2010 04:41

Quote:

Originally Posted by stonehope (Post 268431)
Dear all,

i decided to try compiling OF 1.7 on a mac with bernards patches.
After setting the gcc-mp-4.5 compiler for compilation and executing the Allwmake there is the following error in the output:

make: Nothing to be done for `all'.
+ wmakePrintBuild -check
no git description found
+ /bin/rm -f 'OpenFOAM/Make/darwinIntel64DPOpt/global.?'
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
'libNULL.dylib' is up to date.
+ case "$WM_MPLIB" in
+ set +x

Note: ignore spurious warnings about missing mpicxx.h headers
+ WM_OPTIONS=darwinIntel64DPOptOPENMPI
+ wmake libso mpi
'libNULL.dylib' is up to date.
+ wmake libo OSspecific/POSIX
ld -r -o libNULL.o
ld: warning: -arch not specified
ld: no object files specified for inferred architecture x86_64
make: *** [libNULL.o] Error 1
+ wmake libso OpenFOAM
'libNULL.dylib' is up to date.

<snip>

g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OpenFOAM/lnInclude -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt/openmpi-1.4.1 -lPstream -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt \
-lOpenFOAM -lpthread -lm -o OpenFOAM.out
ld: library not found for -lPstream
collect2: ld returned 1 exit status
make[2]: *** [OpenFOAM.out] Error 1
make[1]: *** [dnsFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [DNS] Error 2

g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OpenFOAM/lnInclude -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt/openmpi-1.4.1 -lPstream -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt \
-lOpenFOAM -lpthread -lm -o OpenFOAM.out
ld: library not found for -lPstream
collect2: ld returned 1 exit status
make[2]: *** [OpenFOAM.out] Error 1
make[1]: *** [laplacianFoam] Error 2
g++-mp-4.5 -m64 -DdarwinIntel64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OpenFOAM/lnInclude -I/Users/stonehope/OpenFOAM/OpenFOAM-1.7/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt/openmpi-1.4.1 -lPstream -L/Users/stonehope/OpenFOAM/OpenFOAM-1.7/lib/darwinIntel64DPOpt \
....

The Messages go on in a similar way.

According to the log i guess there is a library missing somewhere, but i don't know where.
Maybe someone of you can help me with this.

Thank You.

Stonehope

All the libraries are missing because they're not being built. Is this log from the first or the second time you tried the compilation. I'm asking because for instance after wmake libso OpenFOAMthere should be a whole bunch of compiler calls should be seen.

Could you check whether in $FOAM_SRC/OpenFOAM/Make/darwinBlaBla there is a number of .o-files? If yes, could you check with the file-command what they acctually are?

Have you sourced the . etc/bashrc before compiling?

Is your OF-installation on a case-sensitive filesystem?

Bernhard

stonehope July 22, 2010 10:53

Hi Bernhard,

thank you for your quick support.

Yes, this log not from the first attemp to compile.

In the $FOAM_SRC/OpenFOAM/Make/darwinIntel64DPOpt - directory there are no files like *.o .
Should there be some of the .o-files?

Yes, i sourced the . etc/bashrc.

I'm using a script from the eth zurich, which is a bit modified from me, so that it is working with OF 1.7 to set the OF enviroment in the bash, could this cause such an error?
I supposed, that it is working, because all "shortcuts" like "tut", "run" etc are working well.

The filesystem is case sensitiv and created by using disk utility from mac OS.


Thank You very much.


Patrik

gschaider July 22, 2010 13:22

Quote:

Originally Posted by stonehope (Post 268535)
Hi Bernhard,

thank you for your quick support.

Yes, this log not from the first attemp to compile.

In the $FOAM_SRC/OpenFOAM/Make/darwinIntel64DPOpt - directory there are no files like *.o .
Should there be some of the .o-files?

Yes, i sourced the . etc/bashrc.

I'm using a script from the eth zurich, which is a bit modified from me, so that it is working with OF 1.7 to set the OF enviroment in the bash, could this cause such an error?
I supposed, that it is working, because all "shortcuts" like "tut", "run" etc are working well.

The filesystem is case sensitiv and created by using disk utility from mac OS.


Thank You very much.


Patrik

Sorry. I have no experience with that ETH-Script. But the missing object-files are a strong indication that the compilation is not working. No idea why. No idea why he tries to link them to a library. Have a look at the generated dep-files whether they resemble what you know from a Linux-distro

Bernhard

Bernhard

demichie July 29, 2010 12:05

Quote:

Originally Posted by gschaider (Post 264731)
Hi!

Attached there are two patches that patch the OpenFOAM and the ThirdParty-directory of the new 1.7-release.

For installation and requirements (case sensitive file system) see for instance http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac (if somebody feels like rewriting/adapting that: go ahead)


Bernhard

I'm trying to install OpenFOAM 1.7 on a clean Macbook Pro. I've just moved from linux to os x so please be patient with me. I've first installed gcc4.5 from MacPorts. The first problem is with /etc/bashrc. After applying the patches it tries to create a file, or a folder, in OpenFOAM/lib/darwinIntelDPOpt, but the lib folder does not exist. I've created the folder and the subfolder darwinIntelDPOpt and the problem seems solved.
The next problem is when I try to compile with ./Allwmake.
I read a lot of messages "could not open file *.H for source file *.C". I've searched and it seems to me that the files exist.
Is there somebody able to help me with the installation?

Thank you
Mattia

chrisb July 29, 2010 18:56

OF1.7. for mac clean installation
 
Hi Mattia,

I will try to answer as much as I can of your problems.

With respect to the 'could not open file' these messages will appear even when OpenFOAM does install on OS X.

As for needing to create that directory 'OpenFOAM/lib/darwinIntelDPOpt' my understanding is the install should do it for you! I would check that you are installing OF on a case-sensitive partition or disk image. If you are not the installation will fail.

If you need help please let me know.

Chris B.

demichie July 30, 2010 03:43

Thank you Chris,
tonight the mac finished to compile the source for OpenFOAM with this message:

make: Traget 'application' not remade because of errors.

Nevertheless, I've tried to run blockMesh and icoFoam and it seems to me that they run.
Now I've to install paraview to see if it will work.
Regarding the directory, I've created a case-sensitive partition to install OpenFOAM, so probebly there is another problem.

ciao
mattia

chrisb July 30, 2010 10:01

Quote:

Originally Posted by demichie (Post 269473)
Thank you Chris,
tonight the mac finished to compile the source for OpenFOAM with this message:

make: Traget 'application' not remade because of errors.

Nevertheless, I've tried to run blockMesh and icoFoam and it seems to me that they run.
Now I've to install paraview to see if it will work.
Regarding the directory, I've created a case-sensitive partition to install OpenFOAM, so probebly there is another problem.

ciao
mattia

Hi Mattia,
If you rerun Allwmake without deleting files you should be able to scroll through and find out what failed to build. Paraview may fail to build but foamToTecplot360 will fail. This is most likely the source of your error. If they are the only component which fail your build should be o.k.

The paraview binaries available from paraview.org should work fine (I would not bother trying to compile it). All that is will require is for you to create the .foam file in your case root directory.

Cheers
CB

AussieRacer August 22, 2010 12:53

Installing 1.7 on g5 ppc
 
Hi All,

I am currently doing an install of OpenFOAM 1.7 on a dual processor (PPC) G5 running OS X 10.5.8.

A couple of questions ...


FIRST QUESTION - APPLYING THE PATCH

When I went to apply the OpenFOAM-1.7-Mac.patch the terminal replied ...

Quote:

The next patch would create the file .gitignore,
which already exists! Assume -R? [n]
So I hit 'n', and the terminal replied ...

Quote:

Apply anyway? [n]
... so I hit 'n' again and it produced ...........

Quote:

Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file .gitignore.rej
patching file Allwmake.noThird
patching file applications/solvers/combustion/PDRFoam/Make/options
patching file applications/solvers/combustion/XiFoam/Make/options ...
<other "patching file" lines snipped from here - there were no other errors>
So everything else then seemed to patch just fine with the OpenFOAM-1.7-Mac.patch after the "1 out of 1 hunk ignored -- saving rejects to file .gitignore.rej" message.

So my first question is, should I have hit 'n' when prompted or not ?

ThirdParty-1.7-Mac.patch applied without any issue.


SECOND QUESTION - etc/bashrc changes

The unpacked OpenFOAM source is at:

/Volumes/OpenFOAM/OpenFOAM-1.7.0

http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac reads ...

Quote:

5. adapt the hard-coded compiler (gcc-mp-4.3 and g+-mp-4.3) in etc/bashrc and wmake/rules/darwin* to fit your system
So I opened etc/bashrc and there is a section in there that reads ...

Quote:

# Location of the OpenFOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=$HOME/$WM_PROJECT
# foamInstall=~$WM_PROJECT
# foamInstall=/usr/local/$WM_PROJECT
# foamInstall=/opt/$WM_PROJECT
What value should the foamInstall variable be set to in those lines for OSX PPC install ?

I tried this ...

foamInstall=$/Volumes/OpenFOAM/$WM_PROJECT

but when I ran Allwmake, that produced ...

Quote:

/Volumes/OpenFOAM/OpenFOAM-1.7.0/Allwmake ; exit;
$ /Volumes/OpenFOAM/OpenFOAM-1.7.0/Allwmake ; exit;
Error: Current directory is not $WM_PROJECT_DIR
The environment variable are not consistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.
Using ...

foamInstall=$HOME/$WM_PROJECT

... produced the same error.

Can anyone give me a pointer in terms of what lines in etc/bashrc I need to change and what values I need to change them to, to allow Allwmake to run without that error ?

- Thanks in advance !

wyldckat August 22, 2010 14:30

Greetings AussieRacer and welcome to the forum!

Quote:

Originally Posted by AussieRacer (Post 272280)
FIRST QUESTION - APPLYING THE PATCH

When I went to apply the OpenFOAM-1.7-Mac.patch the terminal replied
Code:

Apply anyway? [n]
So I hit 'n', and the terminal replied ...
(...)
So my first question is, should I have hit 'n' when prompted or not ?

I don't have experience with Macs, but that type of thing also can happen in Linux. The application patch detected that the desired changes were already made, so it asked if it should reverse the changes. Since you said "No", then there shouldn't be any problem :)

Quote:

Originally Posted by AussieRacer (Post 272280)
SECOND QUESTION - etc/bashrc changes

(...)
So the unpacked OpenFOAM source is at:
/Volumes/OpenFOAM/OpenFOAM-1.7.0
(...)
I tried this ...

foamInstall=$/Volumes/OpenFOAM/$WM_PROJECT

You were so close... The $ is to be used for variables! Allow me to explain with an example: the shell will interpret the variable "$WM_PROJECT" and give out "OpenFOAM". So, you just need to remove that first $ you had and your own "OpenFOAM", i.e. make it like this:
Code:

foamInstall=/Volumes/$WM_PROJECT
And you should be good to go... at least as soon as you open a new terminal and/or source the "OpenFOAM-1.7.0/etc/bashrc" file ;)

Additionally, you might want to change the line a bit below that one; change this one:
Code:

export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
To this:
Code:

export WM_PROJECT_USER_DIR=/Volumes/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
This way your user folder for your OpenFOAM software and case runs will be in the same volume. To see what I mean, before running Allwmake, run this:
Code:

echo $WM_PROJECT_USER_DIR
And since you are using a dual core machine, you might want to add this line to your bashrc file:
Code:

export WM_NCOMPPROCS=2
Oh, by the way, you might want to run Allwmake like so:
Code:

time ./Allwmake > make.log 2>&1
This way you can keep it all logged in the file "make.log" and can later on check if something went wrong.

Good Luck!
Bruno


edit:
@Bernhard: You might want to check this post for your patches for OpenFOAM 1.7.0: http://www.cfd-online.com/Forums/ope...tml#post271787
The problem as already been fixed for 1.7.x, but for 1.7.0 you'll need to:
Quote:

Originally Posted by wyldckat (Post 271787)
add the option "-fno-strict-aliasing" along with "-O3"


gschaider August 23, 2010 08:36

Quote:

Originally Posted by wyldckat (Post 272287)
@Bernhard: You might want to check this post for your patches for OpenFOAM 1.7.0: http://www.cfd-online.com/Forums/ope...tml#post271787
The problem as already been fixed for 1.7.x, but for 1.7.0 you'll need to:

Thank you. I'm aware of this. Once I find time to update the patch I will upload it

BTW: and thanks for answering all the other stuff

AussieRacer August 23, 2010 10:58

Quote:

Originally Posted by wyldckat (Post 272287)
Greetings AussieRacer and welcome to the forum!

Thanks wyldckat, both for your welcome and your help with this.


Quote:

Originally Posted by wyldckat (Post 272287)
The $ is to be used for variables!

Thanks - I missed the leading $.

I made the changes to bashrc as you outlined above.

wyldckat August 23, 2010 11:17

Hi AussieRacer,
Quote:

Originally Posted by wyldckat (Post 272287)
And you should be good to go... at least as soon as you open a new terminal and/or source the "OpenFOAM-1.7.0/etc/bashrc" file

I should have been more specific about this:
Quote:

Originally Posted by http://www.openfoam.com/download/source.php#x4-15000
if running bash or ksh (if in doubt type echo $SHELL), source the etc/bashrc file by adding the following line to the end of your $HOME/.bashrc file:
  • . $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc
then type “. $HOME/.bashrc” in the current terminal window

The "source" procedure is usually this: "dot space path/to/script/to/be/sourced"

So, if you don't want to change your "$HOME/.bashrc" file, you can simply run this, every time you start a new terminal:
Code:

. /Volumes/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc
Notice the space before the first slash!

Now, so you can be certain that the variables are set, run this:
Code:

echo $WM_PROJECT_DIR
If it outputs "/Volumes/OpenFOAM/OpenFOAM-1.7.0" then you should be good to go :)

Good luck!
Bruno

gschaider August 23, 2010 11:19

Quote:

Originally Posted by AussieRacer (Post 272390)
However, when I do ...

Code:

cd /Volumes/OpenFOAM/OpenFOAM-1.7.0
time ./Allwmake > make.log 2>&1

I get ...

--------
Error: Current directory is not $WM_PROJECT_DIR
The environment variable are not consistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.
--------

Is there something wrong in my settings in bashrc ? Should I hardcode the value of WM_PROJECT_DIR by adding a line that hardcodes the value of WM_PROJECT_DIR ?

Can I add some lines of code to bashrc to output the values of the variables as it steps through the code to verify / debug the value of each variable to try to diagnose the problem ? If so what is the best way to do that ?

Thanks again in advance !

Just one question before we go further into this: have you looked at the Wiki for the requirements of this patch? I'm thinking about the case-sensitve file system (because that would explain that the script doesn'T find a correctly named directory). Try "touch foo" and "touch Foo" in your OF-directory. If you get two separate files everything is alright and the problem is something else. If you don't the build will never work in that directory

AussieRacer August 23, 2010 11:36

Quote:

Originally Posted by gschaider (Post 272398)
Just one question before we go further into this: have you looked at the Wiki for the requirements of this patch? I'm thinking about the case-sensitve file system (because that would explain that the script doesn'T find a correctly named directory). Try "touch foo" and "touch Foo" in your OF-directory. If you get two separate files everything is alright and the problem is something else. If you don't the build will never work in that directory

Hi gschaider,

Thanks for your post.

Yes I ran "touch foo" and "touch Foo" in the terminal and that created two separates files - one named "foo" and a second file named "Foo", so it looks like the volume is definitely case sensitive.

Thanks for your help.

AussieRacer August 23, 2010 11:43

Hi wyldcat,

Thanks again for your help - I really appreciate it.

Quote:

Originally Posted by wyldckat (Post 272397)
Now, so you can be certain that the variables are set, run this:
Code:

echo $WM_PROJECT_DIR
If it outputs "/Volumes/OpenFOAM/OpenFOAM-1.7.0" then you should be good to go :)

Good luck!
Bruno

Running ...

Code:

echo $WM_PROJECT_DIR
... returns ...

Quote:

/Volumes/OpenFOAM/OpenFOAM-1.7.0
So it looks like that var $WM_PROJECT_DIR is correct.

Am attempting to install now.

Thanks again for everyone's help on this - it's fantastic to see this kind of community support with OpenFOAM.

wyldckat August 23, 2010 12:22

Hi AussieRacer,

I still managed to pick up your unedited post :)
The issue you had posted was just a slight bug in Bernhard's patches, that only happens before the first build.
Just edit the file "$WM_PROJECT_DIR/etc/apps/paraview3/bashrc", search for the lines that say:
Code:

        echo "Creating $PV_PLUGIN_PATH"
        mkdir $PV_PLUGIN_PATH

And change the second one to this:
Code:

mkdir -p $PV_PLUGIN_PATH
The "-p" option will tell mkdir to create the whole path, not just the end folder.

Best regards,
Bruno

AussieRacer August 23, 2010 12:43

Quote:

Originally Posted by wyldckat (Post 272410)
Hi AussieRacer,

I still managed to pick up your unedited post :)

Yes I edited my post after I noticed that an earlier post in the thread mentioned the same things I was asking about.


Quote:

Originally Posted by wyldckat (Post 272410)
The issue you had posted was just a slight bug in Bernhard's patches, that only happens before the first build.
Just edit the file "$WM_PROJECT_DIR/etc/apps/paraview3/bashrc", search for the lines that say:
Code:

        echo "Creating $PV_PLUGIN_PATH"
        mkdir $PV_PLUGIN_PATH

And change the second one to this:
Code:

mkdir -p $PV_PLUGIN_PATH
The "-p" option will tell mkdir to create the whole path, not just the end folder.

Best regards,
Bruno

I have a build running right now in the background without the change made that you mention above.

Should I stop that build that is running right now, edit the file "$WM_PROJECT_DIR/etc/apps/paraview3/bashrc" and restart the build, or just let the build run ?

When you say "that only happens before the first build", do you mean that the first build addresses that, or does the change need to be made to "$WM_PROJECT_DIR/etc/apps/paraview3/bashrc" before the first build is attempted ?

Thanks again !

wyldckat August 23, 2010 12:59

I should have been more explicit: there is no need to worry :) Just let it keep on building OpenFOAM. Because next time you "source" OpenFOAM's bashrc file (and/or open a new terminal), all will be well ;)


All times are GMT -4. The time now is 15:50.