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

1.5-dev GCC-4.5.1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2010, 08:33
Default 1.5-dev GCC-4.5.1
  #1
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi all

Im trying to compile OF-1.5-dev with gcc-4.5.1.

Im almost successfull. My gcc-4.3.3 is working fine, but I want to test the improved speed of the new gcc-4.5 releases.

I have an error in compiling the combustion libraries. Everything else compiles fine.

Code:
[root@comp combustion]# wmake libso
SOURCE=chemistryReaders/chemkinReader/chemkinLexer.L ; flex -+ -f $SOURCE ; mv lex.yy.cc Make/linux64GccDPOpt/chemkinLexer.C ; g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/ThirdParty/flex-2.5.35/include -IlnInclude -I. -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -DYY_SKIP_YYWRAP -c Make/linux64GccDPOpt/chemkinLexer.C -o Make/linux64GccDPOpt/chemkinLexer.o
SOURCE=mixtureThermos/mixtures/reactingMixture/reactingMixture.C ;  g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/ThirdParty/flex-2.5.35/include -IlnInclude -I. -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/reactingMixture.o
SOURCE=hCombustionThermo/hCombustionThermo.C ;  g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/ThirdParty/flex-2.5.35/include -IlnInclude -I. -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/hCombustionThermo.o
SOURCE=hCombustionThermo/newhCombustionThermo.C ;  g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/ThirdParty/flex-2.5.35/include -IlnInclude -I. -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/opt/software/OpenFOAM/OpenFOAM-gcc-4.5.1/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/newhCombustionThermo.o
lex.yy.cc: In member function ‘int Foam::chemkinReader::lex()’:
lex.yy.cc:35903:57: warning: use of old-style cast
lex.yy.cc:35903:57: warning: use of old-style cast
lex.yy.cc:35919:3: warning: use of old-style cast
lex.yy.cc:37332:62: warning: use of old-style cast
lex.yy.cc: In member function ‘int yyFlexLexer::yy_get_next_buffer()’:
lex.yy.cc:37587:53: warning: use of old-style cast
lex.yy.cc:37610:39: warning: use of old-style cast
lex.yy.cc:37623:28: warning: use of old-style cast
lex.yy.cc:37623:58: warning: use of old-style cast
lex.yy.cc:37644:3: warning: use of old-style cast
lex.yy.cc:37644:3: warning: use of old-style cast
lex.yy.cc:37669:48: warning: use of old-style cast
lex.yy.cc:37672:95: warning: use of old-style cast
lex.yy.cc:37672:115: warning: use of old-style cast
lex.yy.cc: In member function ‘yy_state_type yyFlexLexer::yy_get_previous_state()’:
lex.yy.cc:37699:48: warning: use of old-style cast
lex.yy.cc:37699:48: warning: use of old-style cast
lex.yy.cc: In member function ‘void yyFlexLexer::yyunput(int, char*)’:
lex.yy.cc:37759:32: warning: use of old-style cast
lex.yy.cc:37760:32: warning: use of old-style cast
lex.yy.cc:37768:20: warning: use of old-style cast
lex.yy.cc: In member function ‘int yyFlexLexer::yyinput()’:
lex.yy.cc:37817:14: error: ‘EOF’ was not declared in this scope
lex.yy.cc:37835:36: warning: use of old-style cast
lex.yy.cc: In member function ‘virtual yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)’:
lex.yy.cc:37913:66: warning: use of old-style cast
lex.yy.cc:37922:54: warning: use of old-style cast
lex.yy.cc: In member function ‘virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)’:
lex.yy.cc:37944:48: warning: use of old-style cast
lex.yy.cc:37947:22: warning: use of old-style cast
lex.yy.cc:37949:18: warning: use of old-style cast
lex.yy.cc: In member function ‘void yyFlexLexer::yyensure_buffer_stack()’:
lex.yy.cc:38076:9: warning: use of old-style cast
lex.yy.cc:38096:9: warning: use of old-style cast
lex.yy.cc: In member function ‘void yyFlexLexer::yy_push_state(int)’:
lex.yy.cc:38116:49: warning: use of old-style cast
lex.yy.cc:38119:65: warning: use of old-style cast
lex.yy.cc:38119:77: warning: use of old-style cast
lex.yy.cc: In function ‘void* yyalloc(yy_size_t)’:
lex.yy.cc:38198:31: warning: use of old-style cast
lex.yy.cc: In function ‘void* yyrealloc(void*, yy_size_t)’:
lex.yy.cc:38210:36: warning: use of old-style cast
lex.yy.cc:38210:46: warning: use of old-style cast
lex.yy.cc: In function ‘void yyfree(void*)’:
lex.yy.cc:38215:17: warning: use of old-style cast
make: *** [Make/linux64GccDPOpt/chemkinLexer.o] Error 1
make: *** Waiting for unfinished jobs....
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   September 20, 2010, 09:44
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

