From d8506413365bccb3a030a62256d0f4f6b15a61a3 Mon Sep 17 00:00:00 2001 From: David L Parkhurst Date: Wed, 9 Dec 2009 17:35:19 +0000 Subject: [PATCH] mpi.h needs to be defined first because of a conflict with stdio (SEEK_SET ifdef). output.h is needed for NameDouble mpi version. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3886 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- NameDouble.cxx | 5 +++-- NameDouble.h | 2 +- Solution.cxx | 5 +++-- StorageBin.cxx | 8 ++++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/NameDouble.cxx b/NameDouble.cxx index 530174a1..c36fead0 100644 --- a/NameDouble.cxx +++ b/NameDouble.cxx @@ -20,6 +20,7 @@ #include "Dictionary.h" #include "phqalloc.h" #include "phrqproto.h" +#include "output.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction @@ -477,7 +478,7 @@ cxxNameDouble::mpi_pack(std::vector < int >&ints, } } void -cxxNameDouble::mpi_pack(int *ints, int *ii, double *doubles, int *dd) +cxxNameDouble::mpi_pack(PHREEQC_PTR_ARG_COMMA int *ints, int *ii, double *doubles, int *dd) { int i = *ii; int d = *dd; @@ -490,7 +491,7 @@ cxxNameDouble::mpi_pack(int *ints, int *ii, double *doubles, int *dd) if (n < 0) { std::cerr << it->first << std::endl; - error_msg("Name in NameDouble was not defined in dictionary?\n", + P_INSTANCE_POINTER error_msg("Name in NameDouble was not defined in dictionary?\n", STOP); } //ints.push_back(n); diff --git a/NameDouble.h b/NameDouble.h index 470585d4..09e0f541 100644 --- a/NameDouble.h +++ b/NameDouble.h @@ -73,7 +73,7 @@ class cxxNameDouble:public } void - mpi_pack(std::vector < int >&ints, std::vector < double >&doubles); + mpi_pack(PHREEQC_PTR_ARG_COMMA std::vector < int >&ints, std::vector < double >&doubles); void mpi_pack(int *ints, int *ii, double *doubles, int *dd); diff --git a/Solution.cxx b/Solution.cxx index 2bb47169..0eecc1c3 100644 --- a/Solution.cxx +++ b/Solution.cxx @@ -4,13 +4,14 @@ #ifdef _DEBUG #pragma warning(disable : 4786) // disable truncation warning (Only used by debugger) #endif -#include // assert -#include // std::sort + #ifdef USE_MPI //MPICH seems to require mpi.h to be first #include #endif +#include // assert +#include // std::sort #include "Utils.h" // define first #if !defined(PHREEQC_CLASS) #define EXTERNAL extern diff --git a/StorageBin.cxx b/StorageBin.cxx index c2229da8..74164a10 100644 --- a/StorageBin.cxx +++ b/StorageBin.cxx @@ -4,15 +4,15 @@ #ifdef _DEBUG #pragma warning(disable : 4786) // disable truncation warning (Only used by debugger) #endif +#ifdef USE_MPI +//MPICH seems to require mpi.h to be first +#include +#endif #include #include // std::cout std::cerr #include // assert #include // std::sort -#ifdef USE_MPI -//MPICH seems to require mpi.h to be first -#include -#endif #include "Utils.h" // define first #if !defined(PHREEQC_CLASS) #define EXTERNAL extern