compiling firefoam
Hi,
I tried to compile different versions of firefoam but the following error is common in all versions: [farshad@farshad source]$ ./Allwclean + wclean libso diffusionCombustionThermophysicalModels wclean diffusionCombustionThermophysicalModels + wclean libso fvPatchFields wclean fvPatchFields + wclean [farshad@farshad source]$ ./Allwmake + wmake libso diffusionCombustionThermophysicalModels wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file hCombustionThermo/hCombustionThermos.C SOURCE=hCombustionThermo/hCombustionThermos.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/basic/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/hCombustionThermos.o '/home/farshad/OpenFOAM/farshad-1.7.0/lib/linux64GccDPOpt/libdiffusionCombustionThermophysicalModels.so' is up to date. + wmake libso fvPatchFields wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file totalFlowRateAdvectiveDiffusiveFvPatchScalarField/totalFlowRateAdvectiveDiffusiveFvPatchScalarField. C SOURCE=totalFlowRateAdvectiveDiffusiveFvPatchScala rField/totalFlowRateAdvectiveDiffusiveFvPatchScalarField. C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/basic/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/compressible/turbulenceModel -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/triSurface/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/meshTools/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/LES/LESdeltas/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/LES/LESfilters/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/compressible/LES/lnInclude -IlnInclude -I. -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/totalFlowRateAdvectiveDiffusiveFvPatchScalarField. o '/home/farshad/OpenFOAM/farshad-1.7.0/lib/linux64GccDPOpt/libpatchFields.so' is up to date. + wmake Making dependency list for source file fireFoam.C SOURCE=fireFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I./include -I./fvPatchFields -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/meshTools/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/basic/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/reactionThermo/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/radiation/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/compressible/LES/LESModel -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/LES/compressible/LESModel -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/LES/LESdeltas/lnInclude -IlnInclude -I. -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/fireFoam.o /home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’: /home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readPISOControls.H:8: warning: unused variable ‘momentumPredictor’ /home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’ createFields.H:38: warning: unused variable ‘fu’ createFields.H:39: warning: unused variable ‘ox’ createFields.H:40: warning: unused variable ‘pr’ /home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readTimeControls.H:39: warning: unused variable ‘maxCo’ /home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readTimeControls.H:42: warning: unused variable ‘maxDeltaT’ g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I./include -I./fvPatchFields -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/meshTools/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/basic/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/reactionThermo/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/specie/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/thermophysicalModels/radiation/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/compressible/LES/LESModel -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/LES/compressible/LESModel -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/turbulenceModels/LES/LESdeltas/lnInclude -IlnInclude -I. -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/farshad/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/fireFoam.o -L/home/farshad/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt \ -lfiniteVolume -lmeshTools -lbasicThermophysicalModels -lreactionThermophysicalModels -L/home/farshad/OpenFOAM/farshad-1.7.0/lib/linux64GccDPOpt -ldiffusionCombustionThermophysicalModels -lspecie -lcompressibleLESModels -lradiation -L/home/farshad/OpenFOAM/farshad-1.7.0/lib/linux64GccDPOpt -lpatchFields -lOpenFOAM -liberty -ldl -lm -o /home/farshad/OpenFOAM/farshad-1.7.0/applications/bin/linux64GccDPOpt/fireFoam /usr/bin/ld: Make/linux64GccDPOpt/fireFoam.o: undefined reference to symbol 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)' /usr/bin/ld: note: 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)' is defined in DSO /home/farshad/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/openmpi-1.4.1/libPstream.so so try adding it to the linker command line /home/farshad/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/openmpi-1.4.1/libPstream.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status make: *** [/home/farshad/OpenFOAM/farshad-1.7.0/applications/bin/linux64GccDPOpt/fireFoam] Error 1 [farshad@farshad source]$ \\\\\\\\\\\\\\\\\\\\\\\\\\ please help me understand the reason why this error occured. Thanks |
problem solved
Hi,
I just needed to remove // infront of settimes library. It works fine now. |
Quote:
I got the similar problem when compiling the fireFOAM solver into OpenFOAM 1.7.1 . I am new to this code. Can u say something more about this solution, what does 'remove // infront of settimes library' mean. Thanks so much. |
Greetings wchao.csu and welcome to the forum!
Here are a few questions:
Bruno |
Quote:
1.The detailed error message is shown below. .......................................... + wmake libso thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file greyDiffusiveRadiationMixedFvPatchScalarField.C SOURCE=greyDiffusiveRadiationMixedFvPatchScalarFie ld.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/thermophysicalModels/radiation/lnInclude -I/opt/openfoam171/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam171/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam171/src/meshTools/lnInclude -I../../../../../../libs/thermophysicalModels/basicSolidThermo/basicSolid/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/greyDiffusiveRadiationMixedFvPatchScalarField.o greyDiffusiveRadiationMixedFvPatchScalarField.C: In member function ‘virtual void Foam::radiation::greyDiffusiveRadiationMixedFvPatc hScalarField::updateCoeffs()’: greyDiffusiveRadiationMixedFvPatchScalarField.C:34 3: error: ‘class Foam::radiation::radiativeIntensityRay’ has no member named ‘Qem’ greyDiffusiveRadiationMixedFvPatchScalarField.C:35 6: error: ‘class Foam::radiation::radiativeIntensityRay’ has no member named ‘Qin’ make: *** [Make/linuxGccDPOpt/greyDiffusiveRadiationMixedFvPatchScalarField.o] error 1 .................................................. .................. SOURCE=cyclicPolyPatch.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IextrudeModel17x/lnInclude -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/meshTools/lnInclude -I/opt/openfoam171/src/dynamicMesh/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/cyclicPolyPatch.o cyclicPolyPatch.C: In member function ‘void Foam::cyclicPolyPatch::calcTransforms()’: cyclicPolyPatch.C:239: error: no matching function for call to ‘Foam::cyclicPolyPatch::calcTransformTensors(Foam: :pointField, Foam::pointField, Foam::vectorField, Foam::vectorField, Foam::scalarField, double, Foam::cyclicPolyPatch::transformType)’ /opt/openfoam171/src/OpenFOAM/lnInclude/coupledPolyPatch.H:81: note: candidates are: void Foam::coupledPolyPatch::calcTransformTensors(const Foam::vectorField&, const Foam::vectorField&, const Foam::vectorField&, const Foam::vectorField&, const Foam::scalarField&, Foam::scalar) const cyclicPolyPatch.C:256: error: no matching function for call to ‘Foam::cyclicPolyPatch::calcTransformTensors(Foam: :pointField&, Foam::pointField&, Foam::vectorField&, Foam::vectorField&, Foam::scalarField&, Foam::scalar&, Foam::cyclicPolyPatch::transformType&)’ /opt/openfoam171/src/OpenFOAM/lnInclude/coupledPolyPatch.H:81: note: candidates are: void Foam::coupledPolyPatch::calcTransformTensors(const Foam::vectorField&, const Foam::vectorField&, const Foam::vectorField&, const Foam::vectorField&, const Foam::scalarField&, Foam::scalar) const make: *** [Make/linuxGccDPOpt/cyclicPolyPatch.o] error 1 2.The fireFoam solver already presented in OpenFOAM 1.7.1 works well but I need the latest version of fireFoam. So I downloaded the new one from http://code.google.com/p/firefoam-dev/downloads/list. The problem appears when compiling the new solver. 3.Yes, I managed to build OpenFOAM 1.7.1 successfully and I already tested the example cases. I used Ubuntu/Debian Pack. 4.Ubuntu 10.10 Thanks again |
Also there are a lot of warnings like posted below. Does it have something to do with the error?
lex.yy.cc:35926: warning: use of old-style cast lex.yy.cc:35926: warning: use of old-style cast lex.yy.cc:35942: warning: use of old-style cast lex.yy.cc:37355: warning: use of old-style cast |
Hi wchao.csu,
Well, 1.7.1 isn't enough. They seem to have developed that version of fireFoam for the latest 1.7.x. You'll have to follow the installation instructions for 1.7.x: http://www.openfoam.org/archive/1.7.1/download/git.php As for having more than OpenFOAM version installed in your machine: Advanced tips for working with the OpenFOAM shell environment Best regards, Bruno |
Thanks for your tips I will try it. I thought 1.7.x means both 1.7.0 and 1.7.1 are fine before.
|
Quote:
I followed the instructions and spent whole night on 1.7.x installation. I came across some errors. I searched forum and solved most of them but there were still some remained. So can you help with it? here is the detail log. + wmake libso meshTools triSurfaceSearch.o: file not recognized: File truncated collect2: ld returned 1 exit status make: *** [/home/wchao/OpenFOAM/OpenFOAM-1.7.x/lib/linuxGccDPOpt/libmeshTools.so] error 1 ............. /usr/bin/ld: cannot find -lbasicThermophysicalModels /usr/bin/ld: cannot find -lcompressibleTurbulenceModel /usr/bin/ld: cannot find -lcompressibleRASModels /usr/bin/ld: cannot find -lcompressibleLESModels /usr/bin/ld: cannot find -lmeshTools /usr/bin/ld: cannot find -lfiniteVolume collect2: ld returned 1 exit status make[2]: *** [/home/wchao/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linuxGccDPOpt/chtMultiRegionFoam] error 1 .......................... And similar problems like " /usr/bin/ld: cannot find -l......" repeated a lot.. Thank you so much. |
Is it possible that something wrong within the $home/.bashrc file?
the end of this file is ". $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc" now. |
Hi wchao.csu,
OK, the problem is this: Code:
+ wmake libso meshTools This happens once in a while due to either lack of space on disk, or Ctrl-C at the wrong time, or compiler crash and so on... As for the other list of missing libraries (references to missing "-l*"), that's normal, since there is a large dependency tree in OpenFOAM. This is why the first error is usually the one to blame for everything else. Best regards, Bruno |
Hi Bruno,
Really thanks for your help in installing OpenFOAM 1.7.x, I finally made it and tested the tutorials. it worked prefectly. It's really a tough job. But here I came across another problem, paraview. Paraview3.8.0 only can be installed well with Qt 4.6(learned from other threads). I already upgrade Qt to 4.7. So can u help me with how to downgrade it back to 4.6.3. Thanks so much. I love this forum. |
Hi wchao.csu,
Well, there are at least two ways to solve your problem and they are listed here: Related issues to ParaView with OpenFOAM - Fixes and solutions Basically, you have two options:
Best regards, Bruno |
Hello guys,
I am having several problems to compile fireFoam 1.7.x_0.4. I am using the following configuration: 1) Ubuntu 11.10 2) Gcc 4.5.3 3) Openfoam 1.7.x, as recommended by the developers. Openfoam compilation apparently worked fine, but when I try to wmake the solver it asks for files that I don't have in my 1.7.x version. Quote:
Thanks in advance. |
Greetings Yuri Almeida and welcome to the forum!
It took me a while to try and replicate the issue you're getting. My conclusion is that in fact the installation of OpenFOAM 1.7.x did not go as well as you expected. Did you try checking if this file exists :confused:: Code:
ls -l /home/yuri/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/hashedWordList.H What instructions did you follow for installing OpenFOAM 1.7.x? Best regards, Bruno |
1 Attachment(s)
Hi Bruno,
In fact, the compilation of my OF17x did not work fine. Or at least, the files hashedWordList.H, UPstream.H, and many others required by the solver are not present in the source directory. In order to build OF, I follow the instructions shown in http://www.openfoam.org/download/git.php for 2.1.x. Maybe some package is missed, but I have the 1.6-ext compiled, so I thought that my currents packages would be sufficient. I try to make again the OF17x, using gcc 4.4.6 this time, and "few errors" are still occurring, as can be seen in the annex. Any suggestion? By the way, the solver (fireFoam) asks some files that sounds a little bit weird to me, like the fvPatchFieldNew.C (present in 2.1 version). Curiously my OF17x has the newFvPatchField.C... Thanks for your attention, Bruno! |
Hi Yuri,
I think you're missing this patch: https://github.com/OpenFOAM/OpenFOAM...3e8d0e85b889d9 Quote:
As for the other error you mentioned, I'm not very familiar with this fireFoam modification. All I know is that I once managed to build it without any problems some time ago with my build of 1.7.x, but yesterday one of the solvers in this new external fireFoam had issues, but I didn't bother checking what was the problem :p Best regards, Bruno |
1 Attachment(s)
Hi Bruno,
Apparently these corrections didn't work, could you take a look at my new log file? Thanks again! |
Hi Yuri,
Mmm, this is very strange... which commit do you have for 1.7.x: Code:
git log -1 Bruno |
That's the output, Bruno:
Quote:
|
OK, I had built mine with Gcc 4.6, so I apparently also had even more issues than your build has.
I've switched to Gcc 4.4.6 as well on my Ubuntu 11.10. For that, I've modified OpenFOAM's "etc/bash" to have these settings: Code:
export WM_CC='gcc-4.4' Code:
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed |
:mad: If I hadn't inspected the "make.log" sooner, it would have been a wasted hour... here's the necessary patch, which without the settings from bashrc won't propagate to wmake (swap "linux64Gcc" to "linuxGcc" for 32bit):
Code:
diff --git a/wmake/rules/linux64Gcc/c b/wmake/rules/linux64Gcc/c Code:
wclean all Code:
export WM_NCOMPPROCS=4 |
Hi Yuri,
OK, I've finished confirming this. With the info from the last 2 posts, you should succeed in building everything. Keep in mind:
Bruno |
That is a great news, Bruno! I'm trying to compiling the OF also, utilizing yours implementations, I rope that this time it will work.
I will post the results here soon. |
Hi Bruno,
I really want to thank you so much for your support! The OF17x compilation worked. In addition to your corrections, I changed the variable WM_ARCH_OPTION, which was set by default 64, but my Ubuntu is 32 bits. Could be this one of the reasons for the previous failures? After this, I finally compiled successfully the fireFoam.1.7.x_0.4! So, the big deal was really the OF17x compilation. Thanks again for your help! |
Hii
Hi,
I am getting error while compiling the OF 1.7.x. I have followed till the previous step but unable to understand comment #22 . Which files i have to swap as i am using ubuntu 32bit If possible can you change in the git repository It will be of great help ... Thank You Regards, Trinath Rao |
Greetings Trinath Rao,
Quote:
If I'm not mistaken, this is what it should be like for "linuxGcc": Quote:
Bruno |
Compiled !!
Hi Bruno,
Thank you for replying my query. I build openfoam 1.7.x successfully. and started working perfectly. Merry Christmas and Very Happy New Year 2013 !!! Thanks a lot...!! Regards, Trinath Rao :):) |
All times are GMT -4. The time now is 04:55. |