Did some initial speed test with the simpleFoam pitzDaily3Blocks tutorial with blocks refined in all direction (except z, 2d mesh).

Code:
Number of cells of each type: 
    hexahedra:     123706
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     134
Ok results for 500 itt.
Code:
gcc-4.3.3                    gcc-4.5.1 
  950 s.                         864 s.

Improvement
9.05%
So thats quite a good improvement.

Still having the combustion library compile problem.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   September 20, 2010, 12:14
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Linneman,

Have you tried using the same/similar wmake rules from OpenFOAM 1.7.x? Because that error reminds me of the "--cpp-traditional" argument...

And I suggest to first try using gcc 4.5.0, since the changes recently committed seem to only be tested with gcc 4.5.0

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 20, 2010, 14:01
Default
  #4
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi Bruno

Good ideas I will try the 1.7.x rules sometime in the future.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   September 22, 2010, 11:03
Default
  #5
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by linnemann View Post
Hi Bruno

Good ideas I will try the 1.7.x rules sometime in the future.
I tried it today and found out there are no wmake rules for gcc-4.5 in the wmake-Directory of OF1.7.x. Where do I get them from?

Regards Bastian
bastil is offline   Reply With Quote

Old   September 23, 2010, 08:04
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Bastian,

"On size fits all" the linuxGcc and linux64Gcc rules in OpenFOAM 1.7.x work with gcc 4.3.x, 4.4.x and 4.5.x

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 22, 2010, 08:41
Default
  #7
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Linneman,

Have you tried using the same/similar wmake rules from OpenFOAM 1.7.x? Because that error reminds me of the "--cpp-traditional" argument...

I tried that today and I have the same problems buildig combustion library.
bastil is offline   Reply With Quote

Old   October 22, 2010, 22:07
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Bastil,

This is very odd... I've just finished building OpenFOAM 1.5-dev r1842 with:
  • OpenFOAM's 1.6 ThirdParty folder;
  • OpenFOAM's 1.7.0 linux64Gcc rules folder (I meant to use the one from 1.7.1, but I forgot about it midway but it worked nonetheless!);
  • flex 2.5.35;
  • a fresh custom build of gcc 4.5.1 (adapted from my build-gcc scripts kit);
  • a hatchet to remove those pesky "//" lines from the files files and options that some libraries have... namely:
    Code:
    src/OpenFOAM/Make/options
    src/engine/Make/files
  • and some fine tuning to make it all work together. Including having to do an additional export after sourcing the bashrc file, to make some system libraries visible to wmake:
    Code:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/lib
    NOTE: I'm using Ubuntu 9.10 x86_64, therefore in other x86_64 Linux boxes, one might need to use "lib64" instead of "lib" in this last line!
Attached is the differences between the SVN version and my modified version CAUTION: do not use this patch blindly, since I'm only certain that it "worked for me", so it might not work for you straight out of the box!


Anyway, after this successful build with gcc 4.5.1 and flex 2.5.35, I can only assume that the problems you and Linnemann are having with the combustion library is due to some issue with your system's flex... which is a bit odd, since it worked fine with gcc 4.3.3...
Sooo, my suggestion is to run:
Code:
wclean libso src/thermophysicalModels/combustion
wmake libso src/thermophysicalModels/combustion
and see if it crashes again. If it still does, is it with the same exact error as Linnemann's:
Quote:
Code:
lex.yy.cc:37817:14: error: ‘EOF’ was not declared in this scope
?

Best regards and good luck!
Bruno
Attached Files
File Type: gz differences_1.5-dev.tar.gz (1.8 KB, 27 views)
__________________
wyldckat is offline   Reply With Quote

Old   October 25, 2010, 05:21
Default
  #9
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Sooo, my suggestion is to run:
Code:
wclean libso src/thermophysicalModels/combustion
wmake libso src/thermophysicalModels/combustion
and see if it crashes again. If it still does, is it with the same exact error as Linnemann's:?
Yes it still is the same error and it still crashes. I think you are right: The system-flex seems to have some trouble whereas it is working with gcc4.3.3
bastil is offline   Reply With Quote

Old   October 25, 2010, 08:25
Default
  #10
bb_
New Member
 
Join Date: Jul 2010
Posts: 20
Rep Power: 16
bb_ is on a distinguished road
Hey Bruno,

I also tried to install OF-1.5-dev with GCC-4.5.1 following your instructions (OF-1.5-dev r1842, ThirdParty-1.6, rules from OF-1.7.1, flex-2.5.35) . Sadly, without success.

I successfully compiled gcc and its dependencies (gmp, mpfr, mpc, binutils) but when running the OF Allwmake script, an error occurs:

