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

OF 1.9 (aka OF 2.1) on Mac OS X

Register Blogs Community New Posts Updated Threads Search

Like Tree25Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2012, 14:08
Default
  #21
New Member
 
Michael
Join Date: Dec 2011
Location: Geneva
Posts: 28
Rep Power: 15
lithos is on a distinguished road
Ok, there is a quick and dirty manual, but it exceeds the limits of this forum. But I just discovered that the parallel solving does not work. I try to fix this and change the document.
Have a nice evening.
lithos is offline   Reply With Quote

Old   February 10, 2012, 13:34
Default
  #22
New Member
 
Michael
Join Date: Dec 2011
Location: Geneva
Posts: 28
Rep Power: 15
lithos is on a distinguished road
Sorry guys for being late. Here is a link to the manual: https://rapidshare.com/files/3641151...OS_X.pdf?bin=1

Please let me know if you could store this somewhere else. Thanks.

Hava a nice weekend.
arman3939 likes this.
lithos is offline   Reply With Quote

Old   February 13, 2012, 06:52
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 lithos View Post
Sorry guys for being late. Here is a link to the manual: https://rapidshare.com/files/3641151...OS_X.pdf?bin=1

Please let me know if you could store this somewhere else. Thanks.

Hava a nice weekend.
Thanks for doing a write-up. Personally I would say that the Wiki is a good place for this file. As far as I remember the upload of PDFs is OK (let me know if you experience any problems)

Bernhard
gschaider is offline   Reply With Quote

Old   February 13, 2012, 19:50
Default
  #24
New Member
 
Matt Weber
Join Date: Feb 2012
Posts: 1
Rep Power: 0
mweber is on a distinguished road
Hi,

I'm a little new to all of this and I'm having some trouble sourcing the files.

I get the following error message when attempting to compile,

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

Help would be appreciated.

Thanks.
mweber is offline   Reply With Quote

Old   February 14, 2012, 11:00
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 mweber View Post
Hi,

I'm a little new to all of this and I'm having some trouble sourcing the files.

I get the following error message when attempting to compile,

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

Help would be appreciated.

Thanks.
The Allwmake-script must be run EXACTLY in its directory because otherwise you might get more obscure problems. The message above is the script checking and finding out that you ran it from somewhere else.
pryszkie likes this.
gschaider is offline   Reply With Quote

Old   February 28, 2012, 04:57
Default
  #26
New Member
 
Join Date: Feb 2012
Posts: 4
Rep Power: 14
pryszkie is on a distinguished road
Quote:
Originally Posted by lithos View Post
Sorry guys for being late. Here is a link to the manual: https://rapidshare.com/files/3641151...OS_X.pdf?bin=1

Please let me know if you could store this somewhere else. Thanks.

Hava a nice weekend.
Hello, thanks for the instructions, but I have a problem. I am running 10.7.3 Lion and everything works up until the compilation at the end. I get a lot of "no such file or directory" errors such as

/Users/pr/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/sphericalTensor.H:38:29: error: SphericalTensor.H: No such file or directory

The file is there, except starting with a capital letter. Weren't the patches supposed to "fix" those.

Thanks
pryszkie is offline   Reply With Quote

Old   February 28, 2012, 17:04
Default
  #27
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 pryszkie View Post
Hello, thanks for the instructions, but I have a problem. I am running 10.7.3 Lion and everything works up until the compilation at the end. I get a lot of "no such file or directory" errors such as

/Users/pr/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/sphericalTensor.H:38:29: error: SphericalTensor.H: No such file or directory

The file is there, except starting with a capital letter. Weren't the patches supposed to "fix" those.

Thanks
No. The patch fixes a number of other things, but the case-sensitive filesystem is still a requirement. So try

touch sphericalTensor.H

If it can't happily coexist with SphericalTensor.H then the filesystem is not case-sensitive
gschaider is offline   Reply With Quote

Old   February 28, 2012, 19:32
Default
  #28
New Member
 
Join Date: Feb 2012
Posts: 4
Rep Power: 14
pryszkie is on a distinguished road
Quote:
Originally Posted by gschaider View Post
No. The patch fixes a number of other things, but the case-sensitive filesystem is still a requirement. So try

touch sphericalTensor.H

If it can't happily coexist with SphericalTensor.H then the filesystem is not case-sensitive
Thanks for the reply. I think the problem was not having extracted the OF files from within the case-sensitive filesystem. This problem now seems to be gone.

The only issue now is when compiling everything (gcc46 option), the processes take up all my 4G of ram plus more than 5G of swap. I will try compiling overnight.
pryszkie is offline   Reply With Quote

Old   February 29, 2012, 05:51
Default
  #29
New Member
 
Join Date: Feb 2012
Posts: 4
Rep Power: 14
pryszkie is on a distinguished road
Quote:
Originally Posted by pryszkie View Post
Thanks for the reply. I think the problem was not having extracted the OF files from within the case-sensitive filesystem. This problem now seems to be gone.

The only issue now is when compiling everything (gcc46 option), the processes take up all my 4G of ram plus more than 5G of swap. I will try compiling overnight.
The ram problem was caused by using lithos'

export WM_NCOMPPROCS=20

in bashrc, in his manual. I changed it to 4 instead of 20 and ram may have only topped out at 3G total.

Compilation was successful except for these few programs, but I don't think I need these.

make[2]: *** [wallShearStress] Error 2
make[1]: *** [wall] Error 2
make: *** [postProcessing] Error 2

Anyways, I appreciate the patches, gschaider.
pryszkie is offline   Reply With Quote

Old   March 1, 2012, 11:22
Default Error Compiling
  #30
New Member
 
João Lopes
Join Date: Feb 2012
Posts: 1
Rep Power: 0
jvianalopes is on a distinguished road
Hi,


I followed the instructions to compile with gcc46 and when patching the OpenFOAM directory I found the error:
patching file applications/utilities/postProcessing/turbulence/R/Make/options
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file applications/utilities/postProcessing/turbulence/R/Make/options.rej

/options.rej:
***************
*** 5,10 ****
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \

-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
--- 5,11 ----
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \

+ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \

When I ran the ./Allmake it starded from the beginning with:
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
SOURCE=UPstream.C ; g++-mp-4.6 -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOpt/UPstream.o
In file included from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/wchar.h:42:0,
from /opt/local/include/gcc46/c++/cwchar:46,
from /opt/local/include/gcc46/c++/bits/postypes.h:42,
from /opt/local/include/gcc46/c++/bits/char_traits.h:42,
from /opt/local/include/gcc46/c++/string:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/string.H:51,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/word.H:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/int.H:39,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/label.H:61,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/labelList.H:47,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/UPstream.H:43,
from UPstream.C:26:
/opt/local/include/gcc46/c++/cwchar:66:11: error: '::mbstate_t' has not been declared
/opt/local/include/gcc46/c++/cwchar:141:11: error: '::wint_t' has not been declared
/opt/local/include/gcc46/c++/cwchar:143:11: error: '::btowc' has not been declared
/opt/local/include/gcc46/c++/cwchar:144:11: error: '::fgetwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:145:11: error: '::fgetws' has not been declared
/opt/local/include/gcc46/c++/cwchar:146:11: error: '::fputwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:147:11: error: '::fputws' has not been declared
/opt/local/include/gcc46/c++/cwchar:148:11: error: '::fwide' has not been declared
/opt/local/include/gcc46/c++/cwchar:149:11: error: '::fwprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:150:11: error: '::fwscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:151:11: error: '::getwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:152:11: error: '::getwchar' has not been declared
/opt/local/include/gcc46/c++/cwchar:153:11: error: '::mbrlen' has not been declared
/opt/local/include/gcc46/c++/cwchar:154:11: error: '::mbrtowc' has not been declared
/opt/local/include/gcc46/c++/cwchar:155:11: error: '::mbsinit' has not been declared
/opt/local/include/gcc46/c++/cwchar:156:11: error: '::mbsrtowcs' has not been declared
/opt/local/include/gcc46/c++/cwchar:157:11: error: ':utwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:158:11: error: ':utwchar' has not been declared
/opt/local/include/gcc46/c++/cwchar:160:11: error: '::swprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:162:11: error: '::swscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:163:11: error: '::ungetwc' has not been declared

