# Simultaneous internode I/O and compute using DistributedArrays?

**URL:** https://discourse.julialang.org/t/simultaneous-internode-i-o-and-compute-using-distributedarrays/42910
**Category:** Julia at Scale
**Created:** [July 12, 2020, 12:40am UTC](https://discourse.julialang.org/t/simultaneous-internode-i-o-and-compute-using-distributedarrays/42910 "2020-07-12T00:40:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Matt\_Davis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matt_davis/32/7963_2.png) [@Matt\_Davis](https://discourse.julialang.org/u/Matt_Davis)
#### Post date: [July 12, 2020, 12:40am UTC](https://discourse.julialang.org/t/simultaneous-internode-i-o-and-compute-using-distributedarrays/42910/1 "2020-07-12T00:40:22Z")

</div>

I am attempting to implement multinode tensor contraction, and I am running in to some issues. My current approach is, given two input tensors A and B and an output tensor C (all `DArrays`), to spawn on each worker a loop over all workers querying for their localparts of B, and contracting with the localpart of A, then using `@spawnat` to add the output chunk to the appropriate part of C. This approach works in that it gives the correct result, but benchmarking on a two node setup shows that each process is either able to be doing a contraction or addition, or sending/receiving data, but not both at the same time.

What is the best way to achieve simultaneous I/O operations and compute operations on a mutlinode setup?

Specifically, I would like a worker to be:  
a) running a computation involving shards of a DArray  
b) if queried for its localpart, return that  
c) if asked to add to its localpart of C (result array), to do so

where b) and c) are happening simultaneously with a).
