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

[swak4Foam] swak4Foam and OpenFoam 3.0.x

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

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2015, 05:18
Default swak4Foam and OpenFoam 3.0.x
  #1
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 17
fs82 is on a distinguished road
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
fs82 is offline   Reply With Quote

Old   November 25, 2015, 06:57
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
I actually did this yesterday and it worked fine. Note that you need to grab the devel repository.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   November 25, 2015, 11:57
Default
  #3
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 17
fs82 is on a distinguished road
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.
fs82 is offline   Reply With Quote

Old   November 26, 2015, 03:26
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
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
tomf is offline   Reply With Quote

Old   November 26, 2015, 11:35
Default
  #5
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 17
fs82 is on a distinguished road
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
tomf, wyldckat, ebache and 3 others like this.
fs82 is offline   Reply With Quote

Old   December 16, 2015, 13:49
Default [Solved]
  #6
New Member
 
towanda
Join Date: Aug 2014
Posts: 20
Rep Power: 11
towanda is on a distinguished road
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

Last edited by wyldckat; January 9, 2016 at 12:04. Reason: merged posts that were a few of hours apart
towanda is offline   Reply With Quote

Old   January 5, 2016, 16:47
Default
  #7
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
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
...
Attached Files
File Type: zip make.log.zip (2.9 KB, 7 views)
Zeppo is offline   Reply With Quote

Old   January 6, 2016, 07:07
Default
  #8
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
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?
Zeppo is offline   Reply With Quote

Old   January 6, 2016, 09:40
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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.
alexeym is offline   Reply With Quote

Old   January 6, 2016, 11:46
Default
  #10
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
Hi (privet!), Alexey
Quote:
Originally Posted by alexeym View Post
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.H

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".

Last edited by Zeppo; January 8, 2016 at 08:40.
Zeppo is offline   Reply With Quote

Old   January 7, 2016, 21:44
Default
  #11
New Member
 
Thao Nguyen
Join Date: Oct 2013
Posts: 5
Rep Power: 12
khunyeu is on a distinguished road
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.
khunyeu is offline   Reply With Quote

Old   January 8, 2016, 08:45
Default
  #12
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
@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).

Last edited by alexeym; January 8, 2016 at 14:38. Reason: too many facts in one place
alexeym is offline   Reply With Quote

Old   January 8, 2016, 12:55
Default
  #13
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
Quote:
Originally Posted by alexeym View Post
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 View Post
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?
Attached Files
File Type: zip make.log.zip (3.1 KB, 11 views)

Last edited by Zeppo; January 8, 2016 at 14:55.
Zeppo is offline   Reply With Quote

Old   January 8, 2016, 14:36
Default
  #14
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

There is https://sourceforge.net/p/openfoam-e...ketsswak4foam/.
alexeym is offline   Reply With Quote

Old   January 16, 2016, 07:52
Default
  #15
Member
 
Join Date: May 2015
Posts: 68
Rep Power: 10
hcl734 is on a distinguished road
So is there any solution to this issue ready to use?
hcl734 is offline   Reply With Quote

Old   January 16, 2016, 16:06
Default
  #16
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
Quote:
Originally Posted by hcl734 View Post
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/

Last edited by Zeppo; January 17, 2016 at 09:27.
Zeppo is offline   Reply With Quote

Old   April 7, 2016, 14:50
Default
  #17
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Quote:
Originally Posted by fs82 View Post
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?
ancolli is offline   Reply With Quote

Old   April 8, 2016, 02:17
Default
  #18
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 17
fs82 is on a distinguished road
  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
fs82 is offline   Reply With Quote

Old   April 8, 2016, 03:50
Default
  #19
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Quote:
Originally Posted by fs82 View Post
  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 is offline   Reply With Quote

Old   April 8, 2016, 04:07
Default
  #20
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Quote:
Originally Posted by fs82 View Post
  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.....
ancolli 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
[swak4Foam] Problem with swak4Foam and OpenFOAM 2.3.1 behzad-cfd OpenFOAM Community Contributions 4 March 25, 2017 16:19
[swak4Foam] Installing swak4Foam with openFoam v3.0+ RebelLion OpenFOAM Community Contributions 0 March 11, 2016 19:10
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
[swak4Foam] fails in parallel with -otherTime? Phicau OpenFOAM Community Contributions 3 June 26, 2013 13:00
[swak4Foam] Installing swak4Foam to OpenFOAM in mac Kaquesang OpenFOAM Community Contributions 22 January 21, 2013 11:51


All times are GMT -4. The time now is 14:44.