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

2.0.x on Mac OSX

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2011, 11:26
Default
  #61
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 bambedil View Post
Hallo,

I did a small research about this cwchar-poblem. It seems to be that some libraries are missing on my mac. It could be that this has something to do with gnu c libraries and specially with the glibc. But if I want to compile this glibc-library on lion the terminal say:

../configure
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: running configure fragment for add-on libidn
configure: running configure fragment for add-on nptl
*** The GNU C library is currently not available for this platform.
*** So far nobody cared to port it and if there is no volunteer it
*** might never happen. So, if you have interest to see glibc on
*** this platform visit
*** http://www.gnu.org/software/libc/porting.html
*** and join the group of porters

I´m usind gcc4.5.3.

I don´t find gnu c library for mac...

Greetings
I don't think that this is the problem per se. glibc is only required on systems where the vendor doesn't provide libc (in other words: on Linux). On my Mac OpenFOAM happily compiles without glibc.

The compiler you have: where did you get him from? MacPorts, Fink or self-compiled?
gschaider is offline   Reply With Quote

Old   October 25, 2011, 23:40
Default
  #62
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Unfortunately I think the problem you are dealing with is a bit over my head. Based on what you previously posted it looks like we both basically did the same thing and it worked for me. It looks like the only thing that you did differently was install openmpi from macports, which I didn't do...doesn't seem like that would cause your problem though.

The only other thing I can think of (and I really have no idea if this is relavent) is that I installed the scipy superpack [http://stronginference.com/scipy-superpack/] before compiling OpenFOAM which included installing a gfortran compiler which could have included some libraries that were needed?

If there is anything that I can check on my machine to help you out I am happy to...

MD
mgdenno is offline   Reply With Quote

Old   October 26, 2011, 12:36
Default
  #63
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 mgdenno View Post
Unfortunately I think the problem you are dealing with is a bit over my head. Based on what you previously posted it looks like we both basically did the same thing and it worked for me. It looks like the only thing that you did differently was install openmpi from macports, which I didn't do...doesn't seem like that would cause your problem though.

The only other thing I can think of (and I really have no idea if this is relavent) is that I installed the scipy superpack [http://stronginference.com/scipy-superpack/] before compiling OpenFOAM which included installing a gfortran compiler which could have included some libraries that were needed?

If there is anything that I can check on my machine to help you out I am happy to...

MD
I think the problem here has nothing to do with OpenFOAM or any fancy packages. Something with the compiler he is using is wrong.

Florian: please try to compile a simple HelloWorld like I suggested a fex posts ago (just the first part from http://pages.cs.wisc.edu/~beechung/ref/gcc-intro.html). If that doesn't work then the compiler installation has a problem and you should consider reinstalling it
gschaider is offline   Reply With Quote

Old   October 29, 2011, 18:47
Default
  #64
New Member
 
Flo bucken
Join Date: Mar 2009
Location: Germany
Posts: 8
Rep Power: 17
bambedil is on a distinguished road
Dear Gschaider,

I compiled the small "Hello Wold" c++-program without any problem. I´m using gcc4.5.3. I got it from macports...


Dear Mgdenno,

I tried compiling OpenFOAM with the openmpi from macports and with openmpi from the ThirdParty-folder. Both with the same result.

Greetings
bambedil is offline   Reply With Quote

Old   October 30, 2011, 06:20
Default
  #65
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 bambedil View Post
Dear Gschaider,

I compiled the small "Hello Wold" c++-program without any problem. I´m using gcc4.5.3. I got it from macports...


Dear Mgdenno,

I tried compiling OpenFOAM with the openmpi from macports and with openmpi from the ThirdParty-folder. Both with the same result.

Greetings
OK. To summarize:
- You've got a working compiler (gcc45 from MacPorts)
- When compiling you encounter lots of errors on cwchar

What is unclear to me is: when does this error happen the first time. During compilation of the ThirdParty-stuff or of OF itself. Could you please post from the first time this error happens
- the compiler call
- the first few errors (the most important error is not the one you see most often, but the one that happens first)
gschaider is offline   Reply With Quote

Old   January 22, 2012, 08:24
Default
  #66
New Member
 
Benjamin Stanke
Join Date: Sep 2011
Posts: 18
Rep Power: 15
xtphgu is on a distinguished road
Hello together,

do someone know is there meanwhile a solution to use "mpirun" in openFoam on Lion?

Thanks.
xtphgu is offline   Reply With Quote

Old   February 20, 2012, 11:12
Default Library not loaded
  #67
New Member
 
Arnaud J
Join Date: Feb 2012
Posts: 2
Rep Power: 0
ArnaudJ is on a distinguished road
Hi,

I'm trying to generate the mesh with "blocmesh" in a tutorial but apparently one library was not loaded. These are the lines on my terminal...


h-191-245:cavity arnaudjacques$ blockMesh
dyld: Library not loaded: /usr/lib/libmpi.0.dylib
Referenced from: /Users/arnaudjacques/OpenFOAM/OpenFOAM-2.0.x/platforms/darwinIntel64Gcc45DPOpt/lib/openmpi-system/libPstream.dylib
Reason: image not found
Trace/BPT trap: 5

How can I deal with this pb?
thx
ArnaudJ is offline   Reply With Quote

Old   February 21, 2012, 13:42
Default
  #68
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 ArnaudJ View Post
Hi,

I'm trying to generate the mesh with "blocmesh" in a tutorial but apparently one library was not loaded. These are the lines on my terminal...


h-191-245:cavity arnaudjacques$ blockMesh
dyld: Library not loaded: /usr/lib/libmpi.0.dylib
Referenced from: /Users/arnaudjacques/OpenFOAM/OpenFOAM-2.0.x/platforms/darwinIntel64Gcc45DPOpt/lib/openmpi-system/libPstream.dylib
Reason: image not found
Trace/BPT trap: 5

How can I deal with this pb?
thx
Is this a self-compiled version or did you get the binary from somewhere?

Check with

ls /usr/lib/libmpi*

if there is ANYTHING MPIish there. If there is not then it is hard for me to see how you could compile it anyway.
gschaider is offline   Reply With Quote

Old   February 21, 2012, 13:54
Default
  #69
New Member
 
Arnaud J
Join Date: Feb 2012
Posts: 2
Rep Power: 0
ArnaudJ is on a distinguished road
Thanks Bernhard

the version i have comes from this website http://www.optimulation.com/category.../installation/

When I copy ls /usr/lib/libmpi* in my terminal it's said there is no such file or directory...
ArnaudJ is offline   Reply With Quote

Old   February 21, 2012, 14:55
Default
  #70
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 ArnaudJ View Post
Thanks Bernhard

the version i have comes from this website http://www.optimulation.com/category.../installation/

When I copy ls /usr/lib/libmpi* in my terminal it's said there is no such file or directory...
And you followed their instructions? Don't know how libmpi.dylib gets on the disc in Lion (still have Snow Leopard). With binary packages usually the provider of the package knows best so you'd best ask there (although point 5 might be strong hint. Although the MacPorts-MPI should be in a different place)
gschaider is offline   Reply With Quote

Old   March 24, 2012, 19:49
Default
  #71
New Member
 
Giovani Haryadi
Join Date: Mar 2012
Posts: 2
Rep Power: 0
giovaniharyadi is on a distinguished road
I tried patch all but it seemed not working in my computer :
Giovanis-MacBook-Pro:OpenFOAM-2.0.x giovaniharyadi$ patch -pl < OpenFOAM-2.0.x-Mac.patch
patch: **** strip count l is not a number

Can anyone help me?
Thank you
giovaniharyadi is offline   Reply With Quote

Old   March 27, 2012, 17:59
Default Is there a restriction for gcc45 on Mac-10.6?
  #72
New Member
 
Alonso
Join Date: Mar 2012
Posts: 1
Rep Power: 0
enki4u is on a distinguished road
Hi,

Attempting 2.0.x

I was following the instructions from http://www.optimulation.com/category/openfoam/
and
http://macopenfoam.blogspot.com/p/detailed-setup.html

After attempting both in different scenarios I come to a cul-de-sac and the message
~/OpenFOAM no file-directory appears.

I am under the impression that gcc45 cannot be used for this but I have no answer.

Any help is well received!
enki4u is offline   Reply With Quote

Old   March 27, 2012, 19:47
Default
  #73
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 giovaniharyadi View Post
I tried patch all but it seemed not working in my computer :
Giovanis-MacBook-Pro:OpenFOAM-2.0.x giovaniharyadi$ patch -pl < OpenFOAM-2.0.x-Mac.patch
patch: **** strip count l is not a number

Can anyone help me?
Thank you
You misstyped the command. It should say -p1. Not -pl (I think the error message is very clear about what is required)
gschaider is offline   Reply With Quote

Old   March 28, 2012, 09:55
Default
  #74
New Member
 
Jie Qin
Join Date: Mar 2011
Posts: 8
Rep Power: 15
qinjie1629 is on a distinguished road
I download the Sparseimage and install the OpenFOAM following the instructions:
(My system is 10.7.3. A tutorial from YouTube successfully installed the OF to 10.7.2 following this instruction.)

1. Install Macports for Lion.

2. sudo port install gcc45

3. sudo port install openmpi +gcc45

4. Extract Mac-OF-2.0.x.sparseimage.zip, and mount the image

5.
>> cd ~
>> ln -sf /Volumes/Mac-OF-2.0.x OpenFOAM
>> cd OpenFOAM
>> ln -sf ~/Documents/OF-User ‘whoami’-2.0.x
>> cd ~
>> vi .profile
and add this line
. ~/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc

Quit and restart Terminal…
When I restart Terminal, following errors appeared, Please give me some advices.


-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
qinjie1629 is offline   Reply With Quote

Old   March 28, 2012, 17:46
Default
  #75
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 qinjie1629 View Post
I download the Sparseimage and install the OpenFOAM following the instructions:
(My system is 10.7.3. A tutorial from YouTube successfully installed the OF to 10.7.2 following this instruction.)

1. Install Macports for Lion.

2. sudo port install gcc45

3. sudo port install openmpi +gcc45

4. Extract Mac-OF-2.0.x.sparseimage.zip, and mount the image

5.
>> cd ~
>> ln -sf /Volumes/Mac-OF-2.0.x OpenFOAM
>> cd OpenFOAM
>> ln -sf ~/Documents/OF-User ‘whoami’-2.0.x
>> cd ~
>> vi .profile
and add this line
. ~/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc

Quit and restart Terminal…
When I restart Terminal, following errors appeared, Please give me some advices.


-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamEtcFile: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.0.x/bin/foamCleanPath: /bin/sh: bad interpreter: Operation not permitted
This seems to be a general problem with you OS. Google for "/bin/sh: bad interpreter: Operation not permitted" maybe that might give you a hint
gschaider 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
fluent @ Mac OSx ignazio FLUENT 12 July 25, 2017 08:03
foamToTecplot360 on mac osx 10.6 SL mohanamuraly OpenFOAM 0 April 27, 2011 01:26
Mac OSX and Homebrew egp OpenFOAM Installation 1 February 15, 2011 11:21
OpenFOAM13 for Mac OSX Darwin 104 hjasak OpenFOAM Installation 70 September 24, 2010 06:06
OpenFOAM on mac OSX Nick Colam Main CFD Forum 3 January 27, 2009 01:06


All times are GMT -4. The time now is 08:38.