View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002873 | OpenFOAM | Patch | public | 2018-03-09 15:34 | 2018-03-09 16:11 |
Reporter | handrake0724 | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | RHEL | OS Version | 6.5 |
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0002873: Compile error in sweptFaceAreaWeightAMI.C with intel compiler | ||||
Description | I 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)) | ||||
Tags | No tags attached. | ||||
|
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. |
|
Ok I will try. |
|
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. |
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 |