CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Bug in groovyBC in parallel computation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2012, 08:15
Default Bug in groovyBC in parallel computation
  #1
Member
 
Aleksey Rukhlenko
Join Date: Nov 2009
Location: Moscow
Posts: 55
Rep Power: 16
Aleksey_R is on a distinguished road
Send a message via ICQ to Aleksey_R
Greetings, dear Foamers.

I found a bug which seems to be connected with groovyBC. If in groovyBC expressions the "max" and "min" statements are used, the parallel run of simpleFoam and pisoFoam fails.

This bug is specific for OF-1.6-ext. I tried the same case in OF-2.1.0 (with some changes specific for 2.1.0 version) and anything worked OK.

I attach an example case. It runs simpleFoam OK on a single core but fails in parallel simpleFoam run.

Best regards, Aleksey.
Attached Files
File Type: gz groovyBC_MPI_error.tar.gz (4.0 KB, 25 views)
Aleksey_R is offline   Reply With Quote

Old   February 11, 2012, 09:51
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Greetings Aleksey,

Bernhard might not fix this if it's not reported on the dedicated bug tracker for swak4Foam: http://sourceforge.net/apps/mantisbt...?project_id=10

Make sure that you pick swak4Foam as the project to where you report, since it is embedded into Extend's main project.

On another note... I think I saw swak4Foam being integrated directly into 1.6-ext's git repo... have you seen or are you using that version?

Best regards,
Bruno
__________________

Last edited by wyldckat; February 12, 2012 at 14:44. Reason: sorry, misspelled your name...
wyldckat is offline   Reply With Quote

Old   February 11, 2012, 10:30
Default
  #3
Member
 
Aleksey Rukhlenko
Join Date: Nov 2009
Location: Moscow
Posts: 55
Rep Power: 16
Aleksey_R is on a distinguished road
Send a message via ICQ to Aleksey_R
Thank you for your reply, Bruno.

I've submitted a bug N 123:
https://sourceforge.net/apps/mantisb...iew.php?id=123

The swak4foam was downloaded by command:
svn checkout https://openfoam-extend.svn.sourcefo...ies/swak4Foam/

OF-1.6-ext I downloaded by means of:
git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
and there were neither swak4foam nor groovyBC.


Best regards, Aleksey.
Aleksey_R is offline   Reply With Quote

Old   February 11, 2012, 10:41
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi Aleksey,
Quote:
Originally Posted by Aleksey_R View Post
OF-1.6-ext I downloaded by means of:
git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
and there were neither swak4foam nor groovyBC.
Ah, now I remember, it's on a branch, apparently pending approval. Try this:
Code:
git merge origin/bgschaid/feature/swak4Foam
Then:
Code:
wmake all src/swak4Foam
wmake all applications/utilities/swak4Foam
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 11, 2012, 11:20
Default
  #5
Member
 
Aleksey Rukhlenko
Join Date: Nov 2009
Location: Moscow
Posts: 55
Rep Power: 16
Aleksey_R is on a distinguished road
Send a message via ICQ to Aleksey_R
I've checked the attached case using branched swak4foam. The same behaviour - simpleFoam works OK on single core and fails on parallel run.

Best regards, Aleksey.
Aleksey_R is offline   Reply With Quote

Old   February 11, 2012, 15:52
Default
  #6
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hi and a Good Evening :-)!

This issue that you have seen is to do with the OpenFOAM-1.6-ext version of OpenFOAM.

I posted this as a bug report quite a while ago under the GroovyBC topic, but after discussing it with Bernhard, it turned out to be an issue with the "-ext" version of OpenFOAM.... specifically, to do with "pTraits".

However, can you give me some more details regarding the crash you are having with simpleFoam?? I use GroovyBC with simpleFoam for parallel simulations quite often. Though I get a warning that the "min" or "max" functions return a zero and that the average will be taken (cant remember the exact warning), the simulations work out fine, and the results are also good.


By the way..... I am using the latest version of OpenFOAM-1.6-ext from the Git repository.

