CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OF 1.9 (aka OF 2.1) on Mac OS X (https://www.cfd-online.com/Forums/openfoam-installation/95763-1-9-aka-2-1-mac-os-x.html)

qinjie1629 March 28, 2012 12:58

I format a USB driver as a case-sensitive disk, copy the tar files into this driver, and then unzip the tar files.

I follow the instruction step by step until the last step. when I input source etc/bashrc, following error comes. Please give me some suggestions.


-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/etc/config/settings.sh: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/etc/config/aliases.sh: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory




And then, I used following command to create a link to the USB dirver
>> ln -sf /Volumes/OF OpenFOAM
>> cd OpenFOAM
>> cd OpenFOAM-2.1.0
>> source etc/bashrc

Then, I can compile the files, but, it is very slow due to the limited usb speed. How can I create a sparse image from this USB driver?

gschaider March 28, 2012 16:38

Quote:

Originally Posted by qinjie1629 (Post 351982)
I format a USB driver as a case-sensitive disk, copy the tar files into this driver, and then unzip the tar files.

I follow the instruction step by step until the last step. when I input source etc/bashrc, following error comes. Please give me some suggestions.


-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/etc/config/settings.sh: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/etc/config/aliases.sh: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
-bash: /Users/qinjie/OpenFOAM/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory




And then, I used following command to create a link to the USB dirver
>> ln -sf /Volumes/OF OpenFOAM
>> cd OpenFOAM
>> cd OpenFOAM-2.1.0
>> source etc/bashrc

Then, I can compile the files, but, it is very slow due to the limited usb speed. How can I create a sparse image from this USB driver?

Create a SparseImage with a fitting file-system using the Disk Utility of Mac OS X and copy the files from the stick to that image using cp (with appropriate options)

qinjie1629 March 29, 2012 04:23

Thank you for your kind help.

Here is another problem.
I test the installation by running a tutorial (/incompressible/icoFoam/cavity), when I input 'paraFoam', following errors occur

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

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

when I build the PV3Readers, following errors occur
------
+ '[' -d /Users/qinjie/OpenFOAM/ThirdParty-2.1.0/platforms/darwinIntel64Gcc46/paraview-3.12.0 -a -r /Users/qinjie/OpenFOAM/ThirdParty-2.1.0/platforms/darwinIntel64Gcc46/paraview-3.12.0 ']'
------

I built the ThirdParty-2.1.0 twice, and the paraFoam cannot be used.

I install a built Qt4.8.1 (DMG file) and then install a built ParaView3.14 (DMG file). But, the paraFoam still cannot be used.

I found an introduction about how to use pre-build ParaView for OpenFOAM, but, it is used for Linux, not Mac.

I found this words in the instruction of this thread:
------
"As usual I didn't bother to get the PV3Reader (aka paraFoam) to compile. Use an up-to-date paraview from Kitware with the built in reader for OF"
------
I donot know what is that mean 'the built in reader for OF'.

hi_Legend March 31, 2012 11:26

Quote:

Originally Posted by lithos (Post 343833)
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.


Could anyone email me this pdf file? Thanks in advance!
hellolegend@gmail.com

gschaider March 31, 2012 16:19

Quote:

Originally Posted by qinjie1629 (Post 352106)
Thank you for your kind help.

Here is another problem.
I test the installation by running a tutorial (/incompressible/icoFoam/cavity), when I input 'paraFoam', following errors occur

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

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

when I build the PV3Readers, following errors occur
------
+ '[' -d /Users/qinjie/OpenFOAM/ThirdParty-2.1.0/platforms/darwinIntel64Gcc46/paraview-3.12.0 -a -r /Users/qinjie/OpenFOAM/ThirdParty-2.1.0/platforms/darwinIntel64Gcc46/paraview-3.12.0 ']'
------

I built the ThirdParty-2.1.0 twice, and the paraFoam cannot be used.

I install a built Qt4.8.1 (DMG file) and then install a built ParaView3.14 (DMG file). But, the paraFoam still cannot be used.

I found an introduction about how to use pre-build ParaView for OpenFOAM, but, it is used for Linux, not Mac.

I found this words in the instruction of this thread:
------
"As usual I didn't bother to get the PV3Reader (aka paraFoam) to compile. Use an up-to-date paraview from Kitware with the built in reader for OF"
------
I donot know what is that mean 'the built in reader for OF'.

Compilation of the PV3Reader is possible but I never bother because you need a self-compiled paraview (the binaries provided by kitware don't provide the required headers etc).

Nevertheless: create a file foo.foam (the extension is important) in your case folder and Paraview can open it (that is the built-in reader)

wyldckat April 1, 2012 07:06

Greetings to all!

Since you are all very busy and I had some time to spare, I asked Michael Plagge for permission to transcribe the pdf he posted here some time ago and I've finally got around to doing it: http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac
If anyone wants to improve the wiki page, feel free to do so, specially because I don't have a Mac :cool:

I've also updated a bit the main category for Mac OS X: http://openfoamwiki.net/index.php/Ca...AM_on_Mac_OS_X

If anyone wants to something like this in the future, namely copy-paste PDF stuff to a wiki page, some instructions are provided here: http://openfoamwiki.net/index.php/Ta...enFOAM_v21_Mac

Best regards,
Bruno

PS: this ain't no April Fools' lie ;)

qinjie1629 April 1, 2012 09:18

Quote:

Originally Posted by wyldckat (Post 352521)
Greetings to all!

Since you are all very busy and I had some time to spare, I asked Michael Plagge for permission to transcribe the pdf he posted here some time ago and I've finally got around to doing it: http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac
If anyone wants to improve the wiki page, feel free to do so, specially because I don't have a Mac :cool:

I've also updated a bit the main category for Mac OS X: http://openfoamwiki.net/index.php/Ca...AM_on_Mac_OS_X

If anyone wants to something like this in the future, namely copy-paste PDF stuff to a wiki page, some instructions are provided here: http://openfoamwiki.net/index.php/Ta...enFOAM_v21_Mac

Best regards,
Bruno

PS: this ain't no April Fools' lie ;)



