CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X (https://www.cfd-online.com/Forums/openfoam-installation/114265-patches-compile-openfoam-2-2-mac-os-x.html)

hewei April 2, 2013 07:05

Hi Bernhard,
Nice work you've done. here I wanna know if there is some patches for intel compiler? I find that even running the same case, the pressure is difficult to converged in Mac OpenFOAM with Gcc, if there was a patch for Icc, it will be much better. Thank you!!

Quote:

Originally Posted by gschaider (Post 412412)
Those of you using OpenSource for their CFD-needs, working with a Unix-like operating system but who were tempted by the slick hardware to the dubious corporation with the fruit in the logo may be interested in these patches for the latest version of OpenFOAM that allow compiling it on Mac OS X.

Those who say "How dare you use this fine OpenSource-program on these evil machines" are of course right, I feel ashamed and mumble "But they look so good, they work so fine and as long as it is not in the AppStore Apple will not profit from this"

Anyway. To the point. The patch has the same functionality as the last one for 2.1 posted here:
http://www.cfd-online.com/Forums/ope...tml#post412411
It is installed in the same way as the 2.1-patch described here: http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac

One note: the patch is supposed to create some symbolic links in wmake/rules but instead only creates files. So replace the file darwinIntel64Gcc4X (X from {2..8}) with a symbolic link to darwinIntel64Gcc

For thirdparty-software I rely on MacPorts. For the compilation I used from MacPorts

- OpenMPI
- gcc46 (gcc47 doesn't work for me, but your milage may vary)
- boost and cgal (these are optional. If found they will be used for surfaceExtractFeatures). Usage of these is new for this patch
- ccache (optional but highly recomended)

Contents of my ../site/2.2.x/prefs.sh are:
Code:

export WM_COMPILER=Gcc46
export WM_SCHEDULER=ccache

Feel free to experiment with other compilers

The only thing used/compiled from the original OpenFOAM-Thirdparty-software currently is scotch/ptscotch (as MacPorts uses an older version here)

Have fun and put your MacBooks into brown paper bags when you go outside so that the OpenSource-police won't spot you ;)

Attachment 19669Attachment 19670


gschaider April 2, 2013 07:20

Quote:

Originally Posted by hewei (Post 417808)
Hi Bernhard,
Nice work you've done. here I wanna know if there is some patches for intel compiler?

I don't have the Intel-compiler so it'd be hard for me to add that to the patch (but I'm accepting contributions). And currently I can't justify spending 700$ for it

Quote:

Originally Posted by hewei (Post 417808)
I find that even running the same case, the pressure is difficult to converged in Mac OpenFOAM with Gcc, if there was a patch for Icc, it will be much better.

What leads you to the conclusion that it will be better if compiled with the Intel-compiler if you haven't compiled it with the Intel compiler yet? (only thing I can imagine is that you had such experience on Linux). Not that I would rule that out completely (although if such a thing happens it is probably a problem with the compiler switches - overzealous optimization of the floating point operations)

hewei April 2, 2013 09:10

Quote:

Originally Posted by gschaider (Post 417812)
I don't have the Intel-compiler so it'd be hard for me to add that to the patch (but I'm accepting contributions). And currently I can't justify spending 700$ for it

for me I also download the intel compiler non-commercial version, maybe you can try, if you like , we all know its a time-costing work :)
http://software.intel.com/en-us/non-...re-development


What leads you to the conclusion that it will be better if compiled with the Intel-compiler if you haven't compiled it with the Intel compiler yet? (only thing I can imagine is that you had such experience on Linux). Not that I would rule that out completely (although if such a thing happens it is probably a problem with the compiler switches - overzealous optimization of the floating point operations)

Yes as you said, I installed the OpenFOAM with intel compiler on Linux. when I move my case from my laptop to Mac, the convergence of pressure changes significantly, jumpeds from 10^-10 to 10 ^-1. I asked others, they told me maybe its the problem of compiler.

gschaider April 2, 2013 11:32

Quote:

Originally Posted by hewei (Post 417843)
for me I also download the intel compiler non-commercial version, maybe you can try, if you like , we all know its a time-costing work
http://software.intel.com/en-us/non-...re-development

I'm a bit strange there:
I don't qualify (my MacBook is mainly used for work) and then downloading it anyway would be stealing. I don't have a problem with paying for software (not even the 700$ if I decide I need it) but I want to to it in accordance with their license. OpenSource is NOT communism. People often confuse that.

If you see it differently or are doing OpenFOAM purely as a hobby, then this is fine with me.

Like Bob Dylan said "To live outside the law you've got to be honest"

Quote:

Originally Posted by hewei (Post 417843)
Yes as you said, I installed the OpenFOAM with intel compiler on Linux. when I move my case from my laptop to Mac, the convergence of pressure changes significantly, jumpeds from 10^-10 to 10 ^-1. I asked others, they told me maybe its the problem of compiler.

9 orders of magnitude? sounds more like a bug. You could also try a different gcc-version. Or you go to wmake/rules create a mix of the darwinIntel64Gcc and linux64Icc and see if that compiles.

marcojdressler April 5, 2013 21:48

Hi Forum Members:

I am doing
Code:

git pull
to update OF-2.2.x and I get the following message

Code:

MacBook-Pro:OpenFOAM-2.2.x md$ git pull
remote: Counting objects: 455, done.
remote: Compressing objects: 100% (119/119), done.
remote: Total 285 (delta 222), reused 226 (delta 164)
Receiving objects: 100% (285/285), 27.80 KiB, done.
Resolving deltas: 100% (222/222), completed with 137 local objects.
From git://github.com/OpenFOAM/OpenFOAM-2.2.x
  f16d44e..71fcc24  master    -> origin/master
Updating f16d44e..71fcc24
error: Your local changes to the following files would be overwritten by merge:
        src/OSspecific/POSIX/signals/sigFpe.C
Please, commit your changes or stash them before you can merge.
Aborting
MacBook-Pro:OpenFOAM-2.2.x md$

Can you please give me a hint what to do to work around this issue?

Looking forward reading from you.
Regards,
MD

gschaider April 6, 2013 06:25

Quote:

Originally Posted by marcojdressler (Post 418682)
Hi Forum Members:

I am doing
Code:

git pull
to update OF-2.2.x and I get the following message

Code:

MacBook-Pro:OpenFOAM-2.2.x md$ git pull
remote: Counting objects: 455, done.
remote: Compressing objects: 100% (119/119), done.
remote: Total 285 (delta 222), reused 226 (delta 164)
Receiving objects: 100% (285/285), 27.80 KiB, done.
Resolving deltas: 100% (222/222), completed with 137 local objects.
From git://github.com/OpenFOAM/OpenFOAM-2.2.x
  f16d44e..71fcc24  master    -> origin/master
Updating f16d44e..71fcc24
error: Your local changes to the following files would be overwritten by merge:
        src/OSspecific/POSIX/signals/sigFpe.C
Please, commit your changes or stash them before you can merge.
Aborting
MacBook-Pro:OpenFOAM-2.2.x md$

Can you please give me a hint what to do to work around this issue?

Looking forward reading from you.
Regards,
MD

Create a branch (mdLocalChanges or so) and commit your changes into that. Then pull the upstream and merge it into your branch.

Can't give you the exact commands to do that as I'm doing things somehow differently: I pull the upstream-git into a mercurial repository and use the excellent patch-queues there to record the changes to the upstream (that allows me to easily generate the patches)

RexFuzzle April 8, 2013 02:59

Strugling with 2.2 on 10.8
 
1 Attachment(s)
Good Morning

Firstly, thank you for bringing this to Mac- the virtual box is always a bit of a faf.

I have been struggling for a while now and started from scratch a few times. I have gone the macports route. Attached is the log file- any help would be much appreciated.
Thanks in advance

gschaider April 8, 2013 04:56

Quote:

Originally Posted by RexFuzzle (Post 418988)
Good Morning

Firstly, thank you for bringing this to Mac- the virtual box is always a bit of a faf.

I have been struggling for a while now and started from scratch a few times. I have gone the macports route. Attached is the log file- any help would be much appreciated.
Thanks in advance

make.log.tar.gz: is this part of a conspiracy to deliberately make it difficult for people to help? How many people do you think have the innovative idea to call their file make.log? Just make a guess how many others are now in my Downloads-folder (renamed to make-N.log.tar.gz)? And why in gods name do you have to tar a single file? Is this so that I have to unpack it and clutter my harddisk with somebody else's problems? (because if you just zip it then "less make.log.gz" lets me view it on the fly)

Concerning your problem (I hope that this is the right log-file I'm looking at):
"echo: write error: No space left on device"
From your name I deduce that you're the native English speaker here. You tell me what that could mean (the command df is your friend)

RexFuzzle April 8, 2013 05:03

Thanks for the quick reply.
I missed that error as i was searching for Error with a space after as specified in the wiki. I am sorry about the tar-gz file but I was following the wiki instructions- I did see your rant on the other thread and tried to upload it as a .log file but the forum would not allow it to be uploaded. Next time I will try another format, although hopefully there isn't a next time ;)
Thanks again for your help- it is very much appreciated.

gschaider April 8, 2013 07:37

Quote:

Originally Posted by RexFuzzle (Post 419024)
Thanks for the quick reply.
I missed that error as i was searching for Error with a space after as specified in the wiki. I am sorry about the tar-gz file but I was following the wiki instructions- I did see your rant on the other thread and tried to upload it as a .log file but the forum would not allow it to be uploaded. Next time I will try another format, although hopefully there isn't a next time ;)
Thanks again for your help- it is very much appreciated.

That solves the riddle for me why everybody was using that format. I didn't write the instructions (and I never read them from top to bottom). Modified it so that people post more unique logs and I will stop abusing people. Plain .gz should work BTW (zipping is good as these logs tend to be very long)

ricardo.frantz April 17, 2013 20:02

Hello, Im trying to compile OpenFOAM 2.2. On a OS X 10.8.3 with Xcode 4.6.2 with Command Line Tolls installed.

Code:

gcc -v                                -> gcc version: 4.2.1
mpirun -V                                -> mpirun: command not found
sudo port self update                -> MacPorts base version 2.1.3 installed and downloaded.

sudo port install gcc46
gcc-mp-4.6 -v                        -> gcc version 4.6.3 (MacPorts gcc46 4.6.3_9)
sudo port install flex
sudo port install bison
sudo port install openmpi +gcc46
sudo port install ccache
sudo port install boost
sudo port install cgal

Then I create a sparse image:
/Users/ricardofrantz/OpenFOAM-2.2.0.sparseimage mounted -> OpenFOAM-v2.2

On terminal:
cd /Volumes/OpenFOAM-v2.2
ls -l

drwxr-xr-x@ 9 ricardofrantz staff 578 17 Abr 17:27 OpenFOAM-2.2.0
-rw-r--r--@ 1 ricardofrantz staff 31450102 17 Abr 15:35 OpenFOAM-2.2.0.tgz
-rw-r--r--@ 1 ricardofrantz staff 41620 9 Mar 09:18 OpenFOAM-2.2.x_Mac-20130309.patch
drwxr-xr-x@ 7 ricardofrantz staff 816 17 Abr 17:24 ThirdParty-2.2.0
-rw-r--r--@ 1 ricardofrantz staff 58171983 17 Abr 15:34 ThirdParty-2.2.0.tgz
-rw-r--r--@ 1 ricardofrantz staff 2686 9 Mar 09:17 ThirdParty-2.2_Mac-20130309.patch

mv OpenFOAM-2.2.x_Mac-20130309.patch OpenFOAM-2.2.0
mv ThirdParty-2.2_Mac-20130309.patch ThirdParty-2.2.0

#applied the 20130309 patches,
Code:

cd
cd /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0
patch -p1 < OpenFOAM-2.2.x_Mac-20130309.patch
cd
cd /Volumes/OpenFOAM-v2.2/ThirdParty-2.2.0
patch -p1 < ThirdParty-2.2_Mac-20130309.patch

#changed the permissions on addr2line4Mac.py
Code:

cd /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0
ls bin/addr2line4Mac.py
ls -l bin/addr2line4Mac.py
chmod a+x bin/addr2line4Mac.py
ls -l bin/addr2line4Mac.py

#fixed the sym links in wmake/rules ln -s directory symbolic_link

Code:

cd
ln -s /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc42 darwinIntel64Gcc
ln -s /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc43 darwinIntel64Gcc
ln -s /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc44 darwinIntel64Gcc
ln -s /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc45 darwinIntel64Gcc
ln -s /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc46 darwinIntel64Gcc
ln -s /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc47 darwinIntel64Gcc
ln -s /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc48 darwinIntel64Gcc
ln -s /Volumes/OpenFOAM-v2.2 OpenFOAM

#update etc/bashrc for gcc46 and ccache
open /Volumes/OpenFOAM-v2.2/OpenFOAM-2.2.0/etc/bashrc

Changes on the file:
Code:

ulimit -n 1024
export WM_NCOMPPROCS=8
export WM_COMPILER=Gcc46
export WM_SCHEDULER=ccache
export WM_CC='gcc-mp-4.6'
export WM_CXX='g++-mp-4.6'

cd
. OpenFOAM/OpenFOAM-2.2.0/etc/bashrc -> OK

#try to compile
cd OpenFOAM/OpenFOAM-2.2.0
./Allwmake 2>&1 | tee ricardofrantz_of22.log

Code:

…….
make[1]: *** [multiphaseEulerFoam] Error 1
make[2]: *** No rule to make target `darwinIntel64Gcc46DPOpt/options'.  Stop.
wmake error: file 'Make/darwinIntel64Gcc46DPOpt/objectFiles' could not be created in /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels
+ wmake
/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/MakefileOptions:37: /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc46/general: Not a directory
make[2]: *** No rule to make target `/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc46/general'.  Stop.
/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/MakefileFiles:39: /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc46/general: Not a directory
/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/MakefileFiles:40: darwinIntel64Gcc46DPOpt/options: No such file or directory
make[2]: *** No rule to make target `darwinIntel64Gcc46DPOpt/options'.  Stop.
wmake error: file 'Make/darwinIntel64Gcc46DPOpt/objectFiles' could not be created in /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/applications/solvers/multiphase/twoPhaseEulerFoam
make[1]: *** [twoPhaseEulerFoam] Error 1
make[1]: Target `application' not remade because of errors.
make: *** [multiphase] Error 2
make: Target `application' not remade because of errors.

As I am not sure of all commands and versions I am using, I sent all my steps, so before I ask for an error please check if I'm using the right stuff.
Cheers and nice job.

gschaider April 18, 2013 04:42

Quote:

Originally Posted by ricardo.frantz (Post 421365)
#try to compile
cd OpenFOAM/OpenFOAM-2.2.0
./Allwmake 2>&1 | tee ricardofrantz_of22.log

Code:

…….
make[1]: *** [multiphaseEulerFoam] Error 1
make[2]: *** No rule to make target `darwinIntel64Gcc46DPOpt/options'.  Stop.
wmake error: file 'Make/darwinIntel64Gcc46DPOpt/objectFiles' could not be created in /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels
+ wmake
/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/MakefileOptions:37: /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc46/general: Not a directory
make[2]: *** No rule to make target `/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc46/general'.  Stop.
/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/MakefileFiles:39: /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/rules/darwinIntel64Gcc46/general: Not a directory
/Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/wmake/MakefileFiles:40: darwinIntel64Gcc46DPOpt/options: No such file or directory
make[2]: *** No rule to make target `darwinIntel64Gcc46DPOpt/options'.  Stop.
wmake error: file 'Make/darwinIntel64Gcc46DPOpt/objectFiles' could not be created in /Users/ricardofrantz/OpenFOAM/OpenFOAM-2.2.0/applications/solvers/multiphase/twoPhaseEulerFoam
make[1]: *** [twoPhaseEulerFoam] Error 1
make[1]: Target `application' not remade because of errors.
make: *** [multiphase] Error 2
make: Target `application' not remade because of errors.

As I am not sure of all commands and versions I am using, I sent all my steps, so before I ask for an error please check if I'm using the right stuff.
Cheers and nice job.

Some questions:
- These are the only errors you get? Or are they only example for a lot of other errors?
- Did you manage to run a simple example?
- Did the patches give any errors?

The reason why I'm asking is that you're using 2.2.0 and I develop this with 2.2.x (which even in the first commits had some differences to 2.2.0). But if everything else works and you don't need the solver in question, then I'd stick with 2.2.0 for the time being

simone.rowing April 28, 2013 15:30

Run OpenFOAM-v2.2 in mac with two different sparseimage
 
Hi all, I am attempting to have multiple versions of OpenFOAM installed at the same time. I am using mac Lion OSX, and I want to see if it is possible to use two .sparseimage disk image files.
Quote:

ln -s /Volumes/OpenFOAM-v2.2 OpenFOAM
when I use this command, it is impossible to put another link in OpenFOAM. I tried to change the name of the link and bashrc in the openFOAM folder:,

Quote:

abc=OpenFOAM
# Location of installation
# ~~~~~~~~~~~~~~~~~~~~~~~~
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$abc-$WM_PROJECT_VERSION
i put the name OpenFAOM2 and I change the installation location above.

after the change when i run the complication processs:
Quote:

. OpenFOAM2/OpenFOAM-2.2.0/etc/bashrc
it gives me a new error:
Quote:

WM_CHOSEN_MAC_MPI unset. Using OPENMPI
if anyone knows a solution to run two different sparseimages then please tell me.

marcojdressler April 28, 2013 16:14

Quote:

Originally Posted by simone.rowing (Post 423681)
...
when I use this command, it is impossible to put another link in OpenFOAM.

I think I run into the same problem here. My decision was to source the version I am working with and to use that one. Once I need to work with anohter version I eject the .sparsimage and I source the other version.

gschaider April 28, 2013 17:32

At first: please use CODE not QUOTE for examples. That way they will not be thrown away in an answer.
Quote:

Originally Posted by simone.rowing (Post 423681)
Hi all, I am attempting to have multiple versions of OpenFOAM installed at the same time. I am using mac Lion OSX, and I want to see if it is possible to use two .sparseimage disk image files.
when I use this command, it is impossible to put another link in OpenFOAM. I tried to change the name of the link and bashrc in the openFOAM folder:,

I usually have all my installations on the same drive. But if you want to use multiple drives you'll only have to be "creative" with symbolic links. Suppose you have two drives mounted at /Volumes/OF2.3 and /Volumes/OF3.0 then you make on of them the "major" drive as usual ("ln -s /Volumes/OF2.3 $HOME/OpenFOAM") then put a link ti the other installation into it ("ln -s /Volumes/OF3.0/OpenFOAM-3.0 $HOME/OpenFOAM/OpenFOAM-3.0")

Quote:

Originally Posted by simone.rowing (Post 423681)
i put the name OpenFAOM2 and I change the installation location above.

after the change when i run the complication processs:
it gives me a new error:

That is not an error but a warning that you didn't chose a MPI-implementation and therefor the script chose for you (I think this was discussed in the thread where the patch was published)

simone.rowing April 29, 2013 06:33

OpenFoam for mac don t work
 
Hi All, Thanks for the soon replace.
I try to install in the same way of the vesion 2.1.0 the version 2.2.0 but as I have already written, I had a problem with the symbolic link. Inadvertently I remove my old OpenFoam link.
I delete all sparse immage that I have create. I restart with the istruction from the creation of the new Sparseimage because I have all the prerequisites. But when I thy to install with ./Allwmake I have this error.



Quote:

/Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/MakefileOptions:37: /Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/rules/darwinIntel64Gcc46/general: No such file or directory
make[2]: *** No rule to make target `/Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/rules/darwinIntel64Gcc46/general'. Stop.
/Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/MakefileFiles:39: /Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/rules/darwinIntel64Gcc46/general: No such file or directory
/Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/MakefileFiles:40: darwinIntel64Gcc46DPOpt/options: No such file or directory
make[2]: *** No rule to make target `darwinIntel64Gcc46DPOpt/options'. Stop.
wmake error: file 'Make/darwinIntel64Gcc46DPOpt/objectFiles' could not be created in /Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam
make[1]: *** [solidEquilibriumDisplacementFoam] Error 1
make[1]: Target `application' not remade because of errors.
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.
I follow the same istruction and I use se same Pach of last time for the vertion 2.1.0 now I really don't now why also the old version don t work.
:(:(:(

gschaider April 29, 2013 13:59

Quote:

Originally Posted by simone.rowing (Post 423824)
Hi All, Thanks for the soon replace.
I try to install in the same way of the vesion 2.1.0 the version 2.2.0 but as I have already written, I had a problem with the symbolic link. Inadvertently I remove my old OpenFoam link.
I delete all sparse immage that I have create. I restart with the istruction from the creation of the new Sparseimage because I have all the prerequisites. But when I thy to install with ./Allwmake I have this error.





I follow the same istruction and I use se same Pach of last time for the vertion 2.1.0 now I really don't now why also the old version don t work.
:(:(:(

Have a look at /Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/rules/darwinIntel64Gcc46 : it should be a symbolic link to the directory darwinIntel64Gcc in the same directory. The patch-program doesn't create this correctly. So if it is a plain file delete it (darwinIntel64Gcc46) and replace it with a symbolic link to the neighbour directory. Or copy the directory

simone.rowing May 2, 2013 04:58

Quote:

Have a look at /Users/simomartini/OpenFOAM/OpenFOAM-2.1.0/wmake/rules/darwinIntel64Gcc46 : it should be a symbolic link to the directory darwinIntel64Gcc in the same directory. The patch-program doesn't create this correctly. So if it is a plain file delete it (darwinIntel64Gcc46) and replace it with a symbolic link to the neighbour directory. Or copy the directory
Thank you very much! this worked quite well and the installation now goes through without problems (for 2.2). However I still have a problem with running the mount command of22. it seems that the mount command does not actually mount the image, and I have to do this manually each time, I am not sure if this is a problem in my code.
Code:

alias of22='hdiutil attach "$HOME/OpenFOAM-v2.2.sparseimage" -mountpoint "$HOME/OpenFOAM" > /dev/null ; . $HOME/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc'

gschaider May 4, 2013 06:57

Quote:

Originally Posted by simone.rowing (Post 424588)
Thank you very much! this worked quite well and the installation now goes through without problems (for 2.2). However I still have a problem with running the mount command of22. it seems that the mount command does not actually mount the image, and I have to do this manually each time, I am not sure if this is a problem in my code.
Code:

alias of22='hdiutil attach "$HOME/OpenFOAM-v2.2.sparseimage" -mountpoint "$HOME/OpenFOAM" > /dev/null ; . $HOME/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc'

No idea. I have a separate partition for all my OF-installations so I don't need to mount the image. Try running the mount command without the redirection to /dev/null an see what it outputs. My guess is that there is already a device mounted to $HOME/OpenFOAM and you'll have to unmount it first

rdbisme May 19, 2013 14:18

Attachment 21912Hi to everyone,
i'm a "not-so-expert" of OF and compiling things. Anyway i followed this guide

http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac

for installing OF 2.2 on Mac OSX 10.8.3.

This is what i did:

Code:

sudo ports selfupdate
sudo port install gcc46 openmpi ccache flex bison

Created the sparse image as written in the tutorial 2.5Gb, sparseimage Case Sensitive, Journaled

Copied the OpenFoam-2.2.0.tgz and ThirdParty-2.2.0.tgz in the image.
Extracted them

Downloaded OpenFOAM-2.2.x_Mac-20130309.patch and ThirdParty-2.2_Mac-20130309.patch

Code:

mv OpenFOAM-2.2.x_Mac-20130309.patch OpenFOAM-2.2.0
mv ThirdParty-2.2_Mac-20130309.patch ThirdParty-2.2.0
mv ThirdParty-2.2.0.tgz ThirdParty-2.2.0
cd OpenFOAM-2.2.0
patch -p1 < OpenFOAM-2.2.x_Mac-20130309.patch
chmod a+x bin/addr2line4Mac.py
cd ..
cd ThirdParty-2.2.0/
patch -p1 <ThirdParty-2.2_Mac-20130309.patch

Edited /etc/bashrc as in the guide

Code:

WM_COMPILER=Gcc46
ulimit −n 1024
export WM_NCOMPPROCS=4

At the end of the file:

Code:

export WM_CC='gcc-mp-4.6'
export WM_CXX='g++-mp-4.6'
export WM_SCHEDULER=ccache

Made the symlink
Code:

cd
ln -s /Volumes/OpenFOAM-v2.2/ OpenFOAM

Sourced the bashrc

Code:

. OpenFOAM/OpenFOAM-2.2.0/etc/bashrc
All worked perfectly.

Then,

Code:


cd OpenFOAM/OpenFOAM-2.2.0
./Allwmake 2>&1 | tee rdb.log

But the compiling stopped. It seems having some problems with darwinIntelxxGcc directories, i have a lot of errors like this:

Code:

wmake/rules/darwinIntel64Gcc46/general: Not a directory
What did i do wrong?


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