|
[Sponsors] |
Problem with Application based on a faceZone in parallel |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 27, 2016, 11:07 |
Problem with Application based on a faceZone in parallel
|
#1 |
New Member
P. Silkeit
Join Date: Jun 2015
Posts: 6
Rep Power: 11 |
Dear FOAMers,
I'm working on a new application which does some calculation based on the pressure values provided on a faceZone. When I run the case in parallel and make sure that each processor mesh contains parts of the faceZone the calculation runs smoothly and yields the correct results. For information on the parallelization see this thread http://www.cfd-online.com/Forums/ope...tml#post595977 But when one processor mesh contains no faces of the faceZone the application halts and just hangs without doing nothing. I tried do construct and execute the calculation based on the size of the zoneMesh in the following way to keep the not concerned processor from doing the calculation Code:
// in constructor if(zoneFaces.size()==0) // no face of faceZone on processor { // create the variable i want to calculate // with the correct size and equal to zero myVar = scalarListList( observerPoints.size()) forAll(observerPoints,pointI) { myVar[pointI] = scalarList(Steps.size(),0.0); } } else { // lengthy calculations resulting in myVar of // same size and type as above } // in code / function if(zoneFaces.size()!=0) // if there are faces of faceZone on processor { // do the calculation which changes values in myVar } // Gathering myVar from all processor List<List< List<scalar>>> gatheredStuff(Pstream::nProcs()); gatheredStuff[Pstream::myProcNo()] = myVar; Pstream::gatherList(gatheredStuff); // Further calculation and writing if (Pstream::master()) { // add some contents of gatheredStuff if(runTime.outputTime()) { // write results to file } } Sadly when I run the code it reaches the Pstream::gatherList comand and then following error message is produced: Code:
[0] --> FOAM FATAL IO ERROR: [0] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token [0] [0] file: IOstream at line 0. [0] [0] From function IOstream::fatalCheck(const char*) const [0] in file db/IOstreams/IOstreams/IOstream.C at line 114. [0] FOAM parallel run exiting [0] -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 1. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. -------------------------------------------------------------------------- -------------------------------------------------------------------------- mpirun has exited due to process rank 0 with PID 16980 on node waylon-vm exiting without calling "finalize". This may have caused other processes in the application to be terminated by signals sent by mpirun (as reported here). Thanks for any input in advance. Best regards, Patrick |
|
April 28, 2016, 05:25 |
Additional Info
|
#2 |
New Member
P. Silkeit
Join Date: Jun 2015
Posts: 6
Rep Power: 11 |
When no processor contains faces of the zoneFaces and thus myVar is zero on all processors the calculation completes successfully.
Therefore the problem only arises if one processor does the calculation and the other one does not... Could this be a synchronization problem? |
|
April 28, 2016, 09:47 |
Solved
|
#3 |
New Member
P. Silkeit
Join Date: Jun 2015
Posts: 6
Rep Power: 11 |
I solved my own problem...
The error was that i called gMin and gMax inside the calculation which communicates over processor boundaries if I'm not mistaken and thus doesn't restict the calcualtion to one processor. Using the normal max/min functions resolved the issue. Sorry for spaming.. hopefully this may help someone in the future. Cheers |
|
Tags |
parallel code, parallel computaion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 04:18 |
problem for parallel processing | minaret | OpenFOAM Running, Solving & CFD | 14 | January 19, 2015 23:41 |
problem about running parallel on cluster | killsecond | OpenFOAM Running, Solving & CFD | 3 | July 23, 2014 21:13 |
Fluent parallel license problem | brothershuai | Main CFD Forum | 0 | July 1, 2009 15:41 |
PROBLEM IN PARALLEL PROGRAMMING WITH MPI | Niavarani | Main CFD Forum | 1 | April 20, 2004 06:51 |