|
[Sponsors] |
December 4, 2009, 12:04 |
compiling
|
#161 |
Senior Member
Join Date: Dec 2009
Posts: 112
Rep Power: 17 |
Solved the prob....nvm!
Last edited by heavy_user; December 7, 2009 at 10:18. Reason: nvm! |
|
December 4, 2009, 12:35 |
|
#162 | |
New Member
Join Date: Jul 2009
Posts: 10
Rep Power: 17 |
Quote:
sorry for not being so clear early, since I forgot to mention that at the end of the ./Allwmake I receive many (I suppose) errors around here and there. I wanted to use the System version since it is the latest one, instead of the 4.3.x in the ThirdParty folder. Also because the first time that I've tried to install it, I got a message saying to set "System" as the compiler in the settings file. Is it better to use the System version or it makes no difference? |
||
December 5, 2009, 05:28 |
|
#163 | |
Senior Member
Ahmed
Join Date: Mar 2009
Location: NY
Posts: 251
Rep Power: 18 |
Quote:
Here it is #!/bin/bash echo echo echo "Hello "$USER echo echo "Your current directory is:- "$PWD echo if test -e OpenFOAM then echo echo "There is an old OpenFOAM folder, Updating source files" echo cd OpenFOAM cd OpenFOAM-1.6.x git pull else echo "No OpenFOAM folder found" echo # # Create a new Folder OpenFOAM # DownLoad the latest snapshot from the git repository # echo echo "Creating a new OpenFOAM folder" mkdir $HOME/OpenFOAM cd OpenFOAM echo echo "Starting to DownLoad OpenFOAM-1.6.x" echo git clone git://repo.or.cz/OpenFOAM-1.6.x.git echo echo "DownLoading ThirdParty Files for 64 bits installation" echo wget http://sourceforge.net/projects/foam....gtgz/download wget http://sourceforge.net/projects/foam....gtgz/download echo echo "Unpacking Third Party Ffiles" echo tar xvzf ThirdParty-1.6.General.gtgz tar xvzf ThirdParty-1.6.linux64Gcc.gtgz mv ThirdParty-1.6 ThirdParty-1.6.x echo cd .. echo "You need to add the following statement to your .bashrc file" echo "source $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc" echo emacs .bashrc echo "Now you have modified your .bashrc file, Do the following" echo "1- Close this terminal window, then start a new one" echo "2- Run The InstallOpenFOAM.sh script" echo echo " That is all for now folks.........." fi Please Note the following 1- The third party files downloaded by this script are for 64 Bits installation, If you have a 32 Bits installation, just change the names of the downloaded files in the wget statements. 2- This script, hopefully, is independent of the Distro you are using. I hope it is useful for others Thanks and good luck to all ................................ Open Source for ever ................................ |
||
December 6, 2009, 12:37 |
|
#164 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Hey Ahmed,
Your script downloads the OpenFOAM source code, but never compiles it. And I think instead of launching emacs, you should add the line to .bashrc automatically, just like Mads did. Also, please use the [code] tag when posting stuff like shell scripts, it will make your post more readable. - Anton |
|
December 7, 2009, 02:31 |
|
#165 | |
New Member
sachin
Join Date: Dec 2009
Posts: 3
Rep Power: 17 |
Hi Mads its really useful, and helped me to great extend as I am new to Linux, as suggested I used UBUNTU 9.04.
All the steps given in the cok book are throug but I stuck up when I started tutorials from the user guide, I started with; mkdir -p $FOAM RUN This made the directory at the root/home/openfoam cp -r $FOAM TUTORIALS $FOAM RUN but this is giving me error and I couldnt proceed further. Please let me know where/what I should check Quote:
|
||
December 7, 2009, 03:46 |
|
#166 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
@sachin: I never use these variables for directory names, but maybe you need an underscore in: $FOAM_TUTORIALS ?
@future science: I'd go for the compiler provided with OpenFOAM as I doubt you will find any difference - and it works (which is a good argument :-) ) @ahmed: nice, but I agree with Anton, you might want to add the last few details. /Mads
__________________
Online free airfoil-mesher for OpenFOAM here |
|
December 7, 2009, 04:04 |
|
#167 |
New Member
sachin
Join Date: Dec 2009
Posts: 3
Rep Power: 17 |
Sorry its typo, the underscore is there, I again tried with command I mentioned and I found the issue with copy 'cp' command.
But anyways; as you mentioned if you are not using the commands which OF suggests to run the tutorial, then what you would use to initiate the tutorials, if tutorial folder is placed in OpenFOAM generic file structure? |
|
December 8, 2009, 03:06 |
|
#168 | |
New Member
Pradeep
Join Date: Dec 2009
Posts: 4
Rep Power: 17 |
Dear Mads,
I am a linux newbie. I have tried your script on a new kubuntu 9.1 installation. But I am agetting the the following error. Quote:
One more thing in the OpenFOAM folder there are only the thridparty*.gtgz files and the thirdparty folder. There is no OpenFOAM-1.6.x folder |
||
December 8, 2009, 04:11 |
|
#169 | |
New Member
Pradeep
Join Date: Dec 2009
Posts: 4
Rep Power: 17 |
Hey Mads,
I think i solved the problem. I found that the git pull was happening to ~/OpenFOAM/ThirdP*/gcc*/platforms/linux64. The OpenFOAM1.6 folder was being created at this location. I actually cut out a part of your script and modified that and it is compiling now. This is the part that i used Quote:
Thank you for the script |
||
December 8, 2009, 04:42 |
|
#170 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
@Pradeep: great it worked out :-)
Could someone please explain the '/r/'-difference when using git? What's that about? /Mads
__________________
Online free airfoil-mesher for OpenFOAM here |
|
December 8, 2009, 15:33 |
|
#171 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi all,
I'm totally new to CFD and OpenFOAM with a little of Linux experience and at the moment giving it a try... First of all: I experienced the same problem as stated above by pradeepmohanm, resulting in several "file not found" issues. I think it's a matter of directory changing in the script. I tried it an my workstation today (at the moment at home) with a blank new Xubuntu 9.04 (also set up today). Cannot figure it out exactly... just arrived home. But second and as to answer (or contribute to) your question related to the "/r" issue: git clone git://repo.or.cz/OpenFOAM-1.6.x.git git clone http://repo.or.cz/r/OpenFOAM-1.6.x.git Have a closer look! The difference isn't just the "/r/", it's also "git://" or "html://". As for me (at work), I'm located behind a proxy server (as most users in business or educational networks will be) which redirects any http, https and ftp requests through http://servername:8080 (or the like) As far, as I know git uses an own port (Wikipedia told me... ), which wont be forwarded by the most proxies. So a request via "git://...." wont be successful, while a "http://..." request should be redirected correctly. At least that's what I suspect... maybe it's useful to you... Cheers Wolle |
|
December 9, 2009, 02:52 |
|
#172 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Good morning all!
I just wanted to give some additional feedback. 1st: At home (without a proxy), the original script (using "git://..." path without /r/) for Ubuntu 9.04-64 worked out very well without any changes on a Ubuntu 8.04.3LTS-64, that has been a victim of different experiments concerning Linux... but anyway: It worked out without any problems. 2nd: At work, it didn't, as I just had to notice. As I'm behind a proxy, I changed things to "http://" and the path containing /r/. Pulling the sources worked out then. Sadly, the terminal says the following: Code:
Checking main OpenFOAM env variables... ------------------------------------------------------------------------------- Environment_variable Set_to_file_or_directory Valid Crit ------------------------------------------------------------------------------- $WM_PROJECT_INST_DIR /home/kretzschmar/OpenFOAM yes yes $WM_PROJECT_USER_DIR ...etzschmar/OpenFOAM/kretzschmar-1.6.x no no $WM_THIRD_PARTY_DIR ...retzschmar/OpenFOAM/ThirdParty-1.6.x yes yes ------------------------------------------------------------------------------- Checking the OpenFOAM env variables set on the PATH... ------------------------------------------------------------------------------- Environment_variable Set_to_file_or_directory Valid Path Crit ------------------------------------------------------------------------------- $WM_PROJECT_DIR .../kretzschmar/OpenFOAM/OpenFOAM-1.6.x yes yes yes $FOAM_APPBIN ...1.6.x/applications/bin/linuxGccDPOpt no yes $FOAM_SITE_APPBIN ...penFOAM/site/1.6.x/bin/linuxGccDPOpt no no $FOAM_USER_APPBIN ...1.6.x/applications/bin/linuxGccDPOpt no no $WM_DIR ...schmar/OpenFOAM/OpenFOAM-1.6.x/wmake yes yes yes ------------------------------------------------------------------------------- Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH... ------------------------------------------------------------------------------- Environment_variable Set_to_file_or_directory Valid Path Crit ------------------------------------------------------------------------------- $FOAM_LIBBIN ...OAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt yes yes yes $FOAM_SITE_LIBBIN ...penFOAM/site/1.6.x/lib/linuxGccDPOpt no no $FOAM_USER_LIBBIN .../kretzschmar-1.6.x/lib/linuxGccDPOpt no no $MPI_ARCH_PATH ...penmpi-1.3.3/platforms/linuxGccDPOpt yes yes yes ------------------------------------------------------------------------------- Third party software ------------------------------------------------------------------------------- Software Version Location ------------------------------------------------------------------------------- gcc 4.3.3 ...OAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux/bin/gcc gzip 1.3.12 /bin/gzip tar 1.20 /bin/tar icoFoam WARNING: Conflicting installations: OpenFOAM settings : /home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linuxGccDPOpt/icoFoam current path : CRITICAL ERROR ------------------------------------------------------------------------------- Summary ------------------------------------------------------------------------------- Base configuration ok. The foam installation contains 1 critical error(s). Review the output for warning messages and consult the installation guide for trouble shooting. Code:
gcc -m32 -Wall -O3 -fPIC dirToString.c -o /home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/wmake/bin/linuxGcc/dirToString flex wmkdep.l gcc -m32 -Wall -O3 -fPIC lex.yy.c -o /home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/wmake/bin/linuxGcc/wmkdep lex.yy.c:1393: warning: ‘yyunput’ defined but not used lex.yy.c:1436: warning: ‘input’ defined but not used wmkdep.l: In function ‘yy_scan_bytes’: wmkdep.l:463: internal compiler error: Illegal instruction Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [/home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/wmake/bin/linuxGcc/wmkdep] Fehler 1 + [ -n ] + [ -n ] + [ -n ] + [ -n ] + [ -n ] + cd malloc + ./Allwmake + wmake libso hoard /bin/sh: /home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/wmake/bin/linuxGcc/wmkdep: not found '/home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libhoard.so' is up to date. + wmake libo fbsdmalloc /bin/sh: /home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/wmake/bin/linuxGcc/wmkdep: not found ld -melf_i386 -r -o /home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libfbsdmalloc.o Make/linuxGccDPOpt/fbsdmalloc.o '/home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libfbsdmalloc.o' is up to date. + [ -r /home/kretzschmar/OpenFOAM/ThirdParty-1.6.x/openmpi-1.3.3/platforms/linuxGccDPOpt/lib/libmpi.so ] + echo have OPENMPI shared library have OPENMPI shared library + cd scotch_5.1 + wmake libso src/libscotch /bin/sh: /home/kretzschmar/OpenFOAM/OpenFOAM-1.6.x/wmake/bin/linuxGcc/wmkdep: not found System is a freshly set up (yesterday!) Xubuntu 9.04-32. Any hints? Ciao Wolle BTW: Code:
kretzschmar@PCE29CK1-L:~$ gcc -dumpmachine i686-pc-linux-gnu kretzschmar@PCE29CK1-L:~$ gcc -dumpversion 4.3.3 |
|
December 9, 2009, 06:04 |
|
#173 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
Hi Wolle, thanks for the feedback and the enlightenment on git. I guess I should change the script to use the http-download instead, as it seem more robust.
If you have compiled and changed things back and forth, I can recommend to delete everything (rm -rf ~/OpenFOAM) and start all over again... /Mads
__________________
Online free airfoil-mesher for OpenFOAM here |
|
December 9, 2009, 08:48 |
|
#174 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi all,
I did as you told me and started all over again. Only modification was the git-source. Still no luck. The same compilation error occurs just from the start on. By the way: it seems, that the problem is very close to the one described by Achim here: http://www.cfd-online.com/Forums/ope...tml#post237867 And concerning the answer to Achims posting by akidess: I installed a brand new Xubuntu 9.04 yesterday and checked the RAM by the means of a complete Memtest86 run... no errors occured. Cheers Wolle |
|
December 10, 2009, 04:00 |
|
#175 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
Wolle, I don't know Xubuntu - is it completely the same as Ubuntu? Well obviously not completely :-) but are they virtually the same?
If possible, maybe you could try to use Ubuntu 9.10 just to check. I am really in favour of running a wide variety of distributions, but there might be an "issue" with Xubuntu. Seems that Achim had it work when he changed to Ubuntu?
__________________
Online free airfoil-mesher for OpenFOAM here |
|
December 10, 2009, 04:26 |
|
#176 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi Mads,
Yes, that might possibly be an option. I'm going to give it a try next week... (Though Xubuntu should only be Ubuntu with Xfce instead of Gnome... To be honest: Xfce feels not that nice too...) Cheers Wolle |
|
December 10, 2009, 07:47 |
|
#177 |
Member
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 17 |
Mads, I think I have found a little bug in your install-cookbook script. When I start the version for Ubuntu 9.10 64bit, it crashes at line 53 as the script can not find the folder OpenFOAM-1.6.x, even after a succesful git clone.
The reason is that the working directory is not correctly set. The script changes the working directory with the command cd ~/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/lib64 but does not go back to the ~/OpenFOAM folder. The solution is very simple: just add cd ~/OpenFOAM before the git command. Code:
echo "FIX up for Ubuntu 9.10" cd ~/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/lib64 mv libstdc++.so.6 libstdc++.so.6.orig ln -s /usr/lib/libstdc++.so.6.0.10 libstdc++.so.6 mv libgcc_s.so.1 libgcc_s.so.1.orig ln -s /lib/libgcc_s.so.1 echo "Fix up done" echo "------------------------------------------------------" echo "Retrieveing OpenFOAM..." echo "------------------------------------------------------" ln -s ~/OpenFOAM/ThirdParty-1.6 ~/OpenFOAM/ThirdParty-1.6.x cd ~/OpenFOAM git clone git://repo.or.cz/OpenFOAM-1.6.x.git cd OpenFOAM-1.6.x/ . ~/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc echo . ~/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc >> ~/.bashrc |
|
December 11, 2009, 05:01 |
|
#178 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
Good call Cedric :-) thanks. I've changed your find and changed git to http (and possibly introduced other errors...)
/Mads
__________________
Online free airfoil-mesher for OpenFOAM here |
|
December 11, 2009, 09:29 |
|
#179 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Using http:// instead of git:// will help with firewall related issues, but will also slow down the pull. Just something to keep in mind... Maybe we could add some intelligence to the script to use http only if git fails?
|
|
December 11, 2009, 10:19 |
|
#180 | |
Member
Alessandro
Join Date: Nov 2009
Posts: 67
Rep Power: 17 |
Quote:
__________________
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
install OpenFoam 1.6 by building source: how? | niudie | OpenFOAM Installation | 13 | April 26, 2011 01:48 |
How to Install OpenFOAM on 64 Ubuntu 9.04 | hansel | OpenFOAM Installation | 62 | March 19, 2010 15:43 |
install openfoam 1.6 on opensuse 11.0 | andresbh | OpenFOAM Installation | 8 | September 30, 2009 01:48 |
Install openFOAM 1.6 on debian 32bit - blockMesh: command not found | fossy | OpenFOAM Installation | 1 | August 28, 2009 05:06 |
Install of OpenFOAM 1.6 Error 1 Error 2 & run tutorial | potac | OpenFOAM Installation | 3 | August 27, 2009 10:04 |