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

Issues running custom code in parallel

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 16, 2013, 14:08
Default Issues running custom code in parallel
  #1
New Member
 
BigBlueDart's Avatar
 
Scott Ripplinger
Join Date: Nov 2012
Posts: 13
Rep Power: 4
BigBlueDart is on a distinguished road
I am working on a solver that I've developed using the solidParticle class as a base. I've gotten the code to run properly in serial, but when I try running it in parallel it gets stuck. I've narrowed it down to where a interpolationCellPoint<vector> is declared. While I have modified the code some, this would analogous to line 79 of solidParticleCloud.C (I have lines 78 and 80 commented out). Any ideas of why the code would get stuck here when running in parallel?
BigBlueDart is offline   Reply With Quote

Old   October 15, 2013, 06:11
Default
  #2
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 4
sophie_l is on a distinguished road
Hi Scott,

Sorry I cannot contribute something to your question, but I've got a code based on solidParticle as well. When I decompose a case, particles are divided onto different processors and 'positions' under /processor*/0/lagrangian/defaultCloud/ are written correctly, but there is FOAM Warning:
Quote:
Processor 0: field transfer
--> FOAM Warning :
From function Cloud<ParticleType>::initCloud(const bool checkClass)
in file /openfoam/OpenFOAM-1.7.1/src/lagrangian/basic/lnInclude/CloudIO.C at line 124
Cannot read particle positions file
"/home/channel/processor0/0/lagrangian/defaultCloud"
assuming the initial cloud contains 0 particles.
I don't know whether this warning is fatal to a parallel run or not. After that, I tried to run it in parallel using 'mpirun -np $NSLOTS $EXEC' and 'mpirun -np $NSLOTS $EXEC -parallel' respectively, then it runs in serial rather than in parallel as files in all the time steps are written directly in the case directory rather than under /processor*/.

Just wondering have you got some progress on your parallel issue? I'd appreciate it if you could show some clue on my case.

Thank you very much in advance.
Sophie
sophie_l is offline   Reply With Quote

Old   October 15, 2013, 08:25
Default
  #3
New Member
 
BigBlueDart's Avatar
 
Scott Ripplinger
Join Date: Nov 2012
Posts: 13
Rep Power: 4
BigBlueDart is on a distinguished road
Hey, Sophie.

It's been awhile, so I don't really remember all the details of what my problem was at that point. I do know that I ended up writing a script that would start my simulation again whenever it crashed, and that seemed to get it running.

As for your problem, I'm not entirely sure what the answer would be. What version of OpenFOAM are you running? Are you starting your simulation with an existing field of particles? Are you sure you have MPI installed and set up with OpenFOAM correctly?

If I had to guess I'd say that decomposePar doesn't seem to be handling lagrangian distribution correctly, but I can't really tell for sure with the information I've got.
BigBlueDart is offline   Reply With Quote

Old   October 18, 2013, 14:41
Default
  #4
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 4
sophie_l is on a distinguished road
Hi Scott,

Thank you very much for your response.

Sorry for the late reply. I'm using OF 1.7.1. The standard solvers run in parallel without problem. I have particles existing from the beginning of the simulation.

About the variables introduced with the particle phase, do you think special treatment are needed to get them passed and run in parallel even after I get decomposePar work correctly? I assumed it could run in parallel without new implementation as the solidParticle library is already integrated in OpenFOAM. But now I think it may be necessary.

Thanks,
Sophie
sophie_l is offline   Reply With Quote

Old   October 23, 2013, 06:17
Default
  #5
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 4
sophie_l is on a distinguished road
Hi Scott,

Sorry to be a pain, but may I ask you some questions about the decomposition of particle field please?

1. As for the input files, I only got d, U, positions in the directory of 0/lagrangian/defaultCloud. After looking at CloudIO.C, I'm wondering do I have to prepare 0/uniform/lagrangian/defaultCloud/cloudProperties? If cloudProperties is essential for a successful decomposition, what is the right format? I tried some format, but they didn't help.

2. My 0/lagrangian/defaultCloud/positions is posted here,

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class Cloud<solidParticle>;
location "0";
object positions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
4000
(
(0.5025 0.0025 0.0025) 100
(0.5075 0.0025 0.0025) 101
(0.5125 0.0025 0.0025) 102
(0.5175 0.0025 0.0025) 103
(0.5225 0.0025 0.0025) 104
(0.5275 0.0025 0.0025) 105
(0.5325 0.0025 0.0025) 106
(0.5375 0.0025 0.0025) 107
(0.5425 0.0025 0.0025) 108
(0.5475 0.0025 0.0025) 109
(0.5525 0.0025 0.0025) 110
(0.5575 0.0025 0.0025) 111
(0.5625 0.0025 0.0025) 112
which is of the class Cloud<solidParticle>; however, after decomposePar, the positions file under /processor*/0/lagrangian/defaultCloud/ is of class Cloud<passiveParticle>. I output 'ioP.type()' in CloudIO.C, it is Cloud<passiveParticle>. Is this the reason for the warning? What can I do with it?

Thanks a lot in advance.

Cheers,
Sophie

Quote:
Processor 0: field transfer
--> FOAM Warning :
From function Cloud<ParticleType>::initCloud(const bool checkClass)
in file /openfoam/OpenFOAM-1.7.1/src/lagrangian/basic/lnInclude/CloudIO.C at line 124
Cannot read particle positions file
"/home/channel/processor0/0/lagrangian/defaultCloud"
assuming the initial cloud contains 0 particles.
sophie_l is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Case running in serial, but Parallel run gives error atmcfd OpenFOAM Running, Solving & CFD 14 July 25, 2015 14:15
Problem running OpenFOAM 2.2.x in parallel in Centos 5 lvalvare OpenFOAM Running, Solving & CFD 25 April 21, 2015 07:56
Problem in Running OpenFoam in Parallel himanshu28 OpenFOAM Running, Solving & CFD 1 July 11, 2013 09:19
How to make code run in parallel? cwang5 OpenFOAM Programming & Development 1 May 30, 2011 04:47
Adding Custom Tab in FLUENT using Scheme Code dhimans Fluent UDF and Scheme Programming 0 September 14, 2009 15:10


All times are GMT -4. The time now is 00:06.