projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update library dependency
[ctsim.git]
/
tools
/
mpiworld.cpp
diff --git
a/tools/mpiworld.cpp
b/tools/mpiworld.cpp
index 87c9a93be0aa48117507ac5cd9b67579a4bb6df0..6896d6563b0a884e2ab3a96c4c3ccfab9be33e75 100644
(file)
--- a/
tools/mpiworld.cpp
+++ b/
tools/mpiworld.cpp
@@
-7,9
+7,7
@@
** Date Started: June 2000
**
** This is part of the CTSim program
** Date Started: June 2000
**
** This is part of the CTSim program
-** Copyright (C) 1983-2000 Kevin Rosenberg
-**
-** $Id: mpiworld.cpp,v 1.1 2000/07/13 07:01:35 kevin Exp $
+** 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
**
** 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
+27,9
@@
#include <mpiworld.h>
#include <mpiworld.h>
-MPIWorld::MPIWorld (int& argc, char**& argv)
+MPIWorld::MPIWorld (int& argc, char*
const
*& argv)
{
{
- MPI::Init (argc,
argv
);
+ MPI::Init (argc,
const_cast<char**&>(argv)
);
m_comm = MPI::COMM_WORLD.Dup();
m_nProcessors = m_comm.Get_size();
m_myRank = m_comm.Get_rank();
m_comm = MPI::COMM_WORLD.Dup();
m_nProcessors = m_comm.Get_size();
m_myRank = m_comm.Get_rank();
@@
-41,7
+39,7
@@
MPIWorld::MPIWorld (int& argc, char**& argv)
}
}
-void
+void
MPIWorld::setTotalWorkUnits(int totalWorkUnits)
{
if (m_nProcessors < 1)
MPIWorld::setTotalWorkUnits(int totalWorkUnits)
{
if (m_nProcessors < 1)
@@
-61,7
+59,7
@@
MPIWorld::setTotalWorkUnits(int totalWorkUnits)
currWorkUnits += m_vLocalWorkUnits[iProc];
}
currWorkUnits += m_vLocalWorkUnits[iProc];
}
-
+
}
void
}
void
@@
-76,7
+74,7
@@
MPIWorld::BcastString (string& str)
if (m_myRank == 0)
strcpy (buf, str.c_str());
if (m_myRank == 0)
strcpy (buf, str.c_str());
-
+
m_comm.Bcast (buf, len + 1, MPI::CHAR, 0);
if (m_myRank > 0)
m_comm.Bcast (buf, len + 1, MPI::CHAR, 0);
if (m_myRank > 0)