I successfully installed and ran OpenFOAM Version 6 . I followed the instructions for installing OpenQBMM and am getting a couple errors due to a failure of a template argument deduction/substitution in /OpenFOAM-6/src/OpenFOAM/lnInclude/List.C. A log of my makefile output is attached.
Andy help in resolving this issue would be appreciated.
Post by Alberto Passalacqua on Sept 21, 2019 14:38:03 GMT -6
if you are using OpenFOAM 6 with the master branch, that is the cause of the issue. Currently both master and development branch are aligned with OpenFOAM 7. Stable releases of OpenQBMM target a specific version of OpenFOAM: github.com/OpenQBMM/OpenQBMM/releases
I followed your advice and used OpenFOAM 7 to build OpenQBMM, after checking out the development branch, but am still getting the errors below.
First set of errors:
../../mappedList/mappedList.C:54:47: error: call of overloaded ‘pow(int, Foam::label)’ is ambiguous l += lst[dimi]*pow(10, size - dimi - 1); ../../mappedList/mappedList.C:190:62: error: call of overloaded ‘pow(int, long int)’ is ambiguous mapIndex += (*iter)*pow(10, nDims_ - argIndex - 1);
I'm not a C programmer but I was fix these by defining label lo=10; and replacing 10 with lo in mappedList.C.
Second Set of Errors:
../../mappedPtrList/mappedPtrList.C:59:47: error: call of overloaded ‘pow(int, Foam::label)’ is ambiguous l += lst[dimi]*pow(10, size - dimi - 1); ../../mappedPtrList/mappedPtrList.C:181:62: error: call of overloaded ‘pow(int, long int)’ is ambiguous mapIndex += (*iter)*pow(10, nDims_ - argIndex - 1); ../moments/moment.C:64:53: error: call of overloaded ‘pow(int, Foam::label)’ is ambiguous l += lst[dimi]*pow(10, lst.size() - dimi - 1);
As with mappedList.C, I fixed these by defining label lo=10; and replacing 10 with lo in mappedPtrList.C and moment.C.
Third Set of Errors:
populationBalanceSubModels/daugtherDistributions/oneQuarterMassRatio/oneQuarterMassRatio.C: In member function ‘virtual Foam::scalar Foam::populationBalanceSubModels::daughterDistributions::oneQuarterMassRatio::mDMass(const label&, const scalar&) const’: populationBalanceSubModels/daugtherDistributions/oneQuarterMassRatio/oneQuarterMassRatio.C:91:25: error: call of overloaded ‘pow(int, const label&)’ is ambiguous return (pow(4, order) + 1)*pow(abscissa, order)/pow(5, order); ^ In file included from /home/award/Software/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/UILList.H:39:0, from /home/award/Software/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/ILList.H:39, from /home/award/Software/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/IDLList.H:35, from /home/award/Software/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/entry.H:45, from /home/award/Software/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/dictionary.H:53, from lnInclude/daughterDistribution.H:39, from populationBalanceSubModels/daugtherDistributions/oneQuarterMassRatio/oneQuarterMassRatio.H:52, from populationBalanceSubModels/daugtherDistributions/oneQuarterMassRatio/oneQuarterMassRatio.C:26: /home/award/Software/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/label.H:73:7: note: candidate: Foam::label Foam::pow(Foam::label, Foam::label) label pow(label a, label b); ^~~
This is a bit more than I'd want to attempt to fix with my limited knowledge of C.
Last Edit: Sept 29, 2019 18:56:05 GMT -6 by bajanmon
Post by Alberto Passalacqua on Sept 30, 2019 13:51:05 GMT -6
could you let me know what version of gcc you are using so I can attempt to reproduce the problem? You can find it typing gcc -v in a terminal.
I will provide a patched version, if needed.
I am asking this because we have tested the master branch and the development branch on openSUSE LEAP 15.1, which is the system we use for development. We are currently using gcc 7.4.1 as reference. However, let me know in any case, so I can help you troubleshoot.