c++ - MPI_ERR_BUFFER: invalid buffer pointer -


what common reason error

 mpi_err_buffer: invalid buffer pointer 

which results mpi_bsend() , mpi_rcev() calls? program works fine when number of parallel processes small (<14), when increase number of processes error.

to expand on previous comment:

buffering in mpi can occur on various occasions. messages can buffered internally mpi library in order hide network latency (usually done small messages implementation-dependent size) or buffering can enforced user using of buffered send operations mpi_bsend() , mpi_ibsend(). user buffering differs internal 1 though:

  • first, messages sent mpi_bsend() or mpi_ibsend() buffered, not case internally buffered messages. latter can either buffered or not depending on size , availability of internal buffer space;
  • second, because of "always buffer" aspect, if no buffer space available in user attached buffer, mpi_err_buffer error occurs.

sent messages use buffer space until received sure destionation process. since mpi not provide built-in mechanisms confirm reception of message, 1 has devise way it, e.g. sending confirmation messages destination process source one.

for reason 1 has consider messages not explicitly confirmed being in transit , has allocate enough memory in buffer. means buffer should @ least large total amount of data willing transfer plus message envelope overhead equal number_of_sends * mpi_bsend_overhead. can put lot of memory pressure large mpi jobs. 1 has keep in mind , adjust buffer space accordingly when number of processes changed.

note buffered send provided merely convenience. readily implemented combination of memory duplication , non-blocking send operation, e.g. buffered send frees writing code like:

int data[]; int *shadow_data; mpi_request req;  ... <populate data> ... shadow_data = (int *)malloc(sizeof(data)); memcpy(shadow_data, data, sizeof(data)); mpi_isend(shadow_data, count, mpi_int, destination, tag, mpi_comm_world, &req); ... <reuse data not used mpi> ... mpi_wait(&req); free(shadow_data); 

if memory scarce should resort non-blocking sends only.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -