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] installing funkySetFields (https://www.cfd-online.com/Forums/openfoam-community-contributions/62796-installing-funkysetfields.html)

prapanj March 20, 2009 01:40

installing funkySetFields
 
I downloaded the tar.gz file "funkySetFields.r7106". I extracted the file to $FOAM_APP/utilities/preProcessing/ . For clarity let me call the above path as $PREPROCESS.

$PREPROCESS/funkySetFields/ has a .C file, a Dict file, valueexpressiondriv.c, h etc.

I ran wmake in $PREROCESS/funkySetFields, and got the error "myflex no rule to make target. So I copied the mybison and myflex files to $PREPROCESS/funkySetFields from the Make folder.
I edited the options file. I modified the lines "include $(MAKE_DIR)/mybison" & "include $(MAKE_DIR)/myflex" to "include mybison" and "include myflex".

again ran wmake. This is the error I am getting:

SOURCE=ValueExpressionParser.yy ; rm Make/linuxGccDPOpt/ValueExpressionParser.C Make/linuxGccDPOpt/ValueExpressionParser.tab.hh; bison -ra -S lalr1.cc -v -d $SOURCE ; mv *.tab.cc Make/linuxGccDPOpt/ValueExpressionParser.C ; mv *.tab.hh Make/linuxGccDPOpt/ValueExpressionParser.tab.hh ; mv *.hh Make/linuxGccDPOpt ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -IlnInclude -I. -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c Make/linuxGccDPOpt/ValueExpressionParser.C -o Make/linuxGccDPOpt/ValueExpressionParser.o
ValueExpressionParser.tab.cc: In member function ‘virtual int ve::ValueExpressionParser::parse()’:
ValueExpressionParser.tab.cc:425: error: cannot convert ‘ve::ValueExpressionParser::semantic_type*’ to ‘YYSTYPE*’ for argument ‘1’ to ‘int velex(YYSTYPE*, yy::location*, ValueExpressionDriver&)’
ValueExpressionParser.tab.cc: In member function ‘unsigned char ve::ValueExpressionParser::yytranslate_(int)’:
ValueExpressionParser.tab.cc:1788: warning: use of old-style cast
ValueExpressionParser.yy: At global scope:
ValueExpressionParser.yy:263: error: expected unqualified-id before ‘&’ token
ValueExpressionParser.yy:263: error: expected ‘,’ or ‘...’ before ‘&’ token
ValueExpressionParser.yy:263: error: invalid use of incomplete type ‘struct yy::ValueExpressionParser’
./ValueExpressionDriver.H:16: error: forward declaration of ‘struct yy::ValueExpressionParser’
make: *** [Make/linuxGccDPOpt/ValueExpressionParser.o] Error 1
.

Could someone explain what might be going wrong? I would be very thankful, if possible could you direct me to some guide that talks about the whole process? I followed the userguide tutorial that talks about how to compile turbfoam. But the above case is far more complex for me to figure out. Thank you.

Prapanj

gschaider March 20, 2009 05:39

Quote:

Originally Posted by prapanj (Post 210083)
I downloaded the tar.gz file "funkySetFields.r7106". I extracted the file to $FOAM_APP/utilities/preProcessing/ . For clarity let me call the above path as $PREPROCESS.

At first: is there a reason why you're using a version that is in the section "Ancient history" (http://openfoamwiki.net/index.php/Contrib_funkySetFields#Ancient_history)?

Which version of OpenFOAM are you using? If it is 1.5 go to http://openfoam-extend.svn.sourcefor...ostProcessing/ and get the most recent version by clicking on "Download tarball". For 1.4.1 use http://openfoam-extend.svn.sourcefor...ostProcessing/. For older versions you're on your own. Sorry

Quote:

Originally Posted by prapanj (Post 210083)
$PREPROCESS/funkySetFields/ has a .C file, a Dict file, valueexpressiondriv.c, h etc.

I ran wmake in $PREROCESS/funkySetFields, and got the error "myflex no rule to make target. So I copied the mybison and myflex files to $PREPROCESS/funkySetFields from the Make folder.
I edited the options file. I modified the lines "include $(MAKE_DIR)/mybison" & "include $(MAKE_DIR)/myflex" to "include mybison" and "include myflex".

again ran wmake. This is the error I am getting:

SOURCE=ValueExpressionParser.yy ; rm Make/linuxGccDPOpt/ValueExpressionParser.C Make/linuxGccDPOpt/ValueExpressionParser.tab.hh; bison -ra -S lalr1.cc -v -d $SOURCE ; mv *.tab.cc Make/linuxGccDPOpt/ValueExpressionParser.C ; mv *.tab.hh Make/linuxGccDPOpt/ValueExpressionParser.tab.hh ; mv *.hh Make/linuxGccDPOpt ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -IlnInclude -I. -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rwdi/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c Make/linuxGccDPOpt/ValueExpressionParser.C -o Make/linuxGccDPOpt/ValueExpressionParser.o
ValueExpressionParser.tab.cc: In member function ‘virtual int ve::ValueExpressionParser::parse()’:
ValueExpressionParser.tab.cc:425: error: cannot convert ‘ve::ValueExpressionParser::semantic_type*’ to ‘YYSTYPE*’ for argument ‘1’ to ‘int velex(YYSTYPE*, yy::location*, ValueExpressionDriver&)’
ValueExpressionParser.tab.cc: In member function ‘unsigned char ve::ValueExpressionParser::yytranslate_(int)’:
ValueExpressionParser.tab.cc:1788: warning: use of old-style cast
ValueExpressionParser.yy: At global scope:
ValueExpressionParser.yy:263: error: expected unqualified-id before ‘&’ token
ValueExpressionParser.yy:263: error: expected ‘,’ or ‘...’ before ‘&’ token
ValueExpressionParser.yy:263: error: invalid use of incomplete type ‘struct yy::ValueExpressionParser’
./ValueExpressionDriver.H:16: error: forward declaration of ‘struct yy::ValueExpressionParser’
make: *** [Make/linuxGccDPOpt/ValueExpressionParser.o] Error 1
.

Could someone explain what might be going wrong? I would be very thankful, if possible could you direct me to some guide that talks about the whole process? I followed the userguide tutorial that talks about how to compile turbfoam. But the above case is far more complex for me to figure out. Thank you.

Prapanj

I think I remember that one. Newer versions of bison don't like the old grammar-specifications. This is fixed in the above mentioned version (not in the 1.4.1. There you'd best use the generated Files that come with it - see the README)

