}\r
XBT_DEBUG("will have to access %lld from my chunk", totreads);\r
\r
- char* sendbuf= static_cast<char *>(smpi_get_tmp_sendbuffer(totreads));\r
+ char* sendbuf= static_cast<char *>(smpi_get_tmp_sendbuffer(total_sent));\r
\r
if(totreads>0){\r
seek(min_offset, MPI_SEEK_SET);\r
MPI_File_open( comm, (char*)"/scratch/lib/libsimgrid.so.3.6.2", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh );\r
MPI_Comm_size( comm, &size );\r
MPI_Comm_rank( comm, &rank );\r
- buf = (int *)malloc( 10+ size * sizeof(int) );\r
+ buf = (int *)malloc( 10 * sizeof(int) );\r
buf[0] = rank;\r
\r
/* Write to file */\r
MPI_File_open( comm, (char*)"/scratch/lib/libsimgrid.so.3.6.2", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh );\r
MPI_Comm_size( comm, &size );\r
MPI_Comm_rank( comm, &rank );\r
- buf = (int *)malloc( 10+size * sizeof(int) );\r
+ buf = (int *)malloc( 10* sizeof(int) );\r
buf[0] = rank;\r
\r
/* Write to file */\r