Worked on dependencies for Makefile.

Made dependencies the same for serial and parallel,
can check with make depends and make depends_parallel, 
dependencies and dependencies_parallel should be the same.

Modified fortran with -I/usr/include for gfortran compiler
to find mpif.h.

Now use mpif.h in mpimod.F90 to define MPI_COMM_WORLD.

Dictionary.h moved in cxx files to make serial and parallel
dependencies the same.

Ifdef'd mpimod to exclude everything in module for serial version. 



git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2707 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2008-02-14 17:56:32 +00:00
parent bfec3cc7c7
commit b9520a207f
9 changed files with 7 additions and 80 deletions

View File

@ -7,6 +7,7 @@
#include <iostream> // std::cout std::cerr
#include "Utils.h" // define first
#include "ExchComp.h"
#include "Dictionary.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
@ -523,7 +524,6 @@ void cxxExchComp::multiply(double extensive)
//double formula_z;
}
#ifdef USE_MPI
#include "Dictionary.h"
void cxxExchComp::mpi_pack(std::vector<int>& ints, std::vector<double>& doubles)
{
extern cxxDictionary dictionary;

View File

@ -7,6 +7,7 @@
#include "Utils.h" // define first
#include "KineticsComp.h"
#include "Dictionary.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
@ -310,7 +311,6 @@ void cxxKineticsComp::read_raw(CParser& parser)
}
}
#ifdef USE_MPI
#include "Dictionary.h"
void cxxKineticsComp::mpi_pack(std::vector<int>& ints, std::vector<double>& doubles)
{
extern cxxDictionary dictionary;

View File

@ -8,6 +8,7 @@
#include <iostream> // std::cout std::cerr
#include "Utils.h" // define first
#include "NameDouble.h"
#include "Dictionary.h"
#define EXTERNAL extern
#include "global.h"
#include "output.h"
@ -372,7 +373,6 @@ void cxxNameDouble::multiply(double extensive)
}
}
#ifdef USE_MPI
#include "Dictionary.h"
void cxxNameDouble::mpi_pack(std::vector<int>& ints, std::vector<double>& doubles) {
extern cxxDictionary dictionary;
ints.push_back( (int) (*this).size() );

View File

@ -7,6 +7,7 @@
#include "Utils.h" // define first
#include "PPassemblageComp.h"
#include "Dictionary.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
@ -299,7 +300,6 @@ void cxxPPassemblageComp::read_raw(CParser& parser)
}
#ifdef USE_MPI
#include "Dictionary.h"
void cxxPPassemblageComp::mpi_pack(std::vector<int>& ints, std::vector<double>& doubles)
{
extern cxxDictionary dictionary;

View File

@ -1,45 +0,0 @@
#include "Pe_Data.h"
#include "Utilities.h"
#include <ostream> // std::ostream
cxxPe_Data::cxxPe_Data()
: name("")
{
}
cxxPe_Data::cxxPe_Data(const std::string& name)
: name(name)
{
}
cxxPe_Data::~cxxPe_Data()
{
}
int cxxPe_Data::store(std::vector<cxxPe_Data>& vec_pe_data, const std::string& token)
{
unsigned int i = 0;
unsigned int size = vec_pe_data.size();
for (; i < size; ++i) {
if (vec_pe_data[i].name.compare(token) == 0)
return i;
}
vec_pe_data.push_back(token);
return i;
}
std::vector<cxxPe_Data> cxxPe_Data::alloc()
{
std::vector<cxxPe_Data> vec;
vec.push_back(cxxPe_Data("pe"));
// TODO: see pe_data_alloc
return vec;
}
void cxxPe_Data::dump_xml(std::ostream& os, unsigned int indent)const
{
unsigned int i;
for(i = 0; i < indent; ++i) os << Utilities::INDENT;
os << "<redox>" << this->name << "</redox>\n";
}

View File

@ -1,28 +0,0 @@
#if !defined(PE_DATA_H_INCLUDED)
#define PE_DATA_H_INCLUDED
#include <string>
#include <vector>
class cxxPe_Data
{
public:
cxxPe_Data();
cxxPe_Data(struct pe *pe_ptr);
cxxPe_Data(const std::string& name);
~cxxPe_Data();
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
std::string get_name()const {return this->name;};
void set_name(std::string name) {this->name = name;};
static int store(std::vector<cxxPe_Data>& vec, const std::string& token);
static std::vector<cxxPe_Data> cxxPe_Data::alloc();
private:
std::string name;
};
#endif // PE_DATA_H_INCLUDED

View File

@ -8,6 +8,7 @@
#include "Utils.h" // define first
#include "SSassemblageSS.h"
#include "NameDouble.h"
#include "Dictionary.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
@ -442,7 +443,6 @@ void cxxSSassemblageSS::read_raw(CParser& parser)
}
#ifdef USE_MPI
#include "Dictionary.h"
void cxxSSassemblageSS::mpi_pack(std::vector<int>& ints, std::vector<double>& doubles)
{
extern cxxDictionary dictionary;

View File

@ -7,6 +7,7 @@
#include "Utils.h" // define first
#include "SurfaceCharge.h"
#include "Dictionary.h"
#define EXTERNAL extern
#include "global.h"
#include "output.h"
@ -386,7 +387,6 @@ void cxxSurfaceCharge::read_raw(CParser& parser)
}
}
#ifdef USE_MPI
#include "Dictionary.h"
void cxxSurfaceCharge::mpi_pack(std::vector<int>& ints, std::vector<double>& doubles)
{
extern cxxDictionary dictionary;

View File

@ -7,6 +7,7 @@
#include "Utils.h" // define first
#include "SurfaceComp.h"
#include "Dictionary.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
@ -408,7 +409,6 @@ void cxxSurfaceComp::read_raw(CParser& parser)
}
}
#ifdef USE_MPI
#include "Dictionary.h"
void cxxSurfaceComp::mpi_pack(std::vector<int>& ints, std::vector<double>& doubles)
{
extern cxxDictionary dictionary;