CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] Error installing swak4Foam (https://www.cfd-online.com/Forums/openfoam-community-contributions/113239-error-installing-swak4foam.html)

macelee December 3, 2013 08:14

error building swak4foam
 
I am building swak4foam on a cluster with OpenFOAM 2.2.0. Here is my steps:

- I load my OpenFOAM environement first, then go to $WM_PROJECT_USER_DIR directory
- I donwload https://github.com/wyldckat/swak4foa...ive/master.zip and unpack it
- I loaded Flex and Bison modules
- cd swak4foam-master/; ./Allwmake 2>&1 > make.log

My 'make.log' is attached. It contains errors like:
Code:

could not open file polyMesh.H for source file repositories/SurfacesRepository.C
then
Code:

SOURCE=repositories/SurfacesRepository.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -w
d327,654,819,1125,1476,1505,1572 -xSSE3 -O2 -no-prec-div  -DNoRepository -IMake/
linux64IccDPOpt      -I/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/Op
enFOAM-2.2.0/src/finiteVolume/lnInclude -I/app/materials/openfoam/2.2.0/intel-11
.1/intel-4.0/OpenFOAM-2.2.0/src/sampling/lnInclude -I/app/materials/openfoam/2.2
.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/fileFormats/lnInclude -I/app/material
s/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/triSurface/lnInclude -I
/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/surfMesh/l
nInclude -I/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src
/lagrangian/basic/lnInclude -I/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0
/OpenFOAM-2.2.0/src/meshTools/lnInclude -IlnInclude -I. -I/app/materials/openfoa
m/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/app/materi
als/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnIn
clude  -fPIC -c $SOURCE -o Make/linux64IccDPOpt/SurfacesRepository.o
/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/finiteVolu
me/lnInclude/fvMesh.H(50): catastrophic error: could not open source file "polyM
esh.H"
  #include "polyMesh.H"
                      ^

compilation aborted for repositories/SurfacesRepository.C (code 4)
make: *** [Make/linux64IccDPOpt/SurfacesRepository.o] Error 4
Parser library did not compile OK. No sense continuing as everything else depend
s on it
Requirements for Library not satisfied. I see no sense in going on

I can verify that the missing files are actually on my system under $FOAM_SRC/OpenFOAM/lnInclude/

Can anyone help please?

gschaider December 3, 2013 09:25

Quote:

Originally Posted by fg118 (Post 464572)
Dear Bernhard,

Thank you very much for you reply.
I will try to download the development version and compile it later.

For the second question, once I remove the whitespaces in the expression-string, the different error appeared (see below).

That is interesting. Space shouldn't matter. My guess is that the string held a character that looks like a space but is not a real space. Or some control character. Can you post the file that reproduces this here (zip it for uploading. That way no well-meaning program can remove the offender) or even better at the OpenFOAM-extend-Mantis

Quote:

Originally Posted by fg118 (Post 464572)
Create mesh for time = 0

Time = 0
Using funkySetFieldsDict

Part: setLower
Modifying field alpha1 of type volScalarField

Putting "average(fpos().y<surf(0.)?surf(1.0):surf(0.)) " into field alpha1 at t = "0" if condition "true" is true
Keeping patches unaltered

--> FOAM FATAL ERROR:
inconsistent types: alpha1 is volScalarField while the expression evaluates to a surfaceScalarField

From function doAnExpression()
in file funkySetFields.C at line 359.

FOAM exiting

You create a surfaceScalarField. Then you take the average of it (the average of ALL the faces) which yields a homogenous field that is also a surface-field. Have a look at the reference-guide that comes with swak: you probably wanted the faceAverage-function

gschaider December 3, 2013 09:29

Quote:

Originally Posted by macelee (Post 464585)
I am building swak4foam on a cluster with OpenFOAM 2.2.0. Here is my steps:

- I load my OpenFOAM environement first, then go to $WM_PROJECT_USER_DIR directory
- I donwload https://github.com/wyldckat/swak4foa...ive/master.zip and unpack it
- I loaded Flex and Bison modules
- cd swak4foam-master/; ./Allwmake 2>&1 > make.log

My 'make.log' is attached. It contains errors like:
Code:

could not open file polyMesh.H for source file repositories/SurfacesRepository.C
then
Code:

SOURCE=repositories/SurfacesRepository.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -w
d327,654,819,1125,1476,1505,1572 -xSSE3 -O2 -no-prec-div  -DNoRepository -IMake/
linux64IccDPOpt      -I/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/Op
enFOAM-2.2.0/src/finiteVolume/lnInclude -I/app/materials/openfoam/2.2.0/intel-11
.1/intel-4.0/OpenFOAM-2.2.0/src/sampling/lnInclude -I/app/materials/openfoam/2.2
.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/fileFormats/lnInclude -I/app/material
s/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/triSurface/lnInclude -I
/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/surfMesh/l
nInclude -I/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src
/lagrangian/basic/lnInclude -I/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0
/OpenFOAM-2.2.0/src/meshTools/lnInclude -IlnInclude -I. -I/app/materials/openfoa
m/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/app/materi
als/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnIn
clude  -fPIC -c $SOURCE -o Make/linux64IccDPOpt/SurfacesRepository.o
/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/finiteVolu
me/lnInclude/fvMesh.H(50): catastrophic error: could not open source file "polyM
esh.H"
  #include "polyMesh.H"
                      ^

compilation aborted for repositories/SurfacesRepository.C (code 4)
make: *** [Make/linux64IccDPOpt/SurfacesRepository.o] Error 4
Parser library did not compile OK. No sense continuing as everything else depend
s on it
Requirements for Library not satisfied. I see no sense in going on

I can verify that the missing files are actually on my system under $FOAM_SRC/OpenFOAM/lnInclude/

Can anyone help please?

And $FOAM_SRC/OpenFOAM/lnInclude is the same directory your compiler-call is using (-I/app/materials/openfoa
m/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude)?

No idea (and I don't have an Intel-compiler to test it)

macelee December 3, 2013 10:17

Quote:

Originally Posted by gschaider (Post 464601)
And $FOAM_SRC/OpenFOAM/lnInclude is the same directory your compiler-call is using (-I/app/materials/openfoa
m/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude)?

No idea (and I don't have an Intel-compiler to test it)

Yes I think they are the same.

Code:

echo $FOAM_SRC
/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src

Really confused.

gschaider December 3, 2013 14:40

Quote:

Originally Posted by macelee (Post 464608)
Yes I think they are the same.

Code:

echo $FOAM_SRC
/app/materials/openfoam/2.2.0/intel-11.1/intel-4.0/OpenFOAM-2.2.0/src

Really confused.

"I think" is not good enough. Copy path from the compiler output/command-line and do stuff like
Code:

ls blalaPath/polyMesh.H
to check whether the file is REALLY where it is expected

Some people have compiled swak with the Intel-compiler. So it should be feasible. Maybe one of them can assist you

macelee December 3, 2013 15:14

Quote:

Originally Posted by gschaider (Post 464643)
"I think" is not good enough. Copy path from the compiler output/command-line and do stuff like
Code:

ls blalaPath/polyMesh.H
to check whether the file is REALLY where it is expected

Some people have compiled swak with the Intel-compiler. So it should be feasible. Maybe one of them can assist you

Dear gschaider,

Thanks for your advice. I checked those files again. While the path is indeed correct, I found that the files in $FOAM_SRC/src/OpenFOAM/lnInclude/ are actually symbolic links pointing to files elsewhere. I then found that some of those files have incorrect permissions so that they cannot be read by a normal user on the system. So basically my OpenFOAM installation is somewhat broken. I will ask the system people to correct those file permissions first. I will report back the outcome later.

macelee December 4, 2013 10:10

After fixing the file permission problem, my compiling can go a bit longer, until it stopped with another error, related to the Intel compiler, as discussed in this thread (http://www.cfd-online.com/Forums/ope...ion-2-0-a.html). I am not exactly clear after reading that thread: is the problem completely fixed by using a new version of Intel compiler? I am using an old cluster with OpenFOAM built with intel compiler version 11.x. But new versions 12.x and 13.x are also available.

immortality December 4, 2013 10:50

Hello dear Bernhard,
sorry for propound this here,
but could you introduce me for some line about historty of groovyBC and the creator( I mean you!) I need these information for my thesis.I sent an email to you too
before.thanks.

gschaider December 4, 2013 11:27

Quote:

Originally Posted by macelee (Post 464814)
After fixing the file permission problem, my compiling can go a bit longer, until it stopped with another error, related to the Intel compiler, as discussed in this thread (http://www.cfd-online.com/Forums/ope...ion-2-0-a.html). I am not exactly clear after reading that thread: is the problem completely fixed by using a new version of Intel compiler? I am using an old cluster with OpenFOAM built with intel compiler version 11.x. But new versions 12.x and 13.x are also available.

Don't know

a) I don't have an Intel-compiler
b) didn't want to read through all 50 Postings in the thread to find out which one you meant. Hint: for linking to a specific posting use the #23 link that every posting has

macelee December 4, 2013 15:26

Quote:

Originally Posted by gschaider (Post 464830)
Don't know

a) I don't have an Intel-compiler
b) didn't want to read through all 50 Postings in the thread to find out which one you meant. Hint: for linking to a specific posting use the #23 link that every posting has

Sorry about that, I did not notice the permlinks associated with individual posts. I was referring to this post (http://www.cfd-online.com/Forums/ope...tml#post342207) which was posted several months after the initial post in that thread. It seems to imply that a newer version of Intel compiler does not suffer from the problem.

weezer579 December 4, 2013 16:38

Error in installation
 
Hi Bernhard,

Thank you very much for your help in this post. I am trying to compile swak4foam but running into a little problem of one of the files in Gcc46 folder not found. I did check the source and the file was there, so I am really not sure what went wrong. Attached below is the log of my compilation. Could you please take a look? Thank you very much for your help.

Quote:

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
Bison is version 2.7.12-4996
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 2 Minor 2 Patch 0 (-1 == x)
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=helpers/printSwakVersion.C ; g++ -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64GccDPOpt -I/Users/Ninja/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/Users/Ninja/OpenFOAM/OpenFOAM-2.2.0/src/sampling/lnInclude -I/Users/Ninja/OpenFOAM/OpenFOAM-2.2.0/src/fileFormats/lnInclude -I/Users/Ninja/OpenFOAM/OpenFOAM-2.2.0/src/triSurface/lnInclude -I/Users/Ninja/OpenFOAM/OpenFOAM-2.2.0/src/surfMesh/lnInclude -I/Users/Ninja/OpenFOAM/OpenFOAM-2.2.0/src/lagrangian/basic/lnInclude -I/Users/Ninja/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -IlnInclude -I. -I/Users/Unimax/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/Users/Unimax/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/printSwakVersion.o
In file included from /opt/local/lib/gcc46/gcc/x86_64-apple-darwin12/4.6.4/include-fixed/syslimits.h:7:0,
from /opt/local/lib/gcc46/gcc/x86_64-apple-darwin12/4.6.4/include-fixed/limits.h:34,
from /opt/local/include/gcc46/c++/climits:43,
from /Users/Unimax/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/label.H:38,
from /Users/Unimax/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/labelList.H:47,
from /Users/Unimax/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/UPstream.H:43,
from /Users/Unimax/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/Pstream.H:42,
from helpers/printSwakVersion.H:43,
from helpers/printSwakVersion.C:43:
/opt/local/lib/gcc46/gcc/x86_64-apple-darwin12/4.6.4/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.
make: *** [Make/darwinIntel64GccDPOpt/printSwakVersion.o] Error 1
Parser library did not compile OK. No sense continuing as everything else depends on it
Requirements for Library not satisfied. I see no sense in going on

gschaider December 4, 2013 17:56

Quote:

Originally Posted by macelee (Post 464870)
Sorry about that, I did not notice the permlinks associated with individual posts. I was referring to this post (http://www.cfd-online.com/Forums/ope...tml#post342207) which was posted several months after the initial post in that thread. It seems to imply that a newer version of Intel compiler does not suffer from the problem.

I can't exactly say. It seems at THAT time THAT version of swak compiled with THAT Intel-compiler. Of course new stuff was added to swak and it is possible that the new sources reintroduced the problem (would be helpful to know which sources cause problems for you)

gschaider December 4, 2013 18:17

Quote:

Originally Posted by immortality (Post 464825)
Hello dear Bernhard,
sorry for propound this here,
but could you introduce me for some line about historty of groovyBC and the creator( I mean you!) I need these information for my thesis.I sent an email to you too
before.thanks.

I've always got to look myself for "when did groovyBC start" etc. Best guess is to look at the History-tab of http://openfoamwiki.net/index.php/Contrib/groovyBC

There are no proper papers on it (I'm not in academia so I don't have to write a paper on EVERYTHING I do). People in the past when referencing it either referred to the Wiki-page (this is the 21st century. URLs can be used as references. They might change, I'm aware of that) or one of the presentations listed on the swak-page.

Reason why I wrote groovyBC was that before that I had written a utility to set a parabolic inlet condition. People were asking questions on that ("How do I use it for a different orientation") and I figured "with that thing people don't have to write C++ so they'll ask less questions". Turned out that I was wrong … (that is the interesting part on the history of groovyBC as far as I'm concerned)

gschaider December 4, 2013 18:24

Quote:

Originally Posted by weezer579 (Post 464883)
Hi Bernhard,

Thank you very much for your help in this post. I am trying to compile swak4foam but running into a little problem of one of the files in Gcc46 folder not found. I did check the source and the file was there, so I am really not sure what went wrong. Attached below is the log of my compilation. Could you please take a look? Thank you very much for your help.

Don't know. For me it is there and works.

Are you one of these people who already updated to Mavericks (which I believe is darwin13). MacPorts recommends reinstalling the whole MacPorts-tree after a OS-Upgrade like this (my theory: you installed gcc46 on 10.8, upgraded to 10.9 now gcc46 doesn't know where to find stuff). Even if I'm wrong: try uninstalling gcc46 and reinstalling it

fg118 December 5, 2013 04:17

Quote:

Originally Posted by gschaider (Post 464600)
That is interesting. Space shouldn't matter. My guess is that the string held a character that looks like a space but is not a real space. Or some control character. Can you post the file that reproduces this here (zip it for uploading. That way no well-meaning program can remove the offender) or even better at the OpenFOAM-extend-Mantis



You create a surfaceScalarField. Then you take the average of it (the average of ALL the faces) which yields a homogenous field that is also a surface-field. Have a look at the reference-guide that comes with swak: you probably wanted the faceAverage-function

Thank you very much for your help! I do need faceAverage function. Once I change to it, the program run smoothly.

By the way, after I installed the development version of swak4Foam, the space problem disappeared.

gschaider December 5, 2013 05:24

Quote:

Originally Posted by fg118 (Post 464944)
Thank you very much for your help! I do need faceAverage function. Once I change to it, the program run smoothly.

By the way, after I installed the development version of swak4Foam, the space problem disappeared.

Sorry for the naming conflict. But
a) there is documentation
b) more people need the "other" average. So I decided to name this function differently than the OF-convention

About the space: strange. Don't remember fixing that

immortality December 5, 2013 10:16

Quote:

Originally Posted by gschaider (Post 464892)

Reason why I wrote groovyBC was that before that I had written a utility to set a parabolic inlet condition. People were asking questions on that ("How do I use it for a different orientation") and I figured "with that thing people don't have to write C++ so they'll ask less questions". Turned out that I was wrong … (that is the interesting part on the history of groovyBC as far as I'm concerned)

thank you a lot.I added the interesting start to my thesis:). you certainly have helped many people to get their degrees so far like me :D thank you a lot :)

weezer579 December 6, 2013 21:16

Hi Bernhard,

The problem was exactly what you pointed out. I've reinstalled everything and it can compile smoothly now. Thank you very much for your help.

gschaider December 7, 2013 06:30

Quote:

Originally Posted by weezer579 (Post 465196)
Hi Bernhard,

The problem was exactly what you pointed out. I've reinstalled everything and it can compile smoothly now. Thank you very much for your help.

OK. That is valuable information for me: wait with the Mavericks-update until I have a couple of days where it doesn't matter that MacPorts rebuilds itself

wyldckat December 8, 2013 09:05

Greetings to all!

Quote:

Originally Posted by macelee (Post 464585)
I am building swak4foam on a cluster with OpenFOAM 2.2.0. Here is my steps:

- I load my OpenFOAM environement first, then go to $WM_PROJECT_USER_DIR directory
- I donwload https://github.com/wyldckat/swak4foa...ive/master.zip and unpack it

I guess I'm too late for the party.
But I'd like to point out an important detail - @macelee: you should have downloaded from the OF22X branch, not the master branch, as explained here: http://www.cfd-online.com/Forums/ope...tml#post434217 post #8

Best regards,
Bruno


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