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

Patches for OpenFOAM 1.7 on MacOS X

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2010, 03:40
Default
  #21
Member
 
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 17
leosding is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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.
leosding is offline   Reply With Quote

Old   July 22, 2010, 03:01
Default Problems with compiling OF 1.7 on mac
  #22
New Member
 
stonehope's Avatar
 
Patrik Steinhoff
Join Date: May 2010
Location: Aachen
Posts: 5
Rep Power: 16
stonehope is on a distinguished road
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
stonehope is offline   Reply With Quote

Old   July 22, 2010, 05:41
Default
  #23
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by stonehope View Post
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
gschaider is offline   Reply With Quote

Old   July 22, 2010, 11:53
Default
  #24
New Member
 
stonehope's Avatar
 
Patrik Steinhoff
Join Date: May 2010
Location: Aachen
Posts: 5
Rep Power: 16
stonehope is on a distinguished road
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
stonehope is offline   Reply With Quote

Old   July 22, 2010, 14:22
Default
  #25
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by stonehope View Post
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
gschaider is offline   Reply With Quote

Old   July 29, 2010, 13:05
Default
  #26
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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
demichie is offline   Reply With Quote

Old   July 29, 2010, 19:56
Default OF1.7. for mac clean installation
  #27
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 16
chrisb is on a distinguished road
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.
chrisb is offline   Reply With Quote

Old   July 30, 2010, 04:43
Default
  #28
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 51
Rep Power: 17
demichie is on a distinguished road
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
demichie is offline   Reply With Quote

Old   July 30, 2010, 11:01
Default
  #29
New Member
 
Chris Butler
Join Date: Jun 2010
Posts: 21
Rep Power: 16
chrisb is on a distinguished road
Quote:
Originally Posted by demichie View Post
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
chrisb is offline   Reply With Quote

Old   August 22, 2010, 13:53
Default Installing 1.7 on g5 ppc
  #30
New Member
 
Join Date: May 2010
Posts: 13
Rep Power: 16
AussieRacer is on a distinguished road
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 !

Last edited by AussieRacer; August 23, 2010 at 13:34.
AussieRacer is offline   Reply With Quote

Old   August 22, 2010, 15:30
Default
  #31
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings AussieRacer and welcome to the forum!

Quote:
Originally Posted by AussieRacer View Post
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 View Post
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 View Post
add the option "-fno-strict-aliasing" along with "-O3"
__________________

Last edited by wyldckat; August 22, 2010 at 15:35. Reason: added a note for Bernhard
wyldckat is offline   Reply With Quote

Old   August 23, 2010, 09:36
Default
  #32
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
@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
gschaider is offline   Reply With Quote

Old   August 23, 2010, 11:58
Default
  #33
New Member
 
Join Date: May 2010
Posts: 13
Rep Power: 16
AussieRacer is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings AussieRacer and welcome to the forum!
Thanks wyldckat, both for your welcome and your help with this.


Quote:
Originally Posted by wyldckat View Post
The $ is to be used for variables!
Thanks - I missed the leading $.

I made the changes to bashrc as you outlined above.

Last edited by AussieRacer; August 23, 2010 at 13:31.
AussieRacer is offline   Reply With Quote

Old   August 23, 2010, 12:17
Default
  #34
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi AussieRacer,
Quote:
Originally Posted by wyldckat View Post
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
__________________
wyldckat is offline   Reply With Quote

Old   August 23, 2010, 12:19
Default
  #35
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by AussieRacer View Post
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
gschaider is offline   Reply With Quote

Old   August 23, 2010, 12:36
Default
  #36
New Member
 
Join Date: May 2010
Posts: 13
Rep Power: 16
AussieRacer is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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 is offline   Reply With Quote

Old   August 23, 2010, 12:43
Default
  #37
New Member
 
Join Date: May 2010
Posts: 13
Rep Power: 16
AussieRacer is on a distinguished road
Hi wyldcat,

Thanks again for your help - I really appreciate it.

Quote:
Originally Posted by wyldckat View Post
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.

Last edited by AussieRacer; August 23, 2010 at 13:36.
AussieRacer is offline   Reply With Quote

Old   August 23, 2010, 13:22
Default
  #38
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi 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
__________________
wyldckat is offline   Reply With Quote

Old   August 23, 2010, 13:43
Default
  #39
New Member
 
Join Date: May 2010
Posts: 13
Rep Power: 16
AussieRacer is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
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 View 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
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 !
AussieRacer is offline   Reply With Quote

Old   August 23, 2010, 13:59
Default
  #40
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] Default patches not appearing in paraview ozzythewise OpenFOAM Meshing & Mesh Conversion 9 September 22, 2017 10:51
[snappyHexMesh] internal faces between patches created with snappyHexMesh romant OpenFOAM Meshing & Mesh Conversion 0 August 17, 2009 09:40
Courant number, patches, etc oort OpenFOAM 1 July 24, 2009 19:05
[snappyHexMesh] SnappyHexMesh large number of patches written prapanj OpenFOAM Meshing & Mesh Conversion 0 July 15, 2009 09:11
radiation patches, viewfactors beams Siemens 1 March 12, 2009 08:39


All times are GMT -4. The time now is 12:44.