View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001496 | OpenFOAM | Bug | public | 2015-01-23 10:55 | 2015-01-23 13:11 |
Reporter | Assigned To | henry | |||
Priority | high | Severity | major | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | SGI | OS | Linux SUSE | OS Version | SLES11 Sp3 |
Summary | 0001496: Single precision compilation error | ||||
Description | A source file fails to compile under single precision but passes under double precision. The detail is as follows: SOURCE=derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C ; g++ -m64 -Dlinux64 -DWM_SP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/turbulenceModels -I/store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/transportModels -IlnInclude -I. -I/store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc49SPOpt/atmBoundaryLayerInletVelocityFvPatchVectorField.o derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C: In constructor âFoam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField::atmBoundaryLayerInletVelocityFvPatchVectorField(const Foam::fvPatch&, const Foam::DimensionedField<Foam::Vector<float>, Foam::volMesh>&, const Foam::dictionary&)â: derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C:118:60: error: no matching function for call to âmax(Foam::scalarField&, double)â Ustar_ = kappa_*Uref_/(log((Zref_ + z0_)/max(z0_, 0.001))); ^ derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C:118:60: note: candidates are: In file included from /store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/UList.H:46:0, from /store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/List.H:43, from /store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/wordList.H:42, from /store/ayad/OpenFOAM/OpenFOAM-SGISLES11SP3-2.3.X_X8664_GCC49_16JAN15_REPO/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/patchIdentifier.H:38, ... ... and so on ... Note that Mattijs Janssen has suggested the following fix: change the corresponding line from max(z0_, 0.001) to max(z0_, scalar(0.001)) Implementing the above suggested fix in four source files resulted in successful compilation of the full source. Note that my 2.3.x source was based on a a git made on 16 Jan 2015 | ||||
Steps To Reproduce | Simply compile these source files (containing the above constructs) under single precision | ||||
Tags | No tags attached. | ||||