X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=tools%2Fmpiworld.cpp;h=cdcead769d629cbb63ee7ff5ddaf44e7e98aea03;hp=39d09a15ea37211e612e4a60d45e57d8bb980c89;hb=1a050c98763fbbc0662731b0b76953acede6f5d7;hpb=4a0fb8cd3485dd9d8a86a1a33d45056cf3be204b diff --git a/tools/mpiworld.cpp b/tools/mpiworld.cpp index 39d09a1..cdcead7 100644 --- a/tools/mpiworld.cpp +++ b/tools/mpiworld.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: mpiworld.cpp,v 1.2 2000/07/13 07:17:25 kevin Exp $ +** $Id$ ** ** 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 @@ -29,9 +29,9 @@ #include -MPIWorld::MPIWorld (int& argc, char**& argv) +MPIWorld::MPIWorld (int& argc, char* const *& argv) { - MPI::Init (argc, argv); + MPI::Init (argc, const_cast(argv)); m_comm = MPI::COMM_WORLD.Dup(); m_nProcessors = m_comm.Get_size(); m_myRank = m_comm.Get_rank(); @@ -41,7 +41,7 @@ MPIWorld::MPIWorld (int& argc, char**& argv) } -void +void MPIWorld::setTotalWorkUnits(int totalWorkUnits) { if (m_nProcessors < 1) @@ -61,7 +61,7 @@ MPIWorld::setTotalWorkUnits(int totalWorkUnits) currWorkUnits += m_vLocalWorkUnits[iProc]; } - + } void @@ -76,7 +76,7 @@ MPIWorld::BcastString (string& str) if (m_myRank == 0) strcpy (buf, str.c_str()); - + m_comm.Bcast (buf, len + 1, MPI::CHAR, 0); if (m_myRank > 0)