--- branches/development/src/optimization/Problem.cpp 2012/06/05 18:02:44 1741 +++ trunk/src/optimization/Problem.cpp 2014/02/26 14:14:50 1969 @@ -1,10 +1,9 @@ -#include "config.h" -#include "optimization/Problem.hpp" - #ifdef IS_MPI #include #endif +#include "config.h" +#include "optimization/Problem.hpp" namespace QuantLib { RealType Problem::DotProduct(DynamicVector& v1, @@ -13,8 +12,8 @@ namespace QuantLib { #ifdef IS_MPI // in parallel, we need to add up the contributions from all // processors: - MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &dp, 1, MPI::REALTYPE, - MPI::SUM); + MPI_Allreduce(MPI_IN_PLACE, &dp, 1, MPI_REALTYPE, + MPI_SUM, MPI_COMM_WORLD); #endif return dp; } @@ -25,8 +24,8 @@ namespace QuantLib { #ifdef IS_MPI // in parallel, we need to add up the contributions from all // processors: - MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &dot, 1, MPI::REALTYPE, - MPI::SUM); + MPI_Allreduce(MPI_IN_PLACE, &dot, 1, MPI_REALTYPE, + MPI_SUM, MPI_COMM_WORLD); #endif return dot;