CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   OpenFOAM 1.7.0 installation problem (http://www.cfd-online.com/Forums/openfoam/77548-openfoam-1-7-0-installation-problem.html)

stevek June 26, 2010 13:21

OpenFOAM 1.7.0 installation problem
 
Hello,

I am having problems with the new 1.7.0 installation. The problem starts when I get the following while compiling argList.C for libOpenFoam.so:

lnInclude/dictionaryTemplates.C: In member function 'TFoam::dictionary::lookupOrDefault(const Foam::word&, const T&, bool, bool) const [with T = Foam::Switch]':
global/argList/argList.C:396: instantiated from here
lnInclude/dictionaryTemplates.C:44: error: call of overloaded 'Switch(Foam:: pTraits<Foam::Switch>)' is ambiguous
lnInclude/Switch.H:140: note: candidates are: Foam::Switch::Switch(int)
lnInclude/Switch.H:134: note: Foam::Switch::Switch(bool)
lnInclude/Switch.H:62: note: Foam::Switch::Switch(const Foam::Switch&)

Any suggestions? Many thanks,
Steve

wyldckat June 26, 2010 16:53

Greetings Steve,

That's odd... I'm currently building OpenFOAM 1.7 and there was no error there for me! I'm using Ubuntu 9.10 x86_64 with Ubuntu's gcc 4.4.1.

So, here are a few questions, to try to figure out what happened with your build:
  1. What Linux distribution are you using and what architecture?
  2. What gcc version are you using?
  3. Have you done a md5sum check of the downloaded packages?
  4. What was the previous version(s) of OpenFOAM that you have already built in your current Linux box?
I could write a few dozen suggestions, but I think it would be a useless exercise to do so :(

Best regards,
Bruno

alberto June 26, 2010 21:55

The build fails on openSUSE 11.3 RC1 too, complaining about missing separators in option files everywhere. I'm trying to figure out what's going on...

panda60 June 26, 2010 22:55

Dear all,
OpenFOAM is developed and tested on Linux, but should work with other POSIX systems. OpenFOAM-1.7.0 and ThirdParty-1.7.0 have been tested on standard Ubuntu 10.04 and OpenSuSE 11.2 Linux distributions.

OpenFOAM has been tested in ubuntu and OpenFOAMSUSE, Who can tell me which system is better . Because before I use OpenSUSE, but I noticed that ubuntu sometime can recognized more CPU numbers than OpenSUSE.
My professor buys two same computers for I and my classmate. I install OpenSUSE, the system can display 8 CPUs, but my calssmate's computer installed Ubuntu, and can display 16 CPUs, I don't know why. Maybe this is some high tecnique of CPU, some Linux system can't use this surficiently.

If now Ubuntu is also compatible with OpenFOAM perfectly, I intend to install Ubuntu.

panda60 June 26, 2010 22:57

And if someboy can share some attentation when installing 1.7 should be payed, That would be very good. Or the installation is the same with 1.6 ?

alberto June 26, 2010 23:17

Well, I would think twice before basing the choice only on the pre-packaged version of OpenFOAM. I would not change openSUSE for ubuntu without a technical reason: I think openSUSE is cleaner and better engineered, even if someone says ubuntu is easier to use (try to configure something at server level and I think you'll change your mind). Additionally openSUSE has some advantage based on the fact it is the base for SUSE Linux Enterprise: commercial applications certified for SLE usually work without any problem on openSUSE.

I think the small effort of compiling OF (you'll have to do the same on ubuntu as soon as 1.7.x comes out) is well repaid :-)

On openSUSE 11.2, the installation is straightforward: follow the instructions in the README, and after some time it's ready. OpenSUSE 11.3 is still in release candidate, and I'm trying to have the instructions ready for when it comes out :-)

philippose June 27, 2010 03:12

Hello everyone,

Great to see that there is a brand new version of OpenFOAM now :-)! All that needs to happen is to see a "-dev" version of this release, and I will be jumping around :-)!

Anyway, the compilation problem some people seem to be having with OpenFOAM-1.7 has basically been addressed at the following post, and the solution has also been mentioned in the post..... I stumbled upon this issue since GCC-4.4 (I think.... !)

OpenFOAM-1.5-dev SVN15xx with gcc-4.4.2



Hope this helps.....!

Have a great Sunday!

Philippose

panda60 June 27, 2010 10:19

New version 's source pack is so samll compared with 1.6 .

wyldckat June 27, 2010 10:27

Hi panda60,

Quote:

Originally Posted by panda60 (Post 264711)
New version 's source pack is so samll compared with 1.6 .

This way the download footprint is also a lot smaller! I would say it's ecologically more sensible :D well, only up to a certain point... But also useful for when the files fail to download properly, which happens occasionally!

The actual reason for it being smaller is that this time they don't pack in it the code documentation, which stood for a lot of megabytes of the package.... around 70-75MB when packed, if I'm not mistaken.

Best regards,
Bruno

panda60 June 29, 2010 01:35

Dear wyldckat,
Thanks for your explanation. And I will install version-1.7 in OpenSUSE11.2 quickly.

And now I can't download the user's Guide 1.7 in the home page. The pdf file has not been put ?

alberto June 29, 2010 01:51

It's in the main package, in the usual subdirectory "doc".

About the doxygen code documentation, there are the scripts to generate it.

crmccreary June 30, 2010 10:30

Alas, I cannot get OpenFOAM to compile on CentOS release 5.5 (Final). I compiled gcc 4.4.4, set PATH to the gcc bin directory, modified OpenFOAM-1.5-dev/wmake/rules/linuxGcc/general to add the -P flag (although I think with 4.4.4 cpp that is not required), and I still get:


Quote:

SOURCE=primitives/char/charIO.C ; wmakeScheduler g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.3 -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/charIO.o
lnInclude/dictionaryTemplates.C: In member function ‘T Foam::dictionary::lookupOrAddDefault(const Foam::word&, const T&, bool, bool) [with T = Foam::Switch]’:
primitives/bools/Switch/Switch.C:142: instantiated from here
lnInclude/dictionaryTemplates.C:66: error: call of overloaded ‘Switch(Foam::pTraits<Foam::Switch>)’ is ambiguous
primitives/bools/Switch/Switch.H:140: note: candidates are: Foam::Switch::Switch(int)
primitives/bools/Switch/Switch.H:134: note: Foam::Switch::Switch(bool)
primitives/bools/Switch/Switch.H:62: note: Foam::Switch::Switch(const Foam::Switch&)
make: *** [Make/linux64GccDPOpt/Switch.o] Error 1

wyldckat June 30, 2010 11:23

Greetings Charles and welcome to the forum!

Might I suggest following Linnemann's instructions: http://www.cfd-online.com/Forums/ope...-released.html

Best regards,
Bruno

lakeat July 4, 2010 22:24

Quote:

Originally Posted by stevek (Post 264653)
Hello,

I am having problems with the new 1.7.0 installation. The problem starts when I get the following while compiling argList.C for libOpenFoam.so:

lnInclude/dictionaryTemplates.C: In member function 'TFoam::dictionary::lookupOrDefault(const Foam::word&, const T&, bool, bool) const [with T = Foam::Switch]':
global/argList/argList.C:396: instantiated from here
lnInclude/dictionaryTemplates.C:44: error: call of overloaded 'Switch(Foam:: pTraits<Foam::Switch>)' is ambiguous
lnInclude/Switch.H:140: note: candidates are: Foam::Switch::Switch(int)
lnInclude/Switch.H:134: note: Foam::Switch::Switch(bool)
lnInclude/Switch.H:62: note: Foam::Switch::Switch(const Foam::Switch&)

Any suggestions? Many thanks,
Steve

Update Gnu-Gcc version, it will be fine

howellg December 1, 2010 15:30

error: call of overloaded ‘Switch
 
I'm also seeing the problem quoted by Stevek.

Am working with redhat linux ..

upgraded from gcc 4.1.2

gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)