Great! Thank you so much for your help.

cocopops April 12, 2012 18:29

I seem to doing fine with the ins ructions until I have to source the etc/bashrc file.

I get the error "-bash: ulimit: −n: invalid number".

Anyone know how I can fix this? Cheers.

wyldckat April 13, 2012 03:18

Greetings Rob and welcome to the forum!

Run on your command line this command:
Code:

ulimit −n 1024
Does it give the same error? If so, try another smaller value.

Best regards,
Bruno

cocopops April 13, 2012 03:39

Quote:

Originally Posted by wyldckat (Post 354498)
Greetings Rob and welcome to the forum!

Run on your command line this command:
Code:

ulimit −n 1024
Does it give the same error? If so, try another smaller value.

Best regards,
Bruno

Hey Bruno, thanks for the help. I get no error or message at all when I type this command.

I tried deleting the line altogether, but I got an error when compiling.

wyldckat April 13, 2012 03:49

Quote:

Originally Posted by cocopops (Post 354501)
Hey Bruno, thanks for the help. I get no error or message at all when I type this command.

I tried deleting the line altogether, but I got an error when compiling.

Ooops, I forgot to check which "/etc/bashrc" the original article was refering to. Check the instructions again and you should see that it refers to "OpenFOAM-2.1.0/etc/bashrc", not "/etc/bashrc"...

cocopops April 13, 2012 03:59

Quote:

Originally Posted by wyldckat (Post 354505)
Ooops, I forgot to check which "/etc/bashrc" the original article was refering to. Check the instructions again and you should see that it refers to "OpenFOAM-2.1.0/etc/bashrc", not "/etc/bashrc"...

This is the bashrc I was using. Should I get some sort of message when typing "ulimit -n 1024"?

wyldckat April 13, 2012 04:07

Quote:

Originally Posted by cocopops (Post 354506)
This is the bashrc I was using. Should I get some sort of message when typing "ulimit -n 1024"?

Nope, there shouldn't be any message, at least as far as I remember...
You can run that command after sourcing the file:
Code:

. OpenFOAM/OpenFOAM-2.1.0/etc/bashrc
ulimit -n 1024


lithos April 13, 2012 04:41

2 Attachment(s)
Hey,

there should be an output of the current limit on the command line. I attach you a screenshot.

If you set the ulimit, there should be no output, see second screenshot.

Cheers,

Michael

gschaider April 13, 2012 05:04

