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] I have warning in use swak4Foam (https://www.cfd-online.com/Forums/openfoam-community-contributions/125121-i-have-warning-use-swak4foam.html)

gschaider October 25, 2013 02:59

Quote:

Originally Posted by seju (Post 458859)
my libraries are:
PHP Code:

sajad@sajad-K55VD:~$ ls $FOAM_USER_LIBBIN
libgroovyBC
.so
libgroovyStandardBCs
.so
libsimpleLagrangianFunctionObjects
.so
libsimpleSearchableSurfaces
.so
libswak4FoamParsers
.so
libswakChemistryModelFunctionPlugin
.so
libswakFvcSchemesFunctionPlugin
.so
libswakLagrangianCloudSourcesFunctionPlugin
.so
libswakLocalCalculationsFunctionPlugin
.so
libswakMeshQualityFunctionPlugin
.so
libswakRadiationModelFunctionPlugin
.so
libswakRandomFunctionPlugin
.so
libswakSourceFields
.so
libswakSurfacesAndSetsFunctionPlugin
.so
libswakThermoTurbFunctionPlugin
.so
libswakTopoSources
.so
libswakTransportTurbFunctionPlugin
.so
libswakVelocityFunctionPlugin
.so 

how can I add libraries in swak and complite swak??
I have to add these libraries to swak because I so need these libraries.

OK. simpleFunctionObjects and libraries based on this are missing. Probably there was a problem during compilation. Probably about a method that was recently added to the functionObject-class.
Have a look at the error message: there is already a fix on the MessageBoard

seju October 26, 2013 03:54

now,I must recompiling this swak or cleaning this swak and compile other swak?
whats a complete swak address in net which I download and compile it.???
my openFoam is 2.2.1 and my swak is 0.2.4

wyldckat October 26, 2013 06:04

Greetings to all!

@seju:
Quote:

Originally Posted by seju (Post 459066)
now,I must recompiling this swak or cleaning this swak and compile other swak?
whats a complete swak address in net which I download and compile it.???
my openFoam is 2.2.1 and my swak is 0.2.4

If my memory doesn't fail me, it's written on this post: http://www.cfd-online.com/Forums/ope...tml#post434217 - post #8

If this doesn't work, please provide more details on the steps you are taking, as well as how exactly you installed OpenFOAM on your machine.
In addition, if you also have OpenFOAM 1.6-ext, please detail how you switch between the two versions.

Best regards,
Bruno

seju October 26, 2013 07:52

Quote:

Originally Posted by wyldckat (Post 459095)
Greetings to all!

@seju:

If my memory doesn't fail me, it's written on this post: http://www.cfd-online.com/Forums/ope...tml#post434217 - post #8

If this doesn't work, please provide more details on the steps you are taking, as well as how exactly you installed OpenFOAM on your machine.
In addition, if you also have OpenFOAM 1.6-ext, please detail how you switch between the two versions.

Best regards,
Bruno

I downloaded swak this link
PHP Code:

https://github.com/wyldckat/swak4foam/tree/OF22X 

but this swak dont have some libraries.I install openFoam 2.2.1 on ubuntu 13.04.
I have ubuntu and windows 7 abreast.I dont install openfoam in virtualbox.I install ubuntu absolute.
I fialed in compile openFoam 1.6 ext and I just have openFoam 2.2.1.
I installed openFoam 2.2.1 From this link
PHP Code:

http://www.openfoam.org/archive/2.2.1/download/ 


wyldckat October 26, 2013 08:51

Hi seju,

Many thanks the information! I've tested the following steps on a VM with Ubuntu 13.04 (64bit) and with the same OpenFOAM 2.2.1 installation and they should work as intended:
  1. I downloaded and unpacked like this:
    Code:

    cd ~
    mkdir OpenFOAM
    cd OpenFOAM
    wget https://github.com/wyldckat/swak4foam/archive/OF22X.zip
    unzip OF22X.zip
    cd swak4foam-OF22X/

  2. Then ran this command, just in case some other version is contaminating the shell environment:
    Code:

    wmUNSET
  3. Then prepared the shell environment:
    Code:

    source /opt/openfoam221/etc/bashrc
    export WM_NCOMPPROCS=4

    Change the 4 to the number of cores your machine has got. If you don't know, change it to 1.
  4. Build swak4Foam:
    Code:

    ./Allwmake > make.log 2>&1
  5. Run the command a second time:
    Code:

    ./Allwmake > make.log 2>&1
  6. Now open the file "make.log" and check its contents. For example, run:
    Code:

    cat make.log
    It should show you something like this:
    Code:

    No 'swakConfiguration'. Python etc won't work
    Checking swak4Foam-version and generating file
    Swak version is 0.2.4
    Bison is version 2.5
    Flex is version 2.5.35 (Minor version: 35)
    OpenFOAM-version: Major 2 Minor 2 Patch 1 (-1 == x)
    No change to swak4FoamParsers/foamVersion4swak.H
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libsimpleFunctionObjects.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libsimpleLagrangianFunctionObjects.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libsimpleSearchableSurfaces.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakTopoSources.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakSourceFields.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libgroovyStandardBCs.so' is up to date.
    SWAK_PYTHON_INCLUDE not defined .... no Python-Integration
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakMeshQualityFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakLocalCalculationsFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakRandomFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakFvcSchemesFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakThermoTurbFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakTransportTurbFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakSurfacesAndSetsFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakLagrangianCloudSourcesFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakVelocityFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakChemistryModelFunctionPlugin.so' is up to date.
    '/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/lib/libswakRadiationModelFunctionPlugin.so' is up to date.
    make[1]: `/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/bin/funkyDoCalc' is up to date.
    make[1]: `/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/bin/funkySetBoundaryField' is up to date.
    make[1]: `/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/bin/calcNonUniformOffsetsForMapped' is up to date.
    make[1]: `/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/bin/funkySetFields' is up to date.
    make[1]: `/home/user/OpenFOAM/user-2.2.1/platforms/linux64GccDPOpt/bin/replayTransientBC' is up to date.


    If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/user/OpenFOAM/swak4foam-OF22X/Libraries (most people will be fine without setting that variable)



Best regards,
Bruno

seju October 27, 2013 02:45

dear Bruno and Mr.Gschaider my problem solved.thank you so much.
but I have another problem in:
HTML Code:

http://www.cfd-online.com/Forums/openfoam-meshing/125508-problem-axisymmetric-mesh.html#post459204

Seif Kefi January 2, 2014 06:50

Problems building swak4Foam
 
Hi everyone,

First of all, happy new year!
I am a new Foamer. And, this is my first post.
I am using ubuntu 13.10 and have installed openFoam 2.2.2. What I want to do is to modify the wind velocity profile in the turbineSiting tutorial. So, I decided to download swak4Foam in order to use groovyBC. But, when I use it, it seems that it was not built in the right way. I even used these two patches:
1. http://www.cfd-online.com/Forums/ope...tml#post415028)
2. http://www.cfd-online.com/Forums/ope...tml#post434217

Here is the error messages I get:

Code:

seif@seif-ThinkStation-E31:~/OpenFOAM/seif-2.2.2/run/tutorials/incompressible/simpleFoam/turbineSiting$ foamCalc mag U
Selecting calcType mag
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.2                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.2.2-9240f8b967db
Exec  : foamCalc mag U
Date  : Jan 02 2014
Time  : 19:25:49
Host  : "seif-ThinkStation-E31"
PID    : 6486
Case  : /home/seif/OpenFOAM/seif-2.2.2/run/tutorials/incompressible/simpleFoam/turbineSiting
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning :
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : libsimpleSwakFunctionObjects.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libsimpleSwakFunctionObjects.so"
--> FOAM Warning :
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : libswakFunctionObjects.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libswakFunctionObjects.so"
--> FOAM Warning :
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : libgroovyBC.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libgroovyBC.so"
Create mesh for time = 0

Time = 0
    No U

End

Cheers,
Seif

wyldckat January 2, 2014 08:43

Greetings Seif and welcome to the forum!

Try these steps:
  1. Install the necessary development system packages, since you are using Ubuntu:
    Code:

    sudo apt-get install build-essential flex bison zlib1g-dev
  2. Then try following the instructions from the post above, namely post #25
Best regards,
Bruno

Seif Kefi January 2, 2014 20:54

Hi Bruno,

Thank you for your relpy. But, following these steps, here is the error messages I get:
Code:

../FieldValueExpressionParser.yy:5499:13: note: in expansion of macro ‘sameSize’
lnInclude/swakChecks.H:63:92: error: ‘yylloc’ was not declared in this scope
 #define sameSize(a,b) {Foam::string err=Foam::swakAssertSameSize(a,b); if(err!="") { error(yylloc,err); YYERROR; }}
                                                                                            ^
../FieldValueExpressionParser.yy:5507:13: note: in expansion of macro ‘sameSize’
lnInclude/swakChecks.H:63:92: error: ‘yylloc’ was not declared in this scope
 #define sameSize(a,b) {Foam::string err=Foam::swakAssertSameSize(a,b); if(err!="") { error(yylloc,err); YYERROR; }}
                                                                                            ^
../FieldValueExpressionParser.yy:5514:13: note: in expansion of macro ‘sameSize’
make: *** [Make/linux64GccDPOpt/FieldValueExpressionParser.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

Best regards,
Seif

wyldckat January 4, 2014 19:10

Hi Seif,

What does the file "make.log" have in its first 10 lines?

Best regards,
Bruno

Seif Kefi January 7, 2014 00:59

Hi Bruno,

First of all, sorry for my late reply. Here are the first 10 lines of the log file:

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
Swak version is 0.2.4
Bison is version 3.0
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 2 Patch 2 (-1 == x)
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=FieldValueExpressionParser.yy ; rm -f Make/linux64GccDPOpt/FieldValueExpressionParser.C Make/linux64GccDPOpt/FieldValueExpressionParser.tab.hh; mkdir $$; cd $$; bison -ra -v -d ..

Best regards,
Seif

gschaider January 7, 2014 18:24

Quote:

Originally Posted by Seif Kefi (Post 468909)
Hi Bruno,

First of all, sorry for my late reply. Here are the first 10 lines of the log file:

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
Swak version is 0.2.4
Bison is version 3.0
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 2 Patch 2 (-1 == x)
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=FieldValueExpressionParser.yy ; rm -f Make/linux64GccDPOpt/FieldValueExpressionParser.C Make/linux64GccDPOpt/FieldValueExpressionParser.tab.hh; mkdir $$; cd $$; bison -ra -v -d ..

Best regards,
Seif

"Danger, Will Robinson, Danger". Bison 3.0 seems to be incompatible with 2.x (which swak currently supports). Use the latest 2.x-version instead.

May I ask: which Distro installs Bison 3 by default? Or did you install it yourself from the sources?

wyldckat January 10, 2014 14:14

Greetings to all!

@Bernhard:
Quote:

Originally Posted by gschaider (Post 469060)
May I ask: which Distro installs Bison 3 by default? Or did you install it yourself from the sources?

Seif mentioned Ubuntu 13.10, but I checked packages.ubuntu.com and Ubuntu 13.10 (Saucy) uses Bison 2.7.1 by default; only in Ubuntu 14.04 will it apparently use Bison 3.0.2 (which should be released in 3 months!?).

My guess is that Seif built Bison 3.0 from source code?

Best regards,
Bruno

gschaider January 22, 2014 19:28

Quote:

Originally Posted by wyldckat (Post 469504)
Greetings to all!

@Bernhard:

Seif mentioned Ubuntu 13.10, but I checked packages.ubuntu.com and Ubuntu 13.10 (Saucy) uses Bison 2.7.1 by default; only in Ubuntu 14.04 will it apparently use Bison 3.0.2 (which should be released in 3 months!?).

My guess is that Seif built Bison 3.0 from source code?

Best regards,
Bruno

Bison3 seems to break a number of packages http://trac.macports.org/ticket/39910

BTW: just checked. The development version checks for bison3 and refuses to go further (must have put that in around the time of the above MacPorts-ticket)

From my short look it seemed that the changes necessary to the swak-grammar-files would make them incompatible with bison 2.x. And as long as there is not a significant portion (5-10%) of the Linux-installations out there with bison 3.x I don't consider converting (because that would force people to hand install a bison 3.x on top of the one they already have)

Seif Kefi January 27, 2014 01:06

Hi Bernhard,

What do you recommend me to do?

Best,
Seif

gschaider January 27, 2014 05:09

Quote:

Originally Posted by Seif Kefi (Post 471919)
Hi Bernhard,

What do you recommend me to do?

Obviously install the latest 2.x-version of bison

Either using the package manager of your OS (that is preferred). If that is not possible download the sources and compile it from there (that is described in the README that comes with those sources). Only two things: use the --prefix-option of configure to "install" it to a private directory (don't overwrite the system-bison) and add the directory to the PATH before compiling.

As you're using a cutting-edge distro (which distro ARE you using, by the way?) you should be comfortable with these instructions. If you're not I'd recommend using a more mainstream-distribution


All times are GMT -4. The time now is 00:01.