SHARE
TWEET

Untitled

a guest Jan 29th, 2020 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. else:
  2.     while True:
  3.         start = comm.recv(source=0, tag=1)
  4.         if start == -1: break
  5.  
  6.         i = 0
  7.         slice_value = 0
  8.         while i < slice_size:
  9.             if i%2 == 0:
  10.                 slice_value += 1.0 / (2*(start*slice_size+i)+1)
  11.             else:
  12.                 slice_value -= 1.0 / (2*(start*slice_size+i)+1)
  13.             i += 1
  14.  
  15.         comm.send(slice_value, dest=0, tag=1)
  16.         comm.send(rank, dest=0, tag=2)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top