- /* Find the host where the file is physically located and read it */
- Host* host = local_storage_->get_host();
- XBT_DEBUG("READ %s on disk '%s'", get_path(), local_storage_->get_cname());
- // if the current position is close to the end of the file, we may not be able to read the requested size
- sg_size_t read_size = local_storage_->read(std::min(size, size_ - current_position_));
- current_position_ += read_size;
-
- if (host->get_name() != Host::current()->get_name() && read_size > 0) {
- /* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
- XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", host->get_cname(), read_size);
- std::vector<Host*> m_host_list = {Host::current(), host};
- std::vector<double> flops_amount = {0., 0.};
- std::vector<double> bytes_amount = {0., 0., static_cast<double>(read_size), 0.};
-
- this_actor::parallel_execute(m_host_list, flops_amount, bytes_amount);
+ if (local_disk_) {
+ /* Find the host where the file is physically located and read it */
+ XBT_DEBUG("READ %s on disk '%s'", get_path(), local_disk_->get_cname());
+ // if the current position is close to the end of the file, we may not be able to read the requested size
+ read_size = local_disk_->read(std::min(size, size_ - current_position_));
+ current_position_ += read_size;