OpenFOAM-1.5-dev SVN15xx with gcc-4.4.2
Hello,
A Good Evening to everyone :-)! I was compiling OpenFOAM-1.5-dev SVN 1570 when I realised that there was one issue which I had faced earlier when I was compiling OpenFOAM-1.5-dev SVN 1563, which again popped up this time.... It looks like gcc-4.4.2 has an issue with the C Pre-processor (cpp) which causes the script MakeFileOptions to corrupt the options file which it creates in the $WM_OPTIONS folder. As has been reported earlier in this forum, the resulting options file is stripped off all the backslash-newlines (\) but does not join the respective lines together..... for example, the options file for the OpenFOAM library looks like: Code:
# 1 "options" Code:
EXE_INC = -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3 After reading through some bug reports submitted to RedHat (I use Fedora 12), it looks like the issue is not limited to the version of gcc available on Fedora, but a general problem with gcc-4.4.2 The current solution to the problem is, to use the -P directive when invoking cpp. I modified the file: OpenFOAM-1.5-dev/wmake/rules/linuxGcc/general to incorporate this change, and the compile went through fine.... Code:
CPP = /lib/cpp $(GFLAGS) -P <-- Changed line The other option would be to make the addition directly in the MakeFileOptions script, but that would effect all the architecture variants. Could someone confirm if this issue is also present in other distributions of Linux which use gcc-4.4.2? I havent seen any bug reports submitted to the gcc developers yet regarding this issue. Have a nice day! Philippose |
I could also confirm this issue with Fedora 12.
My workaround is to compile gcc433 and let OpenFOAM use the cpp coming with it. |
Hello again,
A Very Good Morning to everyone! A quick line before running off to my first day of work this year :-)! OpenFOAM-1.5-dev SVN 1570 compiled without any further problems overnight after making the change mentioned above. Hence, I can confirm that the other porting changes for gcc-4.4.x compatibility made recently by Hrvoje on the SVN repository worked fine on my system (Fedora 12 / 32-bit / gcc-4.4.2 / ParaView-3.7.0 CVS ) without having to tweak any part of the source code. Have a great day ahead!! Philippose |
Hi,
I can also confirm a trouble-free compilation of 1.5-dev rev. 1570 on OpenSUSE 11.2 x64 using the system gcc-4.4.1. I had to rerun Allwmake to have everything properly compiled, so nothing special so far... However, one issue remained: I'm still getting immediate segmentation faults when trying to run chtMultiRegionFoam in parallel, regardless which OpenMPI version I choose, while all the other solvers run flawlessly. Well, I think I'll set up a new thread on this topic... Best regards, Johannes |
I just had this reply in the Fedora forums from Jakub Jelinek:
---------------------- Yes, the tokens are separated by whitespace, so it is sufficient if they are again separated by whitespace after preprocessing. See http://gcc.gnu.org/PR41445 for details why this changed, in short without the change the tokens have incorrect location and cause unintended differences in debug info between direct compilation and compilation where preprocessing happens separately from compilation. You can use cpp -P to avoid this (then the output won't be cluttered with # <line> <filename> either). ---------------------- So it looks like this is now a bug in OpenFOAM... |
Urgent help needed
Dear Philippose,
I really need to install OpenFOAM 1.5 on Fedora 12. I have the original OF1.5 downlaoded from its site. Where can I find rev 1570 version? It would be very great, if you could post the details of your work (I am not familiar with changing the compiler or ...). Thank you Yours sincerely Mani |
Quote:
install the nescessary pakages for subversion for your distribution >cd $HOME/OpenFOAM >svn co http://openfoam-extend.svn.sourcefor...nFOAM-1.5-dev/ and then comple after sucessful checking out the subversion repository right now you will get openfoam-extend - Revision "1581" if you not explizitly check out earlier version! hope this helps a bit elvis |
Hi Elvis,
I'm actually using fedora 16 and have already OpenFoam2.1.1 installed. For some reason I have to go back to the version 1.5.I checked out 1.5-dev from the svn that you had provided. But I cannot start installing that. Here is what I did: fist I added this line to my .bashrc file: source $HOME/OpenFOAM-1.5-dev/etc/bashrc then I typed source $HOME/.bshrc in the terminal and I get these: bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory bash: /opt/OpenFOAM-1.5-dev/etc/settings.sh: No such file or directory bash: /opt/OpenFOAM-1.5-dev/etc/aliases.sh: No such file or directory bash: /opt/OpenFOAM-1.5-dev/etc/apps/paraview3/bashrc: No such file or directory bash: /opt/OpenFOAM-1.5-dev/etc/apps/ensightFoam/bashrc: No such file or directory bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory I don't understand why it looking for those file in opt while I have OpenFOAM-1.5-dev downloaded in my home directory and have sourced that there! I think I'm missing something (maybe very simple) but I can't figure out what it is! Can you let me know how I can resolve that and start installing of1.5? Or can you link me to somewhere giving step by step installation guide for openfoam1.5? Thank in advance |
hi
you should differ OpenFOAM2.1.1 from OpenFOAM1.5-dev with command "alias" in .bashrc then whenever you Open terminal, you should define your version first ;) |
You should check if the location of the OpenFOAM installation is set correctly in the OpenFOAM-1.5-dev/etc/bashrc script. If it is the same as in version 2.0, this is defined as variable 'foamInstall'.
I guess is it set to /opt while it should be set to $HOME. Cheers, L |
Thank you guys,
I used aliases to differ of2.1 and of1.5 and also changed the $FOAM_INS_DIR to be my home directory and the problem resolved :) |
All times are GMT -4. The time now is 05:49. |