X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fmpiworld.h;h=d6bf57e36edfe78be95cd871f2574a8188454a4e;hp=74042b3fea6706d23fd9692591b0b7a4ea0a8d68;hb=f13a8c004b8f182b42d9e4df2bcd7c7f030bf1ad;hpb=2451ac413848718a1dd666ce6f6464e974680f47 diff --git a/include/mpiworld.h b/include/mpiworld.h index 74042b3..d6bf57e 100644 --- a/include/mpiworld.h +++ b/include/mpiworld.h @@ -7,9 +7,7 @@ ** Date Started: June 6, 2000 ** ** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg -** -** $id$ +** Copyright (c) 1983-2009 Kevin Rosenberg ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -27,42 +25,44 @@ #include #include - +#include class MPIWorld { public: - MPIWorld (int& argc, char**& argv); + MPIWorld (int& argc, char* const *& argv); void setTotalWorkUnits (int totalUnits); int getRank (void) const - { return m_myRank; } + { return m_myRank; } int getNumProcessors (void) const - { return m_nProcessors; } + { return m_nProcessors; } int getStartWorkUnit (int rank) const - { return m_vStartWorkUnit [rank]; } + { return m_vStartWorkUnit [rank]; } int getEndWorkUnit (int rank) const { return m_vEndWorkUnit [rank]; } int getLocalWorkUnits (int rank) const - { return m_vLocalWorkUnits [rank]; } + { return m_vLocalWorkUnits [rank]; } int getMyStartWorkUnit (void) const - { return m_vStartWorkUnit [m_myRank]; } + { return m_vStartWorkUnit [m_myRank]; } int getMyEndWorkUnit (void) const - { return m_vEndWorkUnit [m_myRank]; } + { return m_vEndWorkUnit [m_myRank]; } int getMyLocalWorkUnits (void) const - { return m_vLocalWorkUnits [m_myRank]; } + { return m_vLocalWorkUnits [m_myRank]; } - MPI::Intracomm getComm() + MPI::Intracomm& getComm() { return m_comm; } - + + void BcastString (string& str); + private: int m_myRank; int m_nProcessors; @@ -72,4 +72,3 @@ private: MPI::Intracomm m_comm; }; -