|
[Sponsors] |
[OpenFOAM.com] Single precision build failing |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 4, 2016, 04:23 |
Single precision build failing
|
#1 |
New Member
Steve Pritchett
Join Date: May 2016
Posts: 2
Rep Power: 0 |
Hi all,
I'm attempting to build a single precision version of OpenFOAM-v3.0+, and am running into difficulties. I've verified that the double precision builds complete as expected. For comparison reasons, I was building two versions in parallel, one with the Intel 2015 (composer_xe_2015.0.090) compiler, and the other with gcc 4.8.5. Both compilers have run into the same issue with a function call to Foam::max. Intel 2015: Code:
icpc -std=c++0x -fp-trap=common -fp-model precise -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_SP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -diag-disable 2304 -xHost -O2 -DNoRepository -I../turbulenceModels/lnInclude -I/codes/OpenFOAM/OpenFOAM-v3.0+_IntelSP/src/transportModels -I/codes/OpenFOAM/OpenFOAM-v3.0+_IntelSP/src/finiteVolume/lnInclude -I/codes/OpenFOAM/OpenFOAM-v3.0+_IntelSP/src/meshTools/lnInclude -IlnInclude -I. -I/codes/OpenFOAM/OpenFOAM-v3.0+_IntelSP/src/OpenFOAM/lnInclude -I/codes/OpenFOAM/OpenFOAM-v3.0+_IntelSP/src/OSspecific/POSIX/lnInclude -fPIC -c turbulentTransportModels/turbulentTransportModels.C -o /codes/OpenFOAM/OpenFOAM-v3.0+_IntelSP/platforms/linux64IccSPInt32Opt/cfs/build/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.o ../turbulenceModels/lnInclude/SpalartAllmarasDES.C(189): error: no instance of overloaded function "Foam::max" matches the argument list argument types are: (double, Foam::tmp<Foam::GeometricField<Foam::scalar, Foam::fvPatchField, Foam::volMesh>>) /max(SMALL, (fv1*max(1e-10, 1 - ft2))) ^ Code:
/codes/OpenFOAM/OpenFOAM-v3.0+_gccSP/src/TurbulenceModels/incompressible g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_SP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I../turbulenceModels/lnInclude -I/codes/OpenFOAM/OpenFOAM-v3.0+_gccSP/src/transportModels -I/codes/OpenFOAM/OpenFOAM-v3.0+_gccSP/src/finiteVolume/lnInclude -I/codes/OpenFOAM/OpenFOAM-v3.0+_gccSP/src/meshTools/lnInclude -IlnInclude -I. -I/codes/OpenFOAM/OpenFOAM-v3.0+_gccSP/src/OpenFOAM/lnInclude -I/codes/OpenFOAM/OpenFOAM-v3.0+_gccSP/src/OSspecific/POSIX/lnInclude -fPIC -c turbulentTransportModels/turbulentTransportModels.C -o /codes/OpenFOAM/OpenFOAM-v3.0+_gccSP/platforms/linux64GccSPInt32Opt/cfs/build/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.o In file included from ../turbulenceModels/lnInclude/SpalartAllmarasDES.H:241:0, from turbulentTransportModels/turbulentTransportModels.C:112: ../turbulenceModels/lnInclude/SpalartAllmarasDES.C: In member function 'Foam::tmp<Foam::GeometricField<float, Foam::fvPatchField, Foam::volMesh> > Foam::LESModels::SpalartAllmarasDES<BasicTurbulenceModel>::psi(const volScalarField&, const volScalarField&) const': ../turbulenceModels/lnInclude/SpalartAllmarasDES.C:189:55: error: no matching function for call to 'max(double, Foam::tmp<Foam::GeometricField<float, Foam::fvPatchField, Foam::volMesh> >&)' /max(SMALL, (fv1*max(1e-10, 1 - ft2))) ^ Does anyone happen to know a good workaround to this issue, or have experience building the single precision version of OpenFOAM-v3.0+ successfully? Any assistance is appreciated. Thanks, Steve |
|
June 14, 2016, 07:26 |
known bug
|
#2 |
New Member
Steve Pritchett
Join Date: May 2016
Posts: 2
Rep Power: 0 |
Just so that others are aware, this is a known bug. The fix can be found on develop.openfoam.com here.
The solution was to force 1e-10 to be a scalar: /max(SMALL, (fv1*max(scalar(1e-10), 1 - ft2))) in the file: src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C Thanks, Steve |
|
Tags |
installation by sources, installation issue, openfoam+, single precision |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Single or double precision | Jonas Larsson | Main CFD Forum | 16 | June 20, 2017 07:53 |
Building from Source on Windows using Cygwin64 | ericthefatguy | SU2 | 2 | May 12, 2015 19:23 |
Number of elements x double precision | matheusguzella | ANSYS Meshing & Geometry | 2 | October 7, 2009 11:15 |
Compiling OpenFOAM 12 in Single Precision | fra76 | OpenFOAM Installation | 5 | April 21, 2006 13:05 |
double precision assigning in FRTRAN | R.A.Khurram | Main CFD Forum | 12 | October 2, 2001 12:00 |