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

Why my program cannot ran in parallel???

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2019, 03:21
Question Why my program cannot ran in parallel???
  #1
New Member
 
Dongxu Wang
Join Date: Sep 2018
Location: China
Posts: 29
Rep Power: 4
wdx_cfd is on a distinguished road
Hi FOAMers,

I am doing some modifications on interFOAM, OpenFOAM v6. It is something about the dynamic mesh and I have changed the functions "pimple.loop()" to another one which is developed by myself. My new program runs good with the single core but will crash if I run it parallel. Here is the error information:

Code:
[1] --> FOAM FATAL IO ERROR: 
[1] incorrect first token, expected '(', found on line 0 the punctuation token ':'
[1] 
[1] file: IOstream at line 0.
[1] 
[1]     From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::List<T>&) [with T = Foam::Field<Foam::Vector<double> >]
[1]     in file /home/wdx/OpenFOAM-6/src/OpenFOAM/lnInclude/ListIO.C at line 131.
[1] 
FOAM parallel run exiting
and another similar case:
Code:
[1] --> FOAM FATAL IO ERROR: 
[1] incorrect first token, expected <int> or '(', found on line 0 the word 'g'
[1] 
[1] file: IOstream at line 0.
[1] 
[1]     From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::List<T>&) [with T = Foam::Field<Foam::Vector<double> >]
[1]     in file /home/wdx/OpenFOAM-6/src/OpenFOAM/lnInclude/ListIO.C at line 148.
[1] 
FOAM parallel run exiting
[1] 
[32] 
[32] 
[32] --> FOAM FATAL IO ERROR: 
[32] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[32] 
[32] file: IOstream at line 0.
[32] 
[32]     From function void Foam::IOstream::fatalCheck(const char*) const
[32]     in file db/IOstreams/IOstreams/IOstream.C at line 109.
[32] 
FOAM parallel run exiting
[32] 
[8] 
[8] 
[8] --> FOAM FATAL IO ERROR: 
[8] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[8] 
[8] file: IOstream at line 0.
[8] 
[8]     From function void Foam::IOstream::fatalCheck(const char*) const
[8]     in file db/IOstreams/IOstreams/IOstream.C at line 109.
[8] 
FOAM parallel run exiting
I find that this error happens at the moment of (CourantNo.H):
Code:
    
scalarField sumPhi
    (
        fvc::surfaceSum(mag(phi))().primitiveField()
    );
What's more, this error will occur after the pimple outer loop is stopped by my newly added criterion (i.e. entering into the next time step and calculating the courantNo as mentioned above). It seems that there is something important in the function of "pimple.loop()" for parallel running but not ciritical for serial running. I have read "pimple.loop()" but I think I did not find anything useful about this parallel running problem.

I don't know much about the parallel running, but I am very confused why this happens? Could anyone give me some suggestions?

Thanks a lot!

WDX

Last edited by wdx_cfd; February 24, 2019 at 21:36.
wdx_cfd is offline   Reply With Quote

Old   February 24, 2019, 15:51
Default
  #2
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 172
Rep Power: 10
massive_turbulence is on a distinguished road
Quote:
Originally Posted by wdx_cfd View Post
Hi FOAMers,

I am doing some modifications on interFOAM, OpenFOAM v6. It is something about the dynamic mesh and I have changed the functions "pimple.loop()" to another one which is developed by myself. My new program runs good with the single core but will crash if I run it parallel. Here is the error information:

Code:
[1] --> FOAM FATAL IO ERROR: 
[1] incorrect first token, expected '(', found on line 0 the punctuation token ':'
[1] 
[1] file: IOstream at line 0.
[1] 
[1]     From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::List<T>&) [with T = Foam::Field<Foam::Vector<double> >]
[1]     in file /home/wdx/OpenFOAM-6/src/OpenFOAM/lnInclude/ListIO.C at line 131.
[1] 
FOAM parallel run exiting
and another similar case:
Code:
[1] --> FOAM FATAL IO ERROR: 
[1] incorrect first token, expected <int> or '(', found on line 0 the word 'g'
[1] 
[1] file: IOstream at line 0.
[1] 
[1]     From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::List<T>&) [with T = Foam::Field<Foam::Vector<double> >]
[1]     in file /home/wdx/OpenFOAM-6/src/OpenFOAM/lnInclude/ListIO.C at line 148.
[1] 
FOAM parallel run exiting
[1] 
[32] 
[32] 
[32] --> FOAM FATAL IO ERROR: 
[32] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[32] 
[32] file: IOstream at line 0.
[32] 
[32]     From function void Foam::IOstream::fatalCheck(const char*) const
[32]     in file db/IOstreams/IOstreams/IOstream.C at line 109.
[32] 
FOAM parallel run exiting
[32] 
[8] 
[8] 
[8] --> FOAM FATAL IO ERROR: 
[8] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[8] 
[8] file: IOstream at line 0.
[8] 
[8]     From function void Foam::IOstream::fatalCheck(const char*) const
[8]     in file db/IOstreams/IOstreams/IOstream.C at line 109.
[8] 
FOAM parallel run exiting
I find that this error happens at the moment of (CourantNo.H):
Code:
    
