CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   OpenFOAM: something wrong with my compiler? (https://www.cfd-online.com/Forums/openfoam/102770-openfoam-something-wrong-my-compiler.html)

S.J.Daniels June 1, 2012 13:38

OpenFOAM: something wrong with my compiler?
 
Hi there,

I've recently installed swak4Foam with OpenFOAM 1.7.1.
It seems to have compiled successfully. However when I run one of the tutorials with in swak4Foam (in this case the pulsedPitzDaily case in groovyBC) I get the following feedback.

Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model oneEqEddy
--> FOAM Warning :
From function cubeRootVolDelta::calcDelta()
in file cubeRootVolDelta/cubeRootVolDelta.C at line 52
Case is 2D, LES is not strictly applicable

oneEqEddyCoeffs
{
ck 0.07;
ce 1.05;
}

Starting time loop

DICPCG: Solving for distance, Initial residual = 1, Final residual = 9.97476e-07, No Iterations 227
DICPCG: Solving for distance, Initial residual = 5.26588e-09, Final residual = 5.26588e-09, No Iterations 0
DICPCG: Solving for distance, Initial residual = 5.26588e-09, Final residual = 5.26588e-09, No Iterations 0
--> FOAM Warning :
From function dlLibraryTable::open(const dictionary& dict, const word& libsEntry, const TablePtr tablePtr)
in file lnInclude/dlLibraryTableTemplates.C at line 67
library "libsampling.so" did not introduce any new entries

Reading/calculating field UMean

Reading/calculating field pMean

Reading/calculating field UPrime2Mean

Reading/calculating field pPrime2Mean

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::tmp<Foam::GeometricField<Foam::outerProduct< double, double>::type, Foam::fvPatchField, Foam::volMesh> > Foam::sqr<double, Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#4 void Foam::fieldAverage::addPrime2MeanField<double, double>(int, Foam::List<Foam::word> const&, Foam::List<Foam::word>&) const in "/opt/openfoam171/lib/linux64GccDPOpt/libfieldFunctionObjects.so"
#5 Foam::fieldAverage::initialize() in "/opt/openfoam171/lib/linux64GccDPOpt/libfieldFunctionObjects.so"
#6 Foam::fieldAverage::read(Foam::dictionary const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libfieldFunctionObjects.so"
#7 Foam::fieldAverage::fieldAverage(Foam::word const&, Foam::objectRegistry const&, Foam::dictionary const&, bool) in "/opt/openfoam171/lib/linux64GccDPOpt/libfieldFunctionObjects.so"
#8 Foam::OutputFilterFunctionObject<Foam::fieldAverag e>::allocateFilter() in "/opt/openfoam171/lib/linux64GccDPOpt/libfieldFunctionObjects.so"
#9 Foam::OutputFilterFunctionObject<Foam::fieldAverag e>::start() in "/opt/openfoam171/lib/linux64GccDPOpt/libfieldFunctionObjects.so"
#10 Foam::functionObjectList::read() in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#11 Foam::Time::operator++() in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#12 Foam::Time::loop() in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#13
in "/opt/openfoam171/applications/bin/linux64GccDPOpt/pisoFoam"
#14 __libc_start_main in "/lib/libc.so.6"
#15
in "/opt/openfoam171/applications/bin/linux64GccDPOpt/pisoFoam"
Floating point exception


I found this a bit strange, I also have two other bits of code I'm using for a project. These were working before I installed swak4FOAM but now they get a similar error message.

Can someone tell me what's going on, or help with a solution?

Best Regards,

Steven

wyldckat June 1, 2012 13:43

Greetings Steven and welcome to the forum!

OK, you didn't mention the Gcc version, although you blamed it ;)

A few questions:
  • What Gcc version are you using?
  • What Linux distribution and version are you using?
  • Which swak4Foam version are you using?
There's a compatibility matrix showing the relation between OpenFOAM and Gcc versions: http://openfoamwiki.net/index.php/In...ibility_Matrix

Best regards,
Bruno

S.J.Daniels June 1, 2012 14:30

Hi Bruno,

Many thanks for your quick response! In answer to your questions:

gcc version 4.4.5 - according to the matrix it seems to be compatable with OF1.7.1.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10

I don't know what version of swak4Foam I've downloaded, but I downloaded it from this website: http://openfoamwiki.net/index.php/Contrib/swak4Foam

I used the command from the following section:
The current version that works with 1.x-releases of OpenFOAM can be downloaded using the following command..


Thank you for your time,


Steven

wyldckat June 2, 2012 08:38

Hi Steven,

OK, first thing, we need bash as the default sh (the default in Ubuntu is dash):
Code:

sudo update-alternatives --install /bin/sh sh /bin/dash 1
sudo update-alternatives --install /bin/sh sh /bin/bash 1
sudo update-alternatives --config sh

Then pick "0".

Then install bison:
Code:

sudo apt-get install bison
If you want python integration as well, see the file "swakConfiguration.example" and copy-edit to "swakConfiguration".

Then build swak4Foam:
Code:

./Allwmake
If you still have problems, run it again like this:
Code:

./Allwmake > make.log 2>&1
tar -czf make.log.tar.gz make.log

Then attach "make.log.tar.gz" to your next post.

Best regards,
Bruno

gschaider June 3, 2012 05:40

Quote:

Originally Posted by S.J.Daniels (Post 364353)
I don't know what version of swak4Foam I've downloaded, but I downloaded it from this website: http://openfoamwiki.net/index.php/Contrib/swak4Foam

I used the command from the following section:
The current version that works with 1.x-releases of OpenFOAM can be downloaded using the following command..

The actual error you posted happens in a library that comes with OF so my lawyer told me do deny all responsibility ;)

Anyway: the only way I can see swak being involved here is that the groovyBC wrote for instance a NaN and that lead to the floating point exception in another library (which is what you're seeing)

Starting with the latest release the utilities that come with swak4Foam (for instance funkySetFields) give a swak-version-number. If you're not seeing that then you don't have the latest release.

wyldckat June 3, 2012 16:41

Greetings to all!

After Bernhard's post, I remembered that I forgot to check if the tutorial worked for me. I tested the tutorial "Examples/groovyBC/pulsedPitzDaily" by running:
Code:

blockMesh
pisoFoam

And It ran with no problems till 0.00037s, which was when I canceled execution, since the initial report indicated that it would crash at the first time step.

Best regards,
Bruno

S.J.Daniels June 10, 2012 09:46

Hi Everyone!

Many thanks for your advice and suggestions. I've got swak4Foam working now!

Best Regards,

Steven :o

gschaider June 10, 2012 15:59

Quote:

Originally Posted by S.J.Daniels (Post 365674)
Many thanks for your advice and suggestions. I've got swak4Foam working now!

If any of the suggestions here was the right one OR if the problem was something different, could you just write one sentence about that here? Not for me but the next poor soul who has the same problem as you and finds this thread via the search-function of the MessageBoard

S.J.Daniels June 11, 2012 11:13

Hello all,

Swak4Foam worked after I followed Bruno's instructions earlier in this thread (installing Bison etc.). I haven't tried the Python integration yet.

Thanks again,

Steven

gschaider June 13, 2012 17:45

Quote:

Originally Posted by S.J.Daniels (Post 365842)
Hello all,

Swak4Foam worked after I followed Bruno's instructions earlier in this thread (installing Bison etc.). I haven't tried the Python integration yet.

Thanks again,

Steven

Thanks for the clarification.

Python integration has potential. But don't spend too much time on it if you don't need it


All times are GMT -4. The time now is 15:13.