|
[Sponsors] |
September 20, 2010, 08:33 |
1.5-dev GCC-4.5.1
|
#1 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
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. |
|
September 20, 2010, 09:44 |
|
#2 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
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 Code:
gcc-4.3.3 gcc-4.5.1 950 s. 864 s. Improvement 9.05% Still having the combustion library compile problem.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
September 20, 2010, 12:14 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
September 20, 2010, 14:01 |
|
#4 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
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. |
|
September 22, 2010, 11:03 |
|
#5 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
||
September 23, 2010, 08:04 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
October 22, 2010, 08:41 |
|
#7 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
||
October 22, 2010, 22:07 |
|
#8 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Bastil,
This is very odd... I've just finished building OpenFOAM 1.5-dev r1842 with:
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 Quote:
Best regards and good luck! Bruno
__________________
|
||
October 25, 2010, 05:21 |
|
#9 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
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
|
|
October 25, 2010, 08:25 |
|
#10 |
New Member
Join Date: Jul 2010
Posts: 20
Rep Power: 16 |
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) 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) |
|
October 25, 2010, 08:35 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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 Edit: Also, you can try this with the 1.5-dev version: Code:
cd $WM_PROJECT_DIR wmakeLnIncludeAll src applications Best regards, Bruno
__________________
Last edited by wyldckat; October 25, 2010 at 08:45. Reason: see EDIT: |
|
October 25, 2010, 10:29 |
|
#12 |
New Member
Join Date: Jul 2010
Posts: 20
Rep Power: 16 |
Hi Bruno,
thanks for the quick reply! My environment setup was correct - the Code:
cd $WM_PROJECT_DIR wmakeLnIncludeAll src applications 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 |
|
October 25, 2010, 10:50 |
|
#13 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
October 25, 2010, 11:03 |
|
#14 |
New Member
Join Date: Jul 2010
Posts: 20
Rep Power: 16 |
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. |
|
October 25, 2010, 19:15 |
|
#15 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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:
Best regards, Bruno
__________________
|
|
October 26, 2010, 04:58 |
|
#16 |
New Member
Join Date: Jul 2010
Posts: 20
Rep Power: 16 |
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> 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. |
|
October 26, 2010, 18:37 |
|
#17 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
October 27, 2010, 05:03 |
|
#18 | |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
Quote:
Regards Bastian |
||
October 27, 2010, 05:36 |
|
#19 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
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. |
|
November 2, 2010, 04:54 |
|
#20 |
New Member
Join Date: Jul 2010
Posts: 20
Rep Power: 16 |
Hey,
results look good so far, test cases are all running fine, with about 5% speed improvement compared to the old setup. regards, bb |
|
|
|
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 |