Code:
cd $WM_PROJECT_DIR
./Allwmake

..
(Thirdparty tools compile successfully)
...

cd src
+ ./Allwmake
+ cd OpenFOAM
+ wmakeLnInclude .
+ cd finiteVolume
+ wmakeLnInclude .
+ cd Pstream
+ ./Allwmake
+ wmake libso dummy
SOURCE=Pstream.C ;  g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40  -IlnInclude -I. -I/home/g18719/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/g18719/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/Pstream.o
SOURCE=IPread.C ;  g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40  -IlnInclude -I. -I/home/g18719/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/g18719/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/IPread.o
IPread.C:30:19: fatal error: error.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/IPread.o] Error 1
make: *** Waiting for unfinished jobs....
Pstream.C:28:30: fatal error: PstreamReduceOps.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/Pstream.o] Error 1

...
(I hit Ctrl+C here to abort the script)
It complains about not finding error.H and PstreamReduceOps.H. Although those files do exist (in ./src/OpenFOAM/db/error/error.H and ./src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H). I suppose something went wrong with the include/search paths. Is there anything I forgot to modify? If you need any additional input I'd be happy to post it here.

Thanks a lot if you have any hints for me!

(sidenote: the code for OF-1.7.1 compiles just fine on the system with the same setup)
bb_ is offline   Reply With Quote

Old   October 25, 2010, 08:35
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings bb,

Did you also check the changes I made to settings.sh and bashrc? They are inside the file attached to that post.

By the way when you run:
Code:
which g++
g++ --version
Does it correspond to the correct location and version of gcc/g++ 4.5.1? If not, check those two files I told you about.

Edit:
Also, you can try this with the 1.5-dev version:
Code:
cd $WM_PROJECT_DIR
wmakeLnIncludeAll src applications
Additionally, are you sure that you aren't trying to use the environment from 1.7.1/x when building 1.5-dev?

Best regards,
Bruno
__________________

Last edited by wyldckat; October 25, 2010 at 08:45. Reason: see EDIT:
wyldckat is offline   Reply With Quote

Old   October 25, 2010, 10:29
Default
  #12
bb_
New Member
 
Join Date: Jul 2010
Posts: 20
Rep Power: 16
bb_ is on a distinguished road
Hi Bruno,

thanks for the quick reply! My environment setup was correct - the