scalarField sumPhi
    (
        fvc::surfaceSum(mag(phi))().primitiveField()
    );
What's more, this error will occur once the number of the current pimple outer loop larger than the total number that read from the fvSolution (I still need the value in the dictionary because the first two time step is controled by the pimple algorithm). I have read "pimple.loop()" but I think I did not find anything useful about this parallel running problem.

I don't know much about the parallel running, but I am very confused why this happens? Could anyone give me some suggestions?

Thanks a lot!

WDX
My guess with this function is that something is wrong with the flux between the different CPU spaces or domains. Without seeing your entire case I doubt anyone will be able to help you.

Code:
    
scalarField sumPhi
    (
        fvc::surfaceSum(mag(phi))().primitiveField()
    );
massive_turbulence is offline   Reply With Quote

Old   February 24, 2019, 19:42
Default
  #3
New Member
 
Dongxu Wang
Join Date: Sep 2018
Location: China
Posts: 29
Rep Power: 4
wdx_cfd is on a distinguished road
Quote:
Originally Posted by massive_turbulence View Post
My guess with this function is that something is wrong with the flux between the different CPU spaces or domains. Without seeing your entire case I doubt anyone will be able to help you.

Code:
    
scalarField sumPhi
    (
        fvc::surfaceSum(mag(phi))().primitiveField()
    );

Thank you for your reply. The entire code is a little bit complicated because I modified both the solver and the sixDof module. So updating the entire code is not an easy thing...

I think the problem is due to my newly added criterion for the pimple outer loop. Once the pimple outer loop is stopped by it, the program will crash (when parallel running).

I'll continue to find out the reason why this error occurs.

wdx_cfd is offline   Reply With Quote

Old   June 27, 2019, 05:49
Default
  #4
Member
 
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 81
Rep Power: 11
einstein_zee is on a distinguished road
Quote:
Originally Posted by wdx_cfd View Post
Hi FOAMers,

I am doing some modifications on interFOAM, OpenFOAM v6. It is something about the dynamic mesh and I have changed the functions "pimple.loop()" to another one which is developed by myself. My new program runs good with the single core but will crash if I run it parallel. Here is the error information:

Code:
[1] --> FOAM FATAL IO ERROR: 
[1] incorrect first token, expected '(', found on line 0 the punctuation token ':'
[1] 
[1] file: IOstream at line 0.
[1] 
[1]     From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::List<T>&) [with T = Foam::Field<Foam::Vector<double> >]
[1]     in file /home/wdx/OpenFOAM-6/src/OpenFOAM/lnInclude/ListIO.C at line 131.
[1] 
FOAM parallel run exiting
and another similar case:
Code:
[1] --> FOAM FATAL IO ERROR: 
[1] incorrect first token, expected <int> or '(', found on line 0 the word 'g'
[1] 
[1] file: IOstream at line 0.
[1] 
[1]     From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::List<T>&) [with T = Foam::Field<Foam::Vector<double> >]
[1]     in file /home/wdx/OpenFOAM-6/src/OpenFOAM/lnInclude/ListIO.C at line 148.
[1] 
FOAM parallel run exiting
[1] 
[32] 
[32] 
[32] --> FOAM FATAL IO ERROR: 
[32] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[32] 
[32] file: IOstream at line 0.
[32] 
[32]     From function void Foam::IOstream::fatalCheck(const char*) const
[32]     in file db/IOstreams/IOstreams/IOstream.C at line 109.
[32] 
FOAM parallel run exiting
[32] 
[8] 
[8] 
[8] --> FOAM FATAL IO ERROR: 
[8] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[8] 
[8] file: IOstream at line 0.
[8] 
[8]     From function void Foam::IOstream::fatalCheck(const char*) const
[8]     in file db/IOstreams/IOstreams/IOstream.C at line 109.
[8] 
FOAM parallel run exiting
I find that this error happens at the moment of (CourantNo.H):
Code:
    
scalarField sumPhi
    (
        fvc::surfaceSum(mag(phi))().primitiveField()
    );
What's more, this error will occur after the pimple outer loop is stopped by my newly added criterion (i.e. entering into the next time step and calculating the courantNo as mentioned above). It seems that there is something important in the function of "pimple.loop()" for parallel running but not ciritical for serial running. I have read "pimple.loop()" but I think I did not find anything useful about this parallel running problem.

I don't know much about the parallel running, but I am very confused why this happens? Could anyone give me some suggestions?

Thanks a lot!

WDX
Hey there,

I doubt that the problem would be because of "CourantNo.H". Cause interFoam already works perfectly fine in parallel . To pinpoint the real trouble you might switch to run in debug mode. Moreover, a basic understanding of how MPI works and how OF manages it is needed(at the very least, in case you want to remedy this on your own).
einstein_zee is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Run Mode:Platform MPI Local Parallel core problem mztcu CFX 0 October 13, 2016 03:14
[snappyHexMesh] Error while running SnappyHex in parallel mg.mithun OpenFOAM Meshing & Mesh Conversion 1 February 10, 2016 13:13
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
Update boundary conditions calculated by an external program CedricVH OpenFOAM 2 January 15, 2010 11:55


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