CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   2.0.x on Mac OSX (https://www.cfd-online.com/Forums/openfoam-installation/89752-2-0-x-mac-osx.html)

gschaider October 25, 2011 10:26

Quote:

Originally Posted by bambedil (Post 329315)
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?

mgdenno October 25, 2011 22:40

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

gschaider October 26, 2011 11:36

Quote:

Originally Posted by mgdenno (Post 329449)
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

bambedil October 29, 2011 17:47

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

gschaider October 30, 2011 05:20

Quote:

Originally Posted by bambedil (Post 330002)
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)

xtphgu January 22, 2012 07:24

Hello together,

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

Thanks.

ArnaudJ February 20, 2012 10:12

Library not loaded
 
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

gschaider February 21, 2012 12:42

Quote:

Originally Posted by ArnaudJ (Post 345342)
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.

ArnaudJ February 21, 2012 12:54

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

gschaider February 21, 2012 13:55

Quote:

Originally Posted by ArnaudJ (Post 345603)
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)

giovaniharyadi March 24, 2012 18:49

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

enki4u March 27, 2012 16:59

Is there a restriction for gcc45 on Mac-10.6?
 
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!

gschaider March 27, 2012 18:47

Quote:

Originally Posted by giovaniharyadi (Post 351275)
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)

qinjie1629 March 28, 2012 08:55

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

gschaider March 28, 2012 16:46

Quote:

Originally Posted by qinjie1629 (Post 351929)
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


All times are GMT -4. The time now is 06:29.