[Dune] problem with mpi_init

Marco Cisternino marco.cisternino at optimad.it
Mon Jan 20 13:11:24 CET 2014


That worked! 
I used the default project to start, then that "return 0" was still there. 
Thank you very much. 

Bests, 
Marco 


-- 
----------------------------------------------- 
Marco Cisternino, PhD 
OPTIMAD Engineering s.r.l. 
Via Giacinto Collegno 18 
10143 Torino - Italy 
www.optimad.it 
marco.cisternino at optimad.it 
+39 011 19719782 
----------------------------------------------- 

----- Messaggio originale -----

Da: "Markus Blatt" <markus at dr-blatt.de> 
A: dune at dune-project.org 
Inviato: Venerdì, 17 gennaio 2014 20:00:29 
Oggetto: Re: [Dune] problem with mpi_init 

Thanks for reporting this. 

I guess that is a bug in the example problem created with duneproject, 
which has a return statement in the try clause that causes the program 
to exit before calling MPI_Finalize. 

Please try to remove "return 0" from the following main function: 
" 
int main(int argc, char** argv) 
{ 
try{ 
//Maybe initialize Mpi 
Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv); 
std::cout << "Hello World! This is tester." << std::endl; 
if(Dune::MPIHelper::isFake) 
std::cout<< "This is a sequential program." << std::endl; 
else 
std::cout<<"I am rank "<<helper.rank()<<" of "<<helper.size() 
<<" processes!"<<std::endl; 
return 0; 
//^^^^^^^^^ Please remove! 
} 
catch (Dune::Exception &e){ 
std::cerr << "Dune reported error: " << e << std::endl; 
} 
catch (...){ 
std::cerr << "Unknown exception thrown!" << std::endl; 
} 
} 


Just a wild guess: 

Does your main contain a return statement? 

If you are using the 
-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de 
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany 
Tel.: +49 (0) 160 97590858 Fax: +49 (0)322 1108991658 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140120/aa85eab8/attachment.htm>


More information about the Dune mailing list