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] swak4Foam and OpenFoam 3.0.x (https://www.cfd-online.com/Forums/openfoam-community-contributions/163210-swak4foam-openfoam-3-0-x.html)

fs82 November 25, 2015 05:18

swak4Foam and OpenFoam 3.0.x
 
Dear All,

has anybody tried to compile swak4Foam with OpenFoam 3.0.x? I tried it but it won't work. It seems to be some issue with the configuration files or with the environmental variables. OpenFoam 3.0.x compiles fine without any error, but swak4Foam complaines about missing files. This is the output of ./Allwmake in swak4Foam directory

Code:

This is a clean install

/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/applications/utilities/miscellaneous/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
swakConfiguration: line 13: [: : integer expression expected
Checking swak4Foam-version and generating file
Swak version is 0.3.2
Bison is version 2.7.12-4996
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 3 Minor 0 Patch -1 (-1 == x / 98)
No swak4FoamParsers/foamVersion4swak.H. Generated
wmakeLnInclude: linking include files to simpleFunctionObjects/lnInclude
/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers
/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/options:51: /opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../mybison: No such file or directory
/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/options:52: /opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../myflex: No such file or directory
/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/options:55: /opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../../../rules/versionOptions: No such file or directory
make: *** No rule to make target `/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../../../rules/versionOptions'.  Stop.
/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/options:51: /opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../mybison: No such file or directory
/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/options:52: /opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../myflex: No such file or directory
/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/options:55: /opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../../../rules/versionOptions: No such file or directory
make: *** No rule to make target `/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/../../../rules/versionOptions'.  Stop.
wmake error: file '/opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers/sourceFiles' could not be created in /opt/pkg/simulation/OpenFOAM/fwd/3.0.x/OpenFOAM-3.0.x/applications/utilities/miscellaneous/swak4Foam/Libraries/swak4FoamParsers
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
Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard


akidess November 25, 2015 06:57

I actually did this yesterday and it worked fine. Note that you need to grab the devel repository.

fs82 November 25, 2015 11:57

No, it is not running. I downloaded the development release but the error remains. I have a feeling that this is somehow related to the content of the $(OBJECTS_DIR) variable. However, I do not have a clue why this points to a wrong place.

tomf November 26, 2015 03:26

Hi,

I have noticed the same behavior and also linked it to the $(OBJECTS_DIR) variable, however I could not resolve the problem. My colleague however had no problems, nor did our cluster. There may be some small setup differences between the machines, but something like this did not happen before.

Regards,
Tom

fs82 November 26, 2015 11:35

Allright, I think I solved this issue. It is not suitable to put the sources of swak4foam into the $WM_PROJECT_DIR/<path>. A better idea is to put the sources into $WM_PROJECT_USER_DIR/<path>, then everything compiles fine and one can use
Code:

maintainanceScripts/copySwakFilesToSite.sh
maintainanceScripts/removeSwakFilesFromLocal.sh

to copy the generated executables to a central installation if desired.

Kind regards,
Fabian

towanda December 16, 2015 13:49

[Solved]
 
solved , sorry

https://openfoamwiki.net/index.php/I...oam-extend_3.x

-----

Dear Community of Foamers,
I was trying to install a swak4Foam version which I have download from:
git clone https://github.com/Unofficial-Extend...xtend-Breeder2.0-libraries-swak4Foam.git swak4Foam

for using with OF3.0.0. I put the swak4Foam files into the folder user-3.0.0/swak4Foam
I also run from the base ./maintainanceScripts/compileRequirements.sh
I have added into my PATH variable the following:
Code:

export PATH=/users/rechimal/OpenFOAM/rechimal-3.0.0/swak4Foam/privateRequirements/bin:$PATH
Then I run ./Allwmake and I get the following error:

Code:

Previously compiled for OpenFOAM 3.0.0

/users/rechimal/OpenFOAM/rechimal-3.0.0/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
Checking swak4Foam-version and generating file
abort: no repository found in '/users/rechimal/OpenFOAM/rechimal-3.0.0/swak4Foam' (.hg not found)!
Swak version is 0.3.2
Bison is version 2.7.12-4996
Flex is version 2.5.39 (Minor version: 39)
OpenFOAM-version: Major 3 Minor 0 Patch 0 (-1 == x / 0)
No change to swak4FoamParsers/foamVersion4swak.H
make: *** No rule to make target 'Make/linux64GccDPInt32Opt/SubsetValueExpressionParser.o', needed by 'Make/linux64GccDPInt32Opt/CellSetValueExpressionDriver.o'.  Stop.
wmake error: file 'Make/linux64GccDPInt32Opt/sourceFiles' could not be created in /users/rechimal/OpenFOAM/rechimal-3.0.0/swak4Foam/Libraries/swak4FoamParsers
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
Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard

After that I run the command:
Code:

ln -s swakConfiguration.automatic swakConfiguration
I run again ./Allwmake and I get the follong error:

Code:

Previously compiled for OpenFOAM 3.0.0

/users/rechimal/OpenFOAM/rechimal-3.0.0/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
swakConfiguration: line 13: [: : integer expression expected
Checking swak4Foam-version and generating file
abort: no repository found in '/users/rechimal/OpenFOAM/rechimal-3.0.0/swak4Foam' (.hg not found)!
Swak version is 0.3.2
Bison is version 2.7.12-4996
Flex is version 2.5.39 (Minor version: 39)
OpenFOAM-version: Major 3 Minor 0 Patch 0 (-1 == x / 0)
No change to swak4FoamParsers/foamVersion4swak.H
make: *** No rule to make target 'Make/linux64GccDPInt32Opt/SubsetValueExpressionParser.o', needed by 'Make/linux64GccDPInt32Opt/CellSetValueExpressionDriver.o'.  Stop.
wmake error: file 'Make/linux64GccDPInt32Opt/sourceFiles' could not be created in /users/rechimal/OpenFOAM/rechimal-3.0.0/swak4Foam/Libraries/swak4FoamParsers
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
Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard

I have search for other post but I could not reach to any solution.
Can anybody tell me if I am missing something or doing something wrong?
How can I solve the problem?

Thanks in advance

Zeppo January 5, 2016 16:47

1 Attachment(s)
OpenSUSE 13.2, OpenFoam 3.0.x

I am trying to install swak4Foam according to this guide: https://openfoamwiki.net/index.php/C...m/Installation
Code:

mkdir -p $FOAM_RUN
cd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION"
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam
cd swak4Foam
./Allwmake

The output is
Code:

This is a clean install
No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
Checking swak4Foam-version and generating file
Swak version is 0.4.0
Bison is version 2.7
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 3 Minor 0 Patch -1 (-1 == x / 98)
No swak4FoamParsers/foamVersion4swak.H. Generated
wmakeLnInclude: linking include files to simpleFunctionObjects/lnInclude
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file plugins/FaceZoneValuePluginFunction.C
Making dependency list for source file plugins/SampledSetValuePluginFunction.C
Making dependency list for source file plugins/SampledSurfaceValuePluginFunction.C
Making dependency list for source file plugins/FaceSetValuePluginFunction.C
could not open file foamString.H for source file plugins/SampledSetValuePluginFunction.C due to No such file or directory
could not open file foamString.H for source file plugins/FaceZoneValuePluginFunction.C due to No such file or directory
could not open file foamString.H for source file plugins/SampledSurfaceValuePluginFunction.C due to No such file or directory
could not open file foamString.H for source file plugins/FaceSetValuePluginFunction.C due to No such file or directory
could not open file SubsetValueExpressionParser.tab.hh for source file plugins/FaceZoneValuePluginFunction.C due to No such file or directory
Making dependency list for source file plugins/CellZoneValuePluginFunction.C
could not open file coordSet.H for source file plugins/SampledSetValuePluginFunction.C due to No such file or directory
could not open file SubsetValueExpressionParser.tab.hh for source file plugins/SampledSetValuePluginFunction.C due to No such file or directory
could not open file SubsetValueExpressionParser.tab.hh for source file plugins/FaceSetValuePluginFunction.C due to No such file or directory
Making dependency list for source file plugins/CellSetValuePluginFunction.C
...


Zeppo January 6, 2016 07:07

Code:

Making dependency list for source file plugins/FaceZoneValuePluginFunction.C
could not open file foamString.H for source file plugins/SampledSetValuePluginFunction.C due to No such file or directory

There's no foamString.H in my OpenFOAM-3.0.x sources. The Foam::string class is declared here:
/opt/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/primitives/strings/string/string.H

And foamString.H can be found in my foam-extend-3.2 sources:
/opt/foam/foam-extend-3.2/src/foam/primitives/strings/string/foamString.H

So It implies that I cannot build swak4Foam for OpenFOAM-3.0.x, can I?

alexeym January 6, 2016 09:40

Hi,

If you take a look at Libraries/swak4FoamParsers/include/swakString.H, you find

Code:

#ifdef FOAM_MOVED_TIME_AND_STRING_HEADERS
#include "foamString.H"
#else
#include "string.H"
#endif

FOAM_MOVED_TIME_AND_STRING_HEADERS symbol is defined in swak.H:

Code:

#if FOAM_VERSION4SWAK >= VERSION_NR(3,2,0) && defined(FOAM_DEV)
#define FOAM_MOVED_TIME_AND_STRING_HEADERS
#endif

To learn why FOAM_VERSION4SWAK >= VERSION_NR(3,2,0) && defined(FOAM_DEV) is try, post your foamVersion4swak.H from Libraries/swak4FoamParsers.

Zeppo January 6, 2016 11:46

Hi (privet!), Alexey
Quote:

Originally Posted by alexeym (Post 579754)
Hi,
To learn why FOAM_VERSION4SWAK >= VERSION_NR(3,2,0) && defined(FOAM_DEV) is try, post your foamVersion4swak.H from Libraries/swak4FoamParsers.

The content of swak4Foam/Libraries/swak4FoamParsers/foamVersion4swak.H:

Code:

// generated by the Allwmake-script of the swak4Foam-distro
#ifndef foamVersion4swak_H
#define foamVersion4swak_H

#define FOAM_VERSION4SWAK_MAJOR 3
#define FOAM_VERSION4SWAK_MINOR 0
#define FOAM_VERSION4SWAK_PATCH -1
#define FOAM_VERSION4SWAK_PATCH_NUM 98

#endif

swak4Foam/Allwmake:
Code:

...
(cd Libraries; wmake all )
...

swak4Foam/Libraries/Allwmake:
Code:

...
of_version_major=`echo $WM_PROJECT_VERSION | sed -e 's=\([0-9]*\).*=\1='`
of_version_minor=`echo $WM_PROJECT_VERSION | sed -e 's=[0-9]*\.\([0-9]*\).*=\1='`
of_version_patch=`echo $WM_PROJECT_VERSION | sed -e 's=[0-9]*\.[0-9]*\.\([0-9a-z]*\).*=\1=' -e 's=[0-9]*\.[0-9]*=x=' -e 's=x=-1='`

if [[ $of_version_minor == "dev" && $of_version_patch == "dev" ]]; then
    echo "This seems to be an OpenFOAM-development version"
    of_version_major=9
    of_version_minor=9
    of_version_patch=99
    of_development=1
fi
...
versionFile=swak4FoamParsers/foamVersion4swak.Hhttp://www.cfd-online.com/Forums/ima.../separator.gif

cat >$versionFile.tmp <<EOF
// generated by the Allwmake-script of the swak4Foam-distro
#ifndef foamVersion4swak_H
#define foamVersion4swak_H

#define FOAM_VERSION4SWAK_MAJOR $of_version_major
#define FOAM_VERSION4SWAK_MINOR $of_version_minor
#define FOAM_VERSION4SWAK_PATCH $of_version_patch
#define FOAM_VERSION4SWAK_PATCH_NUM $of_version_patch_num
EOF

if [[ $of_development != "" ]]; then
    echo >>$versionFile.tmp "#define FOAM_VERSION4SWAK_OF_DEV"
fi

cat >>$versionFile.tmp <<EOF

#endif
EOF

It seems like I have a regular (non-development) OpenFOAM-3.0 and the statement FOAM_VERSION4SWAK >= VERSION_NR(3,2,0) && defined(FOAM_DEV) shouldn't be true. Then FOAM_MOVED_TIME_AND_STRING_HEADERS should never be defined and "swak.H" should include #include "string.H".

khunyeu January 7, 2016 21:44

Hello,

I also got similar problem when installing swak4Foam, could anyone give me a hint please :)

this is my make.log file:

--------------------------------------------------
Previously compiled for OpenFOAM 3.0.0

/home/thao/OpenFOAM/thao-3.0.0/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
Checking swak4Foam-version and generating file
Swak version is 0.3.2
Bison is version 2.7.12-4996
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 3 Minor 0 Patch 0 (-1 == x / 0)
No swak4FoamParsers/foamVersion4swak.H. Generated
wmakeLnInclude: linking include files to simpleFunctionObjects/lnInclude
make: *** No rule to make target `Make/linux64GccDPInt64Opt/SubsetValueExpressionParser.o', needed by `Make/linux64GccDPInt64Opt/CellSetValueExpressionDriver.o'. Stop.
wmake error: file 'Make/linux64GccDPInt64Opt/sourceFiles' could not be created in /home/thao/OpenFOAM/thao-3.0.0/swak4Foam/Libraries/swak4FoamParsers
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
Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard
----------------------------------------------------------------------------------

Thanks,
Thao.

alexeym January 8, 2016 08:45

@Zeppo,

In fact I missed that you are unhappy about foamString.H during wmkdep invocation. The utility does not expand pre-processor definitions, it just scan file for #include directives and symlinks files. So the error could be ignored.

About your log file, I can not reproduce the error on Fedora 21/OpenFOAM 3.0.x (commit 9cf0156). The software builds OK till Bison invocation (and it is expected since I do not want to install older Bison).

Zeppo January 8, 2016 12:55

1 Attachment(s)
Quote:

Originally Posted by alexeym (Post 580091)
In fact I missed the fact that you are unhappy about foamString.H during wmkdep invocation. The utility does not expand pre-processor definitions, it just scan file for #include directives and symlinks files. So the error could be ignored.

That is why I see no errors of this type when I run ./Allwmake for the second time.
Quote:

Originally Posted by alexeym (Post 580091)
About your log file, I can not reproduce the error on Fedora 21/OpenFOAM 3.0.x (commit 9cf0156). The software builds OK till Bison invocation (and it is expected since I do not want to install older Bison).

c++ compiler can't convert "int &" to "long int &" implicitly on the ground of possible numeric overflow:
Code:

Previously compiled for OpenFOAM 3.0.x

/home/sergei/OpenFOAM/sergei-3.0.x/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
Checking swak4Foam-version and generating file
Swak version is 0.4.0
Bison is version 2.7.12-4996
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 3 Minor 0 Patch -1 (-1 == x / 98)
No change to swak4FoamParsers/foamVersion4swak.H

...

../SubsetValueExpressionParser.yy: In instantiation of ‘Foam::autoPtr<Foam::Field<Type> > Foam::SubsetValueExpressionDriver::evaluatePluginFunction(const Foam::word&, const parserSubset::location&, int&, bool) [with T = Foam::Vector<double>]’:
../SubsetValueExpressionParser.yy:740:7:  required from here
../SubsetValueExpressionParser.yy:132:9: error: no matching function for call to ‘Foam::CommonPluginFunction::evaluate(std::basic_string<char>, int&, bool&)
../SubsetValueExpressionParser.yy:132:9: note: candidates are:
In file included from ../SubsetValueExpressionParser.yy:99:0:
lnInclude/CommonPluginFunction.H:224:12: note: template<class T> Foam::tmp<T> Foam::CommonPluginFunction::evaluate(const Foam::string&, Foam::label&)
    tmp<T> evaluate(
            ^
lnInclude/CommonPluginFunction.H:224:12: note:  template argument deduction/substitution failed:
../SubsetValueExpressionParser.yy:132:9: note:  cannot convert ‘scanned’ (type ‘int’) to type ‘Foam::label& {aka long int&}’
In file included from ../SubsetValueExpressionParser.yy:99:0:
lnInclude/CommonPluginFunction.H:230:20: note: template<class T> Foam::tmp<Foam::Field<Type> > Foam::CommonPluginFunction::evaluate(const Foam::string&, Foam::label&, bool)
    tmp<Field<T> > evaluate(
                    ^
lnInclude/CommonPluginFunction.H:230:20: note:  template argument deduction/substitution failed:
../SubsetValueExpressionParser.yy:132:9: note:  cannot convert ‘scanned’ (type ‘int’) to type ‘Foam::label& {aka long int&}’
../SubsetValueExpressionParser.yy: In instantiation of ‘Foam::autoPtr<Foam::Field<Type> > Foam::SubsetValueExpressionDriver::evaluatePluginFunction(const Foam::word&, const parserSubset::location&, int&, bool) [with T = double]’:
../SubsetValueExpressionParser.yy:1301:7:  required from here
../SubsetValueExpressionParser.yy:132:9: error: no matching function for call to ‘Foam::CommonPluginFunction::evaluate(std::basic_string<char>, int&, bool&)’
../SubsetValueExpressionParser.yy:132:9: note: candidates are:
In file included from ../SubsetValueExpressionParser.yy:99:0:
lnInclude/CommonPluginFunction.H:224:12: note: template<class T> Foam::tmp<T> Foam::CommonPluginFunction::evaluate(const Foam::string&, Foam::label&)
    tmp<T> evaluate(

I got it! When I built my OpenFoam from sources I specified the option WM_LABEL_SIZE=64 (just out of curiosity) which affected the definition of the "label" type:
Code:

// "label.h"
// A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
  ...

#define INT_ADD_SIZE(x,s,y) x ## s ## y
#define INT_ADD_DEF_SIZE(x,s,y) INT_ADD_SIZE(x,s,y)
#define INT_SIZE(x,y) INT_ADD_DEF_SIZE(x,WM_LABEL_SIZE,y)
 ...

namespace Foam    {
 
    typedef INT_SIZE(int, _t) label;

It is now:
Code:

typedef int64_t label;
And somewhere in <cstdint>:
Code:

typedef long int  int64_t;
Unfortunatly swak4Foam doesn't always obey the rules - sometimes it uses "int", sometimes "Foam::label", which makes a little mess in the code and I can't got it compiled. I can recompile OpenFOAM with WM_LABEL_SIZE=32 to overcome the issue and I'll be fine, though. Anyway, if what I said is true should I report it as a bug to anywhere?

alexeym January 8, 2016 14:36

Hi,

There is https://sourceforge.net/p/openfoam-e...ketsswak4foam/.

hcl734 January 16, 2016 07:52

So is there any solution to this issue ready to use?

Zeppo January 16, 2016 16:06

Quote:

Originally Posted by hcl734 (Post 581170)
So is there any solution to this issue ready to use?

I have recompiled OpenFOAM with WM_LABEL_SIZE=32 and then swak4Foam has been built with no issues. Are you sure you really need more than (2^32)/2=2147483648 cells, patches, regions etc in your simulations? Just wondering.

Btw, shouldn't "label" be typedefed as "unsigned int" or "unsigned long int"? As far as I can see, objects of this type is only used to index data containers.

I opened a ticket with a bug report: https://sourceforge.net/p/openfoam-e...swak4foam/233/

ancolli April 7, 2016 14:50

Quote:

Originally Posted by fs82 (Post 575129)
Allright, I think I solved this issue. It is not suitable to put the sources of swak4foam into the $WM_PROJECT_DIR/<path>. A better idea is to put the sources into $WM_PROJECT_USER_DIR/<path>, then everything compiles fine and one can use
Code:

maintainanceScripts/copySwakFilesToSite.sh
maintainanceScripts/removeSwakFilesFromLocal.sh

to copy the generated executables to a central installation if desired.

Kind regards,
Fabian


Hi Fabian, I have the same problem as you, but I don't quite understand how did u solve it. Could u please explain to me step by step?

fs82 April 8, 2016 02:17

  1. Create a directory in $WM_PROJECT_USER_DIR
    Code:

    mkdir -p $WM_PROJECT_USER_DIR/applications/utilities/miscellaneous
    cd $WM_PROJECT_USER_DIR/applications/utilities/miscellaneous

  2. Download the sources of swak4foam
    Code:

    git clone https://github.com/Unofficial-Extend...-swak4Foam-dev swak4Foam
    cd swak4Foam
    git checkout port_2.0.x

  3. Copy/Edit the preferences file to use Python (depends on operating system)
    Code:

    cp swakConfiguration.automatic swakConfiguration
  4. Build custom Bison 2.x
    Code:

    ./maintainanceScripts/compileRequirements.sh
  5. Build swak4foam
    Code:

    ./Allwmake
    maintainanceScripts/copySwakFilesToSite.sh
    maintainanceScripts/removeSwakFilesFromLocal.sh


ancolli April 8, 2016 03:50

Quote:

Originally Posted by fs82 (Post 594022)
  1. Create a directory in $WM_PROJECT_USER_DIR
    Code:

    mkdir -p $WM_PROJECT_USER_DIR/applications/utilities/miscellaneous
    cd $WM_PROJECT_USER_DIR/applications/utilities/miscellaneous

  2. Download the sources of swak4foam
    Code:

    git clone https://github.com/Unofficial-Extend...-swak4Foam-dev swak4Foam
    cd swak4Foam
    git checkout port_2.0.x

  3. Copy/Edit the preferences file to use Python (depends on operating system)
    Code:

    cp swakConfiguration.automatic swakConfiguration
  4. Build custom Bison 2.x
    Code:

    ./maintainanceScripts/compileRequirements.sh
  5. Build swak4foam
    Code:

    ./Allwmake
    maintainanceScripts/copySwakFilesToSite.sh
    maintainanceScripts/removeSwakFilesFromLocal.sh


the same problem
I could not use step 2. instead i used:

Code:

hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam
cd swak4Foam

Code:

Reading variables from 'swakConfiguration'
swakConfiguration: line 13: [: : integer expression expected
Checking swak4Foam-version and generating file
Swak version is 0.4.0
Bison is version 2.7.12-4996
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major  Minor v0 Patch v-1+ (-1 == x / v-1+)
No swak4FoamParsers/foamVersion4swak.H. Generated....


ancolli April 8, 2016 04:07

Quote:

Originally Posted by fs82 (Post 594022)
  1. Create a directory in $WM_PROJECT_USER_DIR
    Code:

    mkdir -p $WM_PROJECT_USER_DIR/applications/utilities/miscellaneous
    cd $WM_PROJECT_USER_DIR/applications/utilities/miscellaneous

  2. Download the sources of swak4foam
    Code:

    git clone https://github.com/Unofficial-Extend...-swak4Foam-dev swak4Foam
    cd swak4Foam
    git checkout port_2.0.x

  3. Copy/Edit the preferences file to use Python (depends on operating system)
    Code:

    cp swakConfiguration.automatic swakConfiguration
  4. Build custom Bison 2.x
    Code:

    ./maintainanceScripts/compileRequirements.sh
  5. Build swak4foam
    Code:

    ./Allwmake
    maintainanceScripts/copySwakFilesToSite.sh
    maintainanceScripts/removeSwakFilesFromLocal.sh



if i do the installation as you say i obtain an error in:

git checkout port_2.0.x

Code:

error: pathspec 'port_2.0.x' did not match any file(s) known to git.
and then i obtain the following:
Code:

This is a clean install

/home/ancolli/OpenFOAM/ancolli-v3.0+/applications/utilities/miscellaneous/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
swakConfiguration: line 13: [: : integer expression expected
Checking swak4Foam-version and generating file
abort: no repository found in '/home/ancolli/OpenFOAM/ancolli-v3.0+/applications/utilities/miscellaneous/swak4Foam' (.hg not found)!
Swak version is 0.4.0
Bison is version 2.7.12-4996
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major  Minor v0 Patch v-1+ (-1 == x / v-1+)
No swak4FoamParsers/foamVersion4swak.H. Generated.....



All times are GMT -4. The time now is 19:49.