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

erros when compiling simpleSRFFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2010, 11:26
Default erros when compiling simpleSRFFoam
  #1
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 16
examosty is on a distinguished road
Hello everyone,
I've installed OpenFoam 1.6 in suse 11.2.
When I try to compile the simpleSRFFoam or other user defined solvers, I always receive these errors:

Making dependency list for source file simpleSRFFoam.C
g++ simpleSRFFoam.C -o simpleSRFFoam
simpleSRFFoam.C:34:19: error: fvCFD.H: file or directory not fund
simpleSRFFoam.C:35:39: error: singlePhaseTransportModel.H: file or directory not fund
simpleSRFFoam.C:36:22: error: RASModel.H: Datei oder Verzeichnis nicht gefunden
simpleSRFFoam.C:37:22: error: SRFModel.H: Datei oder Verzeichnis nicht gefunden
simpleSRFFoam.C:43:29: error: setRootCase.H: Datei oder Verzeichnis nicht gefunden
simpleSRFFoam.C:44:28: error: createTime.H: Datei oder Verzeichnis nicht gefunden
simpleSRFFoam.C:45:28: error: createMesh.H: Datei oder Verzeichnis nicht gefunden
simpleSRFFoam.C:47:36: error: initContinuityErrs.H: Datei oder Verzeichnis nicht gefunden
simpleSRFFoam.C:57:40: error: readSIMPLEControls.H: Datei oder Verzeichnis nicht gefunden
In file included from simpleSRFFoam.C:65:
pEqn.H:26:31: error: continuityErrs.H: Datei oder Verzeichnis nicht gefunden
In file included from simpleSRFFoam.C:46:
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:53: error: ‘runTime’ was not declared in this scope
simpleSRFFoam.C:55: error: ‘nl’ was not declared in this scope
...etc.
It's strange, because the files (e.g. fvCFD.H) are included in the file finiteVolume.
Does someone have any idea how can I figure it out?

Regards.
examosty is offline   Reply With Quote

Old   April 21, 2010, 14:05
Default
  #2
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 16
examosty is on a distinguished road
Could someone tell me which can be the problem? I've tried to solve it by myself, but I can not. Is it something about the compiler installed in my computer?
examosty is offline   Reply With Quote

Old   April 21, 2010, 14:15
Default
  #3
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
are you using wmake?

if you dont know what Im talking about you should consult the UserGuide documentation.
niklas is offline   Reply With Quote

Old   April 22, 2010, 04:19
Default
  #4
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 16
examosty is on a distinguished road
Hi niklas,
yes i'm using wmake.
if i just change the code of (for example) simpleFoam it works, but if i try to compile a new foam, no way. I hope you can help me more.
Best Regards!
examosty is offline   Reply With Quote

Old   April 22, 2010, 04:39
Default
  #5
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
You haven't included the include search paths in the Make/options file.

Code:
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude
niklas is offline   Reply With Quote

Old   April 22, 2010, 04:55
Default
  #6
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 16
examosty is on a distinguished road
Hello niklas,

But i do include that in the Make/option file:
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel

EXE_LIBS = \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools
The "fvCFD.H" is also included in the "simpleSRFFoam.C" file. I cannot understand why he doesn't find it.

Best Regards!
examosty is offline   Reply With Quote

Old   April 22, 2010, 10:51
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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 to all,

June, have you tried seeing if the file "fvCFD.H" does exist in the folder "$FOAM_SRC/finiteVolume/lnInclude"? Actually, it should be a symbolic link... For example, try:
Code:
ls -l $FOAM_SRC/finiteVolume/lnInclude/fvCFD.H
This command gives me something like this:
Code:
lrwxrwxrwx 1 xxx xxx 2010-01-18 16:58 /home/xxx/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/fvCFD.H -> ../cfdTools/general/include/fvCFD.H
If it doesn't give you something similar and instead gives you "No such file or directory", then that is what's wrong! You'll probably have to rebuild OpenFOAM again.

The other possibility is: how did you run wmake? Try this inside the folder where you have your solver:
Code:
wclean
wmake

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 23, 2010, 04:34
Default
  #8
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 16
examosty is on a distinguished road
Hi Bruno,
that's exactly what i can not understand. The fvCFD.H exist, but can not be fund. I've tried to rebuild OpenFOAM, it didn't help.
About the wmake i alway do it as you said. So I'm thinking maybe it's something wrong with my system or compiler. But I don't know how can I figure out. What will you say?
Best regards,
June
examosty is offline   Reply With Quote

Old   April 23, 2010, 18:25
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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 June,

OK, lets try the following possibilities:
  1. what gcc version are you using? Run the following command, so we can know what version it is:
    Code:
    gcc -v
  2. try to build the volField test utility (that also depends on fvCFD.H), by running the following commands:
    Code:
    cd $WM_PROJECT_DIR/applications/test/volField
    wmake
    If it doesn't output any errors, then it's one more reason simpleSRFFoam should build...
  3. after I tracked down other posts you've made in the past, I was able to identify that the installed openSUSE architecture is x86_64, and more importantly, something somewhat uncommon: you've installed OpenFOAM 1.6 in the folder "/usr/local/OpenFOAM/1.6/" instead of the usual "/home/username/OpenFOAM/OpenFOAM-1.6". This could be part of the reason you're getting some problems with building simpleSRFFoam. So the question is: did you build OpenFOAM with the user root, or did you build it with your normal user?
    If you've built OpenFOAM as root, and then try to build simpleSRFFoam as a normal user, you possibly can't access the famed fvCFD.H file.
    So, two possibilities arise:
    1. run this command as root:
      Code:
      chmod 777 -R /usr/local/OpenFOAM
      which will make the whole OpenFOAM fully accessible to your all openSUSE's users, and try again building simpleSRFFoam.
    2. or you could setup OpenFOAM in your home folder, just like most people do (I think... but I'm not certain of this)
  4. Additionally, where are you trying to build simpleSRFFoam? Is it in your own user folder, or in the folder "/usr/local/OpenFOAM/1.6/tutorials/incompressible/simpleSRFFoam"?

So, to sum up, the less information you provide on how you installed OpenFOAM, the less likely we'll be able to guess or reproduce the problem you are having right now! Of course too much information would also be counter productive

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 24, 2010, 05:47
Default
  #10
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi June,

Strange problem, I just gave it a try (with OpenFOAM-1.6.x on OpenSUSE 11.2) and no problem occurred. But then again, I have compiled 1.6.x (with Alberto Passalacqua's howTo). Maybe it's an idea to compile the whole lot?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   April 26, 2010, 11:18
Default
  #11
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 16
examosty is on a distinguished road
Greetings Bruno,

Thanks very much for you suggestion.

I did the things you`ve mentioned:

1. with the code "gcc -v" I got the version: gcc version 4.3.3. The whole message is:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-languages=c,c++ --with-pkgversion=OpenFOAM --enable-__cxa_atexit --enable-libstdcxx-allocator=new --with-system-zlib --prefix=/home/dm2/henry/OpenFOAM/ThirdParty/gcc-4.3.3/platforms/linux64 --with-mpfr=/home/dm2/henry/OpenFOAM/ThirdParty/mpfr-2.4.1/platforms/linux64 --with-gmp=/home/dm2/henry/OpenFOAM/ThirdParty/gmp-4.2.4/platforms/linux64
Thread model: posix
gcc version 4.3.3 (OpenFOAM)


2. SOURCE=volFieldTest.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/yang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/yang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/yang/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/volFieldTest.o
/home/yang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/fvMatrixSolve.C: In member function ‘Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve(const Foam::dictionary&) [with Type = Foam::SphericalTensor<double>]’:
/home/yang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/fvMatrixSolve.C:186: instantiated from ‘Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve() [with Type = Foam::SphericalTensor<double>]’
/home/yang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/fvMatrix.C:1288: instantiated from ‘Foam::lduMatrix::solverPerformance Foam::solve(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = Foam::SphericalTensor<double>]’
volFieldTest.C:95: instantiated from here
/home/yang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/fvMatrixSolve.C:88: error: no matching function for call to ‘Foam::SphericalTensor<int>::SphericalTensor(Foam: :SymmTensor<int>)’
/home/yang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude
/SphericalTensorI.H:63: note: candidates are: Foam::SphericalTensor<Cmpt>::SphericalTensor(Foam: :Istream&) [with Cmpt = int]
/home/yang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/SphericalTensorI.H:55: note: Foam::SphericalTensor<Cmpt>::SphericalTensor(const Cmpt&) [with Cmpt = int]
/home/yang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/SphericalTensorI.H:47: note: Foam::SphericalTensor<Cmpt>::SphericalTensor(const Foam::VectorSpace<Foam::SphericalTensor<Cmpt>, Cmpt, 1>&) [with Cmpt = int]
/home/yang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/SphericalTensorI.H:38: note: Foam::SphericalTensor<Cmpt>::SphericalTensor() [with Cmpt = int]
/home/yang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/SphericalTensor.H:56: note: Foam::SphericalTensor<int>::SphericalTensor(const Foam::SphericalTensor<int>&)
make: *** [Make/linux64GccDPOpt/volFieldTest.o] Fehler 1
one error exist.
What did this mean?


3. I've installed Openfoam in the local folder before, but I unstalled it. The OpenFoam I'm using now is installed in my home folder like most people do .

4. I always try to build the simpleSRFFoam in the turtorial folder, I think it should be right.

Best Regards,
June
examosty is offline   Reply With Quote

Old   April 26, 2010, 12:08
Default
  #12
New Member
 
June
Join Date: Dec 2009
Posts: 18
Rep Power: 16
examosty is on a distinguished road
Hi Gij,
Thank you very much for the information. Maybe I'll try it later.
examosty is offline   Reply With Quote

Old   April 26, 2010, 19:53
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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 June,

OK, as for the reply to each point on the list:
1. you're using gcc-4.3.3 - this is good, because this is a must for building OpenFOAM 1.6;

2. Sorry about that, I only checked in OpenFOAM 1.6.x. I've now checked in OpenFOAM 1.6 and it gave me the exact same response. These specific errors that it gives in 1.6 are already fixed in 1.6.x.
The good thing about this one is that it actually means that fvCFD.H was found! Which means that simpleSRFFoam should build!

3. OK, so far so good.

4. Actually, as a precautionary measure, you should have followed the User Guide's instructions (see --> here <--):
Code:
mkdir -p $FOAM_RUN 
cp -r $FOAM_TUTORIALS $FOAM_RUN
This way you always keep the original copy safe from being corrupted


Uhm... this is very odd. The only thing left that seems possibly logical to me is that due to some specific chain of events, the following things happened:
  1. you unpacked the files:
    Code:
    OpenFOAM-1.6.General.gtgz
    OpenFOAM-1.6.linux64GccDPOpt.gtgz
    ThirdParty-1.6.General.gtgz
    ThirdParty-1.6.linux64Gcc.gtgz
  2. sourced the bashrc file that comes with OpenFOAM-1.6/etc;
  3. then ran Allwmake in the folder OpenFOAM-1.6.
  4. errors occurred during the building process, but weren't visible nor did they catch your sight.
  5. although errors occurred, the libraries and applications remained untouched, because they already came from the "linux64*" packages.
Now, what this theory doesn't explain, is why volField doesn't point out that the fvCFD.H file is missing.

So, only two possibilities remain:
  1. the most likely one: the OpenFOAM environment isn't properly active when you try to build simpleSRFFoam. So, how do you "activate" the OpenFOAM environment?
  2. the strange... yet possible one: the unpacked OpenFOAM-1.6.General.gtgz file wasn't 100% properly unpacked; or didn't download properly. Both of these issues have been reported in the past (bad unpack or bad download).
And for now, I'm all out of ideas

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Error compiling OpenFoam 1.6.x with intel compiler icc mak_04 OpenFOAM Installation 5 October 28, 2011 08:06
error msg when compiling user fortran Ollimarc CFX 0 March 13, 2008 19:16
Dissimilarity in compiling new BC in 32bit OpenSuSE 103 versus 64bit CentOS 50 versus 64bit SLED 100 sponiar OpenFOAM Running, Solving & CFD 3 February 26, 2008 07:31
some problem about compiling Nektar ztdep Main CFD Forum 0 July 30, 2005 10:43
Discussing UDF and C++ Compiling Big Stone FLUENT 9 April 12, 2004 16:07


All times are GMT -4. The time now is 07:46.