Have a nice day!

Philippose
philippose is offline   Reply With Quote

Old   February 12, 2012, 08:26
Default
  #7
Member
 
Aleksey Rukhlenko
Join Date: Nov 2009
Location: Moscow
Posts: 55
Rep Power: 16
Aleksey_R is on a distinguished road
Send a message via ICQ to Aleksey_R
Thank you for your reply.

Honestly, the logs are not informative. I attach the log and the terminal output.

By the way, does the attached in this thread case runs on your system?

Best regards, Aleksey.
Attached Files
File Type: txt log.txt (1.9 KB, 16 views)
File Type: txt terminal_output.txt (842 Bytes, 16 views)
Aleksey_R is offline   Reply With Quote

Old   February 12, 2012, 14:41
Default
  #8
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hi again,

I just tried the case you had posted on this thread with OpenFOAM-1.6-extm and you are right..... it does not work.

Initially I thought it might be because the decomposition also cut up the patches into different domains... but I dont think that is the case. Atleast, the decomposition that I got from "decomposePar" had all the patches intact in either one of the two parts.

I hope this post catches Bernhard's attention..... He may have something more to say about the issue. I think he is already aware of it.

Sorry I could not help further....

Have a nice day ahead :-)!

Philippose
philippose is offline   Reply With Quote

Old   February 13, 2012, 20:01
Default
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
Hi Aleksey,

Ah, now I remember, it's on a branch, apparently pending approval. Try this:
Code:
git merge origin/bgschaid/feature/swak4Foam
Then:
Code:
wmake all src/swak4Foam
wmake all applications/utilities/swak4Foam
Best regards,
Bruno
There are good reasons that this branch is currently not merged into the default-branch (I just put it there for discussion). The swak-sources that are there don't differ from regular swak (so this wouldn't fix the problem discussed).
gschaider is offline   Reply With Quote

Old   February 13, 2012, 20:04
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by philippose View Post
Hi again,

I just tried the case you had posted on this thread with OpenFOAM-1.6-extm and you are right..... it does not work.

Initially I thought it might be because the decomposition also cut up the patches into different domains... but I dont think that is the case. Atleast, the decomposition that I got from "decomposePar" had all the patches intact in either one of the two parts.

I hope this post catches Bernhard's attention..... He may have something more to say about the issue. I think he is already aware of it.

Sorry I could not help further....

Have a nice day ahead :-)!

Philippose
Had a quick look at it and can reproduce the problem. Further communications on this will be through the bug on the Mantis (link see above)
gschaider is offline   Reply With Quote

Old   September 13, 2012, 03:40
Default
  #11
Member
 
Join Date: Apr 2012
Location: Trivandrum
Posts: 37
Rep Power: 14
toolpost is on a distinguished road
Hi !

I am getting the same error in simpleFoam solver of OpenFoam1.6ext with parabolicVelocity boundary condition. My case is a simple laminar pipe flow with a constriction and I am trying to run it on an 8-core cpu. The case is tested for single and multiple cores with surfaceNormalfixedvalue bc and found working. but, when parabolicVelocity boundary condition is used, normal solution without decomposing is working fine. but, when tried to decompose it and run in parallel, it ended up with similar errors mentioned above.

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0105602, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0903589, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0875971, No Iterations 1
[entropy:2277] *** An error occurred in MPI_Recv
[entropy:2277] *** on communicator MPI_COMM_WORLD
[entropy:2277] *** MPI_ERR_TRUNCATE: message truncated
[entropy:2277] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 2277 on
node entropy exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[entropy:02276] 1 more process has sent help message help-mpi-errors.txt / mpi_errors_are_fatal
[entropy:02276] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

I have swake4Foam installed, but not used in this particular case. So I think this error is not related to groovyBC.

Any advice would be greatly appreciated... and thanks a lot for your time.

Regards
Jabir
toolpost is offline   Reply With Quote

Old   September 13, 2012, 05:36
Default
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by toolpost View Post
Hi !