to 4.5

Thread model: posix
gcc version 4.5.1 (GCC)

--------------------------------

On working a bit more, found that I could recover from wmake errors by repeating the compile command
on the command line.

The problem was that inside the wmake the older flavor of g++ was being used. The flavor of g++
was not taken from the etc/cshrc script which had been sourced before the compile.

The solution was to edit my path so that the path to the newer g++ occurred before the system g++.
Presumably the path change
setenv PATH pathtonewgcc:$PATH

could be included in the chsrc file before sourcing it.

Next to recompile with a working mpich library ..


The initial error is

lnInclude/dictionaryTemplates.C: In member function ‘T Foam::dictionary::lookupOrDefault(const Foam::word&, const T&, bool, bool) const [with T = Foam::Switch]’:
global/argList/argList.C:396: instantiated from here
lnInclude/dictionaryTemplates.C:44: error: call of overloaded ‘Switch(Foam::pTraits<Foam::Switch>)’ is ambiguous
lnInclude/Switch.H:140: note: candidates are: Foam::Switch::Switch(int)
lnInclude/Switch.H:134: note: Foam::Switch::Switch(bool)
lnInclude/Switch.H:62: note: Foam::Switch::Switch(const Foam::Switch&)
make: *** [Make/linux64Gcc43DPOpt/argList.o] Error 1


All times are GMT -4. The time now is 01:53.