xbt_assert(position >= 0, "Error in seek, cannot seek before file %s", get_path());
current_position_ = position;
if(current_position_>size_){
- XBT_DEBUG("Updating size of file %s from %llu to %llu", path_.c_str(), size_, position);
+ XBT_DEBUG("Updating size of file %s from %llu to %lld", path_.c_str(), size_, position);
local_disk_->extension<FileSystemDiskExt>()->incr_used_size(current_position_-size_);
size_ = current_position_;
status->count = 0;
return MPI_SUCCESS;
}
- XBT_CDEBUG(smpi_io, "min:max : %lld:%lld, tot %lld contig %d", min, max, tot, (datatype->flags() & DT_FLAG_CONTIGUOUS));
+ XBT_CDEBUG(smpi_io, "min:max : %lld:%lld, tot %lld contig %u", min, max, tot, (datatype->flags() & DT_FLAG_CONTIGUOUS));
if ( size==1 || (max - min == tot && (datatype->flags() & DT_FLAG_CONTIGUOUS))) {
// contiguous. Just have each proc perform its read
if (status != MPI_STATUS_IGNORE)
int File::read_shared(MPI_File fh, void* buf, int count, const Datatype* datatype, MPI_Status* status)
{
fh->shared_mutex_->lock();
- XBT_VERB("before read shared, shared pointer is %llu, pointer is %llu",*(fh->shared_file_pointer_) , fh->file_->tell());
fh->seek(*(fh->shared_file_pointer_), MPI_SEEK_SET);
read(fh, buf, count, datatype, status);
*(fh->shared_file_pointer_) = fh->file_->tell();
- XBT_VERB("after read shared, shared pointer is %llu, pointer is %llu",*(fh->shared_file_pointer_) , fh->file_->tell());
fh->shared_mutex_->unlock();
fh->seek(*(fh->shared_file_pointer_), MPI_SEEK_SET);
return MPI_SUCCESS;
> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 0
> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 0
-> (0@bob) before read shared, shared pointer is 0, pointer is 0
> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
> (0@bob) Read in MPI_File /scratch/testfile, 4 bytes read, count 1, readsize 4 bytes, movesize 4
> (0@bob) Position after read in MPI_File /scratch/testfile : 4
-> (0@bob) after read shared, shared pointer is 4, pointer is 4
-> (2@bob) before read shared, shared pointer is 4, pointer is 0
> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 4
> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 4
> (2@bob) Read in MPI_File /scratch/testfile, 4 bytes read, count 1, readsize 4 bytes, movesize 4
> (2@bob) Position after read in MPI_File /scratch/testfile : 8
-> (2@bob) after read shared, shared pointer is 8, pointer is 8
> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8
-> (3@carl) before read shared, shared pointer is 8, pointer is 0
> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 8
> (3@carl) Read in MPI_File /scratch/testfile, 4 bytes read, count 1, readsize 4 bytes, movesize 4
> (3@carl) Position after read in MPI_File /scratch/testfile : 12
-> (3@carl) after read shared, shared pointer is 12, pointer is 12
-> (1@carl) before read shared, shared pointer is 12, pointer is 0
> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 12
> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 12
> (1@carl) Read in MPI_File /scratch/testfile, 4 bytes read, count 1, readsize 4 bytes, movesize 4
> (1@carl) Position after read in MPI_File /scratch/testfile : 16
-> (1@carl) after read shared, shared pointer is 16, pointer is 16
> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 16