2018-03-21 03:23 GMT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002873OpenFOAMPatchpublic2018-03-09 16:11
Assigned Towill 
Platformx86_64OSRHELOS Version6.5
Product Versiondev 
Target VersionFixed in Versiondev 
Summary0002873: Compile error in sweptFaceAreaWeightAMI.C with intel compiler
DescriptionI found that src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/sweptFaceAreaWeightAMI/sweptFaceAreaWeightAMI.C makes error when compiled with intel compiler 2018 as follows:

lnInclude/sweptFaceAreaWeightAMI.C(394): error: more than one instance of overloaded function "std::to_string" matches the argument list:
            function "std::to_string(long long)"
            function "std::to_string(unsigned long long)"
            function "std::to_string(long double)"
            argument types are: (const Foam::label)
          writeFaceOBJ(tgtFace, tgtPoints, "target" + std::to_string(tgtFacei));

it is because std::to_string(int) is not ready for intel compiler.
So workaround for now (as of intel compiler 2018) is to add static_cast<long long> to all the std::to_string function call.

sweptFaceAreaWeightAMI.C(394): std::to_string(static_cast<long long>(tgtFacei))
sweptFaceAreaWeightAMI.C(496): std::to_string(static_cast<long long>(i + 1))
sweptFaceAreaWeightAMI.C(546): std::to_string(static_cast<long long>(tgtFacei))
sweptFaceAreaWeightAMI.C(547): std::to_string(static_cast<long long>(writeCutTrisVTKIndex ++))
sweptFaceAreaWeightAMI.C(552): std::to_string(static_cast<long long>(srcN))

TagsNo tags attached.
Attached Files




henry (manager)

Have you reported the issue to Intel? It would be better that Intel fix their compiler than we work around bugs/limitations of it. Alternatively you could use gcc or clang which are open-source and do not suffer from this limitation.


handrake0724 (reporter)

Ok I will try.


will (manager)

The label-string conversion should have been done using Foam::name rather than std::to_string. That has now been changed, as of commit 1ba4d4b2. I assume that fixes the issue with the intel compiler, but I don't actually have a copy with which to test. If it still doesn't work, please re-report.

-Issue History
Date Modified Username Field Change
2018-03-09 15:34 handrake0724 New Issue
2018-03-09 15:48 henry Note Added: 0009399
2018-03-09 15:50 handrake0724 Note Added: 0009400
2018-03-09 16:11 will Assigned To => will
2018-03-09 16:11 will Status new => resolved
2018-03-09 16:11 will Resolution open => fixed
2018-03-09 16:11 will Fixed in Version => dev
2018-03-09 16:11 will Note Added: 0009401
+Issue History