Bernhard

PS: I will update the Wiki with a link to the tarball-download

prapanj March 22, 2009 23:30

Thank you
 
Hi Bernard,

Thank you. I had looked at the wrong place for the download. I got the right now. It's up and running.

By the way, Great Tool.

thank you

Prapanj

ozie June 24, 2009 08:56

Hello everybody,

I downloaded funkySetField for the OpenFOAM 1.4.1 from the page
http://openfoamwiki.net/index.php/Co...funkySetFields in the directory /utilities/Preprocessing. Than I did wmake. But I had some errors as below;



SOURCE=ValueExpressionLexer.ll ; rm Make/linuxGccDPOpt/ValueExpressionLexer.C ; flex -f $SOURCE ; mv *.c Make/linuxGccDPOpt/ValueExpressionLexer.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/emre/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/emre/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -IlnInclude -I. -I/home/emre/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c Make/linuxGccDPOpt/ValueExpressionLexer.C -o Make/linuxGccDPOpt/ValueExpressionLexer.o
rm: ne peut enlever `Make/linuxGccDPOpt/ValueExpressionLexer.C': Aucun fichier ou répertoire de ce type
/bin/sh: flex: command not found
mv: ne peut évaluer `*.c': Aucun fichier ou répertoire de ce type
g++: Make/linuxGccDPOpt/ValueExpressionLexer.C: Aucun fichier ou répertoire de ce type
g++: no input files
make: *** [Make/linuxGccDPOpt/ValueExpressionLexer.o] Erreur 1