Code:
cd $WM_PROJECT_DIR
wmakeLnIncludeAll src applications
did the trick! After running wmakeLnIncludeAll, Allwmake started and the problem with missing include files was fixed! What exactly does wmakeLnIncludeAll do? (Usually, it's not necessary to run this, is it?)

Sadly, now it seems that I'm have the same issue with src/thermophysicalModels/combustion (everything compiles until this point):

Code:
lex.yy.cc:37817:14: error: 'EOF' was not declared in this scope
Although flex is the correct version..... Well, I'll have a look on that and will get back to you if I can find a solution.
bb_ is offline   Reply With Quote

Old   October 25, 2010, 10:50
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi bb,

wmakeLnIncludeAll will remove all lnInclude sub-folders for the given folders. These lnInclude sub-folders are a quick way for wmake to contain all of the necessary headers for each library/application.

This "containment system" is great, but means that there could be some weird issues once in a while, when you update the code, or make substantial changes to the files and dependencies. This means that wmakeLnIncludeAll can be considered a last resort for when things don't seem to want to get built
In other words, whenever we update 1.7.x or 1.5-dev, and sometimes with a brand new copy/clone, things could be clogged up for some weird and files in lnInclude could be left hanging ...

By the way, rmdepall (if I'm not mistaken) also seems to be useful once in a while as well, specially for situations were the error talks about some file that ends with ".dep"


As for the combustion problem, this is really starting to be very strange... maybe me using the rules from 1.7.0 instead of 1.7.1/x had something to do with it... I'll try to have a go at it when I can.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 25, 2010, 11:03
Default
  #14
bb_
New Member
 
Join Date: Jul 2010
Posts: 20
Rep Power: 16
bb_ is on a distinguished road
Thanks for the enlightenment about these commands , that was very helpfull!

Oh, and tomorrow I'll have a look on the combustion problem too.

Regards,
bb.
bb_ is offline   Reply With Quote

Old   October 25, 2010, 19:15
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi bb,

OK, I've just tested with the linux64Gcc rules from 1.7.1 (only one minor thing changed in the file c++) and it worked fine for me as well.

I've known for a while, from the posts in this forum, that file corruption, bad downloads, git or svn file mangling is known to happen once every million/billion operations around the world. In other words, it can happen, with no prior warning. The error shouldn't have occurred, but it did and it won't repeat for another million operations or so...
So, I suspect that for some weird reason, the file I got isn't damaged, but your versions of that file are corrupted for some weird reason... probably SVN's fault

So, lets try to isolate the error this way:
  1. I've attached the file "src/thermophysicalModels/combustion/chemistryReaders/chemkinReader/chemkinLexer.L" in a tarball/bomb. In other words, it only has the file, with no paths.
  2. Unpack it in your desktop folder or something like that, and run this (or similar) in a terminal with OF 1.5-dev environment set-up:
    Code:
    diff -Nu ~/Desktop/chemkinLexer.L $FOAM_SRC/thermophysicalModels/combustion/chemistryReaders/chemkinReader/chemkinLexer.L
    If there isn't any output, then the files should be identical.
  • If there is any output, even if not visible specifically visible (end line is the only difference, but the different lines should start with "+" or "-"), then that should be the problem. And if this is the case, then something is misconfigured in your SVN. The subversion was installed in my machine just for cloning the 1.5-dev repo the other day, so I didn't configure anything. The svn version is "1.6.5 (r38866)".
  • But if there wasn't any output, then try replacing the file with this one, just in case
So bb, since you said you are going to try and figure out what happened, please also try this!

Best regards,
Bruno
Attached Files
File Type: gz chemkinLexer.L.tar.gz (7.5 KB, 2 views)
__________________
wyldckat is offline   Reply With Quote

Old   October 26, 2010, 04:58
Default
  #16
bb_
New Member
 
Join Date: Jul 2010
Posts: 20
Rep Power: 16
bb_ is on a distinguished road
Ok, so here are the insights of the last couple hours: taking the diff between the two files showed that they are identical. Thus, replacing my version with yours didn't help, but it was worth a try.

However, after googling a little bit, I found this page: http://bugs.gentoo.org/280586. In comment #9, Oliver Borm supplied a patch which worked for him (apparently OF-1.6 and gcc-4.4.1). Looking at it showed that he added the single line

Code:
#include <stdio.h>
at the beginning of src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L.

So that's what I did too - and it compiled successfully!! I don't know why exactly this include is necessary, but anyway...

Right now I'm running a test case for comparison with my old set up to check if everything is all right. So far, everything looks good , but let's be patient and wait for the results.

Edit: BastiL, could you try to do the same to your code? Then we could check if this is a valid fix for the problem.

Last edited by bb_; October 26, 2010 at 07:46.
bb_ is offline   Reply With Quote

Old   October 26, 2010, 18:37
Default
  #17
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi bb,

but... I didn't even bother reading the file, because I knew from past experience since OpenFOAM 1.6.x that it wouldn't build with gcc 4.4.x unless "stdio.h" that was in the chemkinLexer.L file! See this bug report, because it also has links to the proposed fixes for 1.6.x. The changes in OpenFOAM's 1.6.x git from 2009-11-13 by Mattijs contain all of the fixes needed for building with gcc 4.4.x. And that shouldn't be the only ".L" file that needs fixing too, as shown here.

<rant>But then how on (virtually digital) earth does it build with me? "I think therefore it will work"?</rant>

Anyway, I'm glad you managed to figure it out! Have you or will you report it to OpenFOAM-extend's Mantis page?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 27, 2010, 05:03
Default
  #18
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by bb_ View Post
Right now I'm running a test case for comparison with my old set up to check if everything is all right. So far, everything looks good , but let's be patient and wait for the results.
Edit: BastiL, could you try to do the same to your code? Then we could check if this is a valid fix for the problem.
I will try the same. What do your results look like so far? I will keep you posted.

Regards Bastian
bastil is offline   Reply With Quote

Old   October 27, 2010, 05:36
Default
  #19
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
For me it does not work at all. I am getting further but not done compiling the combustion library (see logfile).

I already tried preplacing '[[' and ']]' as metioned here:
http://www.cfd-online.com/Forums/ope...e-60mainb.html

My flex is the system flex 2.5.31.

Ideas?

Regards Bastian

Edit: False alarm. I used wmake instead of wmake libso. Not the library compiles fine for me, too.
Attached Files
File Type: gz log.txt.gz (8.8 KB, 0 views)
bastil is offline   Reply With Quote

Old   November 2, 2010, 04:54
Default
  #20
bb_
New Member
 
Join Date: Jul 2010
Posts: 20
Rep Power: 16
bb_ is on a distinguished road
Hey,

results look good so far, test cases are all running fine, with about 5% speed improvement compared to the old setup.

regards,
bb
bb_ 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] ParaFoam instalation in OpenFoam 1.5 dev titio ParaView 2 July 25, 2010 00:24
OpenFOAM 1.5 dev LVDH OpenFOAM 98 May 5, 2010 18:01
[OpenFOAM] ParaView/ParaFoam in OpenFoam 1.5 dev titio ParaView 2 February 27, 2010 15:02
[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


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