Got ex4 working with MPI.

Added a new RunCellsThreadNoPrint that is about 20% faster when there is no printing of the output file.

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8383 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2014-01-17 20:32:53 +00:00
parent 9a56d9f8d4
commit 7b09eba977
2 changed files with 4 additions and 2 deletions

View File

@ -238,6 +238,7 @@ std::ostream& operator<< (std::ostream &os, const CSelectedOutput &a)
return os;
}
void CSelectedOutput::Serialize(
int row_number,
std::vector<int> &types, // each column for each row types, including headings
std::vector<long> &longs, // in order by occurance
std::vector<double> &doubles, // in order by occurance
@ -251,7 +252,7 @@ void CSelectedOutput::Serialize(
size_t nrows = this->m_nRowCount;
size_t ncols = this->m_vecVarHeadings.size();
longs.push_back((long) nrows);
longs.push_back((long) 1);
longs.push_back((long) ncols);
// put headings
@ -265,7 +266,7 @@ void CSelectedOutput::Serialize(
// go through rows by column
for (size_t j = 0; j < ncols; j++)
{
for (size_t i = 0; i < nrows; i++)
for (size_t i = row_number; i < row_number + 1; i++)
{
types.push_back(m_arrayVar[j][i].type);
switch(m_arrayVar[j][i].type)

View File

@ -39,6 +39,7 @@ public:
// Serialize
void Serialize(
int row,
std::vector<int> &types,
std::vector<long> &longs,
std::vector<double> &doubles,