I did this too, FYI.

template<class T>
tmp::enable_if<is_builtin<T>::value>
send(
    const T *buf, size_t count, int dest, int tag, MPI_Comm comm) {
  int imax = std::numeric_limits<int>::max();
  MPI_Datatype dtype = datatype<T>();
  while (count > 0) {
    int c = imax;
    if ((size_t)c > count) c = count;
    count -= c;
    MPI_Send((void*)buf, c, dtype, dest, tag, comm);
    buf += c;
  }
}

template <class T>
tmp::enable_if<is_builtin<T>::value>
recv(
    T *buf, size_t count, int source, int tag, MPI_Comm comm,
    MPI_Status *status=MPI_STATUS_IGNORE) {
  int imax = std::numeric_limits<int>::max();
  MPI_Datatype dtype = datatype<T>();
  if (count > (size_t)imax && status == MPI_STATUS_IGNORE
      && (source == MPI_ANY_SOURCE || tag == MPI_ANY_TAG)) {
    MPI_Status t[1];
    return recv(buf, count, source, tag, comm, t);
  }
  while (count > 0) {
    int c = imax;
    if ((size_t)c > count) c = count;
    count -= c;
    MPI_Recv((void*)buf, c, dtype, source, tag, comm, status);
    if (count > 0) {
      if (source == MPI_ANY_SOURCE) source = status->MPI_SOURCE;
      if (tag == MPI_ANY_TAG) tag = status->MPI_TAG;
    }
    buf += c;
  }
}


                                                      Changsheng Jiang


On Wed, Jul 17, 2013 at 4:51 PM, mohammad assadsolimani <
m.assadsolim...@jesus.ch> wrote:

>
> Dear all,
>
> I do my PhD in physics and  use a program, which uses openmpi for
> a sophisticated calculation.
> But there is a Problem with "max. message size ". That is limited to  ~2GB.
> Someone  suggested that I have to use chunks i.e. I have to  disassemble
> the massages
> in smaller massages.  That might be nice, but I do not know how?
> I often was searching the last time in internet however I did not get an
> example.
> Is there any other possibility to increase this volume without
> manipulation of
> the code?
>
> The version of my ompi:    mpirun (Open MPI) 1.5.5
>
>
> I am very grateful for all of   your help  and thank you in advanced
> Mohammad
>
> ------------------------------**------------------------------**--
> Webmail: http://mail.livenet.ch
> Glauben entdecken: http://www.jesus.ch
> Christliches Webportal: http://www.livenet.ch
>
>
>
> ______________________________**_________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/**mailman/listinfo.cgi/users<http://www.open-mpi.org/mailman/listinfo.cgi/users>
>

Reply via email to