CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

xxxFoam > log, Failed! xxxFoam, succeed! ?.....

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2015, 10:35
Default xxxFoam > log, Failed! xxxFoam, succeed! ?.....
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Hi guys,

I run into a very weird case....

In my code, its just a c++ program for now. It does not need any OpenFOAM libraries. It compiles no warning, no error. Runs smoothly.

But when I add this:

Code:
int main(int argc, char *argv[])
{
    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"
I just include these headers, actually I did not use mesh class and time class. It shows a strange problem.

Code:
    Info<<endl;
    //- Check if its realizable, if not, get out of the loop
    if(!gaussian.gaussianCheckRealizable(weights, abscissas, ms, n) )
    {
         break;
    }
    Info<<endl;
See this Info? I have to include this "Info" there. There is no problem with this.

But if I delete this info lines it shows:

Code:
Create time

Constructing single cell mesh

Reading EQMOM properties

#0  Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/printStack.C:221
#1  Foam::sigFpe::sigHandler(int) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/signals/sigFpe.C:117
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  KDF::gaussianCheckRealizable(double const*, double const*, double const*, int const&) at ~/case/phdCase/EQMOM/KDF/KDF.C:113 (discriminator 2)
#4  
 at ~/case/phdCase/EQMOM/EQMOM/EQMOM.C:45
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6  
 at ??:?

So Im quite confused now. Adding Info, succeed, Delete Info, fail.
The code is related with Info????


Sorry, the title of this thread is misleading..
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   September 21, 2015, 11:16
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
  1. Let me know what title you prefer for the thread and I'll change it.
  2. If you didn't forget to describe anything, then my guess is that the use of "Info" ensures that the necessary libraries are loaded up and ready to go. No using it leads to the libraries being only loaded onto memory, but possibly not initialized.
If you could provide a complete example package, it would make it easier to diagnose.
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel U.Golling OpenFOAM Running, Solving & CFD 52 September 23, 2023 03:35
Initial conditions for uniform flow andreas OpenFOAM 5 November 16, 2012 15:00
[OpenFOAM] ParaView/Parafoam error when making animation Disco_Caine ParaView 6 September 28, 2010 09:54
user subroutine error CFDUSER CFX 2 December 9, 2006 06:31
user defined function cfduser CFX 0 April 29, 2006 10:58


All times are GMT -4. The time now is 09:21.