|
[Sponsors] |
January 18, 2011, 10:24 |
c++ libraries and solver compiling
|
#1 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I'm talking about OF-1.5-dev. I'd like to compile the simpleSRFFoam solver and study the mixer tutorial case (they both are in /opt/OpenFOAM/OpenFOAM-1.5-dev/tutorials/simpleSRFFoam) but there is a c++ libraries version problem. I already met it with MRFSimpleFoam but a coworker of mine got rid of it by editing the links:
Code:
lrwxrwxrwx 1 maurizio maurizio 23 2011-01-18 15:10 libstdc++.so.6 -> /usr/lib/libstdc++.so.6 lrwxrwxrwx 1 maurizio maurizio 28 2011-01-18 15:10 libstdc++.so.6.0.10 -> /usr/lib/libstdc++.so.6.0.13 |
|
January 19, 2011, 02:36 |
|
#2 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I report the compiling error I refer to:
Code:
g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=1861 -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/opt/OpenFOAM/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/opt/OpenFOAM/OpenFOAM-1.5-dev/src/transportModels -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/simpleSRFFoam.o -L/opt/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt \ -lincompressibleRASModels -lincompressibleTransportModels -lfiniteVolume -lmeshTools -llduSolvers -lOpenFOAM -liberty -ldl -lm -o /home/maurizio/OpenFOAM/maurizio-1.5-dev/applications/bin/linux64GccDPOpt/simpleSRFFoam /opt/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libincompressibleRASModels.so: undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11' collect2: ld returned 1 exit status make: *** [/home/maurizio/OpenFOAM/maurizio-1.5-dev/applications/bin/linux64GccDPOpt/simpleSRFFoam] Errore 1 |
|
January 19, 2011, 05:47 |
|
#3 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I also tried to compile simpleSRFFoam in OpenFOAM-1.7, but I failed. Which is the correct procedure? I launched wmake in /opt/openfoam171/tutorials/incompressible/simpleSRFFoam/simpleSRFFoam. What is my error?
|
|
January 19, 2011, 08:16 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Maurizio,
OK, lets step back a bit:
Bruno
__________________
|
|
January 19, 2011, 14:33 |
|
#5 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Hi, Bruno.
You're right, I gave no informations. That's just because I couldn't understand anything about libraries, compiling and so on. OK, let's start again. I usually use OpenFOAM-1.7, but I just started to be involved with OpenFOAM-1.5-dev. First I installed it via CAE Team PPA, but soon I had problems with MRFSimpleFoam solver. I realized it needed to be builded when I downloaded some tutorials about rotating meshes. Anyway, wmake seemed not to work. I asked a coworker to help me - I'm having a work experience abroad - and he suggested to re-install OF-1.5-dev in an alternative way. I agreed, OF-1.5-dev via PPA has a very, very strange folder distribution. Now I'm entering in a black box. I think he downloaded OF-1.5-dev from the company cluster and compiled it with gcc-4.3.1 (resident in the cluster or included in OF, I don't know). It was all OK - just have to open a second terminal, with OF-1.7 environment, to launch paraFoam (don't ask me why).Then I tried to compile MRFSimpleFoam solver (/opt/OpenFOAM/OpenFOAM-1-5-dev/tutorials/MRFSimpleFoam/MRFSimpleFoam) with wmake, but it didn't work - OF complained about gcc version or something similar. The guy solved that by 're-linking' the c++ libraries (see first post in this thread). Yesterday I also tried to compile simpleSRFFoam but I had a similar problem. Why the re-linking trick doesn't work with it? We don't know. Anyway, he's still working at it. Getting back to my problem, in the meantime I'd like to use OF-15-dev via CAE Team PPA (I didn't uninstall it yet). If I enter in /usr/share/doc/openfoam-dev-1.5/simpleSRFFoam/simpleSRFFoam, I find createFields.H, Make and simpleSRFFoam.H.gz (that I extracted). I launched wmake and obtained Code:
Making dependency list for source file simpleSRFFoam.C could not open file fvCFD.H for source file simpleSRFFoam.C could not open file incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H for source file simpleSRFFoam.C could not open file incompressible/RASModel/RASModel.H for source file simpleSRFFoam.C could not open file SRFModel.H for source file simpleSRFFoam.C could not open file setRootCase.H for source file simpleSRFFoam.C could not open file createTime.H for source file simpleSRFFoam.C could not open file createMesh.H for source file simpleSRFFoam.C could not open file initContinuityErrs.H for source file simpleSRFFoam.C could not open file readSIMPLEControls.H for source file simpleSRFFoam.C could not open file continuityErrs.H for source file simpleSRFFoam.C SOURCE=simpleSRFFoam.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/usr/lib/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/usr/lib/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/usr/lib/OpenFOAM-1.5-dev/src/transportModels -IlnInclude -I. -I/usr/lib/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/usr/lib/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc/simpleSRFFoam.o simpleSRFFoam.C:34:19: error: fvCFD.H: Nessun file o directory simpleSRFFoam.C:35:80: error: incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H: Nessun file o directory simpleSRFFoam.C:36:46: error: incompressible/RASModel/RASModel.H: Nessun file o directory simpleSRFFoam.C:37:22: error: SRFModel.H: Nessun file o directory simpleSRFFoam.C:44:28: error: setRootCase.H: Nessun file o directory simpleSRFFoam.C:46:27: error: createTime.H: Nessun file o directory simpleSRFFoam.C:47:27: error: createMesh.H: Nessun file o directory simpleSRFFoam.C:49:35: error: initContinuityErrs.H: Nessun file o directory simpleSRFFoam.C:61:39: error: readSIMPLEControls.H: Nessun file o directory simpleSRFFoam.C:103:39: error: continuityErrs.H: Nessun file o directory In file included from simpleSRFFoam.C:48: createFields.H: In function ‘int main(int, char**)’: createFields.H:1: error: ‘Info’ was not declared in this scope createFields.H:1: error: ‘endl’ was not declared in this scope createFields.H:2: error: ‘volScalarField’ was not declared in this scope createFields.H:2: error: expected ‘;’ before ‘p’ createFields.H:16: error: ‘volVectorField’ was not declared in this scope createFields.H:16: error: expected ‘;’ before ‘Urel’ createFields.H:30: error: ‘surfaceScalarField’ was not declared in this scope createFields.H:30: error: expected ‘;’ before ‘phi’ createFields.H:43: error: ‘label’ was not declared in this scope createFields.H:43: error: expected ‘;’ before ‘pRefCell’ createFields.H:44: error: ‘scalar’ was not declared in this scope createFields.H:44: error: expected ‘;’ before ‘pRefValue’ createFields.H:45: error: ‘p’ was not declared in this scope createFields.H:45: error: ‘mesh’ was not declared in this scope createFields.H:45: error: ‘pRefCell’ was not declared in this scope createFields.H:45: error: ‘pRefValue’ was not declared in this scope createFields.H:45: error: ‘setRefCell’ was not declared in this scope createFields.H:47: error: ‘singlePhaseTransportModel’ was not declared in this scope createFields.H:47: error: expected ‘;’ before ‘laminarTransport’ createFields.H:49: error: ‘autoPtr’ was not declared in this scope createFields.H:49: error: ‘incompressible’ has not been declared createFields.H:51: error: ‘incompressible’ has not been declared createFields.H:51: error: ‘Urel’ was not declared in this scope createFields.H:51: error: ‘phi’ was not declared in this scope createFields.H:51: error: ‘laminarTransport’ was not declared in this scope createFields.H:52: error: ‘turbulence’ was not declared in this scope createFields.H:55: error: ‘SRF’ has not been declared createFields.H:57: error: ‘SRF’ has not been declared createFields.H:58: error: ‘SRF’ was not declared in this scope simpleSRFFoam.C:57: error: ‘runTime’ was not declared in this scope simpleSRFFoam.C:59: error: ‘nl’ was not declared in this scope simpleSRFFoam.C:68: error: ‘tmp’ was not declared in this scope simpleSRFFoam.C:68: error: ‘fvVectorMatrix’ was not declared in this scope simpleSRFFoam.C:70: error: ‘fvm’ has not been declared simpleSRFFoam.C:73: error: ‘UrelEqn’ was not declared in this scope simpleSRFFoam.C:77: error: ‘fvc’ has not been declared simpleSRFFoam.C:77: error: ‘solve’ was not declared in this scope simpleSRFFoam.C:80: error: expected ‘;’ before ‘AUrel’ simpleSRFFoam.C:81: error: ‘AUrel’ was not declared in this scope simpleSRFFoam.C:83: error: ‘fvc’ has not been declared simpleSRFFoam.C:84: error: ‘adjustPhi’ was not declared in this scope simpleSRFFoam.C:87: error: ‘nNonOrthCorr’ was not declared in this scope simpleSRFFoam.C:89: error: ‘fvScalarMatrix’ was not declared in this scope simpleSRFFoam.C:89: error: expected ‘;’ before ‘pEqn’ simpleSRFFoam.C:94: error: ‘pEqn’ was not declared in this scope simpleSRFFoam.C:109: error: ‘fvc’ has not been declared simpleSRFFoam.C:118: error: expected ‘;’ before ‘Uabs’ make: *** [Make/linux64Gcc/simpleSRFFoam.o] Errore 1 Anyway, in order to answer to your questions: 1. Described 2. 4.3.1 (I have 4.4.3 in my computer) 3. Yes, I refer to OpenFOAMs on my computer, running Ubuntu 10.04 LTS. 4. Why opt/ and not in home? Why not? There's not a particular reason, I thought it was usual. OpenFOAM-1.7 is also in opt/ (I followed the official instructions for Ubuntu in OpenFOAM homesite). Thanks for your patience and sorry for the long post. Regards, |
|
January 19, 2011, 20:07 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Maurizio,
About the PPA version, did you run this command? Code:
sudo apt-get install openfoam-dev-1.5-dev As for the 1.5-dev version you have in "/opt":
As for making the ParaView version from OpenFOAM 1.7 work with 1.5-dev... I'll try to explain that tomorrow I'm too tired today... Best regards and good luck! Bruno
__________________
|
|
January 20, 2011, 10:30 |
|
#7 | |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Thank you, thank you, thank you very much, Bruno. Your answer is very exhaustive, we are working on it. It's like a tutorial, I hope it will be useful for someone else.
Quote:
Thanks for your unbelievable availibility, regards. |
||
January 20, 2011, 19:42 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Maurizio,
I hope by now the build is up and running As for getting ParaView 3.8.1, that comes with OpenFOAM 1.7.1 from OpenCFD's official Debian packages for Ubuntu, to work in 1.5-dev is very simple:
Best regards, Bruno
__________________
|
|
January 21, 2011, 02:49 |
|
#9 | |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Thanks for your reply, I'll apply your hints. Anyway, I forgot a little question: about OpenFOAM-1.5-dev, what do you mean with
Quote:
UPDATE Your hints work! But I have an unexpected error when launching paraFOAM (it's just a warning, I can make post-procession anyway): Code:
Warning: In /home/opencfd/OpenFOAM/ThirdParty-1.7.x/ParaView-3.8.1/VTK/IO/vtkOpenFOAMReader.cxx, line 4273 vtkOpenFOAMReaderPrivate (0x39ecb60): Different time directories with the same time value 0.5 and 0.1 found. 0.1 will be ignored. Warning: In /home/opencfd/OpenFOAM/ThirdParty-1.7.x/ParaView-3.8.1/VTK/IO/vtkOpenFOAMReader.cxx, line 4273 vtkOpenFOAMReaderPrivate (0x39ecb60): Different time directories with the same time value 0.4 and 0.2 found. 0.2 will be ignored. Warning: In /home/opencfd/OpenFOAM/ThirdParty-1.7.x/ParaView-3.8.1/VTK/IO/vtkOpenFOAMReader.cxx, line 4273 vtkOpenFOAMReaderPrivate (0x39ecb60): Different time directories with the same time value 0 and 0.3 found. 0.3 will be ignored. Code:
# Compilation options (architecture, precision, optimised, debug or profiling) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export WM_NCOMPPROCS=2 Last edited by vaina74; January 21, 2011 at 06:26. |
||
January 21, 2011, 08:20 |
|
#10 |
Member
Giovanni Caramia
Join Date: Mar 2009
Location: Bari, ITALY
Posts: 58
Rep Power: 17 |
To solve the error when launching paraFOAM you can try to modify the file
~/OpenFOAM/OpenFOAM-1.5-dev/bin/paraFoam or what comes out from the command which paraFoam adding export LC_ALL=C at the end of the file just before paraview --data="$caseFile" |
|
January 21, 2011, 08:43 |
|
#11 |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
I already know that little trick, I used myself. But I didn't think the trouble was about that because paraFoam with OF-1.7 solved cases already worked fine.
Anyway, I trusted you and applied your hint. I can't believe it, you're right :-) Thanks. |
|
January 21, 2011, 15:29 |
|
#12 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Maurizio,
Quote:
Quote:
Quote:
Best regards, Bruno
__________________
|
||||
January 21, 2011, 15:43 |
|
#13 | |
Senior Member
Join Date: Feb 2010
Posts: 213
Rep Power: 17 |
Quote:
I think this info is essential (for not so expert users like me), I can't understand why the installation wiki page misses it (or didn't i read well?). I thought the 2nd 'dev' meant 'this stuff is under development, take care, it's not stable'. I'm going to test it.About export LC_ALL=C, I didn't think of it because OpenFOAM-1.6.x express this trouble in a different way: paraFOAM opened without warnings, but it didn't show anything. A special thank to Bruno e grazie anche a te, Giovanni |
||
February 3, 2012, 18:43 |
|
#14 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings,
Sorry for fishing this post out of the past, but after I saw a reputation detail given today to my post #6, I noticed a glitch on my own instructions. The fix is shown in bold below: Quote:
Bruno
__________________
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ANSYS Workbench on "Uncertified" Linux Distros | hsr | CFX | 289 | April 20, 2023 10:23 |
Compilation problem after modifying a solver. | PetSul | OpenFOAM Running, Solving & CFD | 2 | October 1, 2009 18:28 |
FEM Solver | triggerfish | OpenFOAM | 1 | April 27, 2009 11:31 |
Could you comare StarCD with CFX 5?Help, please... | Suteh | CFX | 54 | November 7, 2001 21:12 |
Mesh generator and CFD solver | Gennady Kireyko | Main CFD Forum | 0 | May 6, 2001 12:13 |