|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Sicheng Sun
Join Date: Jun 2016
Posts: 9
Rep Power: 10 ![]() |
Hello Friends,
I'm wondering how to extract MPI rank in OpenFOAM? In general, I think this would work: Code:
#include"mpi.h" int main(int argc , char **argv) { int size,rank; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); Info << "rank: " << rank << nl << endl; } Code:
Fatal error in PMPI_Init_thread: Other MPI error, error stack: MPI_Init_thread(1028): Cannot call MPI_INIT or MPI_INIT_THREAD more than once Thanks a lot |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Sicheng Sun
Join Date: Jun 2016
Posts: 9
Rep Power: 10 ![]() |
solved,
for people who meet the same problem, use Code:
rank = Pstream::myProcNo(); Pout << "rank: " << rank << nl << endl; |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
CentOS kernel update 3.10.0-862.11.6 breaks MPI | Michael Rath | CFX | 0 | August 22, 2018 09:10 |
MPI Application rank 0 exited before MPI_Finalize() with status 1 | mustafadeniz89 | AVL FIRE | 6 | November 24, 2015 09:40 |
Problem running fluent with InfiniBand | blackpuma | FLUENT | 10 | August 28, 2011 01:16 |
Error using LaunderGibsonRSTM on SGI ALTIX 4700 | jaswi | OpenFOAM | 2 | April 29, 2008 10:54 |
Is Testsuite on the way or not | lakeat | OpenFOAM Installation | 6 | April 28, 2008 11:12 |