Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error (openfoam-8, centos-7, gcc-8.2.0) #4

Closed
mercanca opened this issue Feb 18, 2022 · 2 comments
Closed

Compiling error (openfoam-8, centos-7, gcc-8.2.0) #4

mercanca opened this issue Feb 18, 2022 · 2 comments

Comments

@mercanca
Copy link

When I try to compile picFoam, it gives an error:

./Allwmake
wmake PICMCCFVM
wmake solver/picFoam
wmake preProcess/picInitialise
g++ -std=c++11 -m64 -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 -O3 -DNoRepository -ftemplate-depth-100 -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/finiteVolume/lnInclude -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude -I../../PICMCCFVM/lnInclude -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude -L/root/OpenFOAM/root-8/platforms/linux64GccDPInt64Opt/lib -IlnInclude -I. -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OSspecific/POSIX/lnInclude -fPIC -c makePICInitialiseModels.C -o Make/linux64GccDPInt64Opt/makePICInitialiseModels.o
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C: In member function ‘virtual void Foam::CountInitialization::initialiseParticles()’:
lnInclude/CountInitialization.C:113:70: error: no matching function for call to ‘Foam::Random::sampleAB(int, Foam::label)’
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
In file included from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxI.H:27,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBox.H:387,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxList.H:37,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/AMIInterpolation.H:54,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/cyclicAMIPolyPatch.H:40,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.C:34,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.H:291,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/particle.H:38,
from ../../PICMCCFVM/lnInclude/picParcel.H:43,
from makePICInitialiseModels.C:26:
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: candidate: ‘template Type Foam::Random::sampleAB(const Type&, const Type&)’
inline Type sampleAB(const Type& a, const Type& b);
^~~~~~~~
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: template argument deduction/substitution failed:
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C:113:70: note: deduced conflicting types for parameter ‘const Type’ (‘int’ and ‘Foam::label’ {aka ‘long int’})
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
lnInclude/CountInitialization.C:199:67: error: no matching function for call to ‘Foam::Random::sampleAB(int, Foam::label)’
label rndCellI = rndGen.sampleAB(0,mesh.cells().size());
^
In file included from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxI.H:27,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBox.H:387,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxList.H:37,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/AMIInterpolation.H:54,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/cyclicAMIPolyPatch.H:40,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.C:34,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.H:291,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/particle.H:38,
from ../../PICMCCFVM/lnInclude/picParcel.H:43,
from makePICInitialiseModels.C:26:
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: candidate: ‘template Type Foam::Random::sampleAB(const Type&, const Type&)’
inline Type sampleAB(const Type& a, const Type& b);
^~~~~~~~
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: template argument deduction/substitution failed:
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C:199:67: note: deduced conflicting types for parameter ‘const Type’ (‘int’ and ‘Foam::label’ {aka ‘long int’})
label rndCellI = rndGen.sampleAB(0,mesh.cells().size());
^
lnInclude/CountInitialization.C:205:62: error: no matching function for call to ‘Foam::Random::sampleAB(int, Foam::label)’
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
In file included from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxI.H:27,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBox.H:387,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxList.H:37,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/AMIInterpolation.H:54,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/cyclicAMIPolyPatch.H:40,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.C:34,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.H:291,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/particle.H:38,
from ../../PICMCCFVM/lnInclude/picParcel.H:43,
from makePICInitialiseModels.C:26:
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: candidate: ‘template Type Foam::Random::sampleAB(const Type&, const Type&)’
inline Type sampleAB(const Type& a, const Type& b);
^~~~~~~~
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: template argument deduction/substitution failed:
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C:205:62: note: deduced conflicting types for parameter ‘const Type’ (‘int’ and ‘Foam::label’ {aka ‘long int’})
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
make: *** [Make/linux64GccDPInt64Opt/makePICInitialiseModels.o] Error 1

I could not find a solution. My opemfoam-8 bashrc script is:

source /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/etc/bashrc WM_LABEL_SIZE=64 WM_MPLIB=OPENMPI

Thanks.

@chriskuehn
Copy link
Contributor

Should be fixed with latest commit.

@mercanca
Copy link
Author

mercanca commented Mar 2, 2022

Should be fixed with latest commit.

thank you. It is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants