← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5251: Attempt to fix error detected by buildbot. Strange since the

 

On Tue, Nov 9, 2010 at 12:26 AM,  <noreply@xxxxxxxxxxxxx> wrote:
> ------------------------------------------------------------
> revno: 5251
> committer: Anders Logg <logg@xxxxxxxxx>
> branch nick: dolfin
> timestamp: Tue 2010-11-09 00:24:06 +0100
> message:
>  Attempt to fix error detected by buildbot. Strange since the
>  missing function is already there.

The buildbot fails when MPI is disabled. It seems like the function

  dolfin::MPI::local_range(unsigned int, unsigned int, unsigned int)

is not implemented in MPI.cpp when MPI is disabled.

Johannes

> modified:
>  dolfin/main/MPI.cpp
>  dolfin/main/MPI.h
>
>
> --
> lp:dolfin
> https://code.launchpad.net/~dolfin-core/dolfin/main
>
> Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
> To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
>
> === modified file 'dolfin/main/MPI.cpp'
> --- dolfin/main/MPI.cpp 2010-11-08 17:45:21 +0000
> +++ dolfin/main/MPI.cpp 2010-11-08 23:24:06 +0000
> @@ -7,7 +7,7 @@
>  // Modified by Niclas Jansson, 2009.
>  //
>  // First added:  2007-11-30
> -// Last changed: 2010-11-08
> +// Last changed: 2010-11-09
>
>  #include <dolfin/log/dolfin_log.h>
>  #include <numeric>
> @@ -464,11 +464,11 @@
>  //-----------------------------------------------------------------------------
>  std::pair<dolfin::uint, dolfin::uint> dolfin::MPI::local_range(uint process,
>                                                                uint N,
> -                                                               uint _num_processes)
> +                                                               uint num_processes)
>  {
>   // Compute number of items per process and remainder
> -  const uint n = N / _num_processes;
> -  const uint r = N % _num_processes;
> +  const uint n = N / num_processes;
> +  const uint r = N % num_processes;
>
>   // Compute local range
>   std::pair<uint, uint> range;
>
> === modified file 'dolfin/main/MPI.h'
> --- dolfin/main/MPI.h   2010-11-08 17:45:21 +0000
> +++ dolfin/main/MPI.h   2010-11-08 23:24:06 +0000
> @@ -7,7 +7,7 @@
>  // Modified by Niclas Jansson, 2009.
>  //
>  // First added:  2007-11-30
> -// Last changed: 2010-11-08
> +// Last changed: 2010-11-09
>
>  #ifndef __MPI_DOLFIN_WRAPPER_H
>  #define __MPI_DOLFIN_WRAPPER_H
> @@ -136,11 +136,13 @@
>
>     /// Return local range for given process, splitting [0, N - 1] into
>     /// num_processes() portions of almost equal size
> -    static std::pair<uint, uint> local_range(uint process, uint N);
> +    static std::pair<uint, uint> local_range(uint process,
> +                                             uint N);
>
>     /// Return local range for given process, splitting [0, N - 1] into
>     /// num_processes portions of almost equal size
> -    static std::pair<uint, uint> local_range(uint process, uint N,
> +    static std::pair<uint, uint> local_range(uint process,
> +                                             uint N,
>                                              uint num_processes);
>
>     /// Return which process owns index (inverse of local_range)
>
>
>



Follow ups