How to call external function in parallel
Dear foamers,
I added to a solver a call to an external function after the transport problem is solved, as the code below summarizes. Now, I would like to make the loop between stars (***) parallel. Could you please advise me on that? After reading many docs and posts, I still couldn't do it. Code:
int main(int argc, char *argv[]) Thomas |
I'm not sure I understand. How is this not parallel? When running a parallel simulation, there are nProcs processes executing simultaneously. Each processor will do their own forAll(mesh.cells()) loop, and each one will execute myFunc for each cell on their own memory space.
What is not working? |
Dear David,
Thank you for your reply. At that time, I was still new to OpenFOAM. I was running OpenFOAM in serial mode, and wanted to parallelize only the call to the function. After I understood how OpenFOAM runs in parallel, this question lost most of its significance. |
All times are GMT -4. The time now is 06:00. |