Quote:

Originally Posted by lithos (Post 354517)
Hey,

there should be an output of the current limit on the command line. I attach you a screenshot.

If you set the ulimit, there should be no output, see second screenshot.

Cheers,

Michael

What interests me is the source of the error message. I don't find a call to ulimit in my etc/bashrc.

Could you have a look where it is with (lets look everywhere to be sure)

grep -r ulimit $WM_PROJECT_DIR/etc/*

and post the extract of the script (and state where you got the Mac-patches from)

wyldckat April 13, 2012 05:18

Hi Bernhard,

No need for that, because ulimit is being introduced manually, accordingly to the instructions from here: http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac - search for "ulimit" ;)

But like I wrote before, I don't have a Mac to fully test the instructions... :rolleyes:

Best regards,
Bruno

lithos April 13, 2012 06:26

Quote:

Originally Posted by gschaider (Post 354526)
What interests me is the source of the error message. I don't find a call to ulimit in my etc/bashrc.

Could you have a look where it is with (lets look everywhere to be sure)

grep -r ulimit $WM_PROJECT_DIR/etc/*

and post the extract of the script (and state where you got the Mac-patches from)

Well, sorry for not mentioning it, but I mean the etc/bashrc in my OpenFOAM-directory where I added the lines for ulimit and export WM_NCOMPPROCS manually. Normally you should not use /etc/bashrc on a Mac unless you know what you're doing.

If cocopops has still problems, it might be a problem of his operating system.

Concerning the manual, it worked exact the way I wrote it down. I am just trying to install the older 1.7.1 version which has a similar way.

cocopops April 13, 2012 14:58

I'm fairly sure I got no error when trying to source it earlier, but when I got home (didn't want to compile it in public, laptop gets a bit noisy!" I got another error when trying to run './Allwmake'.

So I started again, and I'm back to the limit error. I understand I can set the value myself, but I'm not sure how I decide a value.

Sorry for the questions, I'm not used to command line stuff (I know, maybe I'm not ready for OpenFOAM, but I want to give it a go), I usually just double-click things to run them, hah.

lithos April 13, 2012 15:33

Quote:

Originally Posted by cocopops (Post 354608)
I'm fairly sure I got no error when trying to source it earlier, but when I got home (didn't want to compile it in public, laptop gets a bit noisy!" I got another error when trying to run './Allwmake'.

So I started again, and I'm back to the limit error. I understand I can set the value myself, but I'm not sure how I decide a value.

Sorry for the questions, I'm not used to command line stuff (I know, maybe I'm not ready for OpenFOAM, but I want to give it a go), I usually just double-click things to run them, hah.

Hey,
normally if you type
Code:

ulimit -n 1024
it keeps the value until you close the terminal and open a new one. The entry in the bashrc script is just to enable this every time you recompile some part of OpenFOAM. The command changes the number of files a process is allowed to open at the same time. Since the compilation involves a lot of small text files it is advisable to set it to a higher value like 1024 (default is 256).

Could you please tell us which version of OS X you're using?

Have a nice evening.

wyldckat April 13, 2012 15:37

Hi Rob,

Quote:

Originally Posted by cocopops (Post 354608)
So I started again, and I'm back to the limit error. I understand I can set the value myself, but I'm not sure how I decide a value.

Like I wrote before, you can simply source the "bashrc" file and run it afterwards, because AFAIK ulimit is only necessary during the building stage:
Code:

. OpenFOAM/OpenFOAM-2.1.0/etc/bashrc
ulimit -n 1024

Note that by source I mean that the following two commands should do the exact same thing:
Code:

. OpenFOAM/OpenFOAM-2.1.0/etc/bashrc
source OpenFOAM/OpenFOAM-2.1.0/etc/bashrc

As for the errors you're getting, you can do the following steps:
Code:

./Allwmake > Allwmake.log 2>&1
tar -czf log.tar.gz Allwmake.log

Then attach the file "log.tar.gz" to your next post so we can have a look at it.
If you want to keep your working paths and user names private, then before compressing the "Allwmake.log" file, use a text editor to search and replace all of the sensitive words.

In the mean time, I'm going to do another review to the wiki page and put some additional sections on it, so it's easier to point people to it.
edit: done!

Best regards,
Bruno


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