Newsgroups: comp.parallel.mpi From: "Nathan A. Baker" Subject: Core dump on MPI_Finalize() Organization: The Avant-Garde of the Now, Ltd. Date: Thu, 2 Oct 1997 09:01:16 -0700 Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-ID: Hello all -- I have a question regarding the calls made inside MPI_Finalize(). I've been writing a parallel application C++ which was working fine until I wrapped the cout ostream to stdout to an object that only writes to stdout from PE 0. This object (and associated operators) work fine, but when MPI_Finalize() is called at the end of my program I get a core dump. The class declaration for my object is below... Does anyone have any ideas why this might be happening? Thanks! class out : public ostream { // a class to wrap the cout object // and comtrol console output such // that only PE 0 writes to stdout public: int my_rank; // rank of PE with out object Setup(int n) { // function called by Parallel_List // constructor. this gets rank of // calling PE as argument my_rank = n; cout << my_rank << " just called out::Setup()." << endl; } template out &operator<<(T o) { if (my_rank==0) cout << o; return *this; } } pcout; // object ---------------------------------------- Nathan Baker * nbaker@chemcca10.ucsd.edu A mosquito cried out in pain "A chemist has poisoned my brain!" The cause of his sorrow was para-dichlorodiphenyltrichloroethane ----------------------------------------