|
[Sponsors] |
OpenFOAM-1.5-dev svn revision 1438: libOpenFOAM does not compile in SP |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 14, 2009, 13:02 |
OpenFOAM-1.5-dev svn revision 1438: libOpenFOAM does not compile in SP
|
#1 |
New Member
|
Hi all!
I came across this showstopper yesterday while trying to compile the svn rev. #1438 of the OpenFoam-1.5-dev repository. While compile in DP works fine, compiling in SP (single precision) produces the following output: wmake libso OpenFoam [...] interpolations/RBFInterpolation/RBFFunctions/W2/W2.C: In member function ‘virtual Foam::tmp<Foam::Field<float> > Foam::W2::weights(const Foam::vectorField&, const Foam::vector&) const’: interpolations/RBFInterpolation/RBFFunctions/W2/W2.C:68: error: no matching function for call to ‘max(Foam::tmp<Foam::Field<float> >, double)’ lnInclude/label.H:190: note: candidates are: char Foam::max(char, char) lnInclude/label.H:191: note: short int Foam::max(short int, short int) lnInclude/label.H:192: note: int Foam::max(int, int) lnInclude/label.H:193: note: long int Foam::max(long int, long int) lnInclude/label.H:194: note: long long int Foam::max(long long int, long long int) lnInclude/label.H:196: note: unsigned char Foam::max(unsigned char, unsigned char) lnInclude/label.H:197: note: short unsigned int Foam::max(short unsigned int, short unsigned int) lnInclude/label.H:198: note: unsigned int Foam::max(unsigned int, unsigned int) lnInclude/label.H:199: note: long unsigned int Foam::max(long unsigned int, long unsigned int) lnInclude/label.H:200: note: long long unsigned int Foam::max(long long unsigned int, long long unsigned int) lnInclude/label.H:202: note: long int Foam::max(int, long int) lnInclude/label.H:203: note: long long int Foam::max(int, long long int) lnInclude/label.H:204: note: long long int Foam::max(long long int, int) lnInclude/doubleFloat.H:92: note: double Foam::max(double, double) lnInclude/doubleFloat.H:93: note: double Foam::max(double, float) lnInclude/doubleFloat.H:94: note: double Foam::max(float, double) lnInclude/doubleFloat.H:95: note: float Foam::max(float, float) lnInclude/doubleFloat.H:96: note: double Foam::max(double, int) lnInclude/doubleFloat.H:97: note: double Foam::max(int, double) lnInclude/doubleFloat.H:98: note: double Foam::max(double, long int) lnInclude/doubleFloat.H:99: note: double Foam::max(long int, double) lnInclude/doubleFloat.H:100: note: float Foam::max(float, int) lnInclude/doubleFloat.H:101: note: float Foam::max(int, float) lnInclude/doubleFloat.H:102: note: float Foam::max(float, long int) lnInclude/doubleFloat.H:103: note: float Foam::max(long int, float) make: *** [Make/linux64GccSPOpt/W2.o] Error 1 make: *** Waiting for unfinished jobs.... Culprit is obviously src/OpenFOAM/interpolations/RBFInterpolation/RBFFunctions/W2/W2.C using a Foam::max function for a single precision scalar field which has not been declared. I would fix it by myself, but I have no idea where to start. Anyone want to try? Enlighten me... |
|
October 14, 2009, 13:20 |
Fixed!
|
#2 |
New Member
|
This is an issue raised by Henry in this thread:
http://www.cfd-online.com/Forums/ope...on-issues.html So the fix is to replace on line #68 in the file src/OpenFOAM/interpolations/RBFInterpolation/RBFFunctions/W2/W2.C : Foam::max(pow4(1 - (dist/radius_)), 0.0) by Foam::max(pow4(1 - (dist/radius_)), scalar(0.0)) Can anyone commit the fix to the svn repo? Thanx. |
|
October 15, 2009, 07:15 |
Additional source files to be modified
|
#3 |
New Member
|
In 1.5-dev, the following source files need to be also modified in order to be able to compile in single precision:
min([...], scalar(0.0)) and max([...], scalar(0.0)) respectively. |
|
October 16, 2009, 06:35 |
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
My fault: thank you, I'll check it in now.
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
Tags |
1.5-dev, libopenfoam, rev.1438, single precision |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM 1.5 installation on OpenSUSE 11.0 | bigphil | OpenFOAM Installation | 16 | April 29, 2009 07:28 |
Problem installing OpenFOAM 1.5 installation on RHEL 4. | vwsj84 | OpenFOAM Installation | 4 | April 23, 2009 05:48 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |
OpenFOAM Version 1.5 Released | OpenFOAM discussion board administrator | OpenFOAM Announcements from ESI-OpenCFD | 0 | July 14, 2008 19:22 |
OpenFOAM Debian packaging current status problems and TODOs | oseen | OpenFOAM Installation | 9 | August 26, 2007 14:50 |