I am new to OpenFOAM, could you help me to resolve my problem?

thank you in advance for your cooperations

Oguz,

ozie June 25, 2009 08:07

Hello everybody,

I noticed why such an error occured as above. Because I didn`t take into account to call ./insertGenerated.sh. So I retried to compile funkysetfields..
But this time, I had the error below;

funkySetFields.C:43:26: error: timeSelector.H: Aucun fichier ou répertoire de ce type
funkySetFields.C: In function ‘int main(int, char**)’:
funkySetFields.C:193: error: ‘Foam::timeSelector’ has not been declared
funkySetFields.C:220: error: ‘Foam::timeSelector’ has not been declared
make: *** [Make/linuxGccDPOpt/funkySetFields.o] Erreur 1

So I checked funkySetFields.C. So I noticed that timeSelector.H is needed to run this program. Indeed, this file doesn`t exist among the funkySetFields files therby causing errors...

Does anyone could tell me how to find timeSelector.H, or maybe am I doing something wrong when compiling funkySetField?

oguz,

gschaider June 29, 2009 09:14

Quote:

Originally Posted by ozie (Post 220453)
Hello everybody,


funkySetFields.C:43:26: error: timeSelector.H: Aucun fichier ou répertoire de ce type

So I checked funkySetFields.C. So I noticed that timeSelector.H is needed to run this program. Indeed, this file doesn`t exist among the funkySetFields files therby causing errors...

timeSelector.H should be found in $FOAM_SRC/OpenFOAM/lnInclude in 1.5. You are using 1.5 aren't you?

yapalparvi July 31, 2009 10:25

Hi,

I downloaded the latest version of FunkySetFields.tar.gz for V 1.5 from the link provided. I extracted the file in /application/utilities/preProcessing. It created a direction FunkySetField..... I went into the directory and tried ./Allwmake . It saus permission denied..... . Any help would be appreciated.
Thanks

gschaider August 3, 2009 04:14

Quote:

Originally Posted by yapalparvi (Post 224865)
I downloaded the latest version of FunkySetFields.tar.gz for V 1.5 from the link provided. I extracted the file in /application/utilities/preProcessing. It created a direction FunkySetField..... I went into the directory and tried ./Allwmake . It saus permission denied..... . Any help would be appreciated.

Check with "ls -l" whether the executable bits are set for Allwmake (they should be). If not then set them with "chmod a+x Allwmake"

Ghash October 14, 2009 14:58

Hi

I use OpenFoam v1.6 and downloaded the right version of funkysetfields. I copied everything in the Preprocessing Folder like described above.
Now I tried to run Allwmake and I get a lot of Errors:

It starts with Errors of the type:
/home/Ghash/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../include/c++/4.3.3/x86_64-unknown-linux-gnu/bits/os_defines.h:44:22: error: features.h: Datei oder Verzeichnis nicht gefunden

then it goes on with this Error:

/home/Ghash/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude/cpuTime.H:43:23: error: sys/times.h: Datei oder Verzeichnis nicht gefunden

and then a lot of Errors like this one:

/home/Ghash/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../include/c++/4.3.3/cwchar:72: error: ‘::mbstate_t’ has not been declared

then this:

/home/Ghash/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../include/c++/4.3.3/x86_64-unknown-linux-gnu/bits/gthr-default.h:46: error: ‘pthread_key_t’ does not name a type

and so on.

All in all a lot of Errors, but I still have the hope, that there is just one reason :D

I'm new to OpenFoam and Linux, so sorry if this is a stupid question. And thank you for your help!!!


Ghash

gschaider October 16, 2009 05:41

Quote:

Originally Posted by Ghash (Post 232643)
Hi

I use OpenFoam v1.6 and downloaded the right version of funkysetfields. I copied everything in the Preprocessing Folder like described above.
Now I tried to run Allwmake and I get a lot of Errors:

It starts with Errors of the type:
/home/Ghash/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../include/c++/4.3.3/x86_64-unknown-linux-gnu/bits/os_defines.h:44:22: error: features.h: Datei oder Verzeichnis nicht gefunden

then it goes on with this Error:

/home/Ghash/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude/cpuTime.H:43:23: error: sys/times.h: Datei oder Verzeichnis nicht gefunden

and then a lot of Errors like this one:

/home/Ghash/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../include/c++/4.3.3/cwchar:72: error: ‘::mbstate_t’ has not been declared

then this:

/home/Ghash/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../include/c++/4.3.3/x86_64-unknown-linux-gnu/bits/gthr-default.h:46: error: ‘pthread_key_t’ does not name a type

and so on.

All in all a lot of Errors, but I still have the hope, that there is just one reason :D

I'm new to OpenFoam and Linux, so sorry if this is a stupid question. And thank you for your help!!!


Ghash

Did you compile anything on that machine before? I doubt it. The features.h is part of the glibc-headers-package on my distro. My tip would be to install the gcc from your OS-Vendor (although you use the OF-provided-gcc). This usually pulls in al the necessary dependencies

Bernhard

Ghash October 19, 2009 04:30

This helped, now it works! Thank you for your help.

Greetings
Ghash

moh1367 January 29, 2010 01:42

Sorry!
Is there a version of FunkySetfields for 1.6. version. If yes please get me the link?
Thanks a lot

gschaider January 29, 2010 06:00

Quote:

Originally Posted by moh1367 (Post 244168)
Sorry!
Is there a version of FunkySetfields for 1.6. version. If yes please get me the link?
Thanks a lot

Have a look at
http://openfoamwiki.net/index.php/Co...funkySetFields
the SVN-link works out of the box. For the tarball-link just substitute 1.5 with 1.6

Bernhard

moh1367 January 30, 2010 11:59

FunkySetFields Installation
 
Thanks, but what should I do with these numerous files?
I taught I should have a .tar file!

gschaider January 30, 2010 19:10

Quote:

Originally Posted by moh1367 (Post 244300)
Thanks, but what should I do with these numerous files?

Compile them? No. Seriously. Which files are you talking about? In any case (getting via svn or Downloading the tarball and untarring) you get the same directory structure and it should be compiled like a regular utility
Quote:

Originally Posted by moh1367 (Post 244300)
I taught I should have a .tar file!

And you can get one. See http://openfoamwiki.net/index.php/Co...ields#Download (just before section 7.1)

moh1367 January 31, 2010 00:25

Thanks!
I got it , it works!

rudy February 17, 2010 12:09

Hi
I use OpenFoam v1.6 and am trying to cpmpile a new utility FunkySetFields. I copied everything in the Preprocessing Folder like described above.
Now I tried to run wmake from applications/utilties/preProcessing/funkySetField and got following error.

Making dependency list for source file ValueExpressionParser.yy
could not open file ValueExpressionParser.tab.hh for source file ValueExpressionParser.yy
Making dependency list for source file ValueExpressionLexer.ll
could not open file ValueExpressionParser.tab.hh for source file ValueExpressionLexer.ll
Making dependency list for source file ValueExpressionDriver.C
could not open file ValueExpressionParser.tab.hh for source file ValueExpressionDriver.C
Making dependency list for source file funkySetFields.C
could not open file ValueExpressionParser.tab.hh for source file funkySetFields.C
SOURCE=ValueExpressionParser.yy ; rm -f Make/linuxGccDPOpt/ValueExpressionParser.C Make/linuxGccDPOpt/ValueExpressionParser.tab.hh; bison -ra -v -d $SOURCE ; mv *.tab.cc Make/linuxGccDPOpt/ValueExpressionParser.C ; mv *.tab.hh Make/linuxGccDPOpt/ValueExpressionParser.tab.hh ; mv *.hh Make/linuxGccDPOpt ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linuxGccDPOpt/ValueExpressionParser.C -o Make/linuxGccDPOpt/ValueExpressionParser.o
In file included from Make/linuxGccDPOpt/location.hh:44,
from ValueExpressionParser.tab.hh:65,
from ValueExpressionParser.tab.cc:68:
position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around && within ||
ValueExpressionParser.tab.cc: In member function ‘unsigned char ve::ValueExpressionParser::yytranslate_(int)’:
ValueExpressionParser.tab.cc:3207: warning: use of old-style cast
SOURCE=ValueExpressionLexer.ll ; rm Make/linuxGccDPOpt/ValueExpressionLexer.C ; flex -f $SOURCE ; mv *.c Make/linuxGccDPOpt/ValueExpressionLexer.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/rahul/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linuxGccDPOpt/ValueExpressionLexer.C -o Make/linuxGccDPOpt/ValueExpressionLexer.o
rm: cannot remove `Make/linuxGccDPOpt/ValueExpressionLexer.C': No such file or directory
/bin/sh: flex: not found
mv: cannot stat `*.c': No such file or directory
g++: Make/linuxGccDPOpt/ValueExpressionLexer.C: No such file or directory
g++: no input files
make: *** [Make/linuxGccDPOpt/ValueExpressionLexer.o] Error 1

can anyone please tell me what i m doing wrong...what i can make out is may be i downloaded an older version(for 1.5) and that may be the source of error but i m not sure...Any suggestions are appreciated...
thanks,
rudy...

gschaider February 17, 2010 13:12

Quote:

Originally Posted by rudy (Post 246329)
Hi
I use OpenFoam v1.6 and am trying to cpmpile a new utility FunkySetFields. I copied everything in the Preprocessing Folder like described above.
Now I tried to run wmake from applications/utilties/preProcessing/funkySetField and got following error.

Make/linuxGccDPOpt/ValueExpressionLexer.o
<snip>
rm: cannot remove `Make/linuxGccDPOpt/ValueExpressionLexer.C': No such file or directory
/bin/sh: flex: not found
mv: cannot stat `*.c': No such file or directory
g++: Make/linuxGccDPOpt/ValueExpressionLexer.C: No such file or directory
g++: no input files
make: *** [Make/linuxGccDPOpt/ValueExpressionLexer.o] Error 1

can anyone please tell me what i m doing wrong...what i can make out is may be i downloaded an older version(for 1.5) and that may be the source of error but i m not sure...Any suggestions are appreciated...
thanks,
rudy...

First thing I noticed is the missing flex-command. Install that too on your system (bison&flex usually come in pairs. They're the Starsky&Hutch of computer science)

Bernhard

Disco_Caine March 9, 2010 08:21

Hi, ive just downloaded funkysetfields and i need to get it running ASAP.

At first i had the funkysetfields folder in a folder called openFOAMwiki outside of the OpenFOAM-1.6.x folder, after reading the posts here i put it in the preprocessing folder.

Now i go step inside the funkySetFields folder and try this:

./insertGenerated.sh

But it says permission denied.

i tried just compiling with wmake and i get the error that the fellow above gets.

I am really new to this and very lost, so if anyone can help, please
make it very simple and clear. I am total linux-newb, perhaps even
less than a newb.

P.S: i do have another comment about installing openfoam on ubuntu,
this is on another computer.

thanks in advance!

Disco_Caine March 9, 2010 14:01

I have fixed my own problem, perhaps this is way too obvious for the almighty linux users, but i shall post it anyways, just in case another new guy runs into the same problem.

1) open up your terminal and make sure you are in the funkySetFields folder, (where the insertGenerated.sh is) and type this:

chmod +x insertGenerated.sh

2) then type:

./insertGenerated.sh

3) then, wmake.

And you are done with funkySetFields


P.S: sorry about the different fonts!


All times are GMT -4. The time now is 22:43.