CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

OpenFOAM-1.5-dev SVN15xx with gcc-4.4.2

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By philippose
  • 1 Post By nimasam
  • 1 Post By Lieven

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2010, 18:26
Default OpenFOAM-1.5-dev SVN15xx with gcc-4.4.2
  #1
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
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"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "options"
EXE_INC =
    -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3

LIB_LIBS =
    $(FOAM_LIBBIN)/libOSspecific.o
    -L$(FOAM_LIBBIN)/dummy -lPstream
    -lz



$(OBJECTS_DIR)/global.o: FORCE

FORCE:
instead of looking like:

Code:
EXE_INC = -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3


LIB_LIBS = $(FOAM_LIBBIN)/libOSspecific.o -L$(FOAM_LIBBIN)/dummy -lPstream -lz






$(OBJECTS_DIR)/global.o: FORCE

FORCE:
which causes the build to fail with errors of *** missing separator.

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
LD         = ld -melf_i386

PROJECT_LIBS = -l$(WM_PROJECT) -ldl

include $(GENERAL_RULES)/standard

include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++
I tried making this change to the GFLAGS variable, but this breaks the build because GFLAGS is used elsewhere too.

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
sourav90 likes this.
philippose is offline   Reply With Quote

Old   January 6, 2010, 21:15
Default
  #2
lin
Senior Member
 
Hua Zen
Join Date: Mar 2009
Posts: 138
Rep Power: 17
lin is on a distinguished road
I could also confirm this issue with Fedora 12.

My workaround is to compile gcc433 and let OpenFOAM use the cpp coming with it.
lin is offline   Reply With Quote

Old   January 7, 2010, 01:38
Default
  #3
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
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
philippose is offline   Reply With Quote

Old   January 9, 2010, 07:19
Default
  #4
Member
 
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17
johannes is on a distinguished road
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
johannes is offline   Reply With Quote

Old   January 12, 2010, 06:55
Default
  #5
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17
terrybarnaby is on a distinguished road
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...
terrybarnaby is offline   Reply With Quote

Old   January 13, 2010, 14:58
Default Urgent help needed
  #6
Member
 
Join Date: Mar 2009
Posts: 46
Rep Power: 17
mmahdinia is on a distinguished road
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
mmahdinia is offline   Reply With Quote

Old   January 13, 2010, 16:07
Default
  #7
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Quote:
Originally Posted by mmahdinia View Post
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?
rev 1570 means that he uses the DEV-version FROM THE SUBVERSION REPOSITORY

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
elvis is offline   Reply With Quote

Old   November 17, 2012, 17:18
Default
  #8
New Member
 
Mhsn
Join Date: Oct 2012
Posts: 24
Rep Power: 14
mhsn is on a distinguished road
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
mhsn is offline   Reply With Quote

Old   November 18, 2012, 15:23
Default
  #9
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
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
mhsn likes this.
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   November 18, 2012, 18:21
Default
  #10
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
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
mhsn likes this.
Lieven is offline   Reply With Quote

Old   November 18, 2012, 18:39
Default
  #11
New Member
 
Mhsn
Join Date: Oct 2012
Posts: 24
Rep Power: 14
mhsn is on a distinguished road
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
mhsn is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Paraview/Parafoam in OpenFoam 1.5 dev titio ParaView 0 December 9, 2009 13:13
[OpenFOAM] Paraview/Parafoam in OpenFoam 1.5 dev titio ParaView 0 December 9, 2009 13:12
OpenFOAM 1.5 installation on OpenSUSE 11.0 bigphil OpenFOAM Installation 16 April 29, 2009 07:28
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 05:48
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


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