|
[Sponsors] | |||||
[swak4Foam] problem with compiling when WM_LABEL_SIZE is set to 64 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Senior Member
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 22 ![]() |
Dear foamers,
I have a problem when compiling swak4Foam in conjunction with an OpenFOAM or foam-extend compiled with WM_LABEL_SIZE set to 64! The process fails at exactly the same line of "swakShiftFieldFunctionPlugin" on both foam-extend-4.1 (nextRelease) and OpenFOAM-v1812. However, there is no problem when WM_LABEL_SIZE is set to 32. OpenFOAM plus v1812 Code:
wmake libso swakShiftFieldFunctionPlugin
g++-8 -std=c++11 -m64 -DOPENFOAM=1812 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I../../swak4FoamParsers/lnInclude -I/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/finiteVolume/lnInclude -I/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/sampling/lnInclude -I/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/surfMesh/lnInclude -I/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/lagrangian/basic/lnInclude -I/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/meshTools/lnInclude -IlnInclude -I. -I/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude -I/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OSspecific/POSIX/lnInclude -fPIC -c shiftFieldGeneralPluginFunction.C -o Make/linux64GccDPInt64Opt/shiftFieldGeneralPluginFunction.o
In file included from ../../swak4FoamParsers/lnInclude/ExpressionResult.H:321,
from ../../swak4FoamParsers/lnInclude/CommonPluginFunction.H:50,
from ../../swak4FoamParsers/lnInclude/ConcretePluginFunction.H:43,
from ../../swak4FoamParsers/lnInclude/FieldValuePluginFunction.H:43,
from shiftFieldGeneralPluginFunction.H:43,
from shiftFieldGeneralPluginFunction.C:34:
../../swak4FoamParsers/lnInclude/ExpressionResultI.H: In member function ‘void Foam::ExpressionResult::setSingleValueInternal(Type)’:
../../swak4FoamParsers/lnInclude/ExpressionResultI.H:229:13: warning: unnecessary parentheses in declaration of ‘single_’ [-Wparentheses]
Type(single_)=val;
^
In file included from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/List.H:381,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/labelList.H:60,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/UPstream.H:42,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/Pstream.H:42,
from ../../swak4FoamParsers/lnInclude/DebugOStream.H:50,
from ../../swak4FoamParsers/lnInclude/swak.H:596,
from shiftFieldGeneralPluginFunction.C:33:
/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/List.C: In instantiation of ‘Foam::List<T>::List(InputIterator, InputIterator) [with InputIterator = long int; T = Foam::polyPatch*]’:
shiftFieldGeneralPluginFunction.C:96:26: required from ‘void Foam::shiftFieldGeneralPluginFunction<Type, Order>::doEvaluation() [with Type = double; Foam::meshToMesh::interpolationMethod Order = (Foam::meshToMesh::interpolationMethod)3]’
shiftFieldGeneralPluginFunction.C:227:7: required from here
/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/List.C:300:44: error: no matching function for call to ‘distance(long int&, long int&)’
List<T>(begIter, endIter, std::distance(begIter, endIter))
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/bits/stl_algobase.h:66,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/string.H:52,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/word.H:43,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/int16.H:39,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/int.H:38,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/label.H:39,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/labelList.H:59,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/UPstream.H:42,
from /home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/Pstream.H:42,
from ../../swak4FoamParsers/lnInclude/DebugOStream.H:50,
from ../../swak4FoamParsers/lnInclude/swak.H:596,
from shiftFieldGeneralPluginFunction.C:33:
/usr/include/c++/8/bits/stl_iterator_base_funcs.h:138:5: note: candidate: ‘template<class _InputIterator> typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)’
distance(_InputIterator __first, _InputIterator __last)
^~~~~~~~
/usr/include/c++/8/bits/stl_iterator_base_funcs.h:138:5: note: template argument deduction/substitution failed:
/usr/include/c++/8/bits/stl_iterator_base_funcs.h: In substitution of ‘template<class _InputIterator> typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) [with _InputIterator = long int]’:
/home/shadowfax/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/List.C:300:44: required from ‘Foam::List<T>::List(InputIterator, InputIterator) [with InputIterator = long int; T = Foam::polyPatch*]’
shiftFieldGeneralPluginFunction.C:96:26: required from ‘void Foam::shiftFieldGeneralPluginFunction<Type, Order>::doEvaluation() [with Type = double; Foam::meshToMesh::interpolationMethod Order = (Foam::meshToMesh::interpolationMethod)3]’
shiftFieldGeneralPluginFunction.C:227:7: required from here
/usr/include/c++/8/bits/stl_iterator_base_funcs.h:138:5: error: no type named ‘difference_type’ in ‘struct std::iterator_traits<long int>’
make: *** [/home/shadowfax/OpenFOAM/OpenFOAM-v1812/wmake/rules/General/transform:35: Make/linux64GccDPInt64Opt/shiftFieldGeneralPluginFunction.o] Error 1
Code:
Making dependency list for source file shiftFieldGeneralPluginFunction.C
could not open file interpolation2DTable.H for source file shiftFieldGeneralPluginFunction.C
could not open file string.H for source file shiftFieldGeneralPluginFunction.C
could not open file mappedFvPatch.H for source file shiftFieldGeneralPluginFunction.C
could not open file mappedWallFvPatch.H for source file shiftFieldGeneralPluginFunction.C
could not open file mappedPointPatch.H for source file shiftFieldGeneralPluginFunction.C
SOURCE=shiftFieldGeneralPluginFunction.C ; g++-8 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-class-memaccess -O3 -DNoRepository -ftemplate-depth-200 -DFOAM_DEV -I../../swak4FoamParsers/lnInclude -I/home/shadowfax/foam/foam-extend-4.1/src/finiteVolume/lnInclude -I/home/shadowfax/foam/foam-extend-4.1/src/sampling/lnInclude -I/home/shadowfax/foam/foam-extend-4.1/src/surfMesh/lnInclude -I/home/shadowfax/foam/foam-extend-4.1/src/lagrangian/basic/lnInclude -I/home/shadowfax/foam/foam-extend-4.1/src/meshTools/lnInclude -IlnInclude -I. -I/home/shadowfax/foam/foam-extend-4.1/src/foam/lnInclude -I/home/shadowfax/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/shiftFieldGeneralPluginFunction.o
In file included from ../../swak4FoamParsers/lnInclude/ExpressionResult.H:321,
from ../../swak4FoamParsers/lnInclude/CommonPluginFunction.H:50,
from ../../swak4FoamParsers/lnInclude/ConcretePluginFunction.H:43,
from ../../swak4FoamParsers/lnInclude/FieldValuePluginFunction.H:43,
from shiftFieldGeneralPluginFunction.H:43,
from shiftFieldGeneralPluginFunction.C:34:
../../swak4FoamParsers/lnInclude/ExpressionResultI.H: In member function ‘void Foam::ExpressionResult::setSingleValueInternal(Type)’:
../../swak4FoamParsers/lnInclude/ExpressionResultI.H:229:13: warning: unnecessary parentheses in declaration of ‘single_’ [-Wparentheses]
Type(single_)=val;
^
In file included from /home/shadowfax/foam/foam-extend-4.1/src/foam/lnInclude/List.H:297,
from /home/shadowfax/foam/foam-extend-4.1/src/foam/lnInclude/labelList.H:36,
from /home/shadowfax/foam/foam-extend-4.1/src/foam/lnInclude/Pstream.H:43,
from ../../swak4FoamParsers/lnInclude/DebugOStream.H:50,
from ../../swak4FoamParsers/lnInclude/swak.H:596,
from shiftFieldGeneralPluginFunction.C:33:
/home/shadowfax/foam/foam-extend-4.1/src/foam/lnInclude/List.C: In instantiation of ‘Foam::List<T>::List(InputIterator, InputIterator) [with InputIterator = long int; T = Foam::polyPatch*]’:
shiftFieldGeneralPluginFunction.C:96:26: required from ‘void Foam::shiftFieldGeneralPluginFunction<Type, Order>::doEvaluation() [with Type = double; Foam::meshToMesh::order Order = (Foam::meshToMesh::order)1]’
shiftFieldGeneralPluginFunction.C:227:7: required from here
/home/shadowfax/foam/foam-extend-4.1/src/foam/lnInclude/List.C:207:37: error: ‘iter’ cannot be used as a function
this->operator[](s++) = iter();
~~~~^~
make: *** [shiftFieldGeneralPluginFunction.dep:667: Make/linux64GccDPOpt/shiftFieldGeneralPluginFunction.o] Error 1
D. Khazaei |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 22 ![]() |
fixed on both foam-extend-4.1 and OpenFOAM-v1812 by applying the suggested fix from here:
![]() https://sourceforge.net/p/foam-extend/tickets/21/ Code:
List<polyPatch*> newBound(origBound.size(), NULL); Code:
List<polyPatch*> newBound(origBound.size(), static_cast<polyPatch*>(NULL)); |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
| Compile problem ccm26ToFoam in OpenFoam-1.6 | shildenbrand | OpenFOAM Bugs | 11 | October 20, 2009 16:43 |
| fortran compile problem | Don | CFX | 1 | November 5, 2008 06:33 |
| natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
| Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |