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

[OpenFOAM.com] Build problem with OF 1712

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2018, 10:49
Default Build problem with OF 1712
  #1
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hello all,

I am facing a problem when trying to compile OF 1712. OS is CentOS 6.4, gcc is 4.8.5, and compilation runs to the very end, giving the following errors shortly before the end:

g++ -std=c++11 -m64 -DOPENFOAM_PLUS=1712 -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 -DUSE_OMP -fopenmp -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/fileFormats/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/surfMesh/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/meshTools/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-v1712/src/OSspecific/POSIX/lnInclude -fPIC -c utilities/meshes/polyMeshGenModifier/polyMeshGenModifierZipUpCells.C -o /usr/local/OpenFOAM/OpenFOAM-v1712/build/linux64Gcc48DPInt64Opt/modules/cfmesh/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierZipUpCells.o
In file included from lnInclude/DynList.H:254:0,
from lnInclude/VRWGraph.H:41,
from lnInclude/meshSubset.H:40,
from lnInclude/polyMeshGenPoints.H:41,
from lnInclude/polyMeshGenFaces.H:40,
from lnInclude/polyMeshGenCells.H:40,
from lnInclude/polyMeshGen.H:40,
from utilities/meshes/polyMeshGenModifier/polyMeshGenModifier.H:40,
from utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C:26:
lnInclude/DynListI.H: In Instanziierung von »Foam::Module:ynList<T, staticSize>:ynList(const ListType&) [with ListType = int; T = long int; long int staticSize = 16l]«:
lnInclude/helperFunctionsTopologyManipulationI.H:600:34: von hier erfordert
lnInclude/DynListI.H:218:21: Fehler: Abfrage des Elementes »size« in »l«, das vom Nicht-Klassentyp »const int« ist
setSize(l.size());
^
lnInclude/DynListI.H:221:32: Fehler: indizierter Wert ist weder ein Feld noch ein Zeiger
this->operator[](i) = l[i];
^
lnInclude/DynListI.H: In Instanziierung von »Foam::Module:ynList<T, staticSize>:ynList(const ListType&) [with ListType = int; T = Foam::Vector2D<double>; long int staticSize = 6l]«:
lnInclude/helperFunctionsGeometryQueriesI.H:1144:37: von hier erfordert
lnInclude/DynListI.H:218:21: Fehler: Abfrage des Elementes »size« in »l«, das vom Nicht-Klassentyp »const int« ist
setSize(l.size());
^
lnInclude/DynListI.H:221:32: Fehler: indizierter Wert ist weder ein Feld noch ein Zeiger
this->operator[](i) = l[i];
^
make[1]: *** [/usr/local/OpenFOAM/OpenFOAM-v1712/build/linux64Gcc48DPInt64Opt/modules/cfmesh/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.o] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozesse...
make: *** [cfmesh] Fehler 2

I suppose the error is related to the cfMesh library, but I do not know how to overcome it.

I have half a dozen different versions of OF installed, and the only other version containing the file DynListI.H is foam-extend-4.0, which compiles fine. The respective code line is the same in both versions, if that helps. The faulty method is:

Code:
template<class T, Foam::label staticSize>
template<class ListType>
inline Foam::Module::DynList<T, staticSize>::DynList(const ListType& l)
:
    dataPtr_(nullptr),
    nAllocated_(0),
    staticData_(),
    nextFree_(0)
{
    setSize(l.size());
    for (label i = 0; i < nextFree_; ++i)
    {
        this->operator[](i) = l[i]; // <== this is line 221
    }

    # ifdef DEBUG
    checkAllocation();
    # endif
}
Any idea, how to get over this? I tested some tutorials, and they run correctly.

Best regards,

Pascal.
--
blaise is offline   Reply With Quote

Old   June 7, 2018, 11:02
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by blaise View Post
Hello all,

I am facing a problem when trying to compile OF 1712. OS is CentOS 6.4, gcc is 4.8.5, and compilation runs to the very end, giving the following errors shortly before the end:

g++ -std=c++11 -m64 -DOPENFOAM_PLUS=1712 -Dlinux64 --

Problems with 64-bit labels were fixed 5-Jan-2018. The changes in the commit are fairly small, so you can very easily make the changes yourself too.

The commit is here:

https://develop.openfoam.com/Communi...367fd9565ad8ae

As an alternative, you could also just use 32-bit labels. AFAIK this is what foam-extend has anyhow.
blaise likes this.
olesen is offline   Reply With Quote

Old   June 12, 2018, 09:12
Default
  #3
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Great, that did the trick!

Thanks a lot!

Cheers,

Pascal.
--
blaise is offline   Reply With Quote

Reply


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
Building from Source on Windows using Cygwin64 ericthefatguy SU2 2 May 12, 2015 19:23
QT creator build option problem bluenail OpenFOAM Programming & Development 2 July 22, 2014 14:30
Hardware build review/advise for student desktop AerE Hardware 10 July 5, 2013 07:03
Build problem Jeff CFX 0 July 31, 2003 14:21
CFX4.3 Build problem cfx4.3 user CFX 4 January 2, 2003 15:18


All times are GMT -4. The time now is 13:38.