followed by thousands of lines of errors and messages. The last lines are:
Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C: In constructor 'Foam::NamedEnum<Enum, nEnum>::NamedEnum()':
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:18: error: wrong number of template arguments (1, should be 3)
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/HashTable.H:62:48: error: provided for 'template<class T, class Key, class Hash> struct Foam::HashTable'
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:19: error: expected '{' before '(' token
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C: At global scope:
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:20: error: expected unqualified-id before numeric constant
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:20: error: expected ')' before numeric constant
In file included from /opt/local/include/gcc46/c++/ext/atomicity.h:34:0,
from /opt/local/include/gcc46/c++/bits/basic_string.h:41,
from /opt/local/include/gcc46/c++/string:54,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/string.H:51,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/word.H:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/int.H:39,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/label.H:61,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/labelList.H:47,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/UPstream.H:43,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/Pstream.H:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/parRun.H:35,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvCFD.H:4,
from solidEquilibriumDisplacementFoam.C:38:
/opt/local/include/gcc46/c++//x86_64-apple-darwin11/bits/gthr.h:170:27: error: expected declaration before end of line
make[2]: *** [Make/darwinIntel64Gcc46DPOpt/solidEquilibriumDisplacementFoam.o] Error 1
make[2]: Target `/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/bin/solidEquilibriumDisplacementFoam' not remade because of errors.
make[1]: *** [solidEquilibriumDisplacementFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.

Can you give any suggestion to solve this problem?
I'm running the Lion with Macports and the gcc46.

Thanks in advance
João
jvianalopes is offline   Reply With Quote

Old   March 1, 2012, 15:22
Default
  #31
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 jvianalopes View Post
Hi,


I followed the instructions to compile with gcc46 and when patching the OpenFOAM directory I found the error:
patching file applications/utilities/postProcessing/turbulence/R/Make/options
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file applications/utilities/postProcessing/turbulence/R/Make/options.rej

/options.rej:
***************
*** 5,10 ****
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \

-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
--- 5,11 ----
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \

+ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \

When I ran the ./Allmake it starded from the beginning with:
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
SOURCE=UPstream.C ; g++-mp-4.6 -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOpt/UPstream.o
In file included from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/wchar.h:42:0,
from /opt/local/include/gcc46/c++/cwchar:46,
from /opt/local/include/gcc46/c++/bits/postypes.h:42,
from /opt/local/include/gcc46/c++/bits/char_traits.h:42,
from /opt/local/include/gcc46/c++/string:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/string.H:51,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/word.H:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/int.H:39,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/label.H:61,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/labelList.H:47,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/UPstream.H:43,
from UPstream.C:26:
/opt/local/include/gcc46/c++/cwchar:66:11: error: '::mbstate_t' has not been declared
/opt/local/include/gcc46/c++/cwchar:141:11: error: '::wint_t' has not been declared
/opt/local/include/gcc46/c++/cwchar:143:11: error: '::btowc' has not been declared
/opt/local/include/gcc46/c++/cwchar:144:11: error: '::fgetwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:145:11: error: '::fgetws' has not been declared
/opt/local/include/gcc46/c++/cwchar:146:11: error: '::fputwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:147:11: error: '::fputws' has not been declared
/opt/local/include/gcc46/c++/cwchar:148:11: error: '::fwide' has not been declared
/opt/local/include/gcc46/c++/cwchar:149:11: error: '::fwprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:150:11: error: '::fwscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:151:11: error: '::getwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:152:11: error: '::getwchar' has not been declared
/opt/local/include/gcc46/c++/cwchar:153:11: error: '::mbrlen' has not been declared
/opt/local/include/gcc46/c++/cwchar:154:11: error: '::mbrtowc' has not been declared
/opt/local/include/gcc46/c++/cwchar:155:11: error: '::mbsinit' has not been declared
/opt/local/include/gcc46/c++/cwchar:156:11: error: '::mbsrtowcs' has not been declared
/opt/local/include/gcc46/c++/cwchar:157:11: error: ':utwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:158:11: error: ':utwchar' has not been declared
/opt/local/include/gcc46/c++/cwchar:160:11: error: '::swprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:162:11: error: '::swscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:163:11: error: '::ungetwc' has not been declared

followed by thousands of lines of errors and messages. The last lines are:
Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C: In constructor 'Foam::NamedEnum<Enum, nEnum>::NamedEnum()':
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:18: error: wrong number of template arguments (1, should be 3)
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/HashTable.H:62:48: error: provided for 'template<class T, class Key, class Hash> struct Foam::HashTable'
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:19: error: expected '{' before '(' token
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C: At global scope:
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:20: error: expected unqualified-id before numeric constant
/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/NamedEnum.C:33:20: error: expected ')' before numeric constant
In file included from /opt/local/include/gcc46/c++/ext/atomicity.h:34:0,
from /opt/local/include/gcc46/c++/bits/basic_string.h:41,
from /opt/local/include/gcc46/c++/string:54,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/string.H:51,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/word.H:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/int.H:39,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/label.H:61,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/labelList.H:47,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/UPstream.H:43,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/Pstream.H:42,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/parRun.H:35,
from /Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvCFD.H:4,
from solidEquilibriumDisplacementFoam.C:38:
/opt/local/include/gcc46/c++//x86_64-apple-darwin11/bits/gthr.h:170:27: error: expected declaration before end of line
make[2]: *** [Make/darwinIntel64Gcc46DPOpt/solidEquilibriumDisplacementFoam.o] Error 1
make[2]: Target `/Users/jlopes/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/bin/solidEquilibriumDisplacementFoam' not remade because of errors.
make[1]: *** [solidEquilibriumDisplacementFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.

Can you give any suggestion to solve this problem?
I'm running the Lion with Macports and the gcc46.

Thanks in advance
João
There was a similar problem reported at
http://www.cfd-online.com/Forums/ope...tml#post328100

Only had a quick glance and am not sure whether the problem was solved. Please have a look at the thread. If there is no solution, please come back with the information that was request from that guy
gschaider is offline   Reply With Quote

Old   March 2, 2012, 17:00
Default
  #32
New Member
 
Join Date: Feb 2012
Posts: 4
Rep Power: 14
pryszkie is on a distinguished road
Quote:
Originally Posted by jvianalopes View Post
Hi,


I followed the instructions to compile with gcc46 and when patching the OpenFOAM directory I found the error:[INDENT] [COLOR=Red]patching file applications/utilities/postProcessing/turbulence/R/Make/options
Hunk #1 FAILED at 5.
...
...
Can you give any suggestion to solve this problem?
I'm running the Lion with Macports and the gcc46.

Thanks in advance
João
I had a similar problem when compiling. I think one of the compiler variables may not have been re-set. Do
Code:
echo $WM_COMPILER
and it should be Gcc46. If not, try changing the export WM_COMPILER line, in OpenFoam/etc/bashrc, to this
Code:
export WM_COMPILER=Gcc46
.

Last edited by pryszkie; March 2, 2012 at 17:03. Reason: shorten post
pryszkie is offline   Reply With Quote

Old   March 2, 2012, 17:49
Default
  #33
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 to all!

My bet is on the folder "/Users/jlopes/OpenFOAM/" not being a case sensitive mount. I say this because the last time that "wchar.h" errors popped up on me, was due to a case insensitive file system

Best regards,
Bruno
__________________

Last edited by wyldckat; March 7, 2012 at 09:19. Reason: typo
wyldckat is offline   Reply With Quote

Old   March 17, 2012, 12:44
Default Running parallel with gcc-4.2
  #34
New Member
 
William Case
Join Date: Sep 2011
Posts: 6
Rep Power: 15
wrcase is on a distinguished road
Dear Foamers
Has anyone resolved the parallel issue when compiling with gcc-4.2? I am aware that compiling with gcc-4.6 seems to resolve it. However, my constraint is that we are running a Mac cluster with Mac OSX 10.5 (Leopard), which to the best of my knowledge restricts me from installing later versions of gcc. Since the cluster is a limited resource, we can't risk upgrading the OS until a much later date. Thus, I am hoping to find the resolution to one of two questions:
1. Has anyone compiling with gcc-4.2 successfully gotten past the error (as quoted) when doing parallel computing? If so, how?
2. Is there a way to install gcc-4.6 on a Mac OSX 10.5 system? If so, how?

Here is more information from my system:
gcc version 4.2.1 (Apple Inc. build 5564)
mpirun (Open MPI) 1.5.3
Results from otool -L $FOAM_LIBBIN/$FOAM_MPI/libPstream.dylib:
/opt/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64GccDPOpt/lib/
openmpi-1.5.3/libPstream.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5)
/Network/Servers/controller.cluster/Homedir/wrcase/OpenFOAM/ThirdParty-2.1.x/platforms/darwinIntel64Gcc/openmpi-1.5.3/lib/libmpi.1.dylib (compatibility version 2.0.0, current version 2.1.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

Kind regards,
Bill

Quote:
Originally Posted by podallaire View Post
Thanks Bernhard for the patches !

Did you try to run something parallel ? I'm having trouble here, I tried many different versions of openmpi but I just cannot get it to work. I never had this problem before on OSX. I'm getting something like this when I try to use snappyHexMesh :

Code:
Create time

Create mesh for time = 0

[0] 
[0] 
[0] --> FOAM FATAL IO ERROR: 
[0] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[0] 
[0] file: IOstream at line 0.
[0] 
[0]     From function IOstream::fatalCheck(const char*) const
[0]     in file db/IOstreams/IOstreams/IOstream.C at line 114.
[0] 
FOAM parallel run exiting
[0] 
[1] 
[1] 
[1] --> FOAM FATAL IO ERROR: 
[1] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[1] 
[1] file: IOstream at line 0.
[1] 
[1]     From function IOstream::fatalCheck(const char*) const
[1]     in file db/IOstreams/IOstreams/IOstream.C at line 114.
[1] 
FOAM parallel run exiting
[1]
I bench-tested all openmpi installations and did not get any problem. Would it be something to do with capturing the command line arguments ?

Regards,

PO
wrcase is offline   Reply With Quote

Old   March 17, 2012, 14:21
Default
  #35
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 Bill and welcome to the forum!

I saw several months ago in FreeFOAM's log something about making it possible to compile with gcc 4.2.1. In case you are wondering, read this: http://freefoam.sourceforge.net/#_about_freefoam
Er, then again, I've checked the logs and maybe it's not exactly what I remembered... anyway, it's a worth to try it out

Another possibility is to build every application in static mode in your more recent Mac. There's a somewhat old thread about an experimental way of doing this on Linux: http://www.cfd-online.com/Forums/ope...le-solver.html

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 18, 2012, 06:29
Default
  #36
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 wrcase View Post
Dear Foamers
Has anyone resolved the parallel issue when compiling with gcc-4.2? I am aware that compiling with gcc-4.6 seems to resolve it. However, my constraint is that we are running a Mac cluster with Mac OSX 10.5 (Leopard), which to the best of my knowledge restricts me from installing later versions of gcc. Since the cluster is a limited resource, we can't risk upgrading the OS until a much later date. Thus, I am hoping to find the resolution to one of two questions:
1. Has anyone compiling with gcc-4.2 successfully gotten past the error (as quoted) when doing parallel computing? If so, how?
2. Is there a way to install gcc-4.6 on a Mac OSX 10.5 system? If so, how?
Can't reproduce your problem because I'd have to downgrade my (only) Mac (that's an excuse: in fact I don't have the time).

Just one question (kind of a gordic-knot answer): the way your nodes "see" the OF-installation is via the /opt-directory and I suppose this is either shared via NFS or mirrored from a master copy. Either you can have MacPorts install the compiler there (I don't know which compilers are supported by a MacPorts for 10.5) or do what most Linuxers do: compile the compiler into the ThirdParty-directory and use that one. gcc compiles (in my experience) almost everywhere. One tip: there is the possibility to add a postfix to the executables (gcc-my-46 for instance). That way your gcc doesn't "shadow" the Apple-executables. Which might (or might not) lead to unpleasant surprises
gschaider is offline   Reply With Quote

Old   March 19, 2012, 10:47
Default Running parallel on Mac os x 10.5
  #37
New Member
 
William Case
Join Date: Sep 2011
Posts: 6
Rep Power: 15
wrcase is on a distinguished road
Dear Bruno and Bernhard,
Thank you for the warm welcome and good suggestions.

In response to Bruno's suggestion,http://freefoam.sourceforge.net/#_about_freefoam, I didn't seem to find what I was looking for (not to say the answer wasn't there). As far as cross-compiling... I'm not sure if I am ready to tackle this. I am still an amateur when it comes to large project compiling.

In regards to Bernhard's question/suggestion -- You described the system correctly. Your suggestion of compiling gcc-4.6 will probably be 3rd on my list, since I started the others before reading your post.

Here is where I am at:
1. The latest version of gcc, to the best of my knowledge, that can be installed to OSX 10.5 using macPorts is gcc-mp-4.3. Unfortunately, I have never been able to compile the openmpi in Thirdparty properly with this. Although other's in my group seem to have. It seemed to resolve the original parallel problem (in post #34), however, I cannot confirm, having other parallel errors due to the openmpi not compiling properly. (The compile instead uses an old openmpi installed before my time from macPorts).

2. Both Fink and gfortran-with-gcc, http://gcc.gnu.org/wiki/GFortranBinaries#MacOS, have precompiled packages of gcc-4.6 for OSX 10.5. I have to convince the administrator to install this before I can proceed. The Fink package is compiled only for i386 (32-bit) and I am not sure about the gfortran.

3. Take Bernhard's suggestion and compile gcc-4.6 in Thirdparty.

Kind regards,
Bill
wrcase is offline   Reply With Quote

Old   March 19, 2012, 14:36
Default Resolved: Running parallel on Mac OS X 10.5
  #38
New Member
 
William Case
Join Date: Sep 2011
Posts: 6
Rep Power: 15
wrcase is on a distinguished road
Dear Foamers,
I managed to get OpenFoam-2.1.x working in parallel on the OS X 10.5 system. I had to compile under 32bit using gcc-mp-4.3 from macPorts.

Here are the special steps I needed:
1. Download and unpack Openfoam and Thirdparty from GIT (see post #1 of this thread).
2. Modify the OpenFOAM-2.1.x/etc/bashrc file as follows:
a. From previous posts in this thread I added
ulimit -n 1024 # Useful for OpenFOAM compiling
export WM_NCOMPPROCS=8 # Sets the number of processes the CPU can manage in parallel\
b. I set WM_ARCH_OPTION=32
3. Applied patch to Thirdparty and first patch to OpenFOAM-2.1.x (post #1)
4. In $WM_DIR/rules I copied darwinIntel64Gcc directory to darwinIntelGcc.
5. Modified the files in darwinIntelGcc directory as follows:

c: gcc -m64 ... --> gcc-mp-4.3 -m32 ...
c++: g++ -m64 ... --> g++-mp-4.3 -m32 ...
general: cpp ... --> cpp-mp-4.3 ...

6. Followed remaining instructions from post #1

I hope this helps.

Kind regards,
Bill
wrcase is offline   Reply With Quote

Old   March 24, 2012, 07:59
Default
  #39
New Member
 
Wouter
Join Date: Mar 2012
Posts: 6
Rep Power: 14
wcpvandervelden is on a distinguished road
Dear all,

Thanks to the wonderful instructions presented here, I did manage to install and compile OpenFoam 2.1.0 on my Mac OSX Lion.

OpenFOAM is running smooth. However the post processing steps aren't. As gschaider already mentioned in his first post, PV3Reader was not compiled. Therefore I downloaded ParaView 3.14.0 from the website from Kitware and installed it by simply dragging the file to the applications folder.

However, now I have to problem that I somehow have to connect ParaView with my current OpenFOAM installation. Since at this point, when I try to use paraFoam, i received the following message:

===============
FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
./Allwclean
./Allwmake
===============

I tried the obvious, as mentioned in the error but this will not help.

So, how can I fix this in order to generate .foam files which I can open with my ParaView version? This is basically the last step gschnaider mentioned in his first post, however I don't know how to do this.

Thank you in advance,

Wouter

+++++++++
Sorry for the spam, already found the solution. simply make a .foam document by e.g.

touch Dambreak.foam

This can be opened with ParaView

Last edited by wcpvandervelden; March 24, 2012 at 08:27. Reason: Solution known
wcpvandervelden is offline   Reply With Quote

Old   March 24, 2012, 09:34
Default
  #40
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi Wouter,

I find it convenient to make an alias to open ParaView from the command line.

If you add the following two lines to your ~/.alias:
Code:
alias paraview="/Applications/ParaView\ 3.14.0-RC2.app/Contents/MacOS/paraview"
alias parax="touch case.foam && paraview --data=case.foam &"
Then if you type parax inside a case, it will open the case in paraview, or typing paraview will open paraview without opening a case.

Philip
bigphil is offline   Reply With Quote

Reply

Tags
compilation error


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
Extend Project 1.6-ext Binary Release for Mac OS X hjasak OpenFOAM Announcements from Other Sources 26 November 5, 2013 17:50
Openfoam mac: Compiling custom libraries atareen64 OpenFOAM 3 April 14, 2011 12:01
OpenFOAM-1.6 on Mac OS X 10.6.1 elvisjohndowson OpenFOAM 6 October 21, 2009 16:45
Mac Simple Install Request or Processing Assistance Help sjohnson OpenFOAM Installation 4 December 12, 2008 08:46
MAC + SOLA for free surface T Main CFD Forum 1 April 11, 2001 14:43


All times are GMT -4. The time now is 13:40.