I am getting the same error in simpleFoam solver of OpenFoam1.6ext with parabolicVelocity boundary condition. My case is a simple laminar pipe flow with a constriction and I am trying to run it on an 8-core cpu. The case is tested for single and multiple cores with surfaceNormalfixedvalue bc and found working. but, when parabolicVelocity boundary condition is used, normal solution without decomposing is working fine. but, when tried to decompose it and run in parallel, it ended up with similar errors mentioned above.

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0105602, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0903589, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0875971, No Iterations 1
[entropy:2277] *** An error occurred in MPI_Recv
[entropy:2277] *** on communicator MPI_COMM_WORLD
[entropy:2277] *** MPI_ERR_TRUNCATE: message truncated
[entropy:2277] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 2277 on
node entropy exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[entropy:02276] 1 more process has sent help message help-mpi-errors.txt / mpi_errors_are_fatal
[entropy:02276] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

I have swake4Foam installed, but not used in this particular case. So I think this error is not related to groovyBC.

Any advice would be greatly appreciated... and thanks a lot for your time.

Regards
Jabir
To be sure remove the swak-stuff from the libs entry (then I can plead "I'm not to blame")

I think it can't be the parabolic-BC as the velocity has already been successfully solved. The problem seems to occur during the pressure solution. Are you using any AMG-type solver for that. Just for testing replace it with one of the CG-solvers.

Other than that in my experience that kind of error usually occurs because of an inconsistently compiled OF-version (because of an update after which you chose only to compile some libraries for instance). Sounds like snake oil but sometimes a complete recompilation helps.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 13, 2012, 08:15
Default
  #13
Member
 
Join Date: Apr 2012
Location: Trivandrum
Posts: 37
Rep Power: 14
toolpost is on a distinguished road
Thanks for your quick response..

Quote:
To be sure remove the swak-stuff from the libs entry (then I can plead "I'm not to blame")
Previously, I haven't included the libs in my controlDict file and so I thought there is no connection between this error and swak4Foam. right? Anyways, now I completely removed swak4Foam and the same error is still there.. So, I think it is a good news for you..

Quote:
Are you using any AMG-type solver for that. Just for testing replace it with one of the CG-solvers.
No. I am not using AMG.

Code:
solvers
{
    p
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-06;
        relTol           0.01;
    };
    U
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-05;
        relTol           0.1;
    };
So, what to do next? Do you think a complete re-compilation/installation solve this issue?

Thanks a lot for your time.

Regards,
Jabir

Last edited by toolpost; September 14, 2012 at 00:01. Reason: typos
toolpost is offline   Reply With Quote

Old   September 13, 2012, 11:56
Default
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by toolpost View Post
Thanks for your quick response..

Previously, I haven't included the libs in my controlDict file and so I thought there is no connection between this error and swak4Foam. right? Anyways, now I completely removed swak4Foam and the same error is still there.. So, I think it is a good new for you..

No. I am not using AMG.

Code:
solvers
{
    p
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-06;
        relTol           0.01;
    };
    U
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-05;
        relTol           0.1;
    };
So, what to do next? Do you think a complete re-compilation/installation solve this issue?

Thanks a lot for your time.

Regards,
Jabir
I'm afraid recompilation will not help.

You mentioned the parabolic-BC before. That is the last thing I can think of. Replace that with a normal fixedValue. If the simulation then runs OK then probably the min/max in parallel is the problem
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 14, 2012, 00:01
Default
  #15
Member
 
Join Date: Apr 2012
Location: Trivandrum
Posts: 37
Rep Power: 14
toolpost is on a distinguished road
Good morning!

Quote:
Originally Posted by gschaider View Post

You mentioned the parabolic-BC before. That is the last thing I can think of. Replace that with a normal fixedValue. If the simulation then runs OK then probably the min/max in parallel is the problem
I already tested the case with "surfaceNormalFixedValue" and it is working fine. I mentioned it in my first post. The "parabolicVelocity" runs in single core simulation, but fails for parallel case.

Thanks for your time and consideration.

Regards,
Jabir
toolpost is offline   Reply With Quote

Old   September 15, 2012, 10:05
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Greetings to all!

@Jabir: Can you provide an example based on one of the tutorial cases? This way we can more easily try and replicate the problem you're getting.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 15, 2012, 12:45
Default
  #17
Member
 
Join Date: Apr 2012
Location: Trivandrum
Posts: 37
Rep Power: 14
toolpost is on a distinguished road
Good evening!

Quote:
Originally Posted by wyldckat View Post
Can you provide an example based on one of the tutorial cases?
Yes. I tried with pitzDaily case with laminar flow assumption and the same errors appeared again. The case file is attached. Please have a look at the 0/U file. Both inlet bcs are fine with single core simulation. But in parallel run, the parabolicvelocity crashes as said above.

Thanks for your help.

Regards,
Jabir
Attached Files
File Type: gz case1.tar.gz (3.4 KB, 10 views)
toolpost is offline   Reply With Quote

Old   September 16, 2012, 05:22
Default
  #18
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi Jabir,

OK, only now did I come to the conclusion that the problem is with the "parabolicVelocity" BC itself, not groovyBC
Therefore, I think this should be reported at http://sourceforge.net/apps/mantisbt...?project_id=11, namely project "OpenFOAM-ext release", along with the test case you provided!

As for a quick fix, have a look at the tutorial "incompressible/simpleFoam/pitzDailyExptInlet", where you can find in the folder "constant/boundaryData/inlet/" that the values at the "inlet" are being defined for each point on the patch.
It may be a bit annoying having to define them manually or with the help of another utility, but for now this would be the somewhat-quickest solution.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 18, 2012, 00:40
Default
  #19
Member
 
Join Date: Apr 2012
Location: Trivandrum
Posts: 37
Rep Power: 14
toolpost is on a distinguished road
Good morning Bruno!

Thanks a lot for your help and suggestions. So, the problem comes from parabolicVelocity bc, and not from groovyBC. I shall post a bug report in the link you provided.

Quote:
As for a quick fix, have a look at the tutorial "incompressible/simpleFoam/pitzDailyExptInlet", where you can find in the folder "constant/boundaryData/inlet/" that the values at the "inlet" are being defined for each point on the patch.
It may be a bit annoying having to define them manually or with the help of another utility, but for now this would be the somewhat-quickest solution.
I have checked it. The procedure of specifying individual velocities at each points looks tedious, but as you said it would be the quickest solution. I am going to give it a try.

Thanks again for your time and help.

Regards,
Jabir
toolpost is offline   Reply With Quote

Old   September 18, 2012, 08:50
Default
  #20
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by toolpost View Post
Good morning Bruno!

Thanks a lot for your help and suggestions. So, the problem comes from parabolicVelocity bc, and not from groovyBC. I shall post a bug report in the link you provided.

I have checked it. The procedure of specifying individual velocities at each points looks tedious, but as you said it would be the quickest solution. I am going to give it a try.

Thanks again for your time and help.

Regards,
Jabir
Something that might make it less tedious is funkySetBoundaryFields. This allows you to set boundary fields (not only the value but everything that accepts a uniform/nonuniform value like the inletValue) statically with an expression. Basically the idea would be to set the parabolic inlet for a fixedValue in the serial case with it and then decompose it (this would avoid this unfortunate min/max-bug)

There is an example-dictionary that comes with swak4Foam
wyldckat and toolpost like this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Tags
bug, groovybc, parallel, pisofoam, simplefoam


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
Fluent parallel computation using Xeon duo-processor with CFD occupation below 50% zhujj09 FLUENT 1 October 19, 2016 16:02
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 19:45
the speed of parallel computation for over 3 million grid is very slow liujmljm SU2 7 June 27, 2014 17:45
Run in parallel: bug or what? novyno OpenFOAM Running, Solving & CFD 0 November 10, 2009 11:34
load balancing in parallel computation shyamdsundar Main CFD Forum 0 September 3, 2009 00:53


All times are GMT -4. The